????

Your IP : 3.129.218.83


Current Path : C:/Program Files/Azure Data Studio/resources/app/out/vs/code/electron-main/
Upload File :
Current File : C:/Program Files/Azure Data Studio/resources/app/out/vs/code/electron-main/main.js

/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/(function(){var Z=["require","exports","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/platform","vs/platform/log/common/log","vs/platform/instantiation/common/instantiation","vs/base/common/uri","vs/base/common/async","vs/nls!vs/code/electron-main/main","vs/base/common/path","vs/nls","vs/base/common/types","vs/base/common/errors","electron","vs/base/common/network","vs/platform/files/common/files","vs/base/common/buffer","vs/platform/configuration/common/configuration","vs/base/common/resources","vs/platform/lifecycle/electron-main/lifecycleMainService","vs/base/node/pfs","vs/platform/product/common/productService","vs/base/common/cancellation","vs/base/common/arrays","vs/platform/telemetry/common/telemetry","vs/base/common/strings","os","vs/platform/environment/electron-main/environmentMainService","vs/platform/windows/electron-main/windows","vs/platform/workspace/common/workspace","vs/base/common/uuid","vs/base/common/extpath","vs/platform/environment/common/environment","vs/platform/state/node/state","vs/base/common/map","vs/base/common/process","vs/base/common/objects","vs/base/parts/ipc/electron-main/ipcMain","vs/platform/policy/common/policy","vs/platform/uriIdentity/common/uriIdentity","vs/platform/userDataProfile/common/userDataProfile","vs/base/parts/ipc/common/ipc","vs/platform/registry/common/platform","vs/base/common/json","fs","vs/base/common/labels","child_process","vs/platform/update/common/update","vs/base/common/functional","vs/base/common/errorMessage","vs/platform/request/common/request","vs/platform/telemetry/common/telemetryUtils","vs/platform/userDataProfile/electron-main/userDataProfile","vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/base/common/decorators","vs/base/common/stream","vs/base/common/hash","vs/base/common/ternarySearchTree","vs/platform/configuration/common/configurationRegistry","vs/platform/remote/common/remoteHosts","vs/platform/dialogs/electron-main/dialogMainService","vs/platform/utilityProcess/electron-main/utilityProcess","vs/platform/environment/node/argvHelper","vs/platform/backup/electron-main/backup","vs/base/common/performance","vs/platform/log/electron-main/loggerService","vs/platform/product/common/product","vs/platform/native/electron-main/nativeHostMainService","vs/base/common/iterator","vs/base/common/stopwatch","vs/base/common/severity","vs/base/common/codicons","crypto","vs/base/common/processes","vs/base/common/marshalling","vs/platform/instantiation/common/descriptors","vs/platform/credentials/common/credentials","vs/platform/files/common/watcher","vs/platform/protocol/electron-main/protocol","vs/platform/theme/electron-main/themeMainService","vs/platform/window/common/window","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/storage/electron-main/storageMainService","vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/base/common/lazy","vs/base/common/normalization","vs/base/node/id","net","sql/base/common/locConstants","vs/base/node/processes","vs/platform/environment/node/environmentService","vs/platform/diagnostics/common/diagnostics","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/serviceCollection","vs/platform/files/node/diskFileSystemProvider","vs/platform/shell/node/shellEnv","vs/platform/sign/common/sign","vs/platform/update/electron-main/updateMetadataProvider","vs/platform/storage/common/storage","vs/platform/workspaces/common/workspaces","vs/platform/workspaces/node/workspaces","vs/base/parts/ipc/node/ipc.net","vs/platform/update/electron-main/abstractUpdateService","vs/base/common/linkedList","vs/base/common/themables","vs/base/node/ports","vs/base/common/glob","vs/base/node/extpath","vs/base/node/powershell","vs/base/node/ps","vs/base/node/shell","vs/base/parts/ipc/common/ipc.net","vs/base/parts/ipc/electron-main/ipc.mp","vs/base/parts/storage/common/storage","vs/platform/environment/node/argv","path","vs/platform/contextkey/common/contextkey","vs/platform/encryption/common/encryptionService","vs/platform/extensionManagement/common/extensionManagement","vs/platform/externalTerminal/common/externalTerminal","vs/platform/files/common/io","vs/platform/configuration/common/configurationModels","vs/platform/extensions/common/extensions","vs/platform/state/node/stateService","vs/platform/telemetry/common/commonProperties","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/terminal/common/environmentVariable","vs/platform/terminal/common/terminal","vs/platform/tunnel/common/tunnel","vs/platform/url/common/url","vs/platform/window/electron-main/window","vs/platform/extensionManagement/common/extensionsScannerService","vs/platform/windows/electron-main/windowsFinder","vs/base/node/unc","vs/platform/diagnostics/electron-main/diagnosticsMainService","vs/base/common/color","vs/base/common/assert","vs/base/common/jsonFormatter","vs/base/common/jsonEdit","vs/base/common/numbers","vs/base/common/skipList","vs/base/common/cache","vs/base/common/symbols","vs/base/node/crypto","vs/base/node/macAddress","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/contextmenu/electron-main/contextmenu","vs/nls!sql/base/common/locConstants","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/base/common/jsonErrorMessages","vs/nls!vs/base/common/platform","vs/base/common/console","vs/base/common/uriIpc","util","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/ipc/electron-main/ipc.electron","vs/base/parts/ipc/node/ipc.cp","vs/base/parts/storage/node/storage","vs/nls!vs/code/electron-main/app","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/dialogs/electron-main/dialogMainService","vs/nls!vs/platform/environment/node/argv","vs/nls!vs/platform/environment/node/argvHelper","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/externalTerminal/node/externalTerminalService","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/files/common/io","vs/nls!vs/platform/files/electron-main/diskFileSystemProviderServer","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/nls!vs/platform/issue/electron-main/issueMainService","vs/nls!vs/platform/menubar/electron-main/menubar","vs/nls!vs/platform/native/electron-main/nativeHostMainService","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/shell/node/shellEnv","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/terminal/common/terminalPlatformConfiguration","vs/nls!vs/platform/terminal/common/terminalProfiles","vs/nls!vs/platform/update/common/update.config.contribution","vs/nls!vs/platform/userDataProfile/common/userDataProfile","vs/nls!vs/platform/windows/electron-main/windowImpl","vs/nls!vs/platform/windows/electron-main/windowsMainService","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/nls!vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/platform/backup/common/backup","vs/platform/backup/node/backup","vs/platform/contextkey/common/scanner","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/environment/common/environmentService","vs/platform/debug/electron-main/extensionHostDebugIpc","vs/platform/environment/node/userDataPath","vs/platform/environment/node/wait","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/base/common/semver/semver","vs/platform/externalServices/common/serviceMachineId","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/graph","vs/platform/extensionManagement/common/extensionUrlTrust","vs/platform/extensions/common/extensionHostStarter","vs/platform/externalTerminal/node/externalTerminalService","vs/platform/files/common/diskFileSystemProviderClient","vs/platform/files/node/watcher/nodejs/nodejsWatcherLib","vs/platform/files/node/watcher/nodejs/nodejsWatcher","vs/platform/files/node/watcher/nodejs/nodejsClient","vs/platform/files/node/watcher/watcherClient","vs/platform/instantiation/common/instantiationService","vs/platform/issue/common/issue","vs/platform/credentials/common/credentialsMainService","vs/platform/encryption/electron-main/encryptionMainService","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/files/node/diskFileSystemProviderServer","vs/platform/files/electron-main/diskFileSystemProviderServer","vs/platform/log/common/bufferLog","vs/platform/log/common/logIpc","vs/platform/log/common/logService","vs/platform/log/electron-main/logIpc","vs/platform/log/node/spdlogLog","vs/platform/log/node/loggerService","vs/platform/menubar/common/menubar","vs/platform/policy/common/filePolicyService","vs/platform/policy/common/policyIpc","vs/platform/policy/node/nativePolicyService","vs/platform/extensionManagement/node/extensionUrlTrustService","vs/platform/profiling/electron-main/windowProfiling","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurations","vs/platform/configuration/common/configurationService","vs/platform/remote/common/electronRemoteResources","vs/platform/remote/common/remoteAuthorityResolver","vs/platform/remote/common/remoteAgentConnection","vs/platform/remote/common/remoteSocketFactoryService","vs/platform/remote/node/wsl","vs/platform/request/common/requestIpc","vs/platform/request/node/proxy","url","vs/platform/sharedProcess/common/sharedProcess","vs/platform/sign/common/abstractSignService","vs/platform/sign/node/signService","vs/platform/diagnostics/node/diagnosticsService","vs/platform/telemetry/common/telemetryIpc","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/node/telemetryUtils","vs/platform/telemetry/electron-main/telemetryUtils","vs/platform/terminal/common/environmentVariableCollection","vs/platform/terminal/common/environmentVariableShared","vs/platform/terminal/common/requestStore","vs/platform/terminal/common/terminalProfiles","vs/platform/terminal/common/terminalPlatformConfiguration","vs/platform/terminal/node/terminalEnvironment","vs/platform/terminal/node/terminalProfiles","vs/platform/terminal/node/ptyHostService","vs/platform/update/common/update.config.contribution","vs/platform/update/common/updateIpc","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/url/electron-main/electronUrlListener","vs/platform/userData/common/fileUserDataProvider","vs/platform/utilityProcess/common/utilityProcessWorkerService","vs/platform/webview/common/webviewManagerService","vs/platform/webview/electron-main/webviewProtocolProvider","vs/platform/credentials/electron-main/credentialsMainService","vs/platform/launch/electron-main/launchMainService","vs/platform/webview/electron-main/webviewMainService","vs/platform/windows/node/windowTracker","vs/platform/storage/electron-main/storageIpc","vs/platform/extensionManagement/node/extensionsProfileScannerService","vs/platform/extensionManagement/node/extensionsScannerService","vs/platform/protocol/electron-main/protocolMainService","vs/platform/storage/electron-main/storageMain","vs/platform/userDataProfile/electron-main/userDataProfileStorageIpc","vs/platform/userDataProfile/node/userDataProfile","zlib","vs/platform/backup/electron-main/backupMainService","vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService","vs/platform/request/node/requestService","vs/platform/request/electron-main/requestMainService","vs/code/electron-main/auth","vs/platform/tunnel/node/tunnelService","vs/platform/update/electron-main/updateService.darwin","vs/platform/update/electron-main/updateService.snap","vs/platform/userDataProfile/electron-main/userDataProfilesHandler","vs/platform/extensions/electron-main/extensionHostStarter","vs/platform/sharedProcess/electron-main/sharedProcess","vs/platform/terminal/electron-main/electronPtyHostStarter","vs/platform/utilityProcess/electron-main/utilityProcessWorkerMainService","vs/platform/windows/electron-main/windowsStateHandler","vs/platform/issue/electron-main/issueMainService","vs/platform/update/electron-main/updateService.linux","vs/platform/update/electron-main/updateService.win32","vs/platform/windows/electron-main/windowImpl","vs/platform/menubar/electron-main/menubar","vs/platform/menubar/electron-main/menubarMainService","vs/platform/windows/electron-main/windowsMainService","vs/platform/workspaces/electron-main/workspacesMainService","vs/code/electron-main/app","minimist","assert","graceful-fs","@vscode/policy-watcher","string_decoder","vs/code/electron-main/main"],te=function(H){for(var e=[],b=0,L=H.length;b<L;b++)e[b]=Z[H[b]];return e};define(Z[136],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function b(P,h){const u=Math.pow(10,h);return Math.round(P*u)/u}class L{constructor(h,u,m,g=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,h))|0,this.g=Math.min(255,Math.max(0,u))|0,this.b=Math.min(255,Math.max(0,m))|0,this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,u){return h.r===u.r&&h.g===u.g&&h.b===u.b&&h.a===u.a}}e.RGBA=L;class r{constructor(h,u,m,g){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=b(Math.max(Math.min(1,u),0),3),this.l=b(Math.max(Math.min(1,m),0),3),this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,u){return h.h===u.h&&h.s===u.s&&h.l===u.l&&h.a===u.a}static fromRGBA(h){const u=h.r/255,m=h.g/255,g=h.b/255,v=h.a,d=Math.max(u,m,g),y=Math.min(u,m,g);let E=0,l=0;const p=(y+d)/2,c=d-y;if(c>0){switch(l=Math.min(p<=.5?c/(2*p):c/(2-2*p),1),d){case u:E=(m-g)/c+(m<g?6:0);break;case m:E=(g-u)/c+2;break;case g:E=(u-m)/c+4;break}E*=60,E=Math.round(E)}return new r(E,l,p,v)}static _hue2rgb(h,u,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?h+(u-h)*6*m:m<1/2?u:m<2/3?h+(u-h)*(2/3-m)*6:h}static toRGBA(h){const u=h.h/360,{s:m,l:g,a:v}=h;let d,y,E;if(m===0)d=y=E=g;else{const l=g<.5?g*(1+m):g+m-g*m,p=2*g-l;d=r._hue2rgb(p,l,u+1/3),y=r._hue2rgb(p,l,u),E=r._hue2rgb(p,l,u-1/3)}return new L(Math.round(d*255),Math.round(y*255),Math.round(E*255),v)}}e.HSLA=r;class O{constructor(h,u,m,g){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=b(Math.max(Math.min(1,u),0),3),this.v=b(Math.max(Math.min(1,m),0),3),this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,u){return h.h===u.h&&h.s===u.s&&h.v===u.v&&h.a===u.a}static fromRGBA(h){const u=h.r/255,m=h.g/255,g=h.b/255,v=Math.max(u,m,g),d=Math.min(u,m,g),y=v-d,E=v===0?0:y/v;let l;return y===0?l=0:v===u?l=((m-g)/y%6+6)%6:v===m?l=(g-u)/y+2:l=(u-m)/y+4,new O(Math.round(l*60),E,v,h.a)}static toRGBA(h){const{h:u,s:m,v:g,a:v}=h,d=g*m,y=d*(1-Math.abs(u/60%2-1)),E=g-d;let[l,p,c]=[0,0,0];return u<60?(l=d,p=y):u<120?(l=y,p=d):u<180?(p=d,c=y):u<240?(p=y,c=d):u<300?(l=y,c=d):u<=360&&(l=d,c=y),l=Math.round((l+E)*255),p=Math.round((p+E)*255),c=Math.round((c+E)*255),new L(l,p,c,v)}}e.HSVA=O;class D{static fromHex(h){return D.Format.CSS.parseHex(h)||D.red}static equals(h,u){return!h&&!u?!0:!h||!u?!1:h.equals(u)}get hsla(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:O.fromRGBA(this.rgba)}constructor(h){if(h)if(h instanceof L)this.rgba=h;else if(h instanceof r)this._hsla=h,this.rgba=r.toRGBA(h);else if(h instanceof O)this._hsva=h,this.rgba=O.toRGBA(h);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(h){return!!h&&L.equals(this.rgba,h.rgba)&&r.equals(this.hsla,h.hsla)&&O.equals(this.hsva,h.hsva)}getRelativeLuminance(){const h=D._relativeLuminanceForComponent(this.rgba.r),u=D._relativeLuminanceForComponent(this.rgba.g),m=D._relativeLuminanceForComponent(this.rgba.b),g=.2126*h+.7152*u+.0722*m;return b(g,4)}static _relativeLuminanceForComponent(h){const u=h/255;return u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4)}getContrastRatio(h){const u=this.getRelativeLuminance(),m=h.getRelativeLuminance();return u>m?(u+.05)/(m+.05):(m+.05)/(u+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(h){const u=this.getRelativeLuminance(),m=h.getRelativeLuminance();return u>m}isDarkerThan(h){const u=this.getRelativeLuminance(),m=h.getRelativeLuminance();return u<m}lighten(h){return new D(new r(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*h,this.hsla.a))}darken(h){return new D(new r(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*h,this.hsla.a))}transparent(h){const{r:u,g:m,b:g,a:v}=this.rgba;return new D(new L(u,m,g,v*h))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new D(new L(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(h){const u=h.rgba,m=this.rgba.a,g=u.a,v=m+g*(1-m);if(v<1e-6)return D.transparent;const d=this.rgba.r*m/v+u.r*g*(1-m)/v,y=this.rgba.g*m/v+u.g*g*(1-m)/v,E=this.rgba.b*m/v+u.b*g*(1-m)/v;return new D(new L(d,y,E,v))}makeOpaque(h){if(this.isOpaque()||h.rgba.a!==1)return this;const{r:u,g:m,b:g,a:v}=this.rgba;return new D(new L(h.rgba.r-v*(h.rgba.r-u),h.rgba.g-v*(h.rgba.g-m),h.rgba.b-v*(h.rgba.b-g),1))}flatten(...h){const u=h.reduceRight((m,g)=>D._flatten(g,m));return D._flatten(this,u)}static _flatten(h,u){const m=1-h.rgba.a;return new D(new L(m*u.rgba.r+h.rgba.a*h.rgba.r,m*u.rgba.g+h.rgba.a*h.rgba.g,m*u.rgba.b+h.rgba.a*h.rgba.b))}toString(){return this._toString||(this._toString=D.Format.CSS.format(this)),this._toString}static getLighterColor(h,u,m){if(h.isLighterThan(u))return h;m=m||.5;const g=h.getRelativeLuminance(),v=u.getRelativeLuminance();return m=m*(v-g)/v,h.lighten(m)}static getDarkerColor(h,u,m){if(h.isDarkerThan(u))return h;m=m||.5;const g=h.getRelativeLuminance(),v=u.getRelativeLuminance();return m=m*(g-v)/g,h.darken(m)}static{this.white=new D(new L(255,255,255,1))}static{this.black=new D(new L(0,0,0,1))}static{this.red=new D(new L(255,0,0,1))}static{this.blue=new D(new L(0,0,255,1))}static{this.green=new D(new L(0,255,0,1))}static{this.cyan=new D(new L(0,255,255,1))}static{this.lightgrey=new D(new L(211,211,211,1))}static{this.transparent=new D(new L(0,0,0,0))}}e.Color=D,function(P){let h;(function(u){let m;(function(g){function v(t){return t.rgba.a===1?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:P.Format.CSS.formatRGBA(t)}g.formatRGB=v;function d(t){return`rgba(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b}, ${+t.rgba.a.toFixed(2)})`}g.formatRGBA=d;function y(t){return t.hsla.a===1?`hsl(${t.hsla.h}, ${(t.hsla.s*100).toFixed(2)}%, ${(t.hsla.l*100).toFixed(2)}%)`:P.Format.CSS.formatHSLA(t)}g.formatHSL=y;function E(t){return`hsla(${t.hsla.h}, ${(t.hsla.s*100).toFixed(2)}%, ${(t.hsla.l*100).toFixed(2)}%, ${t.hsla.a.toFixed(2)})`}g.formatHSLA=E;function l(t){const a=t.toString(16);return a.length!==2?"0"+a:a}function p(t){return`#${l(t.rgba.r)}${l(t.rgba.g)}${l(t.rgba.b)}`}g.formatHex=p;function c(t,a=!1){return a&&t.rgba.a===1?P.Format.CSS.formatHex(t):`#${l(t.rgba.r)}${l(t.rgba.g)}${l(t.rgba.b)}${l(Math.round(t.rgba.a*255))}`}g.formatHexA=c;function f(t){return t.isOpaque()?P.Format.CSS.formatHex(t):P.Format.CSS.formatRGBA(t)}g.format=f;function I(t){const a=t.length;if(a===0||t.charCodeAt(0)!==35)return null;if(a===7){const s=16*w(t.charCodeAt(1))+w(t.charCodeAt(2)),i=16*w(t.charCodeAt(3))+w(t.charCodeAt(4)),n=16*w(t.charCodeAt(5))+w(t.charCodeAt(6));return new P(new L(s,i,n,1))}if(a===9){const s=16*w(t.charCodeAt(1))+w(t.charCodeAt(2)),i=16*w(t.charCodeAt(3))+w(t.charCodeAt(4)),n=16*w(t.charCodeAt(5))+w(t.charCodeAt(6)),o=16*w(t.charCodeAt(7))+w(t.charCodeAt(8));return new P(new L(s,i,n,o/255))}if(a===4){const s=w(t.charCodeAt(1)),i=w(t.charCodeAt(2)),n=w(t.charCodeAt(3));return new P(new L(16*s+s,16*i+i,16*n+n))}if(a===5){const s=w(t.charCodeAt(1)),i=w(t.charCodeAt(2)),n=w(t.charCodeAt(3)),o=w(t.charCodeAt(4));return new P(new L(16*s+s,16*i+i,16*n+n,(16*o+o)/255))}return null}g.parseHex=I;function w(t){switch(t){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(m=u.CSS||(u.CSS={}))})(h=P.Format||(P.Format={}))}(D||(e.Color=D={}))}),define(Z[55],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=void 0;function b(D){return(P,h,u)=>{let m=null,g=null;if(typeof u.value=="function"?(m="value",g=u.value):typeof u.get=="function"&&(m="get",g=u.get),!g)throw new Error("not supported");u[m]=D(g,h)}}function L(D,P,h){let u=null,m=null;if(typeof h.value=="function"?(u="value",m=h.value,m.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof h.get=="function"&&(u="get",m=h.get),!m)throw new Error("not supported");const g=`$memoize$${P}`;h[u]=function(...v){return this.hasOwnProperty(g)||Object.defineProperty(this,g,{configurable:!1,enumerable:!1,writable:!1,value:m.apply(this,v)}),this[g]}}e.memoize=L;function r(D,P,h){return b((u,m)=>{const g=`$debounce$${m}`,v=`$debounce$result$${m}`;return function(...d){this[v]||(this[v]=h?h():void 0),clearTimeout(this[g]),P&&(this[v]=P(this[v],...d),d=[this[v]]),this[g]=setTimeout(()=>{u.apply(this,d),this[v]=h?h():void 0},D)}})}e.debounce=r;function O(D,P,h){return b((u,m)=>{const g=`$throttle$timer$${m}`,v=`$throttle$result$${m}`,d=`$throttle$lastRun$${m}`,y=`$throttle$pending$${m}`;return function(...E){if(this[v]||(this[v]=h?h():void 0),(this[d]===null||this[d]===void 0)&&(this[d]=-Number.MAX_VALUE),P&&(this[v]=P(this[v],...E)),this[y])return;const l=this[d]+D;l<=Date.now()?(this[d]=Date.now(),u.apply(this,[this[v]]),this[v]=h?h():void 0):(this[y]=!0,this[g]=setTimeout(()=>{this[y]=!1,this[d]=Date.now(),u.apply(this,[this[v]]),this[v]=h?h():void 0},l-Date.now()))}})}e.throttle=O}),define(Z[13],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.isSigPipeError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class b{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?I.isErrorNoTelemetry(a)?new I(a.message+`

`+a.stack):new Error(a.message+`

`+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(s=>{s(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}}e.ErrorHandler=b,e.errorHandler=new b;function L(t){e.errorHandler.setUnexpectedErrorHandler(t)}e.setUnexpectedErrorHandler=L;function r(t){if(!t||typeof t!="object")return!1;const a=t;return a.code==="EPIPE"&&a.syscall?.toUpperCase()==="WRITE"}e.isSigPipeError=r;function O(t){u(t)||e.errorHandler.onUnexpectedError(t)}e.onUnexpectedError=O;function D(t){u(t)||e.errorHandler.onUnexpectedExternalError(t)}e.onUnexpectedExternalError=D;function P(t){if(t instanceof Error){const{name:a,message:s}=t;let i=t.errorCode;const n=t.stacktrace||t.stack;return{$isError:!0,name:a,message:s,stack:n,errorCode:i,data:t.data}}return t}e.transformErrorForSerialization=P;const h="Canceled";function u(t){return t instanceof m?!0:t instanceof Error&&t.name===h&&t.message===h}e.isCancellationError=u;class m extends Error{constructor(){super(h),this.name=this.message}}e.CancellationError=m;function g(){const t=new Error(h);return t.name=t.message,t}e.canceled=g;function v(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}e.illegalArgument=v;function d(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}e.illegalState=d;function y(t){return t?new Error(`readonly property '${t} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=y;function E(t){const a=new Error(`${t} has been disposed`);return a.name="DISPOSED",a}e.disposed=E;function l(t){return t?t.message?t.message:t.stack?t.stack.split(`
`)[0]:String(t):"Error"}e.getErrorMessage=l;class p extends Error{constructor(a){super("NotImplemented"),a&&(this.message=a)}}e.NotImplementedError=p;class c extends Error{constructor(a){super("NotSupported"),a&&(this.message=a)}}e.NotSupportedError=c;class f extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=f;class I extends Error{constructor(a){super(a),this.name="CodeExpectedError"}static fromError(a){if(a instanceof I)return a;const s=new I;return s.message=a.message,s.stack=a.stack,s}static isErrorNoTelemetry(a){return a.name==="CodeExpectedError"}}e.ErrorNoTelemetry=I;class w extends Error{constructor(a){super(a||"An unexpected bug occurred."),Object.setPrototypeOf(this,w.prototype)}}e.BugIndicatingError=w}),define(Z[24],te([0,1,13]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMaxIdxBy=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.reverseOrder=e.booleanComparator=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.findLastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function L(V,ie=0){return V[V.length-(1+ie)]}e.tail=L;function r(V){if(V.length===0)throw new Error("Invalid tail call");return[V.slice(0,V.length-1),V[V.length-1]]}e.tail2=r;function O(V,ie,Q=(fe,pe)=>fe===pe){if(V===ie)return!0;if(!V||!ie||V.length!==ie.length)return!1;for(let fe=0,pe=V.length;fe<pe;fe++)if(!Q(V[fe],ie[fe]))return!1;return!0}e.equals=O;function D(V,ie){const Q=V.length-1;ie<Q&&(V[ie]=V[Q]),V.pop()}e.removeFastWithoutKeepingOrder=D;function P(V,ie,Q){return h(V.length,fe=>Q(V[fe],ie))}e.binarySearch=P;function h(V,ie){let Q=0,fe=V-1;for(;Q<=fe;){const pe=(Q+fe)/2|0,Pe=ie(pe);if(Pe<0)Q=pe+1;else if(Pe>0)fe=pe-1;else return pe}return-(Q+1)}e.binarySearch2=h;function u(V,ie){let Q=0,fe=V.length;if(fe===0)return 0;for(;Q<fe;){const pe=Math.floor((Q+fe)/2);ie(V[pe])?fe=pe:Q=pe+1}return Q}e.findFirstInSorted=u;function m(V,ie,Q){if(V=V|0,V>=ie.length)throw new TypeError("invalid index");const fe=ie[Math.floor(ie.length*Math.random())],pe=[],Pe=[],De=[];for(const We of ie){const ye=Q(We,fe);ye<0?pe.push(We):ye>0?Pe.push(We):De.push(We)}return V<pe.length?m(V,pe,Q):V<pe.length+De.length?De[0]:m(V-(pe.length+De.length),Pe,Q)}e.quickSelect=m;function g(V,ie){const Q=[];let fe;for(const pe of V.slice(0).sort(ie))!fe||ie(fe[0],pe)!==0?(fe=[pe],Q.push(fe)):fe.push(pe);return Q}e.groupBy=g;function v(V,ie,Q){const fe=[];function pe(We,ye,we){if(ye===0&&we.length===0)return;const K=fe[fe.length-1];K&&K.start+K.deleteCount===We?(K.deleteCount+=ye,K.toInsert.push(...we)):fe.push({start:We,deleteCount:ye,toInsert:we})}let Pe=0,De=0;for(;;){if(Pe===V.length){pe(Pe,0,ie.slice(De));break}if(De===ie.length){pe(Pe,V.length-Pe,[]);break}const We=V[Pe],ye=ie[De],we=Q(We,ye);we===0?(Pe+=1,De+=1):we<0?(pe(Pe,1,[]),Pe+=1):we>0&&(pe(Pe,0,[ye]),De+=1)}return fe}e.sortedDiff=v;function d(V,ie,Q){const fe=v(V,ie,Q),pe=[],Pe=[];for(const De of fe)pe.push(...V.slice(De.start,De.start+De.deleteCount)),Pe.push(...De.toInsert);return{removed:pe,added:Pe}}e.delta=d;function y(V,ie,Q){if(Q===0)return[];const fe=V.slice(0,Q).sort(ie);return l(V,ie,fe,Q,V.length),fe}e.top=y;function E(V,ie,Q,fe,pe){return Q===0?Promise.resolve([]):new Promise((Pe,De)=>{(async()=>{const We=V.length,ye=V.slice(0,Q).sort(ie);for(let we=Q,K=Math.min(Q+fe,We);we<We;we=K,K=Math.min(K+fe,We)){if(we>Q&&await new Promise(he=>setTimeout(he)),pe&&pe.isCancellationRequested)throw new b.CancellationError;l(V,ie,ye,we,K)}return ye})().then(Pe,De)})}e.topAsync=E;function l(V,ie,Q,fe,pe){for(const Pe=Q.length;fe<pe;fe++){const De=V[fe];if(ie(De,Q[Pe-1])<0){Q.pop();const We=u(Q,ye=>ie(De,ye)<0);Q.splice(We,0,De)}}}function p(V){return V.filter(ie=>!!ie)}e.coalesce=p;function c(V){let ie=0;for(let Q=0;Q<V.length;Q++)V[Q]&&(V[ie]=V[Q],ie+=1);V.length=ie}e.coalesceInPlace=c;function f(V,ie,Q){V.splice(Q,0,V.splice(ie,1)[0])}e.move=f;function I(V){return!Array.isArray(V)||V.length===0}e.isFalsyOrEmpty=I;function w(V){return Array.isArray(V)&&V.length>0}e.isNonEmptyArray=w;function t(V,ie=Q=>Q){const Q=new Set;return V.filter(fe=>{const pe=ie(fe);return Q.has(pe)?!1:(Q.add(pe),!0)})}e.distinct=t;function a(V){const ie=new Set;return Q=>{const fe=V(Q);return ie.has(fe)?!1:(ie.add(fe),!0)}}e.uniqueFilter=a;function s(V,ie){const Q=i(V,ie);if(Q!==-1)return V[Q]}e.findLast=s;function i(V,ie){for(let Q=V.length-1;Q>=0;Q--){const fe=V[Q];if(ie(fe))return Q}return-1}e.findLastIndex=i;function n(V,ie){return V.length>0?V[0]:ie}e.firstOrDefault=n;function o(V,ie){return V.length>0?V[V.length-1]:ie}e.lastOrDefault=o;function S(V,ie,Q=(fe,pe)=>fe===pe){let fe=0;for(let pe=0,Pe=Math.min(V.length,ie.length);pe<Pe&&Q(V[pe],ie[pe]);pe++)fe++;return fe}e.commonPrefixLength=S;function k(V){return[].concat(...V)}e.flatten=k;function M(V,ie){let Q=typeof ie=="number"?V:0;typeof ie=="number"?Q=V:(Q=0,ie=V);const fe=[];if(Q<=ie)for(let pe=Q;pe<ie;pe++)fe.push(pe);else for(let pe=Q;pe>ie;pe--)fe.push(pe);return fe}e.range=M;function C(V,ie,Q){return V.reduce((fe,pe)=>(fe[ie(pe)]=Q?Q(pe):pe,fe),Object.create(null))}e.index=C;function A(V,ie){return V.push(ie),()=>T(V,ie)}e.insert=A;function T(V,ie){const Q=V.indexOf(ie);if(Q>-1)return V.splice(Q,1),ie}e.remove=T;function F(V,ie,Q){const fe=V.slice(0,ie),pe=V.slice(ie);return fe.concat(Q,pe)}e.arrayInsert=F;function z(V,ie){let Q;if(typeof ie=="number"){let fe=ie;Q=()=>{const pe=Math.sin(fe++)*179426549;return pe-Math.floor(pe)}}else Q=Math.random;for(let fe=V.length-1;fe>0;fe-=1){const pe=Math.floor(Q()*(fe+1)),Pe=V[fe];V[fe]=V[pe],V[pe]=Pe}}e.shuffle=z;function oe(V,ie){const Q=V.indexOf(ie);Q>-1&&(V.splice(Q,1),V.unshift(ie))}e.pushToStart=oe;function ee(V,ie){const Q=V.indexOf(ie);Q>-1&&(V.splice(Q,1),V.push(ie))}e.pushToEnd=ee;function ue(V,ie){for(const Q of ie)V.push(Q)}e.pushMany=ue;function ae(V,ie){return Array.isArray(V)?V.map(ie):ie(V)}e.mapArrayOrNot=ae;function de(V){return Array.isArray(V)?V:[V]}e.asArray=de;function j(V){return V[Math.floor(Math.random()*V.length)]}e.getRandomElement=j;function G(V,ie){for(const Q of V){const fe=ie(Q);if(fe!==void 0)return fe}}e.mapFind=G;function B(V,ie,Q){const fe=U(V,ie),pe=V.length,Pe=Q.length;V.length=pe+Pe;for(let De=pe-1;De>=fe;De--)V[De+Pe]=V[De];for(let De=0;De<Pe;De++)V[De+fe]=Q[De]}e.insertInto=B;function W(V,ie,Q,fe){const pe=U(V,ie),Pe=V.splice(pe,Q);return B(V,pe,fe),Pe}e.splice=W;function U(V,ie){return ie<0?Math.max(ie+V.length,0):Math.min(ie,V.length)}var $;(function(V){function ie(Pe){return Pe<0}V.isLessThan=ie;function Q(Pe){return Pe<=0}V.isLessThanOrEqual=Q;function fe(Pe){return Pe>0}V.isGreaterThan=fe;function pe(Pe){return Pe===0}V.isNeitherLessOrGreaterThan=pe,V.greaterThan=1,V.lessThan=-1,V.neitherLessOrGreaterThan=0})($||(e.CompareResult=$={}));function Y(V,ie){return(Q,fe)=>ie(V(Q),V(fe))}e.compareBy=Y;function se(...V){return(ie,Q)=>{for(const fe of V){const pe=fe(ie,Q);if(!$.isNeitherLessOrGreaterThan(pe))return pe}return $.neitherLessOrGreaterThan}}e.tieBreakComparators=se;const ce=(V,ie)=>V-ie;e.numberComparator=ce;const x=(V,ie)=>(0,e.numberComparator)(V?1:0,ie?1:0);e.booleanComparator=x;function R(V){return(ie,Q)=>-V(ie,Q)}e.reverseOrder=R;function _(V,ie){if(V.length===0)return;let Q=V[0];for(let fe=1;fe<V.length;fe++){const pe=V[fe];ie(pe,Q)>0&&(Q=pe)}return Q}e.findMaxBy=_;function N(V,ie){if(V.length===0)return;let Q=V[0];for(let fe=1;fe<V.length;fe++){const pe=V[fe];ie(pe,Q)>=0&&(Q=pe)}return Q}e.findLastMaxBy=N;function q(V,ie){return _(V,(Q,fe)=>-ie(Q,fe))}e.findMinBy=q;function re(V,ie){if(V.length===0)return-1;let Q=0;for(let fe=1;fe<V.length;fe++){const pe=V[fe];ie(pe,V[Q])>0&&(Q=fe)}return Q}e.findMaxIdxBy=re;class ne{constructor(ie){this.items=ie,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(ie){let Q=this.firstIdx;for(;Q<this.items.length&&ie(this.items[Q]);)Q++;const fe=Q===this.firstIdx?null:this.items.slice(this.firstIdx,Q);return this.firstIdx=Q,fe}takeFromEndWhile(ie){let Q=this.lastIdx;for(;Q>=0&&ie(this.items[Q]);)Q--;const fe=Q===this.lastIdx?null:this.items.slice(Q+1,this.lastIdx+1);return this.lastIdx=Q,fe}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const ie=this.items[this.firstIdx];return this.firstIdx++,ie}removeLast(){const ie=this.items[this.lastIdx];return this.lastIdx--,ie}takeCount(ie){const Q=this.items.slice(this.firstIdx,this.firstIdx+ie);return this.firstIdx+=ie,Q}}e.ArrayQueue=ne;class le{static{this.empty=new le(ie=>{})}constructor(ie){this.iterate=ie}forEach(ie){this.iterate(Q=>(ie(Q),!0))}toArray(){const ie=[];return this.iterate(Q=>(ie.push(Q),!0)),ie}filter(ie){return new le(Q=>this.iterate(fe=>ie(fe)?Q(fe):!0))}map(ie){return new le(Q=>this.iterate(fe=>Q(ie(fe))))}some(ie){let Q=!1;return this.iterate(fe=>(Q=ie(fe),!Q)),Q}findFirst(ie){let Q;return this.iterate(fe=>ie(fe)?(Q=fe,!1):!0),Q}findLast(ie){let Q;return this.iterate(fe=>(ie(fe)&&(Q=fe),!0)),Q}findLastMaxBy(ie){let Q,fe=!0;return this.iterate(pe=>((fe||$.isGreaterThan(ie(pe,Q)))&&(fe=!1,Q=pe),!0)),Q}}e.CallbackIterable=le}),define(Z[137],te([0,1,13]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function L(h,u){if(!h)throw new Error(u?`Assertion failed (${u})`:"Assertion Failed")}e.ok=L;function r(h,u="Unreachable"){throw new Error(u)}e.assertNever=r;function O(h){if(!h)throw new b.BugIndicatingError("Assertion Failed")}e.assert=O;function D(h){if(!h()){debugger;h(),(0,b.onUnexpectedError)(new b.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function P(h,u){let m=0;for(;m<h.length-1;){const g=h[m],v=h[m+1];if(!u(g,v))return!1;m++}return!0}e.checkAdjacentItems=P}),define(Z[49],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function b(L){const r=this;let O=!1,D;return function(){return O||(O=!0,D=L.apply(r,arguments)),D}}e.once=b}),define(Z[69],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var b;(function(L){function r(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}L.is=r;const O=Object.freeze([]);function D(){return O}L.empty=D;function*P(I){yield I}L.single=P;function h(I){return r(I)?I:P(I)}L.wrap=h;function u(I){return I||O}L.from=u;function m(I){return!I||I[Symbol.iterator]().next().done===!0}L.isEmpty=m;function g(I){return I[Symbol.iterator]().next().value}L.first=g;function v(I,w){for(const t of I)if(w(t))return!0;return!1}L.some=v;function d(I,w){for(const t of I)if(w(t))return t}L.find=d;function*y(I,w){for(const t of I)w(t)&&(yield t)}L.filter=y;function*E(I,w){let t=0;for(const a of I)yield w(a,t++)}L.map=E;function*l(...I){for(const w of I)for(const t of w)yield t}L.concat=l;function p(I,w,t){let a=t;for(const s of I)a=w(a,s);return a}L.reduce=p;function*c(I,w,t=I.length){for(w<0&&(w+=I.length),t<0?t+=I.length:t>I.length&&(t=I.length);w<t;w++)yield I[w]}L.slice=c;function f(I,w=Number.POSITIVE_INFINITY){const t=[];if(w===0)return[t,I];const a=I[Symbol.iterator]();for(let s=0;s<w;s++){const i=a.next();if(i.done)return[t,L.empty()];t.push(i.value)}return[t,{[Symbol.iterator](){return a}}]}L.consume=f})(b||(e.Iterable=b={}))}),define(Z[44],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeType=e.stripComments=e.visit=e.findNodeAtOffset=e.contains=e.getNodeValue=e.getNodePath=e.findNodeAtLocation=e.parseTree=e.parse=e.getLocation=e.createScanner=e.ParseOptions=e.ParseErrorCode=e.SyntaxKind=e.ScanError=void 0;var b;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(b||(e.ScanError=b={}));var L;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(L||(e.SyntaxKind=L={}));var r;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(r||(e.ParseErrorCode=r={}));var O;(function(t){t.DEFAULT={allowTrailingComma:!0}})(O||(e.ParseOptions=O={}));function D(t,a=!1){let s=0;const i=t.length;let n="",o=0,S=16,k=0;function M(ee){let ue=0,ae=0;for(;ue<ee;){const de=t.charCodeAt(s);if(de>=48&&de<=57)ae=ae*16+de-48;else if(de>=65&&de<=70)ae=ae*16+de-65+10;else if(de>=97&&de<=102)ae=ae*16+de-97+10;else break;s++,ue++}return ue<ee&&(ae=-1),ae}function C(ee){s=ee,n="",o=0,S=16,k=0}function A(){const ee=s;if(t.charCodeAt(s)===48)s++;else for(s++;s<t.length&&u(t.charCodeAt(s));)s++;if(s<t.length&&t.charCodeAt(s)===46)if(s++,s<t.length&&u(t.charCodeAt(s)))for(s++;s<t.length&&u(t.charCodeAt(s));)s++;else return k=3,t.substring(ee,s);let ue=s;if(s<t.length&&(t.charCodeAt(s)===69||t.charCodeAt(s)===101))if(s++,(s<t.length&&t.charCodeAt(s)===43||t.charCodeAt(s)===45)&&s++,s<t.length&&u(t.charCodeAt(s))){for(s++;s<t.length&&u(t.charCodeAt(s));)s++;ue=s}else k=3;return t.substring(ee,ue)}function T(){let ee="",ue=s;for(;;){if(s>=i){ee+=t.substring(ue,s),k=2;break}const ae=t.charCodeAt(s);if(ae===34){ee+=t.substring(ue,s),s++;break}if(ae===92){if(ee+=t.substring(ue,s),s++,s>=i){k=2;break}switch(t.charCodeAt(s++)){case 34:ee+='"';break;case 92:ee+="\\";break;case 47:ee+="/";break;case 98:ee+="\b";break;case 102:ee+="\f";break;case 110:ee+=`
`;break;case 114:ee+="\r";break;case 116:ee+="	";break;case 117:{const j=M(4);j>=0?ee+=String.fromCharCode(j):k=4;break}default:k=5}ue=s;continue}if(ae>=0&&ae<=31)if(h(ae)){ee+=t.substring(ue,s),k=2;break}else k=6;s++}return ee}function F(){if(n="",k=0,o=s,s>=i)return o=i,S=17;let ee=t.charCodeAt(s);if(P(ee)){do s++,n+=String.fromCharCode(ee),ee=t.charCodeAt(s);while(P(ee));return S=15}if(h(ee))return s++,n+=String.fromCharCode(ee),ee===13&&t.charCodeAt(s)===10&&(s++,n+=`
`),S=14;switch(ee){case 123:return s++,S=1;case 125:return s++,S=2;case 91:return s++,S=3;case 93:return s++,S=4;case 58:return s++,S=6;case 44:return s++,S=5;case 34:return s++,n=T(),S=10;case 47:{const ue=s-1;if(t.charCodeAt(s+1)===47){for(s+=2;s<i&&!h(t.charCodeAt(s));)s++;return n=t.substring(ue,s),S=12}if(t.charCodeAt(s+1)===42){s+=2;const ae=i-1;let de=!1;for(;s<ae;){if(t.charCodeAt(s)===42&&t.charCodeAt(s+1)===47){s+=2,de=!0;break}s++}return de||(s++,k=1),n=t.substring(ue,s),S=13}return n+=String.fromCharCode(ee),s++,S=16}case 45:if(n+=String.fromCharCode(ee),s++,s===i||!u(t.charCodeAt(s)))return S=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=A(),S=11;default:for(;s<i&&z(ee);)s++,ee=t.charCodeAt(s);if(o!==s){switch(n=t.substring(o,s),n){case"true":return S=8;case"false":return S=9;case"null":return S=7}return S=16}return n+=String.fromCharCode(ee),s++,S=16}}function z(ee){if(P(ee)||h(ee))return!1;switch(ee){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function oe(){let ee;do ee=F();while(ee>=12&&ee<=15);return ee}return{setPosition:C,getPosition:()=>s,scan:a?oe:F,getToken:()=>S,getTokenValue:()=>n,getTokenOffset:()=>o,getTokenLength:()=>s-o,getTokenError:()=>k}}e.createScanner=D;function P(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function h(t){return t===10||t===13||t===8232||t===8233}function u(t){return t>=48&&t<=57}var m;(function(t){t[t.nullCharacter=0]="nullCharacter",t[t.maxAsciiCharacter=127]="maxAsciiCharacter",t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.lineSeparator=8232]="lineSeparator",t[t.paragraphSeparator=8233]="paragraphSeparator",t[t.nextLine=133]="nextLine",t[t.space=32]="space",t[t.nonBreakingSpace=160]="nonBreakingSpace",t[t.enQuad=8192]="enQuad",t[t.emQuad=8193]="emQuad",t[t.enSpace=8194]="enSpace",t[t.emSpace=8195]="emSpace",t[t.threePerEmSpace=8196]="threePerEmSpace",t[t.fourPerEmSpace=8197]="fourPerEmSpace",t[t.sixPerEmSpace=8198]="sixPerEmSpace",t[t.figureSpace=8199]="figureSpace",t[t.punctuationSpace=8200]="punctuationSpace",t[t.thinSpace=8201]="thinSpace",t[t.hairSpace=8202]="hairSpace",t[t.zeroWidthSpace=8203]="zeroWidthSpace",t[t.narrowNoBreakSpace=8239]="narrowNoBreakSpace",t[t.ideographicSpace=12288]="ideographicSpace",t[t.mathematicalSpace=8287]="mathematicalSpace",t[t.ogham=5760]="ogham",t[t._=95]="_",t[t.$=36]="$",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.ampersand=38]="ampersand",t[t.asterisk=42]="asterisk",t[t.at=64]="at",t[t.backslash=92]="backslash",t[t.bar=124]="bar",t[t.caret=94]="caret",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.closeParen=41]="closeParen",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.equals=61]="equals",t[t.exclamation=33]="exclamation",t[t.greaterThan=62]="greaterThan",t[t.lessThan=60]="lessThan",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.openParen=40]="openParen",t[t.percent=37]="percent",t[t.plus=43]="plus",t[t.question=63]="question",t[t.semicolon=59]="semicolon",t[t.singleQuote=39]="singleQuote",t[t.slash=47]="slash",t[t.tilde=126]="tilde",t[t.backspace=8]="backspace",t[t.formFeed=12]="formFeed",t[t.byteOrderMark=65279]="byteOrderMark",t[t.tab=9]="tab",t[t.verticalTab=11]="verticalTab"})(m||(m={}));function g(t,a){const s=[],i=new Object;let n;const o={value:{},offset:0,length:0,type:"object",parent:void 0};let S=!1;function k(M,C,A,T){o.value=M,o.offset=C,o.length=A,o.type=T,o.colonOffset=void 0,n=o}try{f(t,{onObjectBegin:(M,C)=>{if(a<=M)throw i;n=void 0,S=a>M,s.push("")},onObjectProperty:(M,C,A)=>{if(a<C||(k(M,C,A,"property"),s[s.length-1]=M,a<=C+A))throw i},onObjectEnd:(M,C)=>{if(a<=M)throw i;n=void 0,s.pop()},onArrayBegin:(M,C)=>{if(a<=M)throw i;n=void 0,s.push(0)},onArrayEnd:(M,C)=>{if(a<=M)throw i;n=void 0,s.pop()},onLiteralValue:(M,C,A)=>{if(a<C||(k(M,C,A,w(M)),a<=C+A))throw i},onSeparator:(M,C,A)=>{if(a<=C)throw i;if(M===":"&&n&&n.type==="property")n.colonOffset=C,S=!1,n=void 0;else if(M===","){const T=s[s.length-1];typeof T=="number"?s[s.length-1]=T+1:(S=!0,s[s.length-1]=""),n=void 0}}})}catch(M){if(M!==i)throw M}return{path:s,previousNode:n,isAtPropertyKey:S,matches:M=>{let C=0;for(let A=0;C<M.length&&A<s.length;A++)if(M[C]===s[A]||M[C]==="*")C++;else if(M[C]!=="**")return!1;return C===M.length}}}e.getLocation=g;function v(t,a=[],s=O.DEFAULT){let i=null,n=[];const o=[];function S(M){Array.isArray(n)?n.push(M):i!==null&&(n[i]=M)}return f(t,{onObjectBegin:()=>{const M={};S(M),o.push(n),n=M,i=null},onObjectProperty:M=>{i=M},onObjectEnd:()=>{n=o.pop()},onArrayBegin:()=>{const M=[];S(M),o.push(n),n=M,i=null},onArrayEnd:()=>{n=o.pop()},onLiteralValue:S,onError:(M,C,A)=>{a.push({error:M,offset:C,length:A})}},s),n[0]}e.parse=v;function d(t,a=[],s=O.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function n(M){i.type==="property"&&(i.length=M-i.offset,i=i.parent)}function o(M){return i.children.push(M),M}f(t,{onObjectBegin:M=>{i=o({type:"object",offset:M,length:-1,parent:i,children:[]})},onObjectProperty:(M,C,A)=>{i=o({type:"property",offset:C,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:M,offset:C,length:A,parent:i})},onObjectEnd:(M,C)=>{i.length=M+C-i.offset,i=i.parent,n(M+C)},onArrayBegin:(M,C)=>{i=o({type:"array",offset:M,length:-1,parent:i,children:[]})},onArrayEnd:(M,C)=>{i.length=M+C-i.offset,i=i.parent,n(M+C)},onLiteralValue:(M,C,A)=>{o({type:w(M),offset:C,length:A,parent:i,value:M}),n(C+A)},onSeparator:(M,C,A)=>{i.type==="property"&&(M===":"?i.colonOffset=C:M===","&&n(C))},onError:(M,C,A)=>{a.push({error:M,offset:C,length:A})}},s);const k=i.children[0];return k&&delete k.parent,k}e.parseTree=d;function y(t,a){if(!t)return;let s=t;for(const i of a)if(typeof i=="string"){if(s.type!=="object"||!Array.isArray(s.children))return;let n=!1;for(const o of s.children)if(Array.isArray(o.children)&&o.children[0].value===i){s=o.children[1],n=!0;break}if(!n)return}else{const n=i;if(s.type!=="array"||n<0||!Array.isArray(s.children)||n>=s.children.length)return;s=s.children[n]}return s}e.findNodeAtLocation=y;function E(t){if(!t.parent||!t.parent.children)return[];const a=E(t.parent);if(t.parent.type==="property"){const s=t.parent.children[0].value;a.push(s)}else if(t.parent.type==="array"){const s=t.parent.children.indexOf(t);s!==-1&&a.push(s)}return a}e.getNodePath=E;function l(t){switch(t.type){case"array":return t.children.map(l);case"object":{const a=Object.create(null);for(const s of t.children){const i=s.children[1];i&&(a[s.children[0].value]=l(i))}return a}case"null":case"string":case"number":case"boolean":return t.value;default:return}}e.getNodeValue=l;function p(t,a,s=!1){return a>=t.offset&&a<t.offset+t.length||s&&a===t.offset+t.length}e.contains=p;function c(t,a,s=!1){if(p(t,a,s)){const i=t.children;if(Array.isArray(i))for(let n=0;n<i.length&&i[n].offset<=a;n++){const o=c(i[n],a,s);if(o)return o}return t}}e.findNodeAtOffset=c;function f(t,a,s=O.DEFAULT){const i=D(t,!1);function n(Y){return Y?()=>Y(i.getTokenOffset(),i.getTokenLength()):()=>!0}function o(Y){return Y?se=>Y(se,i.getTokenOffset(),i.getTokenLength()):()=>!0}const S=n(a.onObjectBegin),k=o(a.onObjectProperty),M=n(a.onObjectEnd),C=n(a.onArrayBegin),A=n(a.onArrayEnd),T=o(a.onLiteralValue),F=o(a.onSeparator),z=n(a.onComment),oe=o(a.onError),ee=s&&s.disallowComments,ue=s&&s.allowTrailingComma;function ae(){for(;;){const Y=i.scan();switch(i.getTokenError()){case 4:de(14);break;case 5:de(15);break;case 3:de(13);break;case 1:ee||de(11);break;case 2:de(12);break;case 6:de(16);break}switch(Y){case 12:case 13:ee?de(10):z();break;case 16:de(1);break;case 15:case 14:break;default:return Y}}}function de(Y,se=[],ce=[]){if(oe(Y),se.length+ce.length>0){let x=i.getToken();for(;x!==17;){if(se.indexOf(x)!==-1){ae();break}else if(ce.indexOf(x)!==-1)break;x=ae()}}}function j(Y){const se=i.getTokenValue();return Y?T(se):k(se),ae(),!0}function G(){switch(i.getToken()){case 11:{let Y=0;try{Y=JSON.parse(i.getTokenValue()),typeof Y!="number"&&(de(2),Y=0)}catch{de(2)}T(Y);break}case 7:T(null);break;case 8:T(!0);break;case 9:T(!1);break;default:return!1}return ae(),!0}function B(){return i.getToken()!==10?(de(3,[],[2,5]),!1):(j(!1),i.getToken()===6?(F(":"),ae(),$()||de(4,[],[2,5])):de(5,[],[2,5]),!0)}function W(){S(),ae();let Y=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(Y||de(4,[],[]),F(","),ae(),i.getToken()===2&&ue)break}else Y&&de(6,[],[]);B()||de(4,[],[2,5]),Y=!0}return M(),i.getToken()!==2?de(7,[2],[]):ae(),!0}function U(){C(),ae();let Y=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(Y||de(4,[],[]),F(","),ae(),i.getToken()===4&&ue)break}else Y&&de(6,[],[]);$()||de(4,[],[4,5]),Y=!0}return A(),i.getToken()!==4?de(8,[4],[]):ae(),!0}function $(){switch(i.getToken()){case 3:return U();case 1:return W();case 10:return j(!0);default:return G()}}return ae(),i.getToken()===17?s.allowEmptyContent?!0:(de(4,[],[]),!1):$()?(i.getToken()!==17&&de(9,[],[]),!0):(de(4,[],[]),!1)}e.visit=f;function I(t,a){const s=D(t),i=[];let n,o=0,S;do switch(S=s.getPosition(),n=s.scan(),n){case 12:case 13:case 17:o!==S&&i.push(t.substring(o,S)),a!==void 0&&i.push(s.getTokenValue().replace(/[^\r\n]/g,a)),o=s.getPosition();break}while(n!==17);return i.join("")}e.stripComments=I;function w(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=w}),define(Z[138],te([0,1,44]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function L(u,m,g){let v,d,y,E,l;if(m){for(E=m.offset,l=E+m.length,y=E;y>0&&!h(u,y-1);)y--;let S=l;for(;S<u.length&&!h(u,S);)S++;d=u.substring(y,S),v=D(d,g)}else d=u,v=0,y=0,E=0,l=u.length;const p=P(g,u);let c=!1,f=0,I;g.insertSpaces?I=O(" ",g.tabSize||4):I="	";const w=(0,b.createScanner)(d,!1);let t=!1;function a(){return p+O(I,v+f)}function s(){let S=w.scan();for(c=!1;S===15||S===14;)c=c||S===14,S=w.scan();return t=S===16||w.getTokenError()!==0,S}const i=[];function n(S,k,M){!t&&k<l&&M>E&&u.substring(k,M)!==S&&i.push({offset:k,length:M-k,content:S})}let o=s();if(o!==17){const S=w.getTokenOffset()+y,k=O(I,v);n(k,y,S)}for(;o!==17;){let S=w.getTokenOffset()+w.getTokenLength()+y,k=s(),M="";for(;!c&&(k===12||k===13);){const A=w.getTokenOffset()+y;n(" ",S,A),S=w.getTokenOffset()+w.getTokenLength()+y,M=k===12?a():"",k=s()}if(k===2)o!==1&&(f--,M=a());else if(k===4)o!==3&&(f--,M=a());else{switch(o){case 3:case 1:f++,M=a();break;case 5:case 12:M=a();break;case 13:c?M=a():M=" ";break;case 6:M=" ";break;case 10:if(k===6){M="";break}case 7:case 8:case 9:case 11:case 2:case 4:k===12||k===13?M=" ":k!==5&&k!==17&&(t=!0);break;case 16:t=!0;break}c&&(k===12||k===13)&&(M=a())}const C=w.getTokenOffset()+y;n(M,S,C),o=k}return i}e.format=L;function r(u,m){const g=JSON.stringify(u,void 0,m.insertSpaces?m.tabSize||4:"	");return m.eol!==void 0?g.replace(/\r\n|\r|\n/g,m.eol):g}e.toFormattedString=r;function O(u,m){let g="";for(let v=0;v<m;v++)g+=u;return g}function D(u,m){let g=0,v=0;const d=m.tabSize||4;for(;g<u.length;){const y=u.charAt(g);if(y===" ")v++;else if(y==="	")v+=d;else break;g++}return Math.floor(v/d)}function P(u,m){for(let g=0;g<m.length;g++){const v=m.charAt(g);if(v==="\r")return g+1<m.length&&m.charAt(g+1)===`
`?`\r
`:"\r";if(v===`
`)return`
`}return u&&u.eol||`
`}e.getEOL=P;function h(u,m){return`\r
`.indexOf(u.charAt(m))!==-1}e.isEOL=h}),define(Z[139],te([0,1,44,138]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyEdits=e.applyEdit=e.withFormatting=e.setProperty=e.removeProperty=void 0;function r(u,m,g){return O(u,m,void 0,g)}e.removeProperty=r;function O(u,m,g,v,d){const y=m.slice(),E=[],l=(0,b.parseTree)(u,E);let p,c;for(;y.length>0&&(c=y.pop(),p=(0,b.findNodeAtLocation)(l,y),p===void 0&&g!==void 0);)typeof c=="string"?g={[c]:g}:g=[g];if(p)if(p.type==="object"&&typeof c=="string"&&Array.isArray(p.children)){const f=(0,b.findNodeAtLocation)(p,[c]);if(f!==void 0)if(g===void 0){if(!f.parent)throw new Error("Malformed AST");const I=p.children.indexOf(f.parent);let w,t=f.parent.offset+f.parent.length;if(I>0){const a=p.children[I-1];w=a.offset+a.length}else w=p.offset+1,p.children.length>1&&(t=p.children[1].offset);return D(u,{offset:w,length:t-w,content:""},v)}else return D(u,{offset:f.offset,length:f.length,content:JSON.stringify(g)},v);else{if(g===void 0)return[];const I=`${JSON.stringify(c)}: ${JSON.stringify(g)}`,w=d?d(p.children.map(a=>a.children[0].value)):p.children.length;let t;if(w>0){const a=p.children[w-1];t={offset:a.offset+a.length,length:0,content:","+I}}else p.children.length===0?t={offset:p.offset+1,length:0,content:I}:t={offset:p.offset+1,length:0,content:I+","};return D(u,t,v)}}else if(p.type==="array"&&typeof c=="number"&&Array.isArray(p.children))if(g!==void 0){const f=`${JSON.stringify(g)}`;let I;if(p.children.length===0||c===0)I={offset:p.offset+1,length:0,content:p.children.length===0?f:f+","};else{const w=c===-1||c>p.children.length?p.children.length:c,t=p.children[w-1];I={offset:t.offset+t.length,length:0,content:","+f}}return D(u,I,v)}else{const f=c,I=p.children[f];let w;if(p.children.length===1)w={offset:p.offset+1,length:p.length-2,content:""};else if(p.children.length-1===f){const t=p.children[f-1],a=t.offset+t.length,s=p.offset+p.length;w={offset:a,length:s-2-a,content:""}}else w={offset:I.offset,length:p.children[f+1].offset-I.offset,content:""};return D(u,w,v)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${p.type}`);else{if(g===void 0)throw new Error("Can not delete in empty document");return D(u,{offset:l?l.offset:0,length:l?l.length:0,content:JSON.stringify(g)},v)}}e.setProperty=O;function D(u,m,g){let v=P(u,m),d=m.offset,y=m.offset+m.content.length;if(m.length===0||m.content.length===0){for(;d>0&&!(0,L.isEOL)(v,d-1);)d--;for(;y<v.length&&!(0,L.isEOL)(v,y);)y++}const E=(0,L.format)(v,{offset:d,length:y-d},g);for(let p=E.length-1;p>=0;p--){const c=E[p];v=P(v,c),d=Math.min(d,c.offset),y=Math.max(y,c.offset+c.length),y+=c.content.length-c.length}const l=u.length-(v.length-y)-d;return[{offset:d,length:l,content:v.substring(d,y)}]}e.withFormatting=D;function P(u,m){return u.substring(0,m.offset)+m.content+u.substring(m.offset+m.length)}e.applyEdit=P;function h(u,m){const g=m.slice(0).sort((d,y)=>{const E=d.offset-y.offset;return E===0?d.length-y.length:E});let v=u.length;for(let d=g.length-1;d>=0;d--){const y=g[d];if(y.offset+y.length<=v)u=P(u,y);else throw new Error("Overlapping edit");v=y.offset}return u}e.applyEdits=h}),define(Z[85],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class b{constructor(r){this.executor=r,this._didRun=!1}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(r){this._error=r}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=b}),define(Z[2],te([0,1,49,69]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const r=!1;let O=null;function D(o){O=o}if(e.setDisposableTracker=D,r){const o="__is_disposable_tracked__";D(new class{trackDisposable(S){const k=new Error("Potentially leaked disposable").stack;setTimeout(()=>{S[o]||console.log(k)},3e3)}setParent(S,k){if(S&&S!==c.None)try{S[o]=!0}catch{}}markAsDisposed(S){if(S&&S!==c.None)try{S[o]=!0}catch{}}markAsSingleton(S){}})}function P(o){return O?.trackDisposable(o),o}function h(o){O?.markAsDisposed(o)}function u(o,S){O?.setParent(o,S)}function m(o,S){if(O)for(const k of o)O.setParent(k,S)}function g(o){return O?.markAsSingleton(o),o}e.markAsSingleton=g;function v(o){return typeof o.dispose=="function"&&o.dispose.length===0}e.isDisposable=v;function d(o){if(L.Iterable.is(o)){const S=[];for(const k of o)if(k)try{k.dispose()}catch(M){S.push(M)}if(S.length===1)throw S[0];if(S.length>1)throw new AggregateError(S,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}e.dispose=d;function y(o){for(const S of o)v(S)&&S.dispose();return[]}e.disposeIfDisposable=y;function E(...o){const S=l(()=>d(o));return m(o,S),S}e.combinedDisposable=E;function l(o){const S=P({dispose:(0,b.once)(()=>{h(S),o()})});return S}e.toDisposable=l;class p{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,P(this)}dispose(){this._isDisposed||(h(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{d(this._toDispose)}finally{this._toDispose.clear()}}add(S){if(!S)return S;if(S===this)throw new Error("Cannot register a disposable on itself!");return u(S,this),this._isDisposed?p.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(S),S}}e.DisposableStore=p;class c{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new p,P(this),u(this._store,this)}dispose(){h(this),this._store.dispose()}_register(S){if(S===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(S)}}e.Disposable=c;class f{constructor(){this._isDisposed=!1,P(this)}get value(){return this._isDisposed?void 0:this._value}set value(S){this._isDisposed||S===this._value||(this._value?.dispose(),S&&u(S,this),this._value=S)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,h(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const S=this._value;return this._value=void 0,S&&u(S,null),S}}e.MutableDisposable=f;class I{constructor(S){this._disposable=S,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=I;class w{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,P(this)}set(S){let k=S;return this.unset=()=>k=void 0,this.isset=()=>k!==void 0,this.dispose=()=>{k&&(k(),k=void 0,h(this))},this}}e.SafeDisposable=w;class t{constructor(){this.references=new Map}acquire(S,...k){let M=this.references.get(S);M||(M={counter:0,object:this.createReferencedObject(S,...k)},this.references.set(S,M));const{object:C}=M,A=(0,b.once)(()=>{--M.counter===0&&(this.destroyReferencedObject(S,M.object),this.references.delete(S))});return M.counter++,{object:C,dispose:A}}}e.ReferenceCollection=t;class a{constructor(S){this.referenceCollection=S}async acquire(S,...k){const M=this.referenceCollection.acquire(S,...k);try{return{object:await M.object,dispose:()=>M.dispose()}}catch(C){throw M.dispose(),C}}}e.AsyncReferenceCollection=a;class s{constructor(S){this.object=S}dispose(){}}e.ImmortalReference=s;function i(o){const S=new p;try{o(S)}finally{S.dispose()}}e.disposeOnReturn=i;class n{constructor(){this._store=new Map,this._isDisposed=!1,P(this)}dispose(){h(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{d(this._store.values())}finally{this._store.clear()}}has(S){return this._store.has(S)}get(S){return this._store.get(S)}set(S,k,M=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),M||this._store.get(S)?.dispose(),this._store.set(S,k)}deleteAndDispose(S){this._store.get(S)?.dispose(),this._store.delete(S)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=n}),define(Z[104],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class b{static{this.Undefined=new b(void 0)}constructor(O){this.element=O,this.next=b.Undefined,this.prev=b.Undefined}}class L{constructor(){this._first=b.Undefined,this._last=b.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===b.Undefined}clear(){let O=this._first;for(;O!==b.Undefined;){const D=O.next;O.prev=b.Undefined,O.next=b.Undefined,O=D}this._first=b.Undefined,this._last=b.Undefined,this._size=0}unshift(O){return this._insert(O,!1)}push(O){return this._insert(O,!0)}_insert(O,D){const P=new b(O);if(this._first===b.Undefined)this._first=P,this._last=P;else if(D){const u=this._last;this._last=P,P.prev=u,u.next=P}else{const u=this._first;this._first=P,P.next=u,u.prev=P}this._size+=1;let h=!1;return()=>{h||(h=!0,this._remove(P))}}shift(){if(this._first!==b.Undefined){const O=this._first.element;return this._remove(this._first),O}}pop(){if(this._last!==b.Undefined){const O=this._last.element;return this._remove(this._last),O}}_remove(O){if(O.prev!==b.Undefined&&O.next!==b.Undefined){const D=O.prev;D.next=O.next,O.next.prev=D}else O.prev===b.Undefined&&O.next===b.Undefined?(this._first=b.Undefined,this._last=b.Undefined):O.next===b.Undefined?(this._last=this._last.prev,this._last.next=b.Undefined):O.prev===b.Undefined&&(this._first=this._first.next,this._first.prev=b.Undefined);this._size-=1}*[Symbol.iterator](){let O=this._first;for(;O!==b.Undefined;)yield O.element,O=O.next}}e.LinkedList=L}),define(Z[35],te([0,1]),function(H,e){"use strict";var b,L,r;Object.defineProperty(e,"__esModule",{value:!0}),e.CounterSet=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function O(E,l,p){let c=E.get(l);return c===void 0&&(c=p,E.set(l,c)),c}e.getOrSet=O;function D(E){const l=[];return E.forEach((p,c)=>{l.push(`${c} => ${p}`)}),`Map(${E.size}) {${l.join(", ")}}`}e.mapToString=D;function P(E){const l=[];return E.forEach(p=>{l.push(p)}),`Set(${E.size}) {${l.join(", ")}}`}e.setToString=P;class h{constructor(l,p){this.uri=l,this.value=p}}class u{static{this.defaultToKey=l=>l.toString()}constructor(l,p){this[b]="ResourceMap",l instanceof u?(this.map=new Map(l.map),this.toKey=p??u.defaultToKey):(this.map=new Map,this.toKey=l??u.defaultToKey)}set(l,p){return this.map.set(this.toKey(l),new h(l,p)),this}get(l){return this.map.get(this.toKey(l))?.value}has(l){return this.map.has(this.toKey(l))}get size(){return this.map.size}clear(){this.map.clear()}delete(l){return this.map.delete(this.toKey(l))}forEach(l,p){typeof p<"u"&&(l=l.bind(p));for(const[c,f]of this.map)l(f.value,f.uri,this)}*values(){for(const l of this.map.values())yield l.value}*keys(){for(const l of this.map.values())yield l.uri}*entries(){for(const l of this.map.values())yield[l.uri,l.value]}*[(b=Symbol.toStringTag,Symbol.iterator)](){for(const[,l]of this.map)yield[l.uri,l.value]}}e.ResourceMap=u;class m{constructor(l,p){this[L]="ResourceSet",!l||typeof l=="function"?this._map=new u(l):(this._map=new u(p),l.forEach(this.add,this))}get size(){return this._map.size}add(l){return this._map.set(l,l),this}clear(){this._map.clear()}delete(l){return this._map.delete(l)}forEach(l,p){this._map.forEach((c,f)=>l.call(p,f,f,this))}has(l){return this._map.has(l)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(L=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=m;var g;(function(E){E[E.None=0]="None",E[E.AsOld=1]="AsOld",E[E.AsNew=2]="AsNew"})(g||(e.Touch=g={}));class v{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(l){return this._map.has(l)}get(l,p=0){const c=this._map.get(l);if(c)return p!==0&&this.touch(c,p),c.value}set(l,p,c=0){let f=this._map.get(l);if(f)f.value=p,c!==0&&this.touch(f,c);else{switch(f={key:l,value:p,next:void 0,previous:void 0},c){case 0:this.addItemLast(f);break;case 1:this.addItemFirst(f);break;case 2:this.addItemLast(f);break;default:this.addItemLast(f);break}this._map.set(l,f),this._size++}return this}delete(l){return!!this.remove(l)}remove(l){const p=this._map.get(l);if(p)return this._map.delete(l),this.removeItem(p),this._size--,p.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const l=this._head;return this._map.delete(l.key),this.removeItem(l),this._size--,l.value}forEach(l,p){const c=this._state;let f=this._head;for(;f;){if(p?l.bind(p)(f.value,f.key,this):l(f.value,f.key,this),this._state!==c)throw new Error("LinkedMap got modified during iteration.");f=f.next}}keys(){const l=this,p=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==p)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:c.key,done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}values(){const l=this,p=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==p)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:c.value,done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}entries(){const l=this,p=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==p)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:[c.key,c.value],done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(l){if(l>=this.size)return;if(l===0){this.clear();return}let p=this._head,c=this.size;for(;p&&c>l;)this._map.delete(p.key),p=p.next,c--;this._head=p,this._size=c,p&&(p.previous=void 0),this._state++}addItemFirst(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l,this._state++}addItemLast(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l,this._state++}removeItem(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{const p=l.next,c=l.previous;if(!p||!c)throw new Error("Invalid list");p.previous=c,c.next=p}l.next=void 0,l.previous=void 0,this._state++}touch(l,p){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(p!==1&&p!==2)){if(p===1){if(l===this._head)return;const c=l.next,f=l.previous;l===this._tail?(f.next=void 0,this._tail=f):(c.previous=f,f.next=c),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l,this._state++}else if(p===2){if(l===this._tail)return;const c=l.next,f=l.previous;l===this._head?(c.previous=void 0,this._head=c):(c.previous=f,f.next=c),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l,this._state++}}}toJSON(){const l=[];return this.forEach((p,c)=>{l.push([c,p])}),l}fromJSON(l){this.clear();for(const[p,c]of l)this.set(p,c)}}e.LinkedMap=v;class d extends v{constructor(l,p=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,p),1)}get limit(){return this._limit}set limit(l){this._limit=l,this.checkTrim()}get ratio(){return this._ratio}set ratio(l){this._ratio=Math.min(Math.max(0,l),1),this.checkTrim()}get(l,p=2){return super.get(l,p)}peek(l){return super.get(l,0)}set(l,p){return super.set(l,p,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=d;class y{constructor(){this.map=new Map}add(l){return this.map.set(l,(this.map.get(l)||0)+1),this}delete(l){let p=this.map.get(l)||0;return p===0?!1:(p--,p===0?this.map.delete(l):this.map.set(l,p),!0)}has(l){return this.map.has(l)}}e.CounterSet=y}),define(Z[86],te([0,1,35]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeAccents=e.normalizeNFD=e.normalizeNFC=void 0;const L=new b.LRUCache(1e4);function r(u){return h(u,"NFC",L)}e.normalizeNFC=r;const O=new b.LRUCache(1e4);function D(u){return h(u,"NFD",O)}e.normalizeNFD=D;const P=/[^\u0000-\u0080]/;function h(u,m,g){if(!u)return u;const v=g.get(u);if(v)return v;let d;return P.test(u)?d=u.normalize(m):d=u,g.set(u,d),d}e.removeAccents=function(){const u=/[\u0300-\u036f]/g;return function(m){return D(m).replace(u,"")}}()}),define(Z[140],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function b(P,h,u){return Math.min(Math.max(P,h),u)}e.clamp=b;function L(P,h){return(h+P%h)%h}e.rot=L;class r{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=r;class O{constructor(){this._n=1,this._val=0}update(h){return this._val=this._val+(h-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=O;class D{constructor(h){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(h),this._values.fill(0,0,h)}update(h){const u=this._values[this._index];return this._values[this._index]=h,this._index=(this._index+1)%this._values.length,this._sum-=u,this._sum+=h,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=D}),function(){function H(r){const O=[];typeof r=="number"&&O.push("code/timeOrigin",r);function D(h){O.push(h,Date.now())}function P(){const h=[];for(let u=0;u<O.length;u+=2)h.push({name:O[u],startTime:O[u+1]});return h}return{mark:D,getMarks:P}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?H():{mark(r){performance.mark(r)},getMarks(){let r=performance.timeOrigin;typeof r!="number"&&(r=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const O=[{name:"code/timeOrigin",startTime:Math.round(r)}];for(const D of performance.getEntriesByType("mark"))O.push({name:D.name,startTime:Math.round(r+D.startTime)});return O}};if(typeof process=="object"){const r=performance?.timeOrigin??Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return H(r)}else return console.trace("perf-util loaded in UNKNOWN environment"),H()}function b(r){return r.MonacoPerformanceMarks||(r.MonacoPerformanceMarks=e()),r.MonacoPerformanceMarks}var L;typeof global=="object"?L=global:typeof self=="object"?L=self:L={},typeof define=="function"?define("vs/base/common/performance",[],function(){return b(L)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=b(L):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),L.perf=b(L))}(),function(H,e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define("vs/base/common/semver/semver",[],e);else{var b=e();for(var L in b)(typeof exports=="object"?exports:H)[L]=b[L]}}(typeof self<"u"?self:this,function(){return function(H){var e={};function b(L){if(e[L])return e[L].exports;var r=e[L]={i:L,l:!1,exports:{}};return H[L].call(r.exports,r,r.exports,b),r.l=!0,r.exports}return b.m=H,b.c=e,b.d=function(L,r,O){b.o(L,r)||Object.defineProperty(L,r,{enumerable:!0,get:O})},b.r=function(L){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})},b.t=function(L,r){if(1&r&&(L=b(L)),8&r||4&r&&typeof L=="object"&&L&&L.__esModule)return L;var O=Object.create(null);if(b.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:L}),2&r&&typeof L!="string")for(var D in L)b.d(O,D,function(P){return L[P]}.bind(null,D));return O},b.n=function(L){var r=L&&L.__esModule?function(){return L.default}:function(){return L};return b.d(r,"a",r),r},b.o=function(L,r){return Object.prototype.hasOwnProperty.call(L,r)},b.p="",b(b.s=0)}([function(H,e,b){(function(L){var r;e=H.exports=ce,r=typeof L=="object"&&L.env&&L.env.NODE_DEBUG&&/\bsemver\b/i.test(L.env.NODE_DEBUG)?function(){var K=Array.prototype.slice.call(arguments,0);K.unshift("SEMVER"),console.log.apply(console,K)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var O=256,D=Number.MAX_SAFE_INTEGER||9007199254740991,P=e.re=[],h=e.src=[],u=0,m=u++;h[m]="0|[1-9]\\d*";var g=u++;h[g]="[0-9]+";var v=u++;h[v]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=u++;h[d]="("+h[m]+")\\.("+h[m]+")\\.("+h[m]+")";var y=u++;h[y]="("+h[g]+")\\.("+h[g]+")\\.("+h[g]+")";var E=u++;h[E]="(?:"+h[m]+"|"+h[v]+")";var l=u++;h[l]="(?:"+h[g]+"|"+h[v]+")";var p=u++;h[p]="(?:-("+h[E]+"(?:\\."+h[E]+")*))";var c=u++;h[c]="(?:-?("+h[l]+"(?:\\."+h[l]+")*))";var f=u++;h[f]="[0-9A-Za-z-]+";var I=u++;h[I]="(?:\\+("+h[f]+"(?:\\."+h[f]+")*))";var w=u++,t="v?"+h[d]+h[p]+"?"+h[I]+"?";h[w]="^"+t+"$";var a="[v=\\s]*"+h[y]+h[c]+"?"+h[I]+"?",s=u++;h[s]="^"+a+"$";var i=u++;h[i]="((?:<|>)?=?)";var n=u++;h[n]=h[g]+"|x|X|\\*";var o=u++;h[o]=h[m]+"|x|X|\\*";var S=u++;h[S]="[v=\\s]*("+h[o]+")(?:\\.("+h[o]+")(?:\\.("+h[o]+")(?:"+h[p]+")?"+h[I]+"?)?)?";var k=u++;h[k]="[v=\\s]*("+h[n]+")(?:\\.("+h[n]+")(?:\\.("+h[n]+")(?:"+h[c]+")?"+h[I]+"?)?)?";var M=u++;h[M]="^"+h[i]+"\\s*"+h[S]+"$";var C=u++;h[C]="^"+h[i]+"\\s*"+h[k]+"$";var A=u++;h[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var T=u++;h[T]="(?:~>?)";var F=u++;h[F]="(\\s*)"+h[T]+"\\s+",P[F]=new RegExp(h[F],"g");var z=u++;h[z]="^"+h[T]+h[S]+"$";var oe=u++;h[oe]="^"+h[T]+h[k]+"$";var ee=u++;h[ee]="(?:\\^)";var ue=u++;h[ue]="(\\s*)"+h[ee]+"\\s+",P[ue]=new RegExp(h[ue],"g");var ae=u++;h[ae]="^"+h[ee]+h[S]+"$";var de=u++;h[de]="^"+h[ee]+h[k]+"$";var j=u++;h[j]="^"+h[i]+"\\s*("+a+")$|^$";var G=u++;h[G]="^"+h[i]+"\\s*("+t+")$|^$";var B=u++;h[B]="(\\s*)"+h[i]+"\\s*("+a+"|"+h[S]+")",P[B]=new RegExp(h[B],"g");var W=u++;h[W]="^\\s*("+h[S]+")\\s+-\\s+("+h[S]+")\\s*$";var U=u++;h[U]="^\\s*("+h[k]+")\\s+-\\s+("+h[k]+")\\s*$";var $=u++;h[$]="(<|>)?=?\\s*\\*";for(var Y=0;Y<35;Y++)r(Y,h[Y]),P[Y]||(P[Y]=new RegExp(h[Y]));function se(K,he){if(K instanceof ce)return K;if(typeof K!="string"||K.length>O||!(he?P[s]:P[w]).test(K))return null;try{return new ce(K,he)}catch{return null}}function ce(K,he){if(K instanceof ce){if(K.loose===he)return K;K=K.version}else if(typeof K!="string")throw new TypeError("Invalid Version: "+K);if(K.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof ce))return new ce(K,he);r("SemVer",K,he),this.loose=he;var me=K.trim().match(he?P[s]:P[w]);if(!me)throw new TypeError("Invalid Version: "+K);if(this.raw=K,this.major=+me[1],this.minor=+me[2],this.patch=+me[3],this.major>D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>D||this.patch<0)throw new TypeError("Invalid patch version");me[4]?this.prerelease=me[4].split(".").map(function(Ie){if(/^[0-9]+$/.test(Ie)){var Le=+Ie;if(Le>=0&&Le<D)return Le}return Ie}):this.prerelease=[],this.build=me[5]?me[5].split("."):[],this.format()}e.parse=se,e.valid=function(K,he){var me=se(K,he);return me?me.version:null},e.clean=function(K,he){var me=se(K.trim().replace(/^[=v]+/,""),he);return me?me.version:null},e.SemVer=ce,ce.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},ce.prototype.toString=function(){return this.version},ce.prototype.compare=function(K){return r("SemVer.compare",this.version,this.loose,K),K instanceof ce||(K=new ce(K,this.loose)),this.compareMain(K)||this.comparePre(K)},ce.prototype.compareMain=function(K){return K instanceof ce||(K=new ce(K,this.loose)),R(this.major,K.major)||R(this.minor,K.minor)||R(this.patch,K.patch)},ce.prototype.comparePre=function(K){if(K instanceof ce||(K=new ce(K,this.loose)),this.prerelease.length&&!K.prerelease.length)return-1;if(!this.prerelease.length&&K.prerelease.length)return 1;if(!this.prerelease.length&&!K.prerelease.length)return 0;var he=0;do{var me=this.prerelease[he],Ie=K.prerelease[he];if(r("prerelease compare",he,me,Ie),me===void 0&&Ie===void 0)return 0;if(Ie===void 0)return 1;if(me===void 0)return-1;if(me!==Ie)return R(me,Ie)}while(++he)},ce.prototype.inc=function(K,he){switch(K){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",he);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",he);break;case"prepatch":this.prerelease.length=0,this.inc("patch",he),this.inc("pre",he);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",he),this.inc("pre",he);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var me=this.prerelease.length;--me>=0;)typeof this.prerelease[me]=="number"&&(this.prerelease[me]++,me=-2);me===-1&&this.prerelease.push(0)}he&&(this.prerelease[0]===he?isNaN(this.prerelease[1])&&(this.prerelease=[he,0]):this.prerelease=[he,0]);break;default:throw new Error("invalid increment argument: "+K)}return this.format(),this.raw=this.version,this},e.inc=function(K,he,me,Ie){typeof me=="string"&&(Ie=me,me=void 0);try{return new ce(K,me).inc(he,Ie).version}catch{return null}},e.diff=function(K,he){if(re(K,he))return null;var me=se(K),Ie=se(he);if(me.prerelease.length||Ie.prerelease.length){for(var Le in me)if((Le==="major"||Le==="minor"||Le==="patch")&&me[Le]!==Ie[Le])return"pre"+Le;return"prerelease"}for(var Le in me)if((Le==="major"||Le==="minor"||Le==="patch")&&me[Le]!==Ie[Le])return Le},e.compareIdentifiers=R;var x=/^[0-9]+$/;function R(K,he){var me=x.test(K),Ie=x.test(he);return me&&Ie&&(K=+K,he=+he),me&&!Ie?-1:Ie&&!me?1:K<he?-1:K>he?1:0}function _(K,he,me){return new ce(K,me).compare(new ce(he,me))}function N(K,he,me){return _(K,he,me)>0}function q(K,he,me){return _(K,he,me)<0}function re(K,he,me){return _(K,he,me)===0}function ne(K,he,me){return _(K,he,me)!==0}function le(K,he,me){return _(K,he,me)>=0}function V(K,he,me){return _(K,he,me)<=0}function ie(K,he,me,Ie){var Le;switch(he){case"===":typeof K=="object"&&(K=K.version),typeof me=="object"&&(me=me.version),Le=K===me;break;case"!==":typeof K=="object"&&(K=K.version),typeof me=="object"&&(me=me.version),Le=K!==me;break;case"":case"=":case"==":Le=re(K,me,Ie);break;case"!=":Le=ne(K,me,Ie);break;case">":Le=N(K,me,Ie);break;case">=":Le=le(K,me,Ie);break;case"<":Le=q(K,me,Ie);break;case"<=":Le=V(K,me,Ie);break;default:throw new TypeError("Invalid operator: "+he)}return Le}function Q(K,he){if(K instanceof Q){if(K.loose===he)return K;K=K.value}if(!(this instanceof Q))return new Q(K,he);r("comparator",K,he),this.loose=he,this.parse(K),this.semver===fe?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}e.rcompareIdentifiers=function(K,he){return R(he,K)},e.major=function(K,he){return new ce(K,he).major},e.minor=function(K,he){return new ce(K,he).minor},e.patch=function(K,he){return new ce(K,he).patch},e.compare=_,e.compareLoose=function(K,he){return _(K,he,!0)},e.rcompare=function(K,he,me){return _(he,K,me)},e.sort=function(K,he){return K.sort(function(me,Ie){return e.compare(me,Ie,he)})},e.rsort=function(K,he){return K.sort(function(me,Ie){return e.rcompare(me,Ie,he)})},e.gt=N,e.lt=q,e.eq=re,e.neq=ne,e.gte=le,e.lte=V,e.cmp=ie,e.Comparator=Q;var fe={};function pe(K,he){if(K instanceof pe)return K.loose===he?K:new pe(K.raw,he);if(K instanceof Q)return new pe(K.value,he);if(!(this instanceof pe))return new pe(K,he);if(this.loose=he,this.raw=K,this.set=K.split(/\s*\|\|\s*/).map(function(me){return this.parseRange(me.trim())},this).filter(function(me){return me.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+K);this.format()}function Pe(K){return!K||K.toLowerCase()==="x"||K==="*"}function De(K,he,me,Ie,Le,Fe,Oe,qe,Ne,He,J,ge,ve){return((he=Pe(me)?"":Pe(Ie)?">="+me+".0.0":Pe(Le)?">="+me+"."+Ie+".0":">="+he)+" "+(qe=Pe(Ne)?"":Pe(He)?"<"+(+Ne+1)+".0.0":Pe(J)?"<"+Ne+"."+(+He+1)+".0":ge?"<="+Ne+"."+He+"."+J+"-"+ge:"<="+qe)).trim()}function We(K,he){for(var me=0;me<K.length;me++)if(!K[me].test(he))return!1;if(he.prerelease.length){for(me=0;me<K.length;me++)if(r(K[me].semver),K[me].semver!==fe&&K[me].semver.prerelease.length>0){var Ie=K[me].semver;if(Ie.major===he.major&&Ie.minor===he.minor&&Ie.patch===he.patch)return!0}return!1}return!0}function ye(K,he,me){try{he=new pe(he,me)}catch{return!1}return he.test(K)}function we(K,he,me,Ie){var Le,Fe,Oe,qe,Ne;switch(K=new ce(K,Ie),he=new pe(he,Ie),me){case">":Le=N,Fe=V,Oe=q,qe=">",Ne=">=";break;case"<":Le=q,Fe=le,Oe=N,qe="<",Ne="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ye(K,he,Ie))return!1;for(var He=0;He<he.set.length;++He){var J=he.set[He],ge=null,ve=null;if(J.forEach(function(Ee){Ee.semver===fe&&(Ee=new Q(">=0.0.0")),ge=ge||Ee,ve=ve||Ee,Le(Ee.semver,ge.semver,Ie)?ge=Ee:Oe(Ee.semver,ve.semver,Ie)&&(ve=Ee)}),ge.operator===qe||ge.operator===Ne||(!ve.operator||ve.operator===qe)&&Fe(K,ve.semver)||ve.operator===Ne&&Oe(K,ve.semver))return!1}return!0}Q.prototype.parse=function(K){var he=this.loose?P[j]:P[G],me=K.match(he);if(!me)throw new TypeError("Invalid comparator: "+K);this.operator=me[1],this.operator==="="&&(this.operator=""),me[2]?this.semver=new ce(me[2],this.loose):this.semver=fe},Q.prototype.toString=function(){return this.value},Q.prototype.test=function(K){return r("Comparator.test",K,this.loose),this.semver===fe||(typeof K=="string"&&(K=new ce(K,this.loose)),ie(K,this.operator,this.semver,this.loose))},Q.prototype.intersects=function(K,he){if(!(K instanceof Q))throw new TypeError("a Comparator is required");var me;if(this.operator==="")return me=new pe(K.value,he),ye(this.value,me,he);if(K.operator==="")return me=new pe(this.value,he),ye(K.semver,me,he);var Ie=!(this.operator!==">="&&this.operator!==">"||K.operator!==">="&&K.operator!==">"),Le=!(this.operator!=="<="&&this.operator!=="<"||K.operator!=="<="&&K.operator!=="<"),Fe=this.semver.version===K.semver.version,Oe=!(this.operator!==">="&&this.operator!=="<="||K.operator!==">="&&K.operator!=="<="),qe=ie(this.semver,"<",K.semver,he)&&(this.operator===">="||this.operator===">")&&(K.operator==="<="||K.operator==="<"),Ne=ie(this.semver,">",K.semver,he)&&(this.operator==="<="||this.operator==="<")&&(K.operator===">="||K.operator===">");return Ie||Le||Fe&&Oe||qe||Ne},e.Range=pe,pe.prototype.format=function(){return this.range=this.set.map(function(K){return K.join(" ").trim()}).join("||").trim(),this.range},pe.prototype.toString=function(){return this.range},pe.prototype.parseRange=function(K){var he=this.loose;K=K.trim(),r("range",K,he);var me=he?P[U]:P[W];K=K.replace(me,De),r("hyphen replace",K),K=K.replace(P[B],"$1$2$3"),r("comparator trim",K,P[B]),K=(K=(K=K.replace(P[F],"$1~")).replace(P[ue],"$1^")).split(/\s+/).join(" ");var Ie=he?P[j]:P[G],Le=K.split(" ").map(function(Fe){return function(Oe,qe){return r("comp",Oe),Oe=function(Ne,He){return Ne.trim().split(/\s+/).map(function(J){return function(ge,ve){r("caret",ge,ve);var Ee=ve?P[de]:P[ae];return ge.replace(Ee,function(Ae,Me,_e,ze,Be){var Ve;return r("caret",ge,Ae,Me,_e,ze,Be),Pe(Me)?Ve="":Pe(_e)?Ve=">="+Me+".0.0 <"+(+Me+1)+".0.0":Pe(ze)?Ve=Me==="0"?">="+Me+"."+_e+".0 <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+".0 <"+(+Me+1)+".0.0":Be?(r("replaceCaret pr",Be),Be.charAt(0)!=="-"&&(Be="-"+Be),Ve=Me==="0"?_e==="0"?">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+_e+"."+(+ze+1):">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+"."+ze+Be+" <"+(+Me+1)+".0.0"):(r("no pr"),Ve=Me==="0"?_e==="0"?">="+Me+"."+_e+"."+ze+" <"+Me+"."+_e+"."+(+ze+1):">="+Me+"."+_e+"."+ze+" <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+"."+ze+" <"+(+Me+1)+".0.0"),r("caret return",Ve),Ve})}(J,He)}).join(" ")}(Oe,qe),r("caret",Oe),Oe=function(Ne,He){return Ne.trim().split(/\s+/).map(function(J){return function(ge,ve){var Ee=ve?P[oe]:P[z];return ge.replace(Ee,function(Ae,Me,_e,ze,Be){var Ve;return r("tilde",ge,Ae,Me,_e,ze,Be),Pe(Me)?Ve="":Pe(_e)?Ve=">="+Me+".0.0 <"+(+Me+1)+".0.0":Pe(ze)?Ve=">="+Me+"."+_e+".0 <"+Me+"."+(+_e+1)+".0":Be?(r("replaceTilde pr",Be),Be.charAt(0)!=="-"&&(Be="-"+Be),Ve=">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+(+_e+1)+".0"):Ve=">="+Me+"."+_e+"."+ze+" <"+Me+"."+(+_e+1)+".0",r("tilde return",Ve),Ve})}(J,He)}).join(" ")}(Oe,qe),r("tildes",Oe),Oe=function(Ne,He){return r("replaceXRanges",Ne,He),Ne.split(/\s+/).map(function(J){return function(ge,ve){ge=ge.trim();var Ee=ve?P[C]:P[M];return ge.replace(Ee,function(Ae,Me,_e,ze,Be,Ve){r("xRange",ge,Ae,Me,_e,ze,Be,Ve);var Ye=Pe(_e),Xe=Ye||Pe(ze),Je=Xe||Pe(Be);return Me==="="&&Je&&(Me=""),Ye?Ae=Me===">"||Me==="<"?"<0.0.0":"*":Me&&Je?(Xe&&(ze=0),Je&&(Be=0),Me===">"?(Me=">=",Xe?(_e=+_e+1,ze=0,Be=0):Je&&(ze=+ze+1,Be=0)):Me==="<="&&(Me="<",Xe?_e=+_e+1:ze=+ze+1),Ae=Me+_e+"."+ze+"."+Be):Xe?Ae=">="+_e+".0.0 <"+(+_e+1)+".0.0":Je&&(Ae=">="+_e+"."+ze+".0 <"+_e+"."+(+ze+1)+".0"),r("xRange return",Ae),Ae})}(J,He)}).join(" ")}(Oe,qe),r("xrange",Oe),Oe=function(Ne,He){return r("replaceStars",Ne,He),Ne.trim().replace(P[$],"")}(Oe,qe),r("stars",Oe),Oe}(Fe,he)}).join(" ").split(/\s+/);return this.loose&&(Le=Le.filter(function(Fe){return!!Fe.match(Ie)})),Le=Le.map(function(Fe){return new Q(Fe,he)})},pe.prototype.intersects=function(K,he){if(!(K instanceof pe))throw new TypeError("a Range is required");return this.set.some(function(me){return me.every(function(Ie){return K.set.some(function(Le){return Le.every(function(Fe){return Ie.intersects(Fe,he)})})})})},e.toComparators=function(K,he){return new pe(K,he).set.map(function(me){return me.map(function(Ie){return Ie.value}).join(" ").trim().split(" ")})},pe.prototype.test=function(K){if(!K)return!1;typeof K=="string"&&(K=new ce(K,this.loose));for(var he=0;he<this.set.length;he++)if(We(this.set[he],K))return!0;return!1},e.satisfies=ye,e.maxSatisfying=function(K,he,me){var Ie=null,Le=null;try{var Fe=new pe(he,me)}catch{return null}return K.forEach(function(Oe){Fe.test(Oe)&&(Ie&&Le.compare(Oe)!==-1||(Le=new ce(Ie=Oe,me)))}),Ie},e.minSatisfying=function(K,he,me){var Ie=null,Le=null;try{var Fe=new pe(he,me)}catch{return null}return K.forEach(function(Oe){Fe.test(Oe)&&(Ie&&Le.compare(Oe)!==1||(Le=new ce(Ie=Oe,me)))}),Ie},e.validRange=function(K,he){try{return new pe(K,he).range||"*"}catch{return null}},e.ltr=function(K,he,me){return we(K,he,"<",me)},e.gtr=function(K,he,me){return we(K,he,">",me)},e.outside=we,e.prerelease=function(K,he){var me=se(K,he);return me&&me.prerelease.length?me.prerelease:null},e.intersects=function(K,he,me){return K=new pe(K,me),he=new pe(he,me),K.intersects(he)},e.coerce=function(K){if(K instanceof ce)return K;if(typeof K!="string")return null;var he=K.match(P[A]);return he==null?null:se((he[1]||"0")+"."+(he[2]||"0")+"."+(he[3]||"0"))}}).call(this,b(1))},function(H,e){var b,L,r=H.exports={};function O(){throw new Error("setTimeout has not been defined")}function D(){throw new Error("clearTimeout has not been defined")}function P(l){if(b===setTimeout)return setTimeout(l,0);if((b===O||!b)&&setTimeout)return b=setTimeout,setTimeout(l,0);try{return b(l,0)}catch{try{return b.call(null,l,0)}catch{return b.call(this,l,0)}}}(function(){try{b=typeof setTimeout=="function"?setTimeout:O}catch{b=O}try{L=typeof clearTimeout=="function"?clearTimeout:D}catch{L=D}})();var h,u=[],m=!1,g=-1;function v(){m&&h&&(m=!1,h.length?u=h.concat(u):g=-1,u.length&&d())}function d(){if(!m){var l=P(v);m=!0;for(var p=u.length;p;){for(h=u,u=[];++g<p;)h&&h[g].run();g=-1,p=u.length}h=null,m=!1,function(c){if(L===clearTimeout)return clearTimeout(c);if((L===D||!L)&&clearTimeout)return L=clearTimeout,clearTimeout(c);try{L(c)}catch{try{return L.call(null,c)}catch{return L.call(this,c)}}}(l)}}function y(l,p){this.fun=l,this.array=p}function E(){}r.nextTick=function(l){var p=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)p[c-1]=arguments[c];u.push(new y(l,p)),u.length!==1||m||P(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=E,r.addListener=E,r.once=E,r.off=E,r.removeListener=E,r.removeAllListeners=E,r.emit=E,r.prependListener=E,r.prependOnceListener=E,r.listeners=function(l){return[]},r.binding=function(l){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(l){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}])}),define(Z[141],te([0,1]),function(H,e){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.SkipList=void 0;class L{constructor(P,h,u){this.level=P,this.key=h,this.value=u,this.forward=[]}}const r=void 0;class O{constructor(P,h=2**16){this.comparator=P,this[b]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,Math.log2(h)|0),this._header=new L(this._maxLevel,r,r)}get size(){return this._size}clear(){this._header=new L(this._maxLevel,r,r)}has(P){return!!O._search(this,P,this.comparator)}get(P){return O._search(this,P,this.comparator)?.value}set(P,h){return O._insert(this,P,h,this.comparator)&&(this._size+=1),this}delete(P){const h=O._delete(this,P,this.comparator);return h&&(this._size-=1),h}forEach(P,h){let u=this._header.forward[0];for(;u;)P.call(h,u.value,u.key,this),u=u.forward[0]}[(b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*entries(){let P=this._header.forward[0];for(;P;)yield[P.key,P.value],P=P.forward[0]}*keys(){let P=this._header.forward[0];for(;P;)yield P.key,P=P.forward[0]}*values(){let P=this._header.forward[0];for(;P;)yield P.value,P=P.forward[0]}toString(){let P="[SkipList]:",h=this._header.forward[0];for(;h;)P+=`node(${h.key}, ${h.value}, lvl:${h.level})`,h=h.forward[0];return P}static _search(P,h,u){let m=P._header;for(let g=P._level-1;g>=0;g--)for(;m.forward[g]&&u(m.forward[g].key,h)<0;)m=m.forward[g];if(m=m.forward[0],m&&u(m.key,h)===0)return m}static _insert(P,h,u,m){const g=[];let v=P._header;for(let d=P._level-1;d>=0;d--){for(;v.forward[d]&&m(v.forward[d].key,h)<0;)v=v.forward[d];g[d]=v}if(v=v.forward[0],v&&m(v.key,h)===0)return v.value=u,!1;{const d=O._randomLevel(P);if(d>P._level){for(let y=P._level;y<d;y++)g[y]=P._header;P._level=d}v=new L(d,h,u);for(let y=0;y<d;y++)v.forward[y]=g[y].forward[y],g[y].forward[y]=v;return!0}}static _randomLevel(P,h=.5){let u=1;for(;Math.random()<h&&u<P._maxLevel;)u+=1;return u}static _delete(P,h,u){const m=[];let g=P._header;for(let v=P._level-1;v>=0;v--){for(;g.forward[v]&&u(g.forward[v].key,h)<0;)g=g.forward[v];m[v]=g}if(g=g.forward[0],!g||u(g.key,h)!==0)return!1;for(let v=0;v<P._level&&m[v].forward[v]===g;v++)m[v].forward[v]=g.forward[v];for(;P._level>0&&P._header.forward[P._level-1]===r;)P._level-=1;return!0}}e.SkipList=O}),define(Z[70],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const b=globalThis.performance&&typeof globalThis.performance.now=="function";class L{static create(O){return new L(O)}constructor(O){this._now=b&&O===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}e.StopWatch=L}),define(Z[3],te([0,1,13,49,2,104,70]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DynamicListEventMultiplexer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.createEventDeliveryQueue=e.Emitter=e.setGlobalLeakWarningThreshold=e.EventProfiling=e.Event=void 0;const P=!1,h=!1;var u;(function(M){M.None=()=>r.Disposable.None;function C(le){if(h){const{onDidAddListener:V}=le,ie=y.create();let Q=0;le.onDidAddListener=()=>{++Q===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ie.print()),V?.()}}}function A(le,V){return j(le,()=>{},0,void 0,!0,void 0,V)}M.defer=A;function T(le){return(V,ie=null,Q)=>{let fe=!1,pe;return pe=le(Pe=>{if(!fe)return pe?pe.dispose():fe=!0,V.call(ie,Pe)},null,Q),fe&&pe.dispose(),pe}}M.once=T;function F(le,V,ie){return de((Q,fe=null,pe)=>le(Pe=>Q.call(fe,V(Pe)),null,pe),ie)}M.map=F;function z(le,V,ie){return de((Q,fe=null,pe)=>le(Pe=>{V(Pe),Q.call(fe,Pe)},null,pe),ie)}M.forEach=z;function oe(le,V,ie){return de((Q,fe=null,pe)=>le(Pe=>V(Pe)&&Q.call(fe,Pe),null,pe),ie)}M.filter=oe;function ee(le){return le}M.signal=ee;function ue(...le){return(V,ie=null,Q)=>(0,r.combinedDisposable)(...le.map(fe=>fe(pe=>V.call(ie,pe),null,Q)))}M.any=ue;function ae(le,V,ie,Q){let fe=ie;return F(le,pe=>(fe=V(fe,pe),fe),Q)}M.reduce=ae;function de(le,V){let ie;const Q={onWillAddFirstListener(){ie=le(fe.fire,fe)},onDidRemoveLastListener(){ie?.dispose()}};V||C(Q);const fe=new f(Q);return V?.add(fe),fe.event}function j(le,V,ie=100,Q=!1,fe=!1,pe,Pe){let De,We,ye,we=0,K;const he={leakWarningThreshold:pe,onWillAddFirstListener(){De=le(Ie=>{we++,We=V(We,Ie),Q&&!ye&&(me.fire(We),We=void 0),K=()=>{const Le=We;We=void 0,ye=void 0,(!Q||we>1)&&me.fire(Le),we=0},typeof ie=="number"?(clearTimeout(ye),ye=setTimeout(K,ie)):ye===void 0&&(ye=0,queueMicrotask(K))})},onWillRemoveListener(){fe&&we>0&&K?.()},onDidRemoveLastListener(){K=void 0,De.dispose()}};Pe||C(he);const me=new f(he);return Pe?.add(me),me.event}M.debounce=j;function G(le,V=0,ie){return M.debounce(le,(Q,fe)=>Q?(Q.push(fe),Q):[fe],V,void 0,!0,void 0,ie)}M.accumulate=G;function B(le,V=(Q,fe)=>Q===fe,ie){let Q=!0,fe;return oe(le,pe=>{const Pe=Q||!V(pe,fe);return Q=!1,fe=pe,Pe},ie)}M.latch=B;function W(le,V,ie){return[M.filter(le,V,ie),M.filter(le,Q=>!V(Q),ie)]}M.split=W;function U(le,V=!1,ie=[]){let Q=ie.slice(),fe=le(De=>{Q?Q.push(De):Pe.fire(De)});const pe=()=>{Q?.forEach(De=>Pe.fire(De)),Q=null},Pe=new f({onWillAddFirstListener(){fe||(fe=le(De=>Pe.fire(De)))},onDidAddFirstListener(){Q&&(V?setTimeout(pe):pe())},onDidRemoveLastListener(){fe&&fe.dispose(),fe=null}});return Pe.event}M.buffer=U;class ${constructor(V){this.event=V,this.disposables=new r.DisposableStore}map(V){return new $(F(this.event,V,this.disposables))}forEach(V){return new $(z(this.event,V,this.disposables))}filter(V){return new $(oe(this.event,V,this.disposables))}reduce(V,ie){return new $(ae(this.event,V,ie,this.disposables))}latch(){return new $(B(this.event,void 0,this.disposables))}debounce(V,ie=100,Q=!1,fe=!1,pe){return new $(j(this.event,V,ie,Q,fe,pe,this.disposables))}on(V,ie,Q){return this.event(V,ie,Q)}once(V,ie,Q){return T(this.event)(V,ie,Q)}dispose(){this.disposables.dispose()}}function Y(le){return new $(le)}M.chain=Y;function se(le,V,ie=Q=>Q){const Q=(...De)=>Pe.fire(ie(...De)),fe=()=>le.on(V,Q),pe=()=>le.removeListener(V,Q),Pe=new f({onWillAddFirstListener:fe,onDidRemoveLastListener:pe});return Pe.event}M.fromNodeEventEmitter=se;function ce(le,V,ie=Q=>Q){const Q=(...De)=>Pe.fire(ie(...De)),fe=()=>le.addEventListener(V,Q),pe=()=>le.removeEventListener(V,Q),Pe=new f({onWillAddFirstListener:fe,onDidRemoveLastListener:pe});return Pe.event}M.fromDOMEventEmitter=ce;function x(le){return new Promise(V=>T(le)(V))}M.toPromise=x;function R(le){const V=new f;return le.then(ie=>{V.fire(ie)},()=>{V.fire(void 0)}).finally(()=>{V.dispose()}),V.event}M.fromPromise=R;function _(le,V){return V(void 0),le(ie=>V(ie))}M.runAndSubscribe=_;function N(le,V){let ie=null;function Q(pe){ie?.dispose(),ie=new r.DisposableStore,V(pe,ie)}Q(void 0);const fe=le(pe=>Q(pe));return(0,r.toDisposable)(()=>{fe.dispose(),ie?.dispose()})}M.runAndSubscribeWithStore=N;class q{constructor(V,ie){this._observable=V,this._counter=0,this._hasChanged=!1;const Q={onWillAddFirstListener:()=>{V.addObserver(this)},onDidRemoveLastListener:()=>{V.removeObserver(this)}};ie||C(Q),this.emitter=new f(Q),ie&&ie.add(this.emitter)}beginUpdate(V){this._counter++}handlePossibleChange(V){}handleChange(V,ie){this._hasChanged=!0}endUpdate(V){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(le,V){return new q(le,V).emitter.event}M.fromObservable=re;function ne(le){return V=>{let ie=0,Q=!1;const fe={beginUpdate(){ie++},endUpdate(){ie--,ie===0&&(le.reportChanges(),Q&&(Q=!1,V()))},handlePossibleChange(){},handleChange(){Q=!0}};return le.addObserver(fe),le.reportChanges(),{dispose(){le.removeObserver(fe)}}}}M.fromObservableLight=ne})(u||(e.Event=u={}));class m{static{this.all=new Set}static{this._idPool=0}constructor(C){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${C}_${m._idPool++}`,m.all.add(this)}start(C){this._stopWatch=new D.StopWatch,this.listenerCount=C}stop(){if(this._stopWatch){const C=this._stopWatch.elapsed();this.durations.push(C),this.elapsedOverall+=C,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=m;let g=-1;function v(M){const C=g;return g=M,{dispose(){g=C}}}e.setGlobalLeakWarningThreshold=v;class d{constructor(C,A=Math.random().toString(18).slice(2,5)){this.threshold=C,this.name=A,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(C,A){const T=this.threshold;if(T<=0||A<T)return;this._stacks||(this._stacks=new Map);const F=this._stacks.get(C.value)||0;if(this._stacks.set(C.value,F+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=T*.5;let z,oe=0;for(const[ee,ue]of this._stacks)(!z||oe<ue)&&(z=ee,oe=ue);console.warn(`[${this.name}] potential listener LEAK detected, having ${A} listeners already. MOST frequent listener (${oe}):`),console.warn(z)}return()=>{const z=this._stacks.get(C.value)||0;this._stacks.set(C.value,z-1)}}}class y{static create(){return new y(new Error().stack??"")}constructor(C){this.value=C}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}}let E=0;class l{constructor(C){this.value=C,this.id=E++}}const p=2,c=(M,C)=>{if(M instanceof l)C(M);else for(let A=0;A<M.length;A++){const T=M[A];T&&C(T)}};class f{constructor(C){this._size=0,this._options=C,this._leakageMon=g>0||this._options?.leakWarningThreshold?new d(this._options?.leakWarningThreshold??g):void 0,this._perfMon=this._options?._profName?new m(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(P){const C=this._listeners;queueMicrotask(()=>{c(C,A=>A.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(C,A,T)=>{if(this._disposed)return r.Disposable.None;A&&(C=C.bind(A));const F=new l(C);let z,oe;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(F.stack=y.create(),z=this._leakageMon.check(F.stack,this._size+1)),P&&(F.stack=oe??y.create()),this._listeners?this._listeners instanceof l?(this._deliveryQueue??=new w,this._listeners=[this._listeners,F]):this._listeners.push(F):(this._options?.onWillAddFirstListener?.(this),this._listeners=F,this._options?.onDidAddFirstListener?.(this)),this._size++;const ee=(0,r.toDisposable)(()=>{z?.(),this._removeListener(F)});return T instanceof r.DisposableStore?T.add(ee):Array.isArray(T)&&T.push(ee),ee},this._event}_removeListener(C){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const A=this._listeners,T=A.indexOf(C);if(T===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,A[T]=void 0;const F=this._deliveryQueue.current===this;if(this._size*p<=A.length){let z=0;for(let oe=0;oe<A.length;oe++)A[oe]?A[z++]=A[oe]:F&&(this._deliveryQueue.end--,z<this._deliveryQueue.i&&this._deliveryQueue.i--);A.length=z}}_deliver(C,A){if(!C)return;const T=this._options?.onListenerError||b.onUnexpectedError;if(!T){C.value(A);return}try{C.value(A)}catch(F){T(F)}}_deliverQueue(C){const A=C.current._listeners;for(;C.i<C.end;)this._deliver(A[C.i++],C.value);C.reset()}fire(C){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof l)this._deliver(this._listeners,C);else{const A=this._deliveryQueue;A.enqueue(this,C,this._listeners.length),this._deliverQueue(A)}this._perfMon?.stop()}hasListeners(){return this._size>0}}e.Emitter=f;const I=()=>new w;e.createEventDeliveryQueue=I;class w{constructor(){this.i=-1,this.end=0}enqueue(C,A,T){this.i=0,this.end=T,this.current=C,this.value=A}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class t extends f{async fireAsync(C,A,T){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new O.LinkedList),c(this._listeners,F=>this._asyncDeliveryQueue.push([F.value,C]));this._asyncDeliveryQueue.size>0&&!A.isCancellationRequested;){const[F,z]=this._asyncDeliveryQueue.shift(),oe=[],ee={...z,token:A,waitUntil:ue=>{if(Object.isFrozen(oe))throw new Error("waitUntil can NOT be called asynchronous");T&&(ue=T(ue,F)),oe.push(ue)}};try{F(ee)}catch(ue){(0,b.onUnexpectedError)(ue);continue}Object.freeze(oe),await Promise.allSettled(oe).then(ue=>{for(const ae of ue)ae.status==="rejected"&&(0,b.onUnexpectedError)(ae.reason)})}}}e.AsyncEmitter=t;class a extends f{get isPaused(){return this._isPaused!==0}constructor(C){super(C),this._isPaused=0,this._eventQueue=new O.LinkedList,this._mergeFn=C?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const C=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(C))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(C){this._size&&(this._isPaused!==0?this._eventQueue.push(C):super.fire(C))}}e.PauseableEmitter=a;class s extends a{constructor(C){super(C),this._delay=C.delay??100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}e.DebounceEmitter=s;class i extends f{constructor(C){super(C),this._queuedEvents=[],this._mergeFn=C?.merge}fire(C){this.hasListeners()&&(this._queuedEvents.push(C),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(A=>super.fire(A)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=i;class n{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(C){const A={event:C,listener:null};this.events.push(A),this.hasListeners&&this.hook(A);const T=()=>{this.hasListeners&&this.unhook(A);const F=this.events.indexOf(A);this.events.splice(F,1)};return(0,r.toDisposable)((0,L.once)(T))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(C=>this.hook(C))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(C=>this.unhook(C))}hook(C){C.listener=C.event(A=>this.emitter.fire(A))}unhook(C){C.listener&&C.listener.dispose(),C.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=n;class o{constructor(C,A,T,F){this._store=new r.DisposableStore;const z=this._store.add(new n),oe=this._store.add(new r.DisposableMap);function ee(ue){oe.set(ue,z.add(F(ue)))}for(const ue of C)ee(ue);this._store.add(A(ue=>{ee(ue)})),this._store.add(T(ue=>{oe.deleteAndDispose(ue)})),this.event=z.event}dispose(){this._store.dispose()}}e.DynamicListEventMultiplexer=o;class S{constructor(){this.buffers=[]}wrapEvent(C){return(A,T,F)=>C(z=>{const oe=this.buffers[this.buffers.length-1];oe?oe.push(()=>A.call(T,z)):A.call(T,z)},void 0,F)}bufferEvents(C){const A=[];this.buffers.push(A);const T=C();return this.buffers.pop(),A.forEach(F=>F()),T}}e.EventBufferer=S;class k{constructor(){this.listening=!1,this.inputEvent=u.None,this.inputEventListener=r.Disposable.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(C){this.inputEvent=C,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=C(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=k}),define(Z[23],te([0,1,3]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const L=Object.freeze(function(P,h){const u=setTimeout(P.bind(h),0);return{dispose(){clearTimeout(u)}}});var r;(function(P){function h(u){return u===P.None||u===P.Cancelled||u instanceof O?!0:!u||typeof u!="object"?!1:typeof u.isCancellationRequested=="boolean"&&typeof u.onCancellationRequested=="function"}P.isCancellationToken=h,P.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:b.Event.None}),P.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:L})})(r||(e.CancellationToken=r={}));class O{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?L:(this._emitter||(this._emitter=new b.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class D{constructor(h){this._token=void 0,this._parentListener=void 0,this._parentListener=h&&h.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new O),this._token}cancel(){this._token?this._token instanceof O&&this._token.cancel():this._token=r.Cancelled}dispose(h=!1){h&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof O&&this._token.dispose():this._token=r.None}}e.CancellationTokenSource=D}),define(Z[142],te([0,1,23]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class L{constructor(P){this.task=P,this.result=null}get(){if(this.result)return this.result;const P=new b.CancellationTokenSource,h=this.task(P.token);return this.result={promise:h,dispose:()=>{this.result=null,P.cancel(),P.dispose()}},this.result}}e.Cache=L;class r{constructor(P){this.fn=P,this.lastCache=void 0,this.lastArgKey=void 0}get(P){const h=JSON.stringify(P);return this.lastArgKey!==h&&(this.lastArgKey=h,this.lastCache=this.fn(P)),this.lastCache}}e.LRUCachedFunction=r;class O{get cachedValues(){return this._map}constructor(P){this.fn=P,this._map=new Map}get(P){if(this._map.has(P))return this._map.get(P);const h=this.fn(P);return this._map.set(P,h),h}}e.CachedFunction=O}),define(Z[56],te([0,1,13,2]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function r(I){const w=I;return w?typeof w.read=="function":!1}e.isReadable=r;function O(I){const w=I;return w?[w.on,w.pause,w.resume,w.destroy].every(t=>typeof t=="function"):!1}e.isReadableStream=O;function D(I){const w=I;return w?O(w.stream)&&Array.isArray(w.buffer)&&typeof w.ended=="boolean":!1}e.isReadableBufferedStream=D;function P(I,w){return new h(I,w)}e.newWriteableStream=P;class h{constructor(w,t){this.reducer=w,this.options=t,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(w){if(!this.state.destroyed){if(this.state.flowing)this.emitData(w);else if(this.buffer.data.push(w),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(t=>this.pendingWritePromises.push(t))}}error(w){this.state.destroyed||(this.state.flowing?this.emitError(w):this.buffer.error.push(w))}end(w){this.state.destroyed||(typeof w<"u"&&this.write(w),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(w){this.listeners.data.slice(0).forEach(t=>t(w))}emitError(w){this.listeners.error.length===0?(0,b.onUnexpectedError)(w):this.listeners.error.slice(0).forEach(t=>t(w))}emitEnd(){this.listeners.end.slice(0).forEach(w=>w())}on(w,t){if(!this.state.destroyed)switch(w){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors();break}}removeListener(w,t){if(this.state.destroyed)return;let a;switch(w){case"data":a=this.listeners.data;break;case"end":a=this.listeners.end;break;case"error":a=this.listeners.error;break}if(a){const s=a.indexOf(t);s>=0&&a.splice(s,1)}}flowData(){if(this.buffer.data.length>0){const w=this.reducer(this.buffer.data);this.emitData(w),this.buffer.data.length=0;const t=[...this.pendingWritePromises];this.pendingWritePromises.length=0,t.forEach(a=>a())}}flowErrors(){if(this.listeners.error.length>0){for(const w of this.buffer.error)this.emitError(w);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function u(I,w){const t=[];let a;for(;(a=I.read())!==null;)t.push(a);return w(t)}e.consumeReadable=u;function m(I,w,t){const a=[];let s;for(;(s=I.read())!==null&&a.length<t;)a.push(s);return s===null&&a.length>0?w(a):{read:()=>{if(a.length>0)return a.shift();if(typeof s<"u"){const i=s;return s=void 0,i}return I.read()}}}e.peekReadable=m;function g(I,w){return new Promise((t,a)=>{const s=[];v(I,{onData:i=>{w&&s.push(i)},onError:i=>{w?a(i):t(void 0)},onEnd:()=>{t(w?w(s):void 0)}})})}e.consumeStream=g;function v(I,w,t){I.on("error",a=>{t?.isCancellationRequested||w.onError(a)}),I.on("end",()=>{t?.isCancellationRequested||w.onEnd()}),I.on("data",a=>{t?.isCancellationRequested||w.onData(a)})}e.listenStream=v;function d(I,w){return new Promise((t,a)=>{const s=new L.DisposableStore,i=[],n=k=>{if(i.push(k),i.length>w)return s.dispose(),I.pause(),t({stream:I,buffer:i,ended:!1})},o=k=>a(k),S=()=>t({stream:I,buffer:i,ended:!0});s.add((0,L.toDisposable)(()=>I.removeListener("error",o))),I.on("error",o),s.add((0,L.toDisposable)(()=>I.removeListener("end",S))),I.on("end",S),s.add((0,L.toDisposable)(()=>I.removeListener("data",n))),I.on("data",n)})}e.peekStream=d;function y(I,w){const t=P(w);return t.end(I),t}e.toStream=y;function E(){const I=P(()=>{throw new Error("not supported")});return I.end(),I}e.emptyStream=E;function l(I){let w=!1;return{read:()=>w?null:(w=!0,I)}}e.toReadable=l;function p(I,w,t){const a=P(t);return v(I,{onData:s=>a.write(w.data(s)),onError:s=>a.error(w.error?w.error(s):s),onEnd:()=>a.end()}),a}e.transform=p;function c(I,w,t){let a=!1;return{read:()=>{const s=w.read();return a?s:(a=!0,s!==null?t([I,s]):I)}}}e.prefixedReadable=c;function f(I,w,t){let a=!1;const s=P(t);return v(w,{onData:i=>a?s.write(i):(a=!0,s.write(t([I,i]))),onError:i=>s.error(i),onEnd:()=>{a||(a=!0,s.write(I)),s.end()}}),s}e.prefixedStream=f}),define(Z[17],te([0,1,85,56]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.binaryIndexOf=e.VSBuffer=void 0;const r=typeof Buffer<"u",O=new b.Lazy(()=>new Uint8Array(256));let D,P;class h{static alloc(A){return r?new h(Buffer.allocUnsafe(A)):new h(new Uint8Array(A))}static wrap(A){return r&&!Buffer.isBuffer(A)&&(A=Buffer.from(A.buffer,A.byteOffset,A.byteLength)),new h(A)}static fromString(A,T){return!(T?.dontUseNodeBuffer||!1)&&r?new h(Buffer.from(A)):(D||(D=new TextEncoder),new h(D.encode(A)))}static fromByteArray(A){const T=h.alloc(A.length);for(let F=0,z=A.length;F<z;F++)T.buffer[F]=A[F];return T}static concat(A,T){if(typeof T>"u"){T=0;for(let oe=0,ee=A.length;oe<ee;oe++)T+=A[oe].byteLength}const F=h.alloc(T);let z=0;for(let oe=0,ee=A.length;oe<ee;oe++){const ue=A[oe];F.set(ue,z),z+=ue.byteLength}return F}constructor(A){this.buffer=A,this.byteLength=this.buffer.byteLength}clone(){const A=h.alloc(this.byteLength);return A.set(this),A}toString(){return r?this.buffer.toString():(P||(P=new TextDecoder),P.decode(this.buffer))}slice(A,T){return new h(this.buffer.subarray(A,T))}set(A,T){if(A instanceof h)this.buffer.set(A.buffer,T);else if(A instanceof Uint8Array)this.buffer.set(A,T);else if(A instanceof ArrayBuffer)this.buffer.set(new Uint8Array(A),T);else if(ArrayBuffer.isView(A))this.buffer.set(new Uint8Array(A.buffer,A.byteOffset,A.byteLength),T);else throw new Error("Unknown argument 'array'")}readUInt32BE(A){return v(this.buffer,A)}writeUInt32BE(A,T){d(this.buffer,A,T)}readUInt32LE(A){return y(this.buffer,A)}writeUInt32LE(A,T){E(this.buffer,A,T)}readUInt8(A){return l(this.buffer,A)}writeUInt8(A,T){p(this.buffer,A,T)}indexOf(A,T=0){return u(this.buffer,A instanceof h?A.buffer:A,T)}}e.VSBuffer=h;function u(C,A,T=0){const F=A.byteLength,z=C.byteLength;if(F===0)return 0;if(F===1)return C.indexOf(A[0]);if(F>z-T)return-1;const oe=O.value;oe.fill(A.length);for(let de=0;de<A.length;de++)oe[A[de]]=A.length-de-1;let ee=T+A.length-1,ue=ee,ae=-1;for(;ee<z;)if(C[ee]===A[ue]){if(ue===0){ae=ee;break}ee--,ue--}else ee+=Math.max(A.length-ue,oe[C[ee]]),ue=A.length-1;return ae}e.binaryIndexOf=u;function m(C,A){return C[A+0]<<0>>>0|C[A+1]<<8>>>0}e.readUInt16LE=m;function g(C,A,T){C[T+0]=A&255,A=A>>>8,C[T+1]=A&255}e.writeUInt16LE=g;function v(C,A){return C[A]*2**24+C[A+1]*2**16+C[A+2]*2**8+C[A+3]}e.readUInt32BE=v;function d(C,A,T){C[T+3]=A,A=A>>>8,C[T+2]=A,A=A>>>8,C[T+1]=A,A=A>>>8,C[T]=A}e.writeUInt32BE=d;function y(C,A){return C[A+0]<<0>>>0|C[A+1]<<8>>>0|C[A+2]<<16>>>0|C[A+3]<<24>>>0}e.readUInt32LE=y;function E(C,A,T){C[T+0]=A&255,A=A>>>8,C[T+1]=A&255,A=A>>>8,C[T+2]=A&255,A=A>>>8,C[T+3]=A&255}e.writeUInt32LE=E;function l(C,A){return C[A]}e.readUInt8=l;function p(C,A,T){C[T]=A}e.writeUInt8=p;function c(C){return L.consumeReadable(C,A=>h.concat(A))}e.readableToBuffer=c;function f(C){return L.toReadable(C)}e.bufferToReadable=f;function I(C){return L.consumeStream(C,A=>h.concat(A))}e.streamToBuffer=I;async function w(C){return C.ended?h.concat(C.buffer):h.concat([...C.buffer,await I(C.stream)])}e.bufferedStreamToBuffer=w;function t(C){return L.toStream(C,A=>h.concat(A))}e.bufferToStream=t;function a(C){return L.transform(C,{data:A=>typeof A=="string"?h.fromString(A):h.wrap(A)},A=>h.concat(A))}e.streamToBufferReadableStream=a;function s(C){return L.newWriteableStream(A=>h.concat(A),C)}e.newWriteableBufferStream=s;function i(C,A){return L.prefixedReadable(C,A,T=>h.concat(T))}e.prefixedBufferReadable=i;function n(C,A){return L.prefixedStream(C,A,T=>h.concat(T))}e.prefixedBufferStream=n;function o(C){let A=0,T=0,F=0;const z=new Uint8Array(Math.floor(C.length/4*3)),oe=ue=>{switch(T){case 3:z[F++]=A|ue,T=0;break;case 2:z[F++]=A|ue>>>2,A=ue<<6,T=3;break;case 1:z[F++]=A|ue>>>4,A=ue<<4,T=2;break;default:A=ue<<2,T=1}};for(let ue=0;ue<C.length;ue++){const ae=C.charCodeAt(ue);if(ae>=65&&ae<=90)oe(ae-65);else if(ae>=97&&ae<=122)oe(ae-97+26);else if(ae>=48&&ae<=57)oe(ae-48+52);else if(ae===43||ae===45)oe(62);else if(ae===47||ae===95)oe(63);else{if(ae===61)break;throw new SyntaxError(`Unexpected base64 character ${C[ue]}`)}}const ee=F;for(;T>0;)oe(0);return h.wrap(z).slice(0,ee)}e.decodeBase64=o;const S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function M({buffer:C},A=!0,T=!1){const F=T?k:S;let z="";const oe=C.byteLength%3;let ee=0;for(;ee<C.byteLength-oe;ee+=3){const ue=C[ee+0],ae=C[ee+1],de=C[ee+2];z+=F[ue>>>2],z+=F[(ue<<4|ae>>>4)&63],z+=F[(ae<<2|de>>>6)&63],z+=F[de&63]}if(oe===1){const ue=C[ee+0];z+=F[ue>>>2],z+=F[ue<<4&63],A&&(z+="==")}else if(oe===2){const ue=C[ee+0],ae=C[ee+1];z+=F[ue>>>2],z+=F[(ue<<4|ae>>>4)&63],z+=F[ae<<2&63],A&&(z+="=")}return z}e.encodeBase64=M}),define(Z[26],te([0,1,142,85]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.repeat=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.charCount=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function r(J){return!J||typeof J!="string"?!0:J.trim().length===0}e.isFalsyOrWhitespace=r;const O=/{(\d+)}/g;function D(J,...ge){return ge.length===0?J:J.replace(O,function(ve,Ee){const Ae=parseInt(Ee,10);return isNaN(Ae)||Ae<0||Ae>=ge.length?ve:ge[Ae]})}e.format=D;const P=/{([^}]+)}/g;function h(J,ge){return J.replace(P,(ve,Ee)=>ge[Ee]??ve)}e.format2=h;function u(J){return J.replace(/[<>&]/g,function(ge){switch(ge){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ge}})}e.escape=u;function m(J){return J.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=m;function g(J,ge){let ve=0;const Ee=ge.charCodeAt(0);for(let Ae=J.length-1;Ae>=0;Ae--)J.charCodeAt(Ae)===Ee&&ve++;return ve}e.count=g;function v(J,ge,ve="\u2026"){return J.length<=ge?J:`${J.substr(0,ge)}${ve}`}e.truncate=v;function d(J,ge=" "){const ve=y(J,ge);return E(ve,ge)}e.trim=d;function y(J,ge){if(!J||!ge)return J;const ve=ge.length;if(ve===0||J.length===0)return J;let Ee=0;for(;J.indexOf(ge,Ee)===Ee;)Ee=Ee+ve;return J.substring(Ee)}e.ltrim=y;function E(J,ge){if(!J||!ge)return J;const ve=ge.length,Ee=J.length;if(ve===0||Ee===0)return J;let Ae=Ee,Me=-1;for(;Me=J.lastIndexOf(ge,Ae-1),!(Me===-1||Me+ve!==Ae);){if(Me===0)return"";Ae=Me}return J.substring(0,Ae)}e.rtrim=E;function l(J){return J.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=l;function p(J){return J.replace(/\*/g,"")}e.stripWildcards=p;function c(J,ge,ve={}){if(!J)throw new Error("Cannot create regex from empty string");ge||(J=m(J)),ve.wholeWord&&(/\B/.test(J.charAt(0))||(J="\\b"+J),/\B/.test(J.charAt(J.length-1))||(J=J+"\\b"));let Ee="";return ve.global&&(Ee+="g"),ve.matchCase||(Ee+="i"),ve.multiline&&(Ee+="m"),ve.unicode&&(Ee+="u"),new RegExp(J,Ee)}e.createRegExp=c;function f(J){return J.source==="^"||J.source==="^$"||J.source==="$"||J.source==="^\\s*$"?!1:!!(J.exec("")&&J.lastIndex===0)}e.regExpLeadsToEndlessLoop=f;function I(J){return J.split(/\r\n|\r|\n/)}e.splitLines=I;function w(J){for(let ge=0,ve=J.length;ge<ve;ge++){const Ee=J.charCodeAt(ge);if(Ee!==32&&Ee!==9)return ge}return-1}e.firstNonWhitespaceIndex=w;function t(J,ge=0,ve=J.length){for(let Ee=ge;Ee<ve;Ee++){const Ae=J.charCodeAt(Ee);if(Ae!==32&&Ae!==9)return J.substring(ge,Ee)}return J.substring(ge,ve)}e.getLeadingWhitespace=t;function a(J,ge=J.length-1){for(let ve=ge;ve>=0;ve--){const Ee=J.charCodeAt(ve);if(Ee!==32&&Ee!==9)return ve}return-1}e.lastNonWhitespaceIndex=a;function s(J,ge,ve){const Ee=[];let Ae=0;for(const Me of J.matchAll(ge)){if(Ee.push(J.slice(Ae,Me.index)),Me.index===void 0)throw new Error("match.index should be defined");Ae=Me.index+Me[0].length,Ee.push(ve(Me[0],...Me.slice(1),Me.index,J,Me.groups))}return Ee.push(J.slice(Ae)),Promise.all(Ee).then(Me=>Me.join(""))}e.replaceAsync=s;function i(J,ge){return J<ge?-1:J>ge?1:0}e.compare=i;function n(J,ge,ve=0,Ee=J.length,Ae=0,Me=ge.length){for(;ve<Ee&&Ae<Me;ve++,Ae++){const Be=J.charCodeAt(ve),Ve=ge.charCodeAt(Ae);if(Be<Ve)return-1;if(Be>Ve)return 1}const _e=Ee-ve,ze=Me-Ae;return _e<ze?-1:_e>ze?1:0}e.compareSubstring=n;function o(J,ge){return S(J,ge,0,J.length,0,ge.length)}e.compareIgnoreCase=o;function S(J,ge,ve=0,Ee=J.length,Ae=0,Me=ge.length){for(;ve<Ee&&Ae<Me;ve++,Ae++){let Be=J.charCodeAt(ve),Ve=ge.charCodeAt(Ae);if(Be===Ve)continue;if(Be>=128||Ve>=128)return n(J.toLowerCase(),ge.toLowerCase(),ve,Ee,Ae,Me);M(Be)&&(Be-=32),M(Ve)&&(Ve-=32);const Ye=Be-Ve;if(Ye!==0)return Ye}const _e=Ee-ve,ze=Me-Ae;return _e<ze?-1:_e>ze?1:0}e.compareSubstringIgnoreCase=S;function k(J){return J>=48&&J<=57}e.isAsciiDigit=k;function M(J){return J>=97&&J<=122}e.isLowerAsciiLetter=M;function C(J){return J>=65&&J<=90}e.isUpperAsciiLetter=C;function A(J,ge){return J.length===ge.length&&S(J,ge)===0}e.equalsIgnoreCase=A;function T(J,ge){const ve=ge.length;return ge.length>J.length?!1:S(J,ge,0,ve)===0}e.startsWithIgnoreCase=T;function F(J,ge){const ve=Math.min(J.length,ge.length);let Ee;for(Ee=0;Ee<ve;Ee++)if(J.charCodeAt(Ee)!==ge.charCodeAt(Ee))return Ee;return ve}e.commonPrefixLength=F;function z(J,ge){const ve=Math.min(J.length,ge.length);let Ee;const Ae=J.length-1,Me=ge.length-1;for(Ee=0;Ee<ve;Ee++)if(J.charCodeAt(Ae-Ee)!==ge.charCodeAt(Me-Ee))return Ee;return ve}e.commonSuffixLength=z;function oe(J){return 55296<=J&&J<=56319}e.isHighSurrogate=oe;function ee(J){return 56320<=J&&J<=57343}e.isLowSurrogate=ee;function ue(J,ge){return(J-55296<<10)+(ge-56320)+65536}e.computeCodePoint=ue;function ae(J,ge,ve){const Ee=J.charCodeAt(ve);if(oe(Ee)&&ve+1<ge){const Ae=J.charCodeAt(ve+1);if(ee(Ae))return ue(Ee,Ae)}return Ee}e.getNextCodePoint=ae;function de(J,ge){const ve=J.charCodeAt(ge-1);if(ee(ve)&&ge>1){const Ee=J.charCodeAt(ge-2);if(oe(Ee))return ue(Ee,ve)}return ve}class j{get offset(){return this._offset}constructor(ge,ve=0){this._str=ge,this._len=ge.length,this._offset=ve}setOffset(ge){this._offset=ge}prevCodePoint(){const ge=de(this._str,this._offset);return this._offset-=ge>=65536?2:1,ge}nextCodePoint(){const ge=ae(this._str,this._len,this._offset);return this._offset+=ge>=65536?2:1,ge}eol(){return this._offset>=this._len}}e.CodePointIterator=j;class G{get offset(){return this._iterator.offset}constructor(ge,ve=0){this._iterator=new j(ge,ve)}nextGraphemeLength(){const ge=me.getInstance(),ve=this._iterator,Ee=ve.offset;let Ae=ge.getGraphemeBreakType(ve.nextCodePoint());for(;!ve.eol();){const Me=ve.offset,_e=ge.getGraphemeBreakType(ve.nextCodePoint());if(K(Ae,_e)){ve.setOffset(Me);break}Ae=_e}return ve.offset-Ee}prevGraphemeLength(){const ge=me.getInstance(),ve=this._iterator,Ee=ve.offset;let Ae=ge.getGraphemeBreakType(ve.prevCodePoint());for(;ve.offset>0;){const Me=ve.offset,_e=ge.getGraphemeBreakType(ve.prevCodePoint());if(K(_e,Ae)){ve.setOffset(Me);break}Ae=_e}return Ee-ve.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=G;function B(J,ge){return new G(J,ge).nextGraphemeLength()}e.nextCharLength=B;function W(J,ge){return new G(J,ge).prevGraphemeLength()}e.prevCharLength=W;function U(J,ge){ge>0&&ee(J.charCodeAt(ge))&&ge--;const ve=ge+B(J,ge);return[ve-W(J,ve),ve]}e.getCharContainingOffset=U;function $(J){const ge=new G(J);let ve=0;for(;!ge.eol();)ve++,ge.nextGraphemeLength();return ve}e.charCount=$;let Y;function se(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function ce(J){return Y||(Y=se()),Y.test(J)}e.containsRTL=ce;const x=/^[\t\n\r\x20-\x7E]*$/;function R(J){return x.test(J)}e.isBasicASCII=R,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function _(J){return e.UNUSUAL_LINE_TERMINATORS.test(J)}e.containsUnusualLineTerminators=_;function N(J){return J>=11904&&J<=55215||J>=63744&&J<=64255||J>=65281&&J<=65374}e.isFullWidthCharacter=N;function q(J){return J>=127462&&J<=127487||J===8986||J===8987||J===9200||J===9203||J>=9728&&J<=10175||J===11088||J===11093||J>=127744&&J<=128591||J>=128640&&J<=128764||J>=128992&&J<=129008||J>=129280&&J<=129535||J>=129648&&J<=129782}e.isEmojiImprecise=q;function re(J,ge){if(J.length<ge)return J;const ve=/\b/g;let Ee=0;for(;ve.test(J)&&!(J.length-ve.lastIndex<ge);)Ee=ve.lastIndex,ve.lastIndex+=1;return J.substring(Ee).replace(/^\s/,"")}e.lcut=re;const ne=/(:?\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/g,le=/\x1b\].*?\x07/g;function V(J){return J&&(J=J.replace(ne,"").replace(le,"")),J}e.removeAnsiEscapeCodes=V,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function ie(J){return!!(J&&J.length>0&&J.charCodeAt(0)===65279)}e.startsWithUTF8BOM=ie;function Q(J){return ie(J)?J.substr(1):J}e.stripUTF8BOM=Q;function fe(J,ge){let ve="";for(let Ee=0;Ee<ge;Ee++)ve+=J;return ve}e.repeat=fe;function pe(J,ge){if(!J||!ge||J.length<ge.length)return!1;const ve=ge.length,Ee=J.toLowerCase();let Ae=0,Me=-1;for(;Ae<ve;){const _e=Ee.indexOf(ge[Ae],Me+1);if(_e<0)return!1;Me=_e,Ae++}return!0}e.fuzzyContains=pe;function Pe(J,ge=!1){return J?(ge&&(J=J.replace(/\\./g,"")),J.toLowerCase()!==J):!1}e.containsUppercaseCharacter=Pe;function De(J){return J.charAt(0).toUpperCase()+J.slice(1)}e.uppercaseFirstLetter=De;function We(J,ge=1){if(ge===0)return"";let ve=-1;do ve=J.indexOf(`
`,ve+1),ge--;while(ge>0&&ve>=0);return ve===-1?J:(J[ve-1]==="\r"&&ve--,J.substr(0,ve))}e.getNLines=We;function ye(J){return J=J%(2*26),J<26?String.fromCharCode(97+J):String.fromCharCode(65+J-26)}e.singleLetterHash=ye;function we(J){return me.getInstance().getGraphemeBreakType(J)}e.getGraphemeBreakType=we;function K(J,ge){return J===0?ge!==5&&ge!==7:J===2&&ge===3?!1:J===4||J===2||J===3||ge===4||ge===2||ge===3?!0:!(J===8&&(ge===8||ge===9||ge===11||ge===12)||(J===11||J===9)&&(ge===9||ge===10)||(J===12||J===10)&&ge===10||ge===5||ge===13||ge===7||J===1||J===13&&ge===14||J===6&&ge===6)}var he;(function(J){J[J.Other=0]="Other",J[J.Prepend=1]="Prepend",J[J.CR=2]="CR",J[J.LF=3]="LF",J[J.Control=4]="Control",J[J.Extend=5]="Extend",J[J.Regional_Indicator=6]="Regional_Indicator",J[J.SpacingMark=7]="SpacingMark",J[J.L=8]="L",J[J.V=9]="V",J[J.T=10]="T",J[J.LV=11]="LV",J[J.LVT=12]="LVT",J[J.ZWJ=13]="ZWJ",J[J.Extended_Pictographic=14]="Extended_Pictographic"})(he||(e.GraphemeBreakType=he={}));class me{static{this._INSTANCE=null}static getInstance(){return me._INSTANCE||(me._INSTANCE=new me),me._INSTANCE}constructor(){this._data=Ie()}getGraphemeBreakType(ge){if(ge<32)return ge===10?3:ge===13?2:4;if(ge<127)return 0;const ve=this._data,Ee=ve.length/3;let Ae=1;for(;Ae<=Ee;)if(ge<ve[3*Ae])Ae=2*Ae;else if(ge>ve[3*Ae+1])Ae=2*Ae+1;else return ve[3*Ae+2];return 0}}function Ie(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function Le(J,ge){if(J===0)return 0;const ve=Fe(J,ge);if(ve!==void 0)return ve;const Ee=new j(ge,J);return Ee.prevCodePoint(),Ee.offset}e.getLeftDeleteOffset=Le;function Fe(J,ge){const ve=new j(ge,J);let Ee=ve.prevCodePoint();for(;Oe(Ee)||Ee===65039||Ee===8419;){if(ve.offset===0)return;Ee=ve.prevCodePoint()}if(!q(Ee))return;let Ae=ve.offset;return Ae>0&&ve.prevCodePoint()===8205&&(Ae=ve.offset),Ae}function Oe(J){return 127995<=J&&J<=127999}var qe;(function(J){J[J.zwj=8205]="zwj",J[J.emojiVariantSelector=65039]="emojiVariantSelector",J[J.enclosingKeyCap=8419]="enclosingKeyCap"})(qe||(qe={})),e.noBreakWhitespace="\xA0";class Ne{static{this.ambiguousCharacterData=new L.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new b.LRUCachedFunction(ge=>{function ve(Ye){const Xe=new Map;for(let Je=0;Je<Ye.length;Je+=2)Xe.set(Ye[Je],Ye[Je+1]);return Xe}function Ee(Ye,Xe){const Je=new Map(Ye);for(const[nt,rt]of Xe)Je.set(nt,rt);return Je}function Ae(Ye,Xe){if(!Ye)return Xe;const Je=new Map;for(const[nt,rt]of Ye)Xe.has(nt)&&Je.set(nt,rt);return Je}const Me=this.ambiguousCharacterData.value;let _e=ge.filter(Ye=>!Ye.startsWith("_")&&Ye in Me);_e.length===0&&(_e=["_default"]);let ze;for(const Ye of _e){const Xe=ve(Me[Ye]);ze=Ae(ze,Xe)}const Be=ve(Me._common),Ve=Ee(Be,ze);return new Ne(Ve)})}static getInstance(ge){return Ne.cache.get(Array.from(ge))}static{this._locales=new L.Lazy(()=>Object.keys(Ne.ambiguousCharacterData.value).filter(ge=>!ge.startsWith("_")))}static getLocales(){return Ne._locales.value}constructor(ge){this.confusableDictionary=ge}isAmbiguous(ge){return this.confusableDictionary.has(ge)}getPrimaryConfusable(ge){return this.confusableDictionary.get(ge)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Ne;class He{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(He.getRawData())),this._data}static isInvisibleCharacter(ge){return He.getData().has(ge)}static get codePoints(){return He.getData()}}e.InvisibleCharacters=He}),define(Z[57],te([0,1,26]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function L(p){return r(p,0)}e.hash=L;function r(p,c){switch(typeof p){case"object":return p===null?O(349,c):Array.isArray(p)?h(p,c):u(p,c);case"string":return P(p,c);case"boolean":return D(p,c);case"number":return O(p,c);case"undefined":return O(937,c);default:return O(617,c)}}e.doHash=r;function O(p,c){return(c<<5)-c+p|0}e.numberHash=O;function D(p,c){return O(p?433:863,c)}function P(p,c){c=O(149417,c);for(let f=0,I=p.length;f<I;f++)c=O(p.charCodeAt(f),c);return c}e.stringHash=P;function h(p,c){return c=O(104579,c),p.reduce((f,I)=>r(I,f),c)}function u(p,c){return c=O(181387,c),Object.keys(p).sort().reduce((f,I)=>(f=P(I,f),r(p[I],f)),c)}class m{constructor(){this._value=0}get value(){return this._value}hash(c){return this._value=r(c,this._value),this._value}}e.Hasher=m;var g;(function(p){p[p.BLOCK_SIZE=64]="BLOCK_SIZE",p[p.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(g||(g={}));function v(p,c,f=32){const I=f-c,w=~((1<<I)-1);return(p<<c|(w&p)>>>I)>>>0}function d(p,c=0,f=p.byteLength,I=0){for(let w=0;w<f;w++)p[c+w]=I}function y(p,c,f="0"){for(;p.length<c;)p=f+p;return p}function E(p,c=32){return p instanceof ArrayBuffer?Array.from(new Uint8Array(p)).map(f=>f.toString(16).padStart(2,"0")).join(""):y((p>>>0).toString(16),c/4)}e.toHexString=E;class l{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(c){const f=c.length;if(f===0)return;const I=this._buff;let w=this._buffLen,t=this._leftoverHighSurrogate,a,s;for(t!==0?(a=t,s=-1,t=0):(a=c.charCodeAt(0),s=0);;){let i=a;if(b.isHighSurrogate(a))if(s+1<f){const n=c.charCodeAt(s+1);b.isLowSurrogate(n)?(s++,i=b.computeCodePoint(a,n)):i=65533}else{t=a;break}else b.isLowSurrogate(a)&&(i=65533);if(w=this._push(I,w,i),s++,s<f)a=c.charCodeAt(s);else break}this._buffLen=w,this._leftoverHighSurrogate=t}_push(c,f,I){return I<128?c[f++]=I:I<2048?(c[f++]=192|(I&1984)>>>6,c[f++]=128|(I&63)>>>0):I<65536?(c[f++]=224|(I&61440)>>>12,c[f++]=128|(I&4032)>>>6,c[f++]=128|(I&63)>>>0):(c[f++]=240|(I&1835008)>>>18,c[f++]=128|(I&258048)>>>12,c[f++]=128|(I&4032)>>>6,c[f++]=128|(I&63)>>>0),f>=64&&(this._step(),f-=64,this._totalLen+=64,c[0]=c[64+0],c[1]=c[64+1],c[2]=c[64+2]),f}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),E(this._h0)+E(this._h1)+E(this._h2)+E(this._h3)+E(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));const c=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(c/4294967296),!1),this._buffDV.setUint32(60,c%4294967296,!1),this._step()}_step(){const c=l._bigBlock32,f=this._buffDV;for(let S=0;S<64;S+=4)c.setUint32(S,f.getUint32(S,!1),!1);for(let S=64;S<320;S+=4)c.setUint32(S,v(c.getUint32(S-12,!1)^c.getUint32(S-32,!1)^c.getUint32(S-56,!1)^c.getUint32(S-64,!1),1),!1);let I=this._h0,w=this._h1,t=this._h2,a=this._h3,s=this._h4,i,n,o;for(let S=0;S<80;S++)S<20?(i=w&t|~w&a,n=1518500249):S<40?(i=w^t^a,n=1859775393):S<60?(i=w&t|w&a|t&a,n=2400959708):(i=w^t^a,n=3395469782),o=v(I,5)+i+s+n+c.getUint32(S*4,!1)&4294967295,s=a,a=t,t=v(w,30),w=I,I=o;this._h0=this._h0+I&4294967295,this._h1=this._h1+w&4294967295,this._h2=this._h2+t&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}}e.StringSHA1=l}),define(Z[71],te([0,1,26]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var L;(function(r){r[r.Ignore=0]="Ignore",r[r.Info=1]="Info",r[r.Warning=2]="Warning",r[r.Error=3]="Error"})(L||(L={})),function(r){const O="error",D="warning",P="warn",h="info",u="ignore";function m(v){return v?b.equalsIgnoreCase(O,v)?r.Error:b.equalsIgnoreCase(D,v)||b.equalsIgnoreCase(P,v)?r.Warning:b.equalsIgnoreCase(h,v)?r.Info:r.Ignore:r.Ignore}r.fromValue=m;function g(v){switch(v){case r.Error:return O;case r.Warning:return D;case r.Info:return h;default:return u}}r.toString=g}(L||(L={})),e.default=L}),define(Z[143],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(Z[58],te([0,1,24,26]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class r{constructor(){this._value="",this._pos=0}reset(d){return this._value=d,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(d){const y=d.charCodeAt(0),E=this._value.charCodeAt(this._pos);return y-E}value(){return this._value[this._pos]}}e.StringIterator=r;class O{constructor(d=!0){this._caseSensitive=d}reset(d){return this._value=d,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let d=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(d)this._from++;else break;else d=!1;return this}cmp(d){return this._caseSensitive?(0,L.compareSubstring)(d,this._value,0,d.length,this._from,this._to):(0,L.compareSubstringIgnoreCase)(d,this._value,0,d.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=O;class D{constructor(d=!0,y=!0){this._splitOnBackslash=d,this._caseSensitive=y}reset(d){this._from=0,this._to=0,this._value=d,this._valueLen=d.length;for(let y=d.length-1;y>=0;y--,this._valueLen--){const E=this._value.charCodeAt(y);if(!(E===47||this._splitOnBackslash&&E===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let d=!0;for(;this._to<this._valueLen;this._to++){const y=this._value.charCodeAt(this._to);if(y===47||this._splitOnBackslash&&y===92)if(d)this._from++;else break;else d=!1}return this}cmp(d){return this._caseSensitive?(0,L.compareSubstring)(d,this._value,0,d.length,this._from,this._to):(0,L.compareSubstringIgnoreCase)(d,this._value,0,d.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=D;var P;(function(v){v[v.Scheme=1]="Scheme",v[v.Authority=2]="Authority",v[v.Path=3]="Path",v[v.Query=4]="Query",v[v.Fragment=5]="Fragment"})(P||(P={}));class h{constructor(d,y){this._ignorePathCasing=d,this._ignoreQueryAndFragment=y,this._states=[],this._stateIdx=0}reset(d){return this._value=d,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new D(!1,!this._ignorePathCasing(d)),this._pathIterator.reset(d.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(d)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(d){if(this._states[this._stateIdx]===1)return(0,L.compareIgnoreCase)(d,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,L.compareIgnoreCase)(d,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(d);if(this._states[this._stateIdx]===4)return(0,L.compare)(d,this._value.query);if(this._states[this._stateIdx]===5)return(0,L.compare)(d,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=h;class u{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const d=this.right;return this.right=d.left,d.left=this,this.updateHeight(),d.updateHeight(),d}rotateRight(){const d=this.left;return this.left=d.right,d.right=this,this.updateHeight(),d.updateHeight(),d}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var m;(function(v){v[v.Left=-1]="Left",v[v.Mid=0]="Mid",v[v.Right=1]="Right"})(m||(m={}));class g{static forUris(d=()=>!1,y=()=>!1){return new g(new h(d,y))}static forPaths(d=!1){return new g(new D(void 0,!d))}static forStrings(){return new g(new r)}static forConfigKeys(){return new g(new O)}constructor(d){this._iter=d}clear(){this._root=void 0}fill(d,y){if(y){const E=y.slice(0);(0,b.shuffle)(E);for(const l of E)this.set(l,d)}else{const E=d.slice(0);(0,b.shuffle)(E);for(const l of E)this.set(l[0],l[1])}}set(d,y){const E=this._iter.reset(d);let l;this._root||(this._root=new u,this._root.segment=E.value());const p=[];for(l=this._root;;){const f=E.cmp(l.segment);if(f>0)l.left||(l.left=new u,l.left.segment=E.value()),p.push([-1,l]),l=l.left;else if(f<0)l.right||(l.right=new u,l.right.segment=E.value()),p.push([1,l]),l=l.right;else if(E.hasNext())E.next(),l.mid||(l.mid=new u,l.mid.segment=E.value()),p.push([0,l]),l=l.mid;else break}const c=l.value;l.value=y,l.key=d;for(let f=p.length-1;f>=0;f--){const I=p[f][1];I.updateHeight();const w=I.balanceFactor();if(w<-1||w>1){const t=p[f][0],a=p[f+1][0];if(t===1&&a===1)p[f][1]=I.rotateLeft();else if(t===-1&&a===-1)p[f][1]=I.rotateRight();else if(t===1&&a===-1)I.right=p[f+1][1]=p[f+1][1].rotateRight(),p[f][1]=I.rotateLeft();else if(t===-1&&a===1)I.left=p[f+1][1]=p[f+1][1].rotateLeft(),p[f][1]=I.rotateRight();else throw new Error;if(f>0)switch(p[f-1][0]){case-1:p[f-1][1].left=p[f][1];break;case 1:p[f-1][1].right=p[f][1];break;case 0:p[f-1][1].mid=p[f][1];break}else this._root=p[0][1]}}return c}get(d){return this._getNode(d)?.value}_getNode(d){const y=this._iter.reset(d);let E=this._root;for(;E;){const l=y.cmp(E.segment);if(l>0)E=E.left;else if(l<0)E=E.right;else if(y.hasNext())y.next(),E=E.mid;else break}return E}has(d){const y=this._getNode(d);return!(y?.value===void 0&&y?.mid===void 0)}delete(d){return this._delete(d,!1)}deleteSuperstr(d){return this._delete(d,!0)}_delete(d,y){const E=this._iter.reset(d),l=[];let p=this._root;for(;p;){const c=E.cmp(p.segment);if(c>0)l.push([-1,p]),p=p.left;else if(c<0)l.push([1,p]),p=p.right;else if(E.hasNext())E.next(),l.push([0,p]),p=p.mid;else break}if(p){if(y?(p.left=void 0,p.mid=void 0,p.right=void 0,p.height=1):(p.key=void 0,p.value=void 0),!p.mid&&!p.value)if(p.left&&p.right){const c=this._min(p.right);if(c.key){const{key:f,value:I,segment:w}=c;this._delete(c.key,!1),p.key=f,p.value=I,p.segment=w}}else{const c=p.left??p.right;if(l.length>0){const[f,I]=l[l.length-1];switch(f){case-1:I.left=c;break;case 0:I.mid=c;break;case 1:I.right=c;break}}else this._root=c}for(let c=l.length-1;c>=0;c--){const f=l[c][1];f.updateHeight();const I=f.balanceFactor();if(I>1?(f.right.balanceFactor()>=0||(f.right=f.right.rotateRight()),l[c][1]=f.rotateLeft()):I<-1&&(f.left.balanceFactor()<=0||(f.left=f.left.rotateLeft()),l[c][1]=f.rotateRight()),c>0)switch(l[c-1][0]){case-1:l[c-1][1].left=l[c][1];break;case 1:l[c-1][1].right=l[c][1];break;case 0:l[c-1][1].mid=l[c][1];break}else this._root=l[0][1]}}}_min(d){for(;d.left;)d=d.left;return d}findSubstr(d){const y=this._iter.reset(d);let E=this._root,l;for(;E;){const p=y.cmp(E.segment);if(p>0)E=E.left;else if(p<0)E=E.right;else if(y.hasNext())y.next(),l=E.value||l,E=E.mid;else break}return E&&E.value||l}findSuperstr(d){return this._findSuperstrOrElement(d,!1)}_findSuperstrOrElement(d,y){const E=this._iter.reset(d);let l=this._root;for(;l;){const p=E.cmp(l.segment);if(p>0)l=l.left;else if(p<0)l=l.right;else if(E.hasNext())E.next(),l=l.mid;else return l.mid?this._entries(l.mid):y?l.value:void 0}}hasElementOrSubtree(d){return this._findSuperstrOrElement(d,!0)!==void 0}forEach(d){for(const[y,E]of this)d(E,y)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(d){const y=[];return this._dfsEntries(d,y),y[Symbol.iterator]()}_dfsEntries(d,y){d&&(d.left&&this._dfsEntries(d.left,y),d.value&&y.push([d.key,d.value]),d.mid&&this._dfsEntries(d.mid,y),d.right&&this._dfsEntries(d.right,y))}_isBalanced(){const d=y=>{if(!y)return!0;const E=y.balanceFactor();return E<-1||E>1?!1:d(y.left)&&d(y.right)};return d(this._root)}}e.TernarySearchTree=g}),define(Z[12],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=void 0;function b(t){return typeof t=="string"}e.isString=b;function L(t){return Array.isArray(t)&&t.every(a=>b(a))}e.isStringArray=L;function r(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}e.isObject=r;function O(t){const a=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof a}e.isTypedArray=O;function D(t){return typeof t=="number"&&!isNaN(t)}e.isNumber=D;function P(t){return!!t&&typeof t[Symbol.iterator]=="function"}e.isIterable=P;function h(t){return t===!0||t===!1}e.isBoolean=h;function u(t){return typeof t>"u"}e.isUndefined=u;function m(t){return!g(t)}e.isDefined=m;function g(t){return u(t)||t===null}e.isUndefinedOrNull=g;function v(t,a){if(!t)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}e.assertType=v;function d(t){if(g(t))throw new Error("Assertion Failed: argument is undefined or null");return t}e.assertIsDefined=d;function y(...t){const a=[];for(let s=0;s<t.length;s++){const i=t[s];if(g(i))throw new Error(`Assertion Failed: argument at index ${s} is undefined or null`);a.push(i)}return a}e.assertAllDefined=y;const E=Object.prototype.hasOwnProperty;function l(t){if(!r(t))return!1;for(const a in t)if(E.call(t,a))return!1;return!0}e.isEmptyObject=l;function p(t){return typeof t=="function"}e.isFunction=p;function c(...t){return t.length>0&&t.every(p)}e.areFunctions=c;function f(t,a){const s=Math.min(t.length,a.length);for(let i=0;i<s;i++)I(t[i],a[i])}e.validateConstraints=f;function I(t,a){if(b(a)){if(typeof t!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(p(a)){try{if(t instanceof a)return}catch{}if(!g(t)&&t.constructor===a||a.length===1&&a.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=I;function w(t){return t===null?void 0:t}e.withNullAsUndefined=w}),define(Z[72],te([0,1,12]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getAllCodicons=e.getCodiconFontCharacters=void 0;const L=Object.create(null);function r(P,h){if((0,b.isString)(h)){const u=L[h];if(u===void 0)throw new Error(`${P} references an unknown codicon: ${h}`);h=u}return L[P]=h,{id:P}}function O(){return L}e.getCodiconFontCharacters=O;function D(){return Object.values(e.Codicon)}e.getAllCodicons=D,e.Codicon={add:r("add",6e4),plus:r("plus",6e4),gistNew:r("gist-new",6e4),repoCreate:r("repo-create",6e4),lightbulb:r("lightbulb",60001),lightBulb:r("light-bulb",60001),repo:r("repo",60002),repoDelete:r("repo-delete",60002),gistFork:r("gist-fork",60003),repoForked:r("repo-forked",60003),gitPullRequest:r("git-pull-request",60004),gitPullRequestAbandoned:r("git-pull-request-abandoned",60004),recordKeys:r("record-keys",60005),keyboard:r("keyboard",60005),tag:r("tag",60006),tagAdd:r("tag-add",60006),tagRemove:r("tag-remove",60006),gitPullRequestLabel:r("git-pull-request-label",60006),person:r("person",60007),personFollow:r("person-follow",60007),personOutline:r("person-outline",60007),personFilled:r("person-filled",60007),gitBranch:r("git-branch",60008),gitBranchCreate:r("git-branch-create",60008),gitBranchDelete:r("git-branch-delete",60008),sourceControl:r("source-control",60008),mirror:r("mirror",60009),mirrorPublic:r("mirror-public",60009),star:r("star",60010),starAdd:r("star-add",60010),starDelete:r("star-delete",60010),starEmpty:r("star-empty",60010),comment:r("comment",60011),commentAdd:r("comment-add",60011),alert:r("alert",60012),warning:r("warning",60012),search:r("search",60013),searchSave:r("search-save",60013),logOut:r("log-out",60014),signOut:r("sign-out",60014),logIn:r("log-in",60015),signIn:r("sign-in",60015),eye:r("eye",60016),eyeUnwatch:r("eye-unwatch",60016),eyeWatch:r("eye-watch",60016),circleFilled:r("circle-filled",60017),primitiveDot:r("primitive-dot",60017),closeDirty:r("close-dirty",60017),debugBreakpoint:r("debug-breakpoint",60017),debugBreakpointDisabled:r("debug-breakpoint-disabled",60017),debugHint:r("debug-hint",60017),primitiveSquare:r("primitive-square",60018),edit:r("edit",60019),pencil:r("pencil",60019),info:r("info",60020),issueOpened:r("issue-opened",60020),gistPrivate:r("gist-private",60021),gitForkPrivate:r("git-fork-private",60021),lock:r("lock",60021),mirrorPrivate:r("mirror-private",60021),close:r("close",60022),removeClose:r("remove-close",60022),x:r("x",60022),repoSync:r("repo-sync",60023),sync:r("sync",60023),clone:r("clone",60024),desktopDownload:r("desktop-download",60024),beaker:r("beaker",60025),microscope:r("microscope",60025),vm:r("vm",60026),deviceDesktop:r("device-desktop",60026),file:r("file",60027),fileText:r("file-text",60027),more:r("more",60028),ellipsis:r("ellipsis",60028),kebabHorizontal:r("kebab-horizontal",60028),mailReply:r("mail-reply",60029),reply:r("reply",60029),organization:r("organization",60030),organizationFilled:r("organization-filled",60030),organizationOutline:r("organization-outline",60030),newFile:r("new-file",60031),fileAdd:r("file-add",60031),newFolder:r("new-folder",60032),fileDirectoryCreate:r("file-directory-create",60032),trash:r("trash",60033),trashcan:r("trashcan",60033),history:r("history",60034),clock:r("clock",60034),folder:r("folder",60035),fileDirectory:r("file-directory",60035),symbolFolder:r("symbol-folder",60035),logoGithub:r("logo-github",60036),markGithub:r("mark-github",60036),github:r("github",60036),terminal:r("terminal",60037),console:r("console",60037),repl:r("repl",60037),zap:r("zap",60038),symbolEvent:r("symbol-event",60038),error:r("error",60039),stop:r("stop",60039),variable:r("variable",60040),symbolVariable:r("symbol-variable",60040),array:r("array",60042),symbolArray:r("symbol-array",60042),symbolModule:r("symbol-module",60043),symbolPackage:r("symbol-package",60043),symbolNamespace:r("symbol-namespace",60043),symbolObject:r("symbol-object",60043),symbolMethod:r("symbol-method",60044),symbolFunction:r("symbol-function",60044),symbolConstructor:r("symbol-constructor",60044),symbolBoolean:r("symbol-boolean",60047),symbolNull:r("symbol-null",60047),symbolNumeric:r("symbol-numeric",60048),symbolNumber:r("symbol-number",60048),symbolStructure:r("symbol-structure",60049),symbolStruct:r("symbol-struct",60049),symbolParameter:r("symbol-parameter",60050),symbolTypeParameter:r("symbol-type-parameter",60050),symbolKey:r("symbol-key",60051),symbolText:r("symbol-text",60051),symbolReference:r("symbol-reference",60052),goToFile:r("go-to-file",60052),symbolEnum:r("symbol-enum",60053),symbolValue:r("symbol-value",60053),symbolRuler:r("symbol-ruler",60054),symbolUnit:r("symbol-unit",60054),activateBreakpoints:r("activate-breakpoints",60055),archive:r("archive",60056),arrowBoth:r("arrow-both",60057),arrowDown:r("arrow-down",60058),arrowLeft:r("arrow-left",60059),arrowRight:r("arrow-right",60060),arrowSmallDown:r("arrow-small-down",60061),arrowSmallLeft:r("arrow-small-left",60062),arrowSmallRight:r("arrow-small-right",60063),arrowSmallUp:r("arrow-small-up",60064),arrowUp:r("arrow-up",60065),bell:r("bell",60066),bold:r("bold",60067),book:r("book",60068),bookmark:r("bookmark",60069),debugBreakpointConditionalUnverified:r("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:r("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:r("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:r("debug-breakpoint-data-unverified",60072),debugBreakpointData:r("debug-breakpoint-data",60073),debugBreakpointDataDisabled:r("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:r("debug-breakpoint-log-unverified",60074),debugBreakpointLog:r("debug-breakpoint-log",60075),debugBreakpointLogDisabled:r("debug-breakpoint-log-disabled",60075),briefcase:r("briefcase",60076),broadcast:r("broadcast",60077),browser:r("browser",60078),bug:r("bug",60079),calendar:r("calendar",60080),caseSensitive:r("case-sensitive",60081),check:r("check",60082),checklist:r("checklist",60083),chevronDown:r("chevron-down",60084),dropDownButton:r("drop-down-button",60084),chevronLeft:r("chevron-left",60085),chevronRight:r("chevron-right",60086),chevronUp:r("chevron-up",60087),chromeClose:r("chrome-close",60088),chromeMaximize:r("chrome-maximize",60089),chromeMinimize:r("chrome-minimize",60090),chromeRestore:r("chrome-restore",60091),circle:r("circle",60092),circleOutline:r("circle-outline",60092),debugBreakpointUnverified:r("debug-breakpoint-unverified",60092),circleSlash:r("circle-slash",60093),circuitBoard:r("circuit-board",60094),clearAll:r("clear-all",60095),clippy:r("clippy",60096),closeAll:r("close-all",60097),cloudDownload:r("cloud-download",60098),cloudUpload:r("cloud-upload",60099),code:r("code",60100),collapseAll:r("collapse-all",60101),colorMode:r("color-mode",60102),commentDiscussion:r("comment-discussion",60103),compareChanges:r("compare-changes",60157),creditCard:r("credit-card",60105),dash:r("dash",60108),dashboard:r("dashboard",60109),database:r("database",60110),debugContinue:r("debug-continue",60111),debugDisconnect:r("debug-disconnect",60112),debugPause:r("debug-pause",60113),debugRestart:r("debug-restart",60114),debugStart:r("debug-start",60115),debugStepInto:r("debug-step-into",60116),debugStepOut:r("debug-step-out",60117),debugStepOver:r("debug-step-over",60118),debugStop:r("debug-stop",60119),debug:r("debug",60120),deviceCameraVideo:r("device-camera-video",60121),deviceCamera:r("device-camera",60122),deviceMobile:r("device-mobile",60123),diffAdded:r("diff-added",60124),diffIgnored:r("diff-ignored",60125),diffModified:r("diff-modified",60126),diffRemoved:r("diff-removed",60127),diffRenamed:r("diff-renamed",60128),diff:r("diff",60129),discard:r("discard",60130),editorLayout:r("editor-layout",60131),emptyWindow:r("empty-window",60132),exclude:r("exclude",60133),extensions:r("extensions",60134),eyeClosed:r("eye-closed",60135),fileBinary:r("file-binary",60136),fileCode:r("file-code",60137),fileMedia:r("file-media",60138),filePdf:r("file-pdf",60139),fileSubmodule:r("file-submodule",60140),fileSymlinkDirectory:r("file-symlink-directory",60141),fileSymlinkFile:r("file-symlink-file",60142),fileZip:r("file-zip",60143),files:r("files",60144),filter:r("filter",60145),flame:r("flame",60146),foldDown:r("fold-down",60147),foldUp:r("fold-up",60148),fold:r("fold",60149),folderActive:r("folder-active",60150),folderOpened:r("folder-opened",60151),gear:r("gear",60152),gift:r("gift",60153),gistSecret:r("gist-secret",60154),gist:r("gist",60155),gitCommit:r("git-commit",60156),gitCompare:r("git-compare",60157),gitMerge:r("git-merge",60158),githubAction:r("github-action",60159),githubAlt:r("github-alt",60160),globe:r("globe",60161),grabber:r("grabber",60162),graph:r("graph",60163),gripper:r("gripper",60164),heart:r("heart",60165),home:r("home",60166),horizontalRule:r("horizontal-rule",60167),hubot:r("hubot",60168),inbox:r("inbox",60169),issueClosed:r("issue-closed",60324),issueReopened:r("issue-reopened",60171),issues:r("issues",60172),italic:r("italic",60173),jersey:r("jersey",60174),json:r("json",60175),bracket:r("bracket",60175),kebabVertical:r("kebab-vertical",60176),key:r("key",60177),law:r("law",60178),lightbulbAutofix:r("lightbulb-autofix",60179),linkExternal:r("link-external",60180),link:r("link",60181),listOrdered:r("list-ordered",60182),listUnordered:r("list-unordered",60183),liveShare:r("live-share",60184),loading:r("loading",60185),location:r("location",60186),mailRead:r("mail-read",60187),mail:r("mail",60188),markdown:r("markdown",60189),megaphone:r("megaphone",60190),mention:r("mention",60191),milestone:r("milestone",60192),gitPullRequestMilestone:r("git-pull-request-milestone",60192),mortarBoard:r("mortar-board",60193),move:r("move",60194),multipleWindows:r("multiple-windows",60195),mute:r("mute",60196),noNewline:r("no-newline",60197),note:r("note",60198),octoface:r("octoface",60199),openPreview:r("open-preview",60200),package_:r("package",60201),paintcan:r("paintcan",60202),pin:r("pin",60203),play:r("play",60204),run:r("run",60204),plug:r("plug",60205),preserveCase:r("preserve-case",60206),preview:r("preview",60207),project:r("project",60208),pulse:r("pulse",60209),question:r("question",60210),quote:r("quote",60211),radioTower:r("radio-tower",60212),reactions:r("reactions",60213),references:r("references",60214),refresh:r("refresh",60215),regex:r("regex",60216),remoteExplorer:r("remote-explorer",60217),remote:r("remote",60218),remove:r("remove",60219),replaceAll:r("replace-all",60220),replace:r("replace",60221),repoClone:r("repo-clone",60222),repoForcePush:r("repo-force-push",60223),repoPull:r("repo-pull",60224),repoPush:r("repo-push",60225),report:r("report",60226),requestChanges:r("request-changes",60227),rocket:r("rocket",60228),rootFolderOpened:r("root-folder-opened",60229),rootFolder:r("root-folder",60230),rss:r("rss",60231),ruby:r("ruby",60232),saveAll:r("save-all",60233),saveAs:r("save-as",60234),save:r("save",60235),screenFull:r("screen-full",60236),screenNormal:r("screen-normal",60237),searchStop:r("search-stop",60238),server:r("server",60240),settingsGear:r("settings-gear",60241),settings:r("settings",60242),shield:r("shield",60243),smiley:r("smiley",60244),sortPrecedence:r("sort-precedence",60245),splitHorizontal:r("split-horizontal",60246),splitVertical:r("split-vertical",60247),squirrel:r("squirrel",60248),starFull:r("star-full",60249),starHalf:r("star-half",60250),symbolClass:r("symbol-class",60251),symbolColor:r("symbol-color",60252),symbolCustomColor:r("symbol-customcolor",60252),symbolConstant:r("symbol-constant",60253),symbolEnumMember:r("symbol-enum-member",60254),symbolField:r("symbol-field",60255),symbolFile:r("symbol-file",60256),symbolInterface:r("symbol-interface",60257),symbolKeyword:r("symbol-keyword",60258),symbolMisc:r("symbol-misc",60259),symbolOperator:r("symbol-operator",60260),symbolProperty:r("symbol-property",60261),wrench:r("wrench",60261),wrenchSubaction:r("wrench-subaction",60261),symbolSnippet:r("symbol-snippet",60262),tasklist:r("tasklist",60263),telescope:r("telescope",60264),textSize:r("text-size",60265),threeBars:r("three-bars",60266),thumbsdown:r("thumbsdown",60267),thumbsup:r("thumbsup",60268),tools:r("tools",60269),triangleDown:r("triangle-down",60270),triangleLeft:r("triangle-left",60271),triangleRight:r("triangle-right",60272),triangleUp:r("triangle-up",60273),twitter:r("twitter",60274),unfold:r("unfold",60275),unlock:r("unlock",60276),unmute:r("unmute",60277),unverified:r("unverified",60278),verified:r("verified",60279),versions:r("versions",60280),vmActive:r("vm-active",60281),vmOutline:r("vm-outline",60282),vmRunning:r("vm-running",60283),watch:r("watch",60284),whitespace:r("whitespace",60285),wholeWord:r("whole-word",60286),window:r("window",60287),wordWrap:r("word-wrap",60288),zoomIn:r("zoom-in",60289),zoomOut:r("zoom-out",60290),listFilter:r("list-filter",60291),listFlat:r("list-flat",60292),listSelection:r("list-selection",60293),selection:r("selection",60293),listTree:r("list-tree",60294),debugBreakpointFunctionUnverified:r("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:r("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:r("debug-breakpoint-function-disabled",60296),debugStackframeActive:r("debug-stackframe-active",60297),circleSmallFilled:r("circle-small-filled",60298),debugStackframeDot:r("debug-stackframe-dot",60298),debugStackframe:r("debug-stackframe",60299),debugStackframeFocused:r("debug-stackframe-focused",60299),debugBreakpointUnsupported:r("debug-breakpoint-unsupported",60300),symbolString:r("symbol-string",60301),debugReverseContinue:r("debug-reverse-continue",60302),debugStepBack:r("debug-step-back",60303),debugRestartFrame:r("debug-restart-frame",60304),callIncoming:r("call-incoming",60306),callOutgoing:r("call-outgoing",60307),menu:r("menu",60308),expandAll:r("expand-all",60309),feedback:r("feedback",60310),gitPullRequestReviewer:r("git-pull-request-reviewer",60310),groupByRefType:r("group-by-ref-type",60311),ungroupByRefType:r("ungroup-by-ref-type",60312),account:r("account",60313),gitPullRequestAssignee:r("git-pull-request-assignee",60313),bellDot:r("bell-dot",60314),debugConsole:r("debug-console",60315),library:r("library",60316),output:r("output",60317),runAll:r("run-all",60318),syncIgnored:r("sync-ignored",60319),pinned:r("pinned",60320),githubInverted:r("github-inverted",60321),debugAlt:r("debug-alt",60305),serverProcess:r("server-process",60322),serverEnvironment:r("server-environment",60323),pass:r("pass",60324),stopCircle:r("stop-circle",60325),playCircle:r("play-circle",60326),record:r("record",60327),debugAltSmall:r("debug-alt-small",60328),vmConnect:r("vm-connect",60329),cloud:r("cloud",60330),merge:r("merge",60331),exportIcon:r("export",60332),graphLeft:r("graph-left",60333),magnet:r("magnet",60334),notebook:r("notebook",60335),redo:r("redo",60336),checkAll:r("check-all",60337),pinnedDirty:r("pinned-dirty",60338),passFilled:r("pass-filled",60339),circleLargeFilled:r("circle-large-filled",60340),circleLarge:r("circle-large",60341),circleLargeOutline:r("circle-large-outline",60341),combine:r("combine",60342),gather:r("gather",60342),table:r("table",60343),variableGroup:r("variable-group",60344),typeHierarchy:r("type-hierarchy",60345),typeHierarchySub:r("type-hierarchy-sub",60346),typeHierarchySuper:r("type-hierarchy-super",60347),gitPullRequestCreate:r("git-pull-request-create",60348),runAbove:r("run-above",60349),runBelow:r("run-below",60350),notebookTemplate:r("notebook-template",60351),debugRerun:r("debug-rerun",60352),workspaceTrusted:r("workspace-trusted",60353),workspaceUntrusted:r("workspace-untrusted",60354),workspaceUnspecified:r("workspace-unspecified",60355),terminalCmd:r("terminal-cmd",60356),terminalDebian:r("terminal-debian",60357),terminalLinux:r("terminal-linux",60358),terminalPowershell:r("terminal-powershell",60359),terminalTmux:r("terminal-tmux",60360),terminalUbuntu:r("terminal-ubuntu",60361),terminalBash:r("terminal-bash",60362),arrowSwap:r("arrow-swap",60363),copy:r("copy",60364),personAdd:r("person-add",60365),filterFilled:r("filter-filled",60366),wand:r("wand",60367),debugLineByLine:r("debug-line-by-line",60368),inspect:r("inspect",60369),layers:r("layers",60370),layersDot:r("layers-dot",60371),layersActive:r("layers-active",60372),compass:r("compass",60373),compassDot:r("compass-dot",60374),compassActive:r("compass-active",60375),azure:r("azure",60376),issueDraft:r("issue-draft",60377),gitPullRequestClosed:r("git-pull-request-closed",60378),gitPullRequestDraft:r("git-pull-request-draft",60379),debugAll:r("debug-all",60380),debugCoverage:r("debug-coverage",60381),runErrors:r("run-errors",60382),folderLibrary:r("folder-library",60383),debugContinueSmall:r("debug-continue-small",60384),beakerStop:r("beaker-stop",60385),graphLine:r("graph-line",60386),graphScatter:r("graph-scatter",60387),pieChart:r("pie-chart",60388),bracketDot:r("bracket-dot",60389),bracketError:r("bracket-error",60390),lockSmall:r("lock-small",60391),azureDevops:r("azure-devops",60392),verifiedFilled:r("verified-filled",60393),newLine:r("newline",60394),layout:r("layout",60395),layoutActivitybarLeft:r("layout-activitybar-left",60396),layoutActivitybarRight:r("layout-activitybar-right",60397),layoutPanelLeft:r("layout-panel-left",60398),layoutPanelCenter:r("layout-panel-center",60399),layoutPanelJustify:r("layout-panel-justify",60400),layoutPanelRight:r("layout-panel-right",60401),layoutPanel:r("layout-panel",60402),layoutSidebarLeft:r("layout-sidebar-left",60403),layoutSidebarRight:r("layout-sidebar-right",60404),layoutStatusbar:r("layout-statusbar",60405),layoutMenubar:r("layout-menubar",60406),layoutCentered:r("layout-centered",60407),layoutSidebarRightOff:r("layout-sidebar-right-off",60416),layoutPanelOff:r("layout-panel-off",60417),layoutSidebarLeftOff:r("layout-sidebar-left-off",60418),target:r("target",60408),indent:r("indent",60409),recordSmall:r("record-small",60410),errorSmall:r("error-small",60411),arrowCircleDown:r("arrow-circle-down",60412),arrowCircleLeft:r("arrow-circle-left",60413),arrowCircleRight:r("arrow-circle-right",60414),arrowCircleUp:r("arrow-circle-up",60415),heartFilled:r("heart-filled",60420),map:r("map",60421),mapFilled:r("map-filled",60422),circleSmall:r("circle-small",60423),bellSlash:r("bell-slash",60424),bellSlashDot:r("bell-slash-dot",60425),commentUnresolved:r("comment-unresolved",60426),gitPullRequestGoToChanges:r("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:r("git-pull-request-new-changes",60428),searchFuzzy:r("search-fuzzy",60429),commentDraft:r("comment-draft",60430),send:r("send",60431),sparkle:r("sparkle",60432),insert:r("insert",60433),mic:r("mic",60434),dialogError:r("dialog-error","error"),dialogWarning:r("dialog-warning","warning"),dialogInfo:r("dialog-info","info"),dialogClose:r("dialog-close","close"),treeItemExpanded:r("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:r("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:r("tree-filter-on-type-off","list-selection"),treeFilterClear:r("tree-filter-clear","close"),treeItemLoading:r("tree-item-loading","loading"),menuSelection:r("menu-selection","check"),menuSubmenu:r("menu-submenu","chevron-right"),menuBarMore:r("menubar-more","more"),scrollbarButtonLeft:r("scrollbar-button-left","triangle-left"),scrollbarButtonRight:r("scrollbar-button-right","triangle-right"),scrollbarButtonUp:r("scrollbar-button-up","triangle-up"),scrollbarButtonDown:r("scrollbar-button-down","triangle-down"),toolBarMore:r("toolbar-more","more"),quickInputBack:r("quick-input-back","arrow-left")}}),define(Z[37],te([0,1,12]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.getOrDefault=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function L(c){if(!c||typeof c!="object"||c instanceof RegExp)return c;const f=Array.isArray(c)?[]:{};return Object.entries(c).forEach(([I,w])=>{f[I]=w&&typeof w=="object"?L(w):w}),f}e.deepClone=L;function r(c){if(!c||typeof c!="object")return c;const f=[c];for(;f.length>0;){const I=f.shift();Object.freeze(I);for(const w in I)if(O.call(I,w)){const t=I[w];typeof t=="object"&&!Object.isFrozen(t)&&!(0,b.isTypedArray)(t)&&f.push(t)}}return c}e.deepFreeze=r;const O=Object.prototype.hasOwnProperty;function D(c,f){return P(c,f,new Set)}e.cloneAndChange=D;function P(c,f,I){if((0,b.isUndefinedOrNull)(c))return c;const w=f(c);if(typeof w<"u")return w;if(Array.isArray(c)){const t=[];for(const a of c)t.push(P(a,f,I));return t}if((0,b.isObject)(c)){if(I.has(c))throw new Error("Cannot clone recursive data-structure");I.add(c);const t={};for(const a in c)O.call(c,a)&&(t[a]=P(c[a],f,I));return I.delete(c),t}return c}function h(c,f,I=!0){return(0,b.isObject)(c)?((0,b.isObject)(f)&&Object.keys(f).forEach(w=>{w in c?I&&((0,b.isObject)(c[w])&&(0,b.isObject)(f[w])?h(c[w],f[w],I):c[w]=f[w]):c[w]=f[w]}),c):f}e.mixin=h;function u(c,f){if(c===f)return!0;if(c==null||f===null||f===void 0||typeof c!=typeof f||typeof c!="object"||Array.isArray(c)!==Array.isArray(f))return!1;let I,w;if(Array.isArray(c)){if(c.length!==f.length)return!1;for(I=0;I<c.length;I++)if(!u(c[I],f[I]))return!1}else{const t=[];for(w in c)t.push(w);t.sort();const a=[];for(w in f)a.push(w);if(a.sort(),!u(t,a))return!1;for(I=0;I<t.length;I++)if(!u(c[t[I]],f[t[I]]))return!1}return!0}e.equals=u;function m(c){const f=new Set;return JSON.stringify(c,(I,w)=>{if((0,b.isObject)(w)||Array.isArray(w)){if(f.has(w))return"[Circular]";f.add(w)}return w})}e.safeStringify=m;function g(c,f,I){const w=f(c);return typeof w>"u"?I:w}e.getOrDefault=g;function v(c,f){const I=Object.create(null);return!c||!f||Object.keys(f).forEach(t=>{const a=c[t],s=f[t];u(a,s)||(I[t]=s)}),I}e.distinct=v;function d(c,f){const I=f.toLowerCase(),w=Object.keys(c).find(t=>t.toLowerCase()===I);return w?c[w]:c[f]}e.getCaseInsensitive=d;function y(c,f){const I=Object.create(null);for(const[w,t]of Object.entries(c))f(w,t)&&(I[w]=t);return I}e.filter=y;function E(c){let f=[];for(;Object.prototype!==c;)f=f.concat(Object.getOwnPropertyNames(c)),c=Object.getPrototypeOf(c);return f}e.getAllPropertyNames=E;function l(c){const f=[];for(const I of E(c))typeof c[I]=="function"&&f.push(I);return f}e.getAllMethodNames=l;function p(c,f){const I=t=>function(){const a=Array.prototype.slice.call(arguments,0);return f(t,a)},w={};for(const t of c)w[t]=I(t);return w}e.createProxyObject=p}),define(Z[105],te([0,1,72]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.themeColorFromId=e.ThemeColor=void 0;var L;(function(D){function P(h){return h&&typeof h=="object"&&typeof h.id=="string"}D.isThemeColor=P})(L||(e.ThemeColor=L={}));function r(D){return{id:D}}e.themeColorFromId=r;var O;(function(D){D.iconNameSegment="[A-Za-z0-9]+",D.iconNameExpression="[A-Za-z0-9-]+",D.iconModifierExpression="~[A-Za-z]+",D.iconNameCharacter="[A-Za-z0-9~-]";const P=new RegExp(`^(${D.iconNameExpression})(${D.iconModifierExpression})?$`);function h(c){const f=P.exec(c.id);if(!f)return h(b.Codicon.error);const[,I,w]=f;if(["active-connections-action","add-server-action","add-server-group-action","server-page"].includes(I))return["codicon",I];{const a=["codicon","codicon-"+I];return w&&a.push("codicon-modifier-"+w.substring(1)),a}}D.asClassNameArray=h;function u(c){return h(c).join(" ")}D.asClassName=u;function m(c){return"."+h(c).join(".")}D.asCSSSelector=m;function g(c){return c&&typeof c=="object"&&typeof c.id=="string"&&(typeof c.color>"u"||L.isThemeColor(c.color))}D.isThemeIcon=g;const v=new RegExp(`^\\$\\((${D.iconNameExpression}(?:${D.iconModifierExpression})?)\\)$`);function d(c){const f=v.exec(c);if(!f)return;const[,I]=f;return{id:I}}D.fromString=d;function y(c){return{id:c}}D.fromId=y;function E(c,f){let I=c.id;const w=I.lastIndexOf("~");return w!==-1&&(I=I.substring(0,w)),f&&(I=`${I}~${f}`),{id:I}}D.modify=E;function l(c){const f=c.id.lastIndexOf("~");if(f!==-1)return c.id.substring(f+1)}D.getModifier=l;function p(c,f){return c.id===f.id&&c.color?.id===f.color?.id}D.isEqual=p})(O||(e.ThemeIcon=O={}))}),define(Z[31],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const b=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function L(r){return b.test(r)}e.isUUID=L,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(P){for(let h=0;h<P.length;h++)P[h]=Math.floor(Math.random()*256);return P};const O=new Uint8Array(16),D=[];for(let P=0;P<256;P++)D.push(P.toString(16).padStart(2,"0"));return function(){r(O),O[6]=O[6]&15|64,O[8]=O[8]&63|128;let h=0,u="";return u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u+="-",u+=D[O[h++]],u+=D[O[h++]],u+="-",u+=D[O[h++]],u+=D[O[h++]],u+="-",u+=D[O[h++]],u+=D[O[h++]],u+="-",u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u+=D[O[h++]],u}}()}),define(Z[144],te([0,1,73,45,49]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checksum=void 0;async function O(D,P){if(await new Promise((m,g)=>{const v=L.createReadStream(D),d=b.createHash("sha1");v.pipe(d);const y=(0,r.once)((E,l)=>{v.removeAllListeners(),d.removeAllListeners(),E?g(E):m(l)});v.once("error",y),v.once("end",y),d.once("error",y),d.once("data",E=>y(void 0,E.toString("hex")))})!==P)throw new Error("Hash mismatch")}e.checksum=O}),define(Z[145],te([0,1,27]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMac=void 0;const L=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function r(D){const P=D.replace(/\-/g,":").toLowerCase();return!L.has(P)}function O(){const D=(0,b.networkInterfaces)();for(const P in D){const h=D[P];if(h){for(const{mac:u}of h)if(r(u))return u}}throw new Error("Unable to retrieve mac address (unexpected format)")}e.getMac=O}),define(Z[87],te([0,1,27,58,31,145]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMachineId=e.virtualMachineHint=void 0,e.virtualMachineHint=new class{_isVirtualMachineMacAddress(u){return this._virtualMachineOUIs||(this._virtualMachineOUIs=L.TernarySearchTree.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0),this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),!!this._virtualMachineOUIs.findSubstr(u)}value(){if(this._value===void 0){let u=0,m=0;const g=(0,b.networkInterfaces)();for(const v in g){const d=g[v];if(d)for(const{mac:y,internal:E}of d)E||(m+=1,this._isVirtualMachineMacAddress(y.toUpperCase())&&(u+=1))}this._value=m>0?u/m:0}return this._value}};let D;async function P(u){return D||(D=(async()=>await h(u)||r.generateUuid())()),D}e.getMachineId=P;async function h(u){try{const m=await new Promise((v,d)=>{H(["crypto"],v,d)}),g=(0,O.getMac)();return m.createHash("sha256").update(g,"utf8").digest("hex")}catch(m){u(m);return}}}),define(Z[106],te([0,1,88]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFreePortFaster=e.BROWSER_RESTRICTED_PORTS=e.findFreePort=void 0;function L(P,h,u,m=1){let g=!1;return new Promise(v=>{const d=setTimeout(()=>{if(!g)return g=!0,v(0)},u);r(P,h,m,y=>{if(!g)return g=!0,clearTimeout(d),v(y)})})}e.findFreePort=L;function r(P,h,u,m){if(h===0)return m(0);const g=new b.Socket;g.once("connect",()=>(D(g),r(P+u,h-1,u,m))),g.once("data",()=>{}),g.once("error",v=>(D(g),v.code!=="ECONNREFUSED"?r(P+u,h-1,u,m):m(P))),g.connect(P,"127.0.0.1")}e.BROWSER_RESTRICTED_PORTS={1:!0,7:!0,9:!0,11:!0,13:!0,15:!0,17:!0,19:!0,20:!0,21:!0,22:!0,23:!0,25:!0,37:!0,42:!0,43:!0,53:!0,69:!0,77:!0,79:!0,87:!0,95:!0,101:!0,102:!0,103:!0,104:!0,109:!0,110:!0,111:!0,113:!0,115:!0,117:!0,119:!0,123:!0,135:!0,137:!0,139:!0,143:!0,161:!0,179:!0,389:!0,427:!0,465:!0,512:!0,513:!0,514:!0,515:!0,526:!0,530:!0,531:!0,532:!0,540:!0,548:!0,554:!0,556:!0,563:!0,587:!0,601:!0,636:!0,989:!0,990:!0,993:!0,995:!0,1719:!0,1720:!0,1723:!0,2049:!0,3659:!0,4045:!0,5060:!0,5061:!0,6e3:!0,6566:!0,6665:!0,6666:!0,6667:!0,6668:!0,6669:!0,6697:!0,10080:!0};function O(P,h,u,m="127.0.0.1"){let g=!1,v,d=1;const y=b.createServer({pauseOnConnect:!0});function E(l,p){g||(g=!0,y.removeAllListeners(),y.close(),v&&clearTimeout(v),p(l))}return new Promise(l=>{v=setTimeout(()=>{E(0,l)},u),y.on("listening",()=>{E(P,l)}),y.on("error",p=>{p&&(p.code==="EADDRINUSE"||p.code==="EACCES")&&d<h?(P++,d++,y.listen(P,m)):E(0,l)}),y.on("close",()=>{E(0,l)}),y.listen(P,m)})}e.findFreePortFaster=O;function D(P){try{P.removeAllListeners("connect"),P.removeAllListeners("error"),P.end(),P.destroy(),P.unref()}catch(h){console.error(h)}}}),function(){function H(){function e(){return process.uncHostAllowlist}function b(h){const u=new Set;if(Array.isArray(h))for(const m of h)typeof m=="string"&&u.add(m);return Array.from(u)}function L(){const h=e();return h?Array.from(h):[]}function r(h){if(process.platform!=="win32")return;const u=e();if(u)if(typeof h=="string")u.add(h.toLowerCase());else for(const m of b(h))r(m)}function O(h){if(typeof h!="string")return;const u=["\\\\.\\UNC\\","\\\\?\\UNC\\","\\\\"];let m;for(const g of u){if(h.indexOf(g)!==0)continue;const d=h.indexOf("\\",g.length);if(d===-1)continue;const y=h.substring(g.length,d);if(y){m=y;break}}return m}function D(){process.platform==="win32"&&(process.restrictUNCAccess=!1)}function P(){return process.platform!=="win32"?!0:process.enableUNCAccessChecks===!1}return{getUNCHostAllowlist:L,addUNCHostToAllowlist:r,getUNCHost:O,disableUNCAccessRestrictions:D,isUNCAccessRestrictionsDisabled:P}}typeof define=="function"?define("vs/base/node/unc",[],function(){return H()}):typeof module=="object"&&typeof module.exports=="object"?module.exports=H():console.trace("vs/base/node/unc defined in UNKNOWN context (neither requirejs or commonjs)")}(),define(Z[146],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_MENU_CLOSE_CHANNEL=e.CONTEXT_MENU_CHANNEL=void 0,e.CONTEXT_MENU_CHANNEL="vscode:contextmenu",e.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(Z[147],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class b{constructor(r,O){this.sender=r,this.onMessage=O}send(r){try{this.sender.send("vscode:message",r.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=b}),define(Z[38],te([0,1,14,13]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validatedIpcMain=void 0;class r{constructor(){this.mapListenerToWrapper=new WeakMap}on(D,P){const h=(u,...m)=>{this.validateEvent(D,u)&&P(u,...m)};return this.mapListenerToWrapper.set(P,h),b.ipcMain.on(D,h),this}once(D,P){return b.ipcMain.once(D,(h,...u)=>{this.validateEvent(D,h)&&P(h,...u)}),this}handle(D,P){return b.ipcMain.handle(D,(h,...u)=>this.validateEvent(D,h)?P(h,...u):Promise.reject(`Invalid channel '${D}' or sender for ipcMain.handle() usage.`)),this}removeHandler(D){return b.ipcMain.removeHandler(D),this}removeListener(D,P){const h=this.mapListenerToWrapper.get(P);return h&&(b.ipcMain.removeListener(D,h),this.mapListenerToWrapper.delete(P)),this}validateEvent(D,P){if(!D||!D.startsWith("vscode:"))return(0,L.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because the channel is unknown.`),!1;const h=P.senderFrame,u=h.url;if(!u||u==="about:blank")return!0;let m="unknown";try{m=new URL(u).host}catch{return(0,L.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a malformed URL '${u}'.`),!1}return m!=="vscode-app"?((0,L.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a bad origin of '${m}'.`),!1):h.parent!==null?((0,L.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because sender of origin '${m}' is not a main frame.`),!1):!0}}e.validatedIpcMain=new r}),define(Z[148],te([0,1,14,38,146]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextMenuListener=void 0;function O(){L.validatedIpcMain.on(r.CONTEXT_MENU_CHANNEL,(P,h,u,m,g)=>{const v=D(P,m,u);v.popup({window:b.BrowserWindow.fromWebContents(P.sender)??void 0,x:g?g.x:void 0,y:g?g.y:void 0,positioningItem:g?g.positioningItem:void 0,callback:()=>{v&&P.sender.send(r.CONTEXT_MENU_CLOSE_CHANNEL,h)}})})}e.registerContextMenuListener=O;function D(P,h,u){const m=new b.Menu;return u.forEach(g=>{let v;g.type==="separator"?v=new b.MenuItem({type:g.type}):Array.isArray(g.submenu)?v=new b.MenuItem({submenu:D(P,h,g.submenu),label:g.label}):v=new b.MenuItem({label:g.label,type:g.type,accelerator:g.accelerator,checked:g.checked,enabled:g.enabled,visible:g.visible,click:(d,y,E)=>P.sender.send(h,g.id,E)}),m.append(v)}),m}}),define(Z[149],te([11,9]),function(H,e){return H.create("sql/base/common/locConstants",e)}),define(Z[89],te([0,1,149]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aboutDetail=e.getNewThemeNotification=e.getThemeUpdatedNotification=e.installTooltip=e.downloadTooltip=e.download=e.experimentalCustomizationDescription=e.outputFontFamilyDescription=e.outputFontSizeDescription=e.outputLineHeightDescription=e.interactiveWindowCollapseCodeCellsDescription=e.markupFontSizeDescription=e.textOutputLineLimitDescription=e.globalToolbarShowLabelDescription=e.consolidatedRunButtonDescription=e.dragAndDropDescription=e.showFoldingControlsDescription=e.consolidatedOutputButtonDescription=e.globalToolbarDescription=e.insertToolbarPositionDescription=e.focusIndicatorDescription=e.compactViewDescription=e.undoRedoPerCellDescription=e.cellToolbarVisibilityDescription=e.diffEnablePreviewDescription=e.showCellStatusbarDescription=e.cellToolbarLocationDescription=e.displayOrderDescription=e.issueReporterPageReviewGuidanceLabel=e.issueReporterServiceAzuredatastudio=e.terminalIntegratedInheritEnvDescription=e.terminalIntegratedEnvWindowsDescription=e.terminalIntegratedEnvLinuxDescription=e.terminalIntegratedEnvOsxDescription=e.terminalIntegratedDetectLocaleDescrption=e.terminalIntegratedCommandsToSkipShellDescrption=e.terminalIntegratedAutoRepliesDescription=e.terminalIntegratedAllowChordsDescription=e.windowTitleAppNameDescription=e.versionMismatchVsCode=e.versionMismatch=e.versionSyntax=e.notebooksNotSupportedError=e.workspaceTrustEmptyWindowDescription=e.workspaceTrustDescription=e.desktopContributionMiinstallVsix=e.watermarkNewNotebook=e.watermarkNewSqlFile=e.localizationsContributionActivateLanguagePack=e.localizationsContributionUpdateLocale=e.watcherExclude=e.filesContributionMaxMemoryForLargeFilesMB=e.fileActionsContributionMiNewDeployment=e.fileActionsContributionMiNewNotebook=e.fileActionsContributionMiNewQuery=e.fileActionsContributionNewQuery=e.extensionsWorkbenchServiceIncompatible=e.extensionsViewsScenarioTypeUndefined=e.extensionsViewletRecommendedExtensions=e.extensionsActionsReinstallActionSuccessReload=e.extensionsActionsInstallExtensionCompletedAndReloadRequired=e.extensionsActionsEnableRemote=e.extensionsActionsUninstallExtensionComplete=e.extensionsActionsPostDisableTooltip=e.extensionsActionsPostEnableTooltip=e.extensionsActionsEnableLocally=e.extensionsActionsPostUpdateTooltip=e.extensionsActionsPostUninstallTooltip=e.extensionsContributionInstallVSIXActionSuccessReload=e.extensionsContributionInstallVSIXActionAllowNone=e.extensionsContributionExtensionsPolicy=e.menusExtensionPointDataGridContext=e.menusExtensionPointConnectionDialogBrowseTreeContext=e.menusExtensionPointObjectExplorerContext=e.menusExtensionPointDataExplorerContext=e.menusExtensionPointDataExplorerAction=e.menusExtensionPointNotebookToolbar=e.menusExtensionPointNotebookTitle=e.menusExtensionPointNotebookCellTitle=e.menusExtensionPointDashboardToolbar=e.updateConfigContributionShowReleaseNotes=e.updateConfigContributionEnableWindowsBackgroundUpdates=e.updateConfigContributionDefault=void 0,e.updateConfigContributionDefault=(0,b.localize)(0,null),e.updateConfigContributionEnableWindowsBackgroundUpdates=(0,b.localize)(1,null),e.updateConfigContributionShowReleaseNotes=(0,b.localize)(2,null),e.menusExtensionPointDashboardToolbar=(0,b.localize)(3,null),e.menusExtensionPointNotebookCellTitle=(0,b.localize)(4,null),e.menusExtensionPointNotebookTitle=(0,b.localize)(5,null),e.menusExtensionPointNotebookToolbar=(0,b.localize)(6,null),e.menusExtensionPointDataExplorerAction=(0,b.localize)(7,null),e.menusExtensionPointDataExplorerContext=(0,b.localize)(8,null),e.menusExtensionPointObjectExplorerContext=(0,b.localize)(9,null),e.menusExtensionPointConnectionDialogBrowseTreeContext=(0,b.localize)(10,null),e.menusExtensionPointDataGridContext=(0,b.localize)(11,null),e.extensionsContributionExtensionsPolicy=(0,b.localize)(12,null),e.extensionsContributionInstallVSIXActionAllowNone=(0,b.localize)(13,null);function L(f){return(0,b.localize)(14,null,f)}e.extensionsContributionInstallVSIXActionSuccessReload=L,e.extensionsActionsPostUninstallTooltip=(0,b.localize)(15,null),e.extensionsActionsPostUpdateTooltip=(0,b.localize)(16,null),e.extensionsActionsEnableLocally=(0,b.localize)(17,null),e.extensionsActionsPostEnableTooltip=(0,b.localize)(18,null),e.extensionsActionsPostDisableTooltip=(0,b.localize)(19,null);function r(f){return(0,b.localize)(20,null,f)}e.extensionsActionsUninstallExtensionComplete=r;function O(f){return(0,b.localize)(21,null,f)}e.extensionsActionsEnableRemote=O;function D(f){return(0,b.localize)(22,null,f)}e.extensionsActionsInstallExtensionCompletedAndReloadRequired=D;function P(f){return(0,b.localize)(23,null,f)}e.extensionsActionsReinstallActionSuccessReload=P,e.extensionsViewletRecommendedExtensions=(0,b.localize)(24,null),e.extensionsViewsScenarioTypeUndefined=(0,b.localize)(25,null);function h(f,I,w,t){return(0,b.localize)(26,null,I,f,w,t)}e.extensionsWorkbenchServiceIncompatible=h,e.fileActionsContributionNewQuery=(0,b.localize)(27,null),e.fileActionsContributionMiNewQuery=(0,b.localize)(28,null),e.fileActionsContributionMiNewNotebook=(0,b.localize)(29,null),e.fileActionsContributionMiNewDeployment=(0,b.localize)(30,null),e.filesContributionMaxMemoryForLargeFilesMB=(0,b.localize)(31,null),e.watcherExclude=(0,b.localize)(32,null);function u(f){return(0,b.localize)(33,null,f)}e.localizationsContributionUpdateLocale=u;function m(f){return(0,b.localize)(34,null,f)}e.localizationsContributionActivateLanguagePack=m,e.watermarkNewSqlFile=(0,b.localize)(35,null),e.watermarkNewNotebook=(0,b.localize)(36,null),e.desktopContributionMiinstallVsix=(0,b.localize)(37,null),e.workspaceTrustDescription=(0,b.localize)(38,null);function g(f){return(0,b.localize)(39,null,f)}e.workspaceTrustEmptyWindowDescription=g,e.notebooksNotSupportedError=(0,b.localize)(40,null);function v(f,I){return(0,b.localize)(41,null,f,I)}e.versionSyntax=v;function d(f,I){return(0,b.localize)(42,null,f,I)}e.versionMismatch=d;function y(f,I,w){return(0,b.localize)(43,null,f,I,w)}e.versionMismatchVsCode=y,e.windowTitleAppNameDescription=(0,b.localize)(44,null),e.terminalIntegratedAllowChordsDescription=(0,b.localize)(45,null),e.terminalIntegratedAutoRepliesDescription=(0,b.localize)(46,null,'`"Terminate batch job (Y/N)": "\\r"`','`"\\r"`');function E(f){return(0,b.localize)(47,null,f.sort().map(I=>`- ${I}`).join(`
`),`[${(0,b.localize)(48,null)}](command:workbench.action.openRawDefaultSettings '${(0,b.localize)(49,null)}')`)}e.terminalIntegratedCommandsToSkipShellDescrption=E,e.terminalIntegratedDetectLocaleDescrption=(0,b.localize)(50,null),e.terminalIntegratedEnvOsxDescription=(0,b.localize)(51,null),e.terminalIntegratedEnvLinuxDescription=(0,b.localize)(52,null),e.terminalIntegratedEnvWindowsDescription=(0,b.localize)(53,null),e.terminalIntegratedInheritEnvDescription=(0,b.localize)(54,null),e.issueReporterServiceAzuredatastudio=(0,b.localize)(55,null),e.issueReporterPageReviewGuidanceLabel=(0,b.localize)(56,null),e.displayOrderDescription=(0,b.localize)(57,null),e.cellToolbarLocationDescription=(0,b.localize)(58,null),e.showCellStatusbarDescription=(0,b.localize)(59,null),e.diffEnablePreviewDescription=(0,b.localize)(60,null),e.cellToolbarVisibilityDescription=(0,b.localize)(61,null),e.undoRedoPerCellDescription=(0,b.localize)(62,null),e.compactViewDescription=(0,b.localize)(63,null),e.focusIndicatorDescription=(0,b.localize)(64,null),e.insertToolbarPositionDescription=(0,b.localize)(65,null),e.globalToolbarDescription=(0,b.localize)(66,null),e.consolidatedOutputButtonDescription=(0,b.localize)(67,null),e.showFoldingControlsDescription=(0,b.localize)(68,null),e.dragAndDropDescription=(0,b.localize)(69,null),e.consolidatedRunButtonDescription=(0,b.localize)(70,null),e.globalToolbarShowLabelDescription=(0,b.localize)(71,null),e.textOutputLineLimitDescription=(0,b.localize)(72,null),e.markupFontSizeDescription=(0,b.localize)(73,null),e.interactiveWindowCollapseCodeCellsDescription=(0,b.localize)(74,null),e.outputLineHeightDescription=(0,b.localize)(75,null),e.outputFontSizeDescription=(0,b.localize)(76,null),e.outputFontFamilyDescription=(0,b.localize)(77,null),e.experimentalCustomizationDescription=(0,b.localize)(78,null),e.download=(0,b.localize)(79,null),e.downloadTooltip=(0,b.localize)(80,null),e.installTooltip=(0,b.localize)(81,null);function l(f){return(0,b.localize)(82,null,f)}e.getThemeUpdatedNotification=l;function p(f){return(0,b.localize)(83,null,f)}e.getNewThemeNotification=p;function c(f,I,w,t,a,s,i,n,o){return(0,b.localize)(84,null,f,I,w,o,t,a,s,i,n)}e.aboutDetail=c}),define(Z[150],te([11,9]),function(H,e){return H.create("vs/base/common/date",e)}),define(Z[151],te([0,1,150]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const L=60,r=L*60,O=r*24,D=O*7,P=O*30,h=O*365;function u(g,v,d,y){typeof g!="number"&&(g=g.getTime());const E=Math.round((new Date().getTime()-g)/1e3);if(E<-30)return(0,b.localize)(0,null,u(new Date().getTime()+E*1e3,!1));if(!y&&E<30)return(0,b.localize)(1,null);let l;return E<L?(l=E,v?l===1?d?(0,b.localize)(2,null,l):(0,b.localize)(3,null,l):d?(0,b.localize)(4,null,l):(0,b.localize)(5,null,l):l===1?d?(0,b.localize)(6,null,l):(0,b.localize)(7,null,l):d?(0,b.localize)(8,null,l):(0,b.localize)(9,null,l)):E<r?(l=Math.floor(E/L),v?l===1?d?(0,b.localize)(10,null,l):(0,b.localize)(11,null,l):d?(0,b.localize)(12,null,l):(0,b.localize)(13,null,l):l===1?d?(0,b.localize)(14,null,l):(0,b.localize)(15,null,l):d?(0,b.localize)(16,null,l):(0,b.localize)(17,null,l)):E<O?(l=Math.floor(E/r),v?l===1?d?(0,b.localize)(18,null,l):(0,b.localize)(19,null,l):d?(0,b.localize)(20,null,l):(0,b.localize)(21,null,l):l===1?d?(0,b.localize)(22,null,l):(0,b.localize)(23,null,l):d?(0,b.localize)(24,null,l):(0,b.localize)(25,null,l)):E<D?(l=Math.floor(E/O),v?l===1?(0,b.localize)(26,null,l):(0,b.localize)(27,null,l):l===1?(0,b.localize)(28,null,l):(0,b.localize)(29,null,l)):E<P?(l=Math.floor(E/D),v?l===1?d?(0,b.localize)(30,null,l):(0,b.localize)(31,null,l):d?(0,b.localize)(32,null,l):(0,b.localize)(33,null,l):l===1?d?(0,b.localize)(34,null,l):(0,b.localize)(35,null,l):d?(0,b.localize)(36,null,l):(0,b.localize)(37,null,l)):E<h?(l=Math.floor(E/P),v?l===1?d?(0,b.localize)(38,null,l):(0,b.localize)(39,null,l):d?(0,b.localize)(40,null,l):(0,b.localize)(41,null,l):l===1?d?(0,b.localize)(42,null,l):(0,b.localize)(43,null,l):d?(0,b.localize)(44,null,l):(0,b.localize)(45,null,l)):(l=Math.floor(E/h),v?l===1?d?(0,b.localize)(46,null,l):(0,b.localize)(47,null,l):d?(0,b.localize)(48,null,l):(0,b.localize)(49,null,l):l===1?d?(0,b.localize)(50,null,l):(0,b.localize)(51,null,l):d?(0,b.localize)(52,null,l):(0,b.localize)(53,null,l))}e.fromNow=u;function m(g){return g.getFullYear()+"-"+String(g.getMonth()+1).padStart(2,"0")+"-"+String(g.getDate()).padStart(2,"0")+"T"+String(g.getHours()).padStart(2,"0")+":"+String(g.getMinutes()).padStart(2,"0")+":"+String(g.getSeconds()).padStart(2,"0")+"."+(g.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=m}),define(Z[152],te([11,9]),function(H,e){return H.create("vs/base/common/errorMessage",e)}),define(Z[50],te([0,1,24,12,152]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function O(g,v){return v&&(g.stack||g.stacktrace)?r.localize(0,null,P(g),D(g.stack)||D(g.stacktrace)):P(g)}function D(g){return Array.isArray(g)?g.join(`
`):g}function P(g){return g.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${g.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof g.code=="string"&&typeof g.errno=="number"&&typeof g.syscall=="string"?r.localize(1,null,g.message):g.message||r.localize(2,null)}function h(g=null,v=!1){if(!g)return r.localize(3,null);if(Array.isArray(g)){const d=b.coalesce(g),y=h(d[0],v);return d.length>1?r.localize(4,null,y,d.length):y}if(L.isString(g))return g;if(g.detail){const d=g.detail;if(d.error)return O(d.error,v);if(d.exception)return O(d.exception,v)}return g.stack?O(g,v):g.message?g.message:r.localize(5,null)}e.toErrorMessage=h;function u(g){const v=g;return v instanceof Error&&Array.isArray(v.actions)}e.isErrorWithActions=u;function m(g,v){let d;return typeof g=="string"?d=new Error(g):d=g,d.actions=v,d}e.createErrorWithActions=m}),define(Z[153],te([11,9]),function(H,e){return H.create("vs/base/common/jsonErrorMessages",e)}),define(Z[154],te([0,1,153]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function L(r){switch(r){case 1:return(0,b.localize)(0,null);case 2:return(0,b.localize)(1,null);case 3:return(0,b.localize)(2,null);case 4:return(0,b.localize)(3,null);case 5:return(0,b.localize)(4,null);case 6:return(0,b.localize)(5,null);case 7:return(0,b.localize)(6,null);case 8:return(0,b.localize)(7,null);case 9:return(0,b.localize)(8,null);default:return""}}e.getParseErrorMessage=L}),define(Z[155],te([11,9]),function(H,e){return H.create("vs/base/common/platform",e)}),define(Z[4],te([0,1,155]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.setTimeout0IsFaster=e.translationsConfigFile=e.platformLocale=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let L=!1,r=!1,O=!1,D=!1,P=!1,h=!1,u=!1,m=!1,g=!1,v=!1,d,y=e.LANGUAGE_DEFAULT,E=e.LANGUAGE_DEFAULT,l,p;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let c;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?c=e.globals.vscode.process:typeof process<"u"&&(c=process);const f=typeof c?.versions?.electron=="string",I=f&&c?.type==="renderer";if(typeof navigator=="object"&&!I)p=navigator.userAgent,L=p.indexOf("Windows")>=0,r=p.indexOf("Macintosh")>=0,m=(p.indexOf("Macintosh")>=0||p.indexOf("iPad")>=0||p.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,O=p.indexOf("Linux")>=0,v=p?.indexOf("Mobi")>=0,h=!0,d=b.getConfiguredDefaultLocale(b.localize(0,null))||e.LANGUAGE_DEFAULT,y=d,E=navigator.language;else if(typeof c=="object"){L=c.platform==="win32",r=c.platform==="darwin",O=c.platform==="linux",D=O&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,u=f,g=!!c.env.CI||!!c.env.BUILD_ARTIFACTSTAGINGDIRECTORY,d=e.LANGUAGE_DEFAULT,y=e.LANGUAGE_DEFAULT;const k=c.env.VSCODE_NLS_CONFIG;if(k)try{const M=JSON.parse(k),C=M.availableLanguages["*"];d=M.locale,E=M.osLocale,y=C||e.LANGUAGE_DEFAULT,l=M._translationsConfigFile}catch{}P=!0}else console.error("Unable to resolve platform.");var w;(function(k){k[k.Web=0]="Web",k[k.Mac=1]="Mac",k[k.Linux=2]="Linux",k[k.Windows=3]="Windows"})(w||(e.Platform=w={}));function t(k){switch(k){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=t;let a=0;r?a=1:L?a=3:O&&(a=2),e.isWindows=L,e.isMacintosh=r,e.isLinux=O,e.isLinuxSnap=D,e.isNative=P,e.isElectron=u,e.isWeb=h,e.isWebWorker=h&&typeof e.globals.importScripts=="function",e.isIOS=m,e.isMobile=v,e.isCI=g,e.platform=a,e.userAgent=p,e.language=y;var s;(function(k){function M(){return e.language}k.value=M;function C(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}k.isDefaultVariant=C;function A(){return e.language==="en"}k.isDefault=A})(s||(e.Language=s={})),e.locale=d,e.platformLocale=E,e.translationsConfigFile=l,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const k=[];e.globals.addEventListener("message",C=>{if(C.data&&C.data.vscodeScheduleAsyncWork)for(let A=0,T=k.length;A<T;A++){const F=k[A];if(F.id===C.data.vscodeScheduleAsyncWork){k.splice(A,1),F.callback();return}}});let M=0;return C=>{const A=++M;k.push({id:A,callback:C}),e.globals.postMessage({vscodeScheduleAsyncWork:A},"*")}}return k=>setTimeout(k)})();var i;(function(k){k[k.Windows=1]="Windows",k[k.Macintosh=2]="Macintosh",k[k.Linux=3]="Linux"})(i||(e.OperatingSystem=i={})),e.OS=r||m?2:L?1:3;let n=!0,o=!1;function S(){if(!o){o=!0;const k=new Uint8Array(2);k[0]=1,k[1]=2,n=new Uint16Array(k.buffer)[0]===(2<<8)+1}return n}e.isLittleEndian=S,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(Z[36],te([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let L;if(typeof b.globals.vscode<"u"&&typeof b.globals.vscode.process<"u"){const r=b.globals.vscode.process;L={get platform(){return r.platform},get arch(){return r.arch},get env(){return r.env},cwd(){return r.cwd()}}}else typeof process<"u"?L={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:L={get platform(){return b.isWindows?"win32":b.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=L.cwd,e.env=L.env,e.platform=L.platform,e.arch=L.arch}),define(Z[10],te([0,1,36]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const L=65,r=97,O=90,D=122,P=46,h=47,u=92,m=58,g=63;class v extends Error{constructor(a,s,i){let n;typeof s=="string"&&s.indexOf("not ")===0?(n="must not be",s=s.replace(/^not /,"")):n="must be";const o=a.indexOf(".")!==-1?"property":"argument";let S=`The "${a}" ${o} ${n} of type ${s}`;S+=`. Received type ${typeof i}`,super(S),this.code="ERR_INVALID_ARG_TYPE"}}function d(t,a){if(t===null||typeof t!="object")throw new v(a,"Object",t)}function y(t,a){if(typeof t!="string")throw new v(a,"string",t)}const E=b.platform==="win32";function l(t){return t===h||t===u}function p(t){return t===h}function c(t){return t>=L&&t<=O||t>=r&&t<=D}function f(t,a,s,i){let n="",o=0,S=-1,k=0,M=0;for(let C=0;C<=t.length;++C){if(C<t.length)M=t.charCodeAt(C);else{if(i(M))break;M=h}if(i(M)){if(!(S===C-1||k===1))if(k===2){if(n.length<2||o!==2||n.charCodeAt(n.length-1)!==P||n.charCodeAt(n.length-2)!==P){if(n.length>2){const A=n.lastIndexOf(s);A===-1?(n="",o=0):(n=n.slice(0,A),o=n.length-1-n.lastIndexOf(s)),S=C,k=0;continue}else if(n.length!==0){n="",o=0,S=C,k=0;continue}}a&&(n+=n.length>0?`${s}..`:"..",o=2)}else n.length>0?n+=`${s}${t.slice(S+1,C)}`:n=t.slice(S+1,C),o=C-S-1;S=C,k=0}else M===P&&k!==-1?++k:k=-1}return n}function I(t,a){d(a,"pathObject");const s=a.dir||a.root,i=a.base||`${a.name||""}${a.ext||""}`;return s?s===a.root?`${s}${i}`:`${s}${t}${i}`:i}e.win32={resolve(...t){let a="",s="",i=!1;for(let n=t.length-1;n>=-1;n--){let o;if(n>=0){if(o=t[n],y(o,"path"),o.length===0)continue}else a.length===0?o=b.cwd():(o=b.env[`=${a}`]||b.cwd(),(o===void 0||o.slice(0,2).toLowerCase()!==a.toLowerCase()&&o.charCodeAt(2)===u)&&(o=`${a}\\`));const S=o.length;let k=0,M="",C=!1;const A=o.charCodeAt(0);if(S===1)l(A)&&(k=1,C=!0);else if(l(A))if(C=!0,l(o.charCodeAt(1))){let T=2,F=T;for(;T<S&&!l(o.charCodeAt(T));)T++;if(T<S&&T!==F){const z=o.slice(F,T);for(F=T;T<S&&l(o.charCodeAt(T));)T++;if(T<S&&T!==F){for(F=T;T<S&&!l(o.charCodeAt(T));)T++;(T===S||T!==F)&&(M=`\\\\${z}\\${o.slice(F,T)}`,k=T)}}}else k=1;else c(A)&&o.charCodeAt(1)===m&&(M=o.slice(0,2),k=2,S>2&&l(o.charCodeAt(2))&&(C=!0,k=3));if(M.length>0)if(a.length>0){if(M.toLowerCase()!==a.toLowerCase())continue}else a=M;if(i){if(a.length>0)break}else if(s=`${o.slice(k)}\\${s}`,i=C,C&&a.length>0)break}return s=f(s,!i,"\\",l),i?`${a}\\${s}`:`${a}${s}`||"."},normalize(t){y(t,"path");const a=t.length;if(a===0)return".";let s=0,i,n=!1;const o=t.charCodeAt(0);if(a===1)return p(o)?"\\":t;if(l(o))if(n=!0,l(t.charCodeAt(1))){let k=2,M=k;for(;k<a&&!l(t.charCodeAt(k));)k++;if(k<a&&k!==M){const C=t.slice(M,k);for(M=k;k<a&&l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&!l(t.charCodeAt(k));)k++;if(k===a)return`\\\\${C}\\${t.slice(M)}\\`;k!==M&&(i=`\\\\${C}\\${t.slice(M,k)}`,s=k)}}}else s=1;else c(o)&&t.charCodeAt(1)===m&&(i=t.slice(0,2),s=2,a>2&&l(t.charCodeAt(2))&&(n=!0,s=3));let S=s<a?f(t.slice(s),!n,"\\",l):"";return S.length===0&&!n&&(S="."),S.length>0&&l(t.charCodeAt(a-1))&&(S+="\\"),i===void 0?n?`\\${S}`:S:n?`${i}\\${S}`:`${i}${S}`},isAbsolute(t){y(t,"path");const a=t.length;if(a===0)return!1;const s=t.charCodeAt(0);return l(s)||a>2&&c(s)&&t.charCodeAt(1)===m&&l(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let a,s;for(let o=0;o<t.length;++o){const S=t[o];y(S,"path"),S.length>0&&(a===void 0?a=s=S:a+=`\\${S}`)}if(a===void 0)return".";let i=!0,n=0;if(typeof s=="string"&&l(s.charCodeAt(0))){++n;const o=s.length;o>1&&l(s.charCodeAt(1))&&(++n,o>2&&(l(s.charCodeAt(2))?++n:i=!1))}if(i){for(;n<a.length&&l(a.charCodeAt(n));)n++;n>=2&&(a=`\\${a.slice(n)}`)}return e.win32.normalize(a)},relative(t,a){if(y(t,"from"),y(a,"to"),t===a)return"";const s=e.win32.resolve(t),i=e.win32.resolve(a);if(s===i||(t=s.toLowerCase(),a=i.toLowerCase(),t===a))return"";let n=0;for(;n<t.length&&t.charCodeAt(n)===u;)n++;let o=t.length;for(;o-1>n&&t.charCodeAt(o-1)===u;)o--;const S=o-n;let k=0;for(;k<a.length&&a.charCodeAt(k)===u;)k++;let M=a.length;for(;M-1>k&&a.charCodeAt(M-1)===u;)M--;const C=M-k,A=S<C?S:C;let T=-1,F=0;for(;F<A;F++){const oe=t.charCodeAt(n+F);if(oe!==a.charCodeAt(k+F))break;oe===u&&(T=F)}if(F!==A){if(T===-1)return i}else{if(C>A){if(a.charCodeAt(k+F)===u)return i.slice(k+F+1);if(F===2)return i.slice(k+F)}S>A&&(t.charCodeAt(n+F)===u?T=F:F===2&&(T=3)),T===-1&&(T=0)}let z="";for(F=n+T+1;F<=o;++F)(F===o||t.charCodeAt(F)===u)&&(z+=z.length===0?"..":"\\..");return k+=T,z.length>0?`${z}${i.slice(k,M)}`:(i.charCodeAt(k)===u&&++k,i.slice(k,M))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const a=e.win32.resolve(t);if(a.length<=2)return t;if(a.charCodeAt(0)===u){if(a.charCodeAt(1)===u){const s=a.charCodeAt(2);if(s!==g&&s!==P)return`\\\\?\\UNC\\${a.slice(2)}`}}else if(c(a.charCodeAt(0))&&a.charCodeAt(1)===m&&a.charCodeAt(2)===u)return`\\\\?\\${a}`;return t},dirname(t){y(t,"path");const a=t.length;if(a===0)return".";let s=-1,i=0;const n=t.charCodeAt(0);if(a===1)return l(n)?t:".";if(l(n)){if(s=i=1,l(t.charCodeAt(1))){let k=2,M=k;for(;k<a&&!l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&!l(t.charCodeAt(k));)k++;if(k===a)return t;k!==M&&(s=i=k+1)}}}}else c(n)&&t.charCodeAt(1)===m&&(s=a>2&&l(t.charCodeAt(2))?3:2,i=s);let o=-1,S=!0;for(let k=a-1;k>=i;--k)if(l(t.charCodeAt(k))){if(!S){o=k;break}}else S=!1;if(o===-1){if(s===-1)return".";o=s}return t.slice(0,o)},basename(t,a){a!==void 0&&y(a,"ext"),y(t,"path");let s=0,i=-1,n=!0,o;if(t.length>=2&&c(t.charCodeAt(0))&&t.charCodeAt(1)===m&&(s=2),a!==void 0&&a.length>0&&a.length<=t.length){if(a===t)return"";let S=a.length-1,k=-1;for(o=t.length-1;o>=s;--o){const M=t.charCodeAt(o);if(l(M)){if(!n){s=o+1;break}}else k===-1&&(n=!1,k=o+1),S>=0&&(M===a.charCodeAt(S)?--S===-1&&(i=o):(S=-1,i=k))}return s===i?i=k:i===-1&&(i=t.length),t.slice(s,i)}for(o=t.length-1;o>=s;--o)if(l(t.charCodeAt(o))){if(!n){s=o+1;break}}else i===-1&&(n=!1,i=o+1);return i===-1?"":t.slice(s,i)},extname(t){y(t,"path");let a=0,s=-1,i=0,n=-1,o=!0,S=0;t.length>=2&&t.charCodeAt(1)===m&&c(t.charCodeAt(0))&&(a=i=2);for(let k=t.length-1;k>=a;--k){const M=t.charCodeAt(k);if(l(M)){if(!o){i=k+1;break}continue}n===-1&&(o=!1,n=k+1),M===P?s===-1?s=k:S!==1&&(S=1):s!==-1&&(S=-1)}return s===-1||n===-1||S===0||S===1&&s===n-1&&s===i+1?"":t.slice(s,n)},format:I.bind(null,"\\"),parse(t){y(t,"path");const a={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return a;const s=t.length;let i=0,n=t.charCodeAt(0);if(s===1)return l(n)?(a.root=a.dir=t,a):(a.base=a.name=t,a);if(l(n)){if(i=1,l(t.charCodeAt(1))){let T=2,F=T;for(;T<s&&!l(t.charCodeAt(T));)T++;if(T<s&&T!==F){for(F=T;T<s&&l(t.charCodeAt(T));)T++;if(T<s&&T!==F){for(F=T;T<s&&!l(t.charCodeAt(T));)T++;T===s?i=T:T!==F&&(i=T+1)}}}}else if(c(n)&&t.charCodeAt(1)===m){if(s<=2)return a.root=a.dir=t,a;if(i=2,l(t.charCodeAt(2))){if(s===3)return a.root=a.dir=t,a;i=3}}i>0&&(a.root=t.slice(0,i));let o=-1,S=i,k=-1,M=!0,C=t.length-1,A=0;for(;C>=i;--C){if(n=t.charCodeAt(C),l(n)){if(!M){S=C+1;break}continue}k===-1&&(M=!1,k=C+1),n===P?o===-1?o=C:A!==1&&(A=1):o!==-1&&(A=-1)}return k!==-1&&(o===-1||A===0||A===1&&o===k-1&&o===S+1?a.base=a.name=t.slice(S,k):(a.name=t.slice(S,o),a.base=t.slice(S,k),a.ext=t.slice(o,k))),S>0&&S!==i?a.dir=t.slice(0,S-1):a.dir=a.root,a},sep:"\\",delimiter:";",win32:null,posix:null};const w=(()=>{if(E){const t=/\\/g;return()=>{const a=b.cwd().replace(t,"/");return a.slice(a.indexOf("/"))}}return()=>b.cwd()})();e.posix={resolve(...t){let a="",s=!1;for(let i=t.length-1;i>=-1&&!s;i--){const n=i>=0?t[i]:w();y(n,"path"),n.length!==0&&(a=`${n}/${a}`,s=n.charCodeAt(0)===h)}return a=f(a,!s,"/",p),s?`/${a}`:a.length>0?a:"."},normalize(t){if(y(t,"path"),t.length===0)return".";const a=t.charCodeAt(0)===h,s=t.charCodeAt(t.length-1)===h;return t=f(t,!a,"/",p),t.length===0?a?"/":s?"./":".":(s&&(t+="/"),a?`/${t}`:t)},isAbsolute(t){return y(t,"path"),t.length>0&&t.charCodeAt(0)===h},join(...t){if(t.length===0)return".";let a;for(let s=0;s<t.length;++s){const i=t[s];y(i,"path"),i.length>0&&(a===void 0?a=i:a+=`/${i}`)}return a===void 0?".":e.posix.normalize(a)},relative(t,a){if(y(t,"from"),y(a,"to"),t===a||(t=e.posix.resolve(t),a=e.posix.resolve(a),t===a))return"";const s=1,i=t.length,n=i-s,o=1,S=a.length-o,k=n<S?n:S;let M=-1,C=0;for(;C<k;C++){const T=t.charCodeAt(s+C);if(T!==a.charCodeAt(o+C))break;T===h&&(M=C)}if(C===k)if(S>k){if(a.charCodeAt(o+C)===h)return a.slice(o+C+1);if(C===0)return a.slice(o+C)}else n>k&&(t.charCodeAt(s+C)===h?M=C:C===0&&(M=0));let A="";for(C=s+M+1;C<=i;++C)(C===i||t.charCodeAt(C)===h)&&(A+=A.length===0?"..":"/..");return`${A}${a.slice(o+M)}`},toNamespacedPath(t){return t},dirname(t){if(y(t,"path"),t.length===0)return".";const a=t.charCodeAt(0)===h;let s=-1,i=!0;for(let n=t.length-1;n>=1;--n)if(t.charCodeAt(n)===h){if(!i){s=n;break}}else i=!1;return s===-1?a?"/":".":a&&s===1?"//":t.slice(0,s)},basename(t,a){a!==void 0&&y(a,"ext"),y(t,"path");let s=0,i=-1,n=!0,o;if(a!==void 0&&a.length>0&&a.length<=t.length){if(a===t)return"";let S=a.length-1,k=-1;for(o=t.length-1;o>=0;--o){const M=t.charCodeAt(o);if(M===h){if(!n){s=o+1;break}}else k===-1&&(n=!1,k=o+1),S>=0&&(M===a.charCodeAt(S)?--S===-1&&(i=o):(S=-1,i=k))}return s===i?i=k:i===-1&&(i=t.length),t.slice(s,i)}for(o=t.length-1;o>=0;--o)if(t.charCodeAt(o)===h){if(!n){s=o+1;break}}else i===-1&&(n=!1,i=o+1);return i===-1?"":t.slice(s,i)},extname(t){y(t,"path");let a=-1,s=0,i=-1,n=!0,o=0;for(let S=t.length-1;S>=0;--S){const k=t.charCodeAt(S);if(k===h){if(!n){s=S+1;break}continue}i===-1&&(n=!1,i=S+1),k===P?a===-1?a=S:o!==1&&(o=1):a!==-1&&(o=-1)}return a===-1||i===-1||o===0||o===1&&a===i-1&&a===s+1?"":t.slice(a,i)},format:I.bind(null,"/"),parse(t){y(t,"path");const a={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return a;const s=t.charCodeAt(0)===h;let i;s?(a.root="/",i=1):i=0;let n=-1,o=0,S=-1,k=!0,M=t.length-1,C=0;for(;M>=i;--M){const A=t.charCodeAt(M);if(A===h){if(!k){o=M+1;break}continue}S===-1&&(k=!1,S=M+1),A===P?n===-1?n=M:C!==1&&(C=1):n!==-1&&(C=-1)}if(S!==-1){const A=o===0&&s?1:o;n===-1||C===0||C===1&&n===S-1&&n===o+1?a.base=a.name=t.slice(A,S):(a.name=t.slice(A,n),a.base=t.slice(A,S),a.ext=t.slice(n,S))}return o>0?a.dir=t.slice(0,o-1):s&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=E?e.win32.normalize:e.posix.normalize,e.isAbsolute=E?e.win32.isAbsolute:e.posix.isAbsolute,e.join=E?e.win32.join:e.posix.join,e.resolve=E?e.win32.resolve:e.posix.resolve,e.relative=E?e.win32.relative:e.posix.relative,e.dirname=E?e.win32.dirname:e.posix.dirname,e.basename=E?e.win32.basename:e.posix.basename,e.extname=E?e.win32.extname:e.posix.extname,e.format=E?e.win32.format:e.posix.format,e.parse=E?e.win32.parse:e.posix.parse,e.toNamespacedPath=E?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=E?e.win32.sep:e.posix.sep,e.delimiter=E?e.win32.delimiter:e.posix.delimiter}),define(Z[32],te([0,1,10,4,26,12]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function D(o){return o===47||o===92}e.isPathSeparator=D;function P(o){return o.replace(/[\\/]/g,b.posix.sep)}e.toSlashes=P;function h(o){return o.indexOf("/")===-1&&(o=P(o)),/^[a-zA-Z]:(\/|$)/.test(o)&&(o="/"+o),o}e.toPosixPath=h;function u(o,S=b.posix.sep){if(!o)return"";const k=o.length,M=o.charCodeAt(0);if(D(M)){if(D(o.charCodeAt(1))&&!D(o.charCodeAt(2))){let A=3;const T=A;for(;A<k&&!D(o.charCodeAt(A));A++);if(T!==A&&!D(o.charCodeAt(A+1))){for(A+=1;A<k;A++)if(D(o.charCodeAt(A)))return o.slice(0,A+1).replace(/[\\/]/g,S)}}return S}else if(p(M)&&o.charCodeAt(1)===58)return D(o.charCodeAt(2))?o.slice(0,2)+S:o.slice(0,2);let C=o.indexOf("://");if(C!==-1){for(C+=3;C<k;C++)if(D(o.charCodeAt(C)))return o.slice(0,C+1)}return""}e.getRoot=u;function m(o){if(!L.isWindows||!o||o.length<5)return!1;let S=o.charCodeAt(0);if(S!==92||(S=o.charCodeAt(1),S!==92))return!1;let k=2;const M=k;for(;k<o.length&&(S=o.charCodeAt(k),S!==92);k++);return!(M===k||(S=o.charCodeAt(k+1),isNaN(S)||S===92))}e.isUNC=m;const g=/[\\/:\*\?"<>\|]/g,v=/[\\/]/g,d=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function y(o,S=L.isWindows){const k=S?g:v;return!(!o||o.length===0||/^\s+$/.test(o)||(k.lastIndex=0,k.test(o))||S&&d.test(o)||o==="."||o===".."||S&&o[o.length-1]==="."||S&&o.length!==o.trim().length||o.length>255)}e.isValidBasename=y;function E(o,S,k){const M=o===S;return!k||M?M:!o||!S?!1:(0,r.equalsIgnoreCase)(o,S)}e.isEqual=E;function l(o,S,k,M=b.sep){if(o===S)return!0;if(!o||!S||S.length>o.length)return!1;if(k){if(!(0,r.startsWithIgnoreCase)(o,S))return!1;if(S.length===o.length)return!0;let A=S.length;return S.charAt(S.length-1)===M&&A--,o.charAt(A)===M}return S.charAt(S.length-1)!==M&&(S+=M),o.indexOf(S)===0}e.isEqualOrParent=l;function p(o){return o>=65&&o<=90||o>=97&&o<=122}e.isWindowsDriveLetter=p;function c(o,S){return L.isWindows&&o.endsWith(":")&&(o+=b.sep),(0,b.isAbsolute)(o)||(o=(0,b.join)(S,o)),o=(0,b.normalize)(o),L.isWindows?(o=(0,r.rtrim)(o,b.sep),o.endsWith(":")&&(o+=b.sep)):(o=(0,r.rtrim)(o,b.sep),o||(o=b.sep)),o}e.sanitizeFilePath=c;function f(o){const S=(0,b.normalize)(o);return L.isWindows?o.length>3?!1:I(S)&&(o.length===2||S.charCodeAt(2)===92):S===b.posix.sep}e.isRootOrDriveLetter=f;function I(o,S=L.isWindows){return S?p(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}e.hasDriveLetter=I;function w(o,S=L.isWindows){return I(o,S)?o[0]:void 0}e.getDriveLetter=w;function t(o,S,k){return S.length>o.length?-1:o===S?0:(k&&(o=o.toLowerCase(),S=S.toLowerCase()),o.indexOf(S))}e.indexOfPath=t;function a(o){const S=o.split(":");let k,M,C;for(const A of S){const T=Number(A);(0,O.isNumber)(T)?M===void 0?M=T:C===void 0&&(C=T):k=k?[k,A].join(":"):A}if(!k)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:k,line:M!==void 0?M:void 0,column:C!==void 0?C:M!==void 0?1:void 0}}e.parseLineAndColumnAware=a;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function n(o,S,k=8){let M="";for(let A=0;A<k;A++){let T;A===0&&L.isWindows&&!S&&(k===3||k===4)?T=i:T=s,M+=T.charAt(Math.floor(Math.random()*T.length))}let C;return S?C=`${S}-${M}`:C=M,o?(0,b.join)(o,C):C}e.randomPath=n}),define(Z[74],te([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var L;(function(P){P[P.stdout=0]="stdout",P[P.stderr=1]="stderr"})(L||(e.Source=L={}));var r;(function(P){P[P.Success=0]="Success",P[P.Unknown=1]="Unknown",P[P.AccessDenied=2]="AccessDenied",P[P.ProcessNotFound=3]="ProcessNotFound"})(r||(e.TerminateResponseCode=r={}));function O(P,...h){const u=h.reduce((v,d)=>(v[d]=!0,v),{}),m=[/^ELECTRON_.+$/,/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(P).filter(v=>!u[v]).forEach(v=>{for(let d=0;d<m.length;d++)if(v.search(m[d])!==-1){delete P[v];break}})}e.sanitizeProcessEnvironment=O;function D(P){P&&(delete P.DEBUG,b.isMacintosh&&delete P.DYLD_LIBRARY_PATH,b.isLinux&&delete P.LD_PRELOAD)}e.removeDangerousEnvVariables=D}),define(Z[7],te([0,1,10,4]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.isUriComponents=e.URI=void 0;const r=/^\w[\w\d+.-]*$/,O=/^\//,D=/^\/\//;function P(i,n){if(!i.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!r.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!O.test(i.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(D.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function h(i,n){return!i&&!n?"file":i}function u(i,n){switch(i){case"https":case"http":case"file":n?n[0]!==g&&(n=g+n):n=g;break}return n}const m="",g="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(n){return n instanceof d?!0:n?typeof n.authority=="string"&&typeof n.fragment=="string"&&typeof n.path=="string"&&typeof n.query=="string"&&typeof n.scheme=="string"&&typeof n.fsPath=="string"&&typeof n.with=="function"&&typeof n.toString=="function":!1}constructor(n,o,S,k,M,C=!1){typeof n=="object"?(this.scheme=n.scheme||m,this.authority=n.authority||m,this.path=n.path||m,this.query=n.query||m,this.fragment=n.fragment||m):(this.scheme=h(n,C),this.authority=o||m,this.path=u(this.scheme,S||m),this.query=k||m,this.fragment=M||m,P(this,C))}get fsPath(){return I(this,!1)}with(n){if(!n)return this;let{scheme:o,authority:S,path:k,query:M,fragment:C}=n;return o===void 0?o=this.scheme:o===null&&(o=m),S===void 0?S=this.authority:S===null&&(S=m),k===void 0?k=this.path:k===null&&(k=m),M===void 0?M=this.query:M===null&&(M=m),C===void 0?C=this.fragment:C===null&&(C=m),o===this.scheme&&S===this.authority&&k===this.path&&M===this.query&&C===this.fragment?this:new l(o,S,k,M,C)}static parse(n,o=!1){const S=v.exec(n);return S?new l(S[2]||m,s(S[4]||m),s(S[5]||m),s(S[7]||m),s(S[9]||m),o):new l(m,m,m,m,m)}static file(n){let o=m;if(L.isWindows&&(n=n.replace(/\\/g,g)),n[0]===g&&n[1]===g){const S=n.indexOf(g,2);S===-1?(o=n.substring(2),n=g):(o=n.substring(2,S),n=n.substring(S)||g)}return new l("file",o,n,m,m)}static from(n,o){return new l(n.scheme,n.authority,n.path,n.query,n.fragment,o)}static joinPath(n,...o){if(!n.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let S;return L.isWindows&&n.scheme==="file"?S=d.file(b.win32.join(I(n,!0),...o)).path:S=b.posix.join(n.path,...o),n.with({path:S})}toString(n=!1){return w(this,n)}toJSON(){return this}static revive(n){if(n){if(n instanceof d)return n;{const o=new l(n);return o._formatted=n.external??null,o._fsPath=n._sep===E?n.fsPath??null:null,o}}else return}}e.URI=d;function y(i){return!i||typeof i!="object"?!1:typeof i.scheme=="string"&&(typeof i.authority=="string"||typeof i.authority>"u")&&(typeof i.path=="string"||typeof i.path>"u")&&(typeof i.query=="string"||typeof i.query>"u")&&(typeof i.fragment=="string"||typeof i.fragment>"u")}e.isUriComponents=y;const E=L.isWindows?1:void 0;class l extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=I(this,!1)),this._fsPath}toString(n=!1){return n?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const n={$mid:1};return this._fsPath&&(n.fsPath=this._fsPath,n._sep=E),this._formatted&&(n.external=this._formatted),this.path&&(n.path=this.path),this.scheme&&(n.scheme=this.scheme),this.authority&&(n.authority=this.authority),this.query&&(n.query=this.query),this.fragment&&(n.fragment=this.fragment),n}}const p={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function c(i,n,o){let S,k=-1;for(let M=0;M<i.length;M++){const C=i.charCodeAt(M);if(C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===45||C===46||C===95||C===126||n&&C===47||o&&C===91||o&&C===93||o&&C===58)k!==-1&&(S+=encodeURIComponent(i.substring(k,M)),k=-1),S!==void 0&&(S+=i.charAt(M));else{S===void 0&&(S=i.substr(0,M));const A=p[C];A!==void 0?(k!==-1&&(S+=encodeURIComponent(i.substring(k,M)),k=-1),S+=A):k===-1&&(k=M)}}return k!==-1&&(S+=encodeURIComponent(i.substring(k))),S!==void 0?S:i}function f(i){let n;for(let o=0;o<i.length;o++){const S=i.charCodeAt(o);S===35||S===63?(n===void 0&&(n=i.substr(0,o)),n+=p[S]):n!==void 0&&(n+=i[o])}return n!==void 0?n:i}function I(i,n){let o;return i.authority&&i.path.length>1&&i.scheme==="file"?o=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?n?o=i.path.substr(1):o=i.path[1].toLowerCase()+i.path.substr(2):o=i.path,L.isWindows&&(o=o.replace(/\//g,"\\")),o}e.uriToFsPath=I;function w(i,n){const o=n?f:c;let S="",{scheme:k,authority:M,path:C,query:A,fragment:T}=i;if(k&&(S+=k,S+=":"),(M||k==="file")&&(S+=g,S+=g),M){let F=M.indexOf("@");if(F!==-1){const z=M.substr(0,F);M=M.substr(F+1),F=z.lastIndexOf(":"),F===-1?S+=o(z,!1,!1):(S+=o(z.substr(0,F),!1,!1),S+=":",S+=o(z.substr(F+1),!1,!0)),S+="@"}M=M.toLowerCase(),F=M.lastIndexOf(":"),F===-1?S+=o(M,!1,!0):(S+=o(M.substr(0,F),!1,!0),S+=M.substr(F))}if(C){if(C.length>=3&&C.charCodeAt(0)===47&&C.charCodeAt(2)===58){const F=C.charCodeAt(1);F>=65&&F<=90&&(C=`/${String.fromCharCode(F+32)}:${C.substr(3)}`)}else if(C.length>=2&&C.charCodeAt(1)===58){const F=C.charCodeAt(0);F>=65&&F<=90&&(C=`${String.fromCharCode(F+32)}:${C.substr(2)}`)}S+=o(C,!0,!1)}return A&&(S+="?",S+=o(A,!1,!1)),T&&(S+="#",S+=n?T:c(T,!1,!1)),S}function t(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+t(i.substr(3)):i}}const a=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function s(i){return i.match(a)?i.replace(a,n=>t(n)):i}}),define(Z[156],te([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function L(u){const m=u;return m&&typeof m.type=="string"&&typeof m.severity=="string"}e.isRemoteConsoleLog=L;function r(u){const m=[];let g;try{const v=JSON.parse(u.arguments),d=v[v.length-1];d&&d.__$stack&&(v.pop(),g=d.__$stack),m.push(...v)}catch{m.push("Unable to log remote console arguments",u.arguments)}return{args:m,stack:g}}e.parse=r;function O(u){if(typeof u!="string")return O(r(u).stack);const m=u;if(m){const g=D(m),v=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(g||"");if(v&&v.length===4)return{uri:b.URI.file(v[1]),line:Number(v[2]),column:Number(v[3])}}}e.getFirstFrame=O;function D(u){if(!u)return u;const m=u.indexOf(`
`);return m===-1?u:u.substring(0,m)}function P(u,m){const{args:g,stack:v}=r(u),d=typeof g[0]=="string"&&g.length===1;let y=D(v);y&&(y=`(${y.trim()})`);let E=[];if(typeof g[0]=="string"?y&&d?E=[`%c[${m}] %c${g[0]} %c${y}`,h("blue"),h(""),h("grey")]:E=[`%c[${m}] %c${g[0]}`,h("blue"),h(""),...g.slice(1)]:E=[`%c[${m}]%`,h("blue"),...g],y&&!d&&E.push(y),typeof console[u.severity]!="function")throw new Error("Unknown console method");console[u.severity].apply(console,E)}e.log=P;function h(u){return`color: ${u}`}}),define(Z[75],te([0,1,17,7]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function r(h){return JSON.stringify(h,D)}e.stringify=r;function O(h){let u=JSON.parse(h);return u=P(u),u}e.parse=O;function D(h,u){return u instanceof RegExp?{$mid:2,source:u.source,flags:u.flags}:u}function P(h,u=0){if(!h||u>200)return h;if(typeof h=="object"){switch(h.$mid){case 1:return L.URI.revive(h);case 2:return new RegExp(h.source,h.flags);case 16:return new Date(h.source)}if(h instanceof b.VSBuffer||h instanceof Uint8Array)return h;if(Array.isArray(h))for(let m=0;m<h.length;++m)h[m]=P(h[m],u+1);else for(const m in h)Object.hasOwnProperty.call(h,m)&&(h[m]=P(h[m],u+1))}return h}e.revive=P}),define(Z[15],te([0,1,13,4,7]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.nodeModulesAsarUnpackedPath=e.nodeModulesAsarPath=e.nodeModulesPath=e.builtinExtensionsPath=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var O;(function(u){u.inMemory="inmemory",u.vscode="vscode",u.internal="private",u.walkThrough="walkThrough",u.walkThroughSnippet="walkThroughSnippet",u.http="http",u.https="https",u.file="file",u.mailto="mailto",u.untitled="untitled",u.data="data",u.attachment="attachment",u.command="command",u.vscodeRemote="vscode-remote",u.vscodeRemoteResource="vscode-remote-resource",u.vscodeManagedRemoteResource="vscode-managed-remote-resource",u.vscodeUserData="vscode-userdata",u.vscodeCustomEditor="vscode-custom-editor",u.vscodeNotebookCell="vscode-notebook-cell",u.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",u.vscodeNotebookCellOutput="vscode-notebook-cell-output",u.vscodeInteractiveInput="vscode-interactive-input",u.vscodeSettings="vscode-settings",u.vscodeWorkspaceTrust="vscode-workspace-trust",u.vscodeTerminal="vscode-terminal",u.vscodeChatSesssion="vscode-chat-editor",u.webviewPanel="webview-panel",u.vscodeWebview="vscode-webview",u.extension="extension",u.vscodeFileResource="vscode-file",u.tmp="tmp",u.vsls="vsls",u.vscodeSourceControl="vscode-scm"})(O||(e.Schemas=O={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class D{constructor(){this._defaultWebPort=80,this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${O.vscodeRemoteResource}`}setPreferredWebSchema(m){this._preferredWebSchema=m}setDelegate(m){this._delegate=m}setServerRootPath(m){this._remoteResourcesPath=`${m}/${O.vscodeRemoteResource}`}set(m,g,v){this._hosts[m]=g,this._ports[m]=v}setConnectionToken(m,g){this._connectionTokens[m]=g}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(m){if(this._delegate)try{return this._delegate(m)}catch(l){return b.onUnexpectedError(l),m}const g=m.authority;let v=this._hosts[g];v&&v.indexOf(":")!==-1&&v.indexOf("[")===-1&&(v=`[${v}]`);const d=this._ports[g],y=this._connectionTokens[g];let E=`path=${encodeURIComponent(m.path)}`;return typeof y=="string"&&(E+=`&${e.connectionTokenQueryName}=${encodeURIComponent(y)}`),r.URI.from({scheme:L.isWeb?this._preferredWebSchema:O.vscodeRemoteResource,authority:L.isWeb&&d===this._defaultWebPort?`${v}`:`${v}:${d}`,path:this._remoteResourcesPath,query:E})}}e.RemoteAuthorities=new D,e.builtinExtensionsPath="vs/../../extensions",e.nodeModulesPath="vs/../../node_modules",e.nodeModulesAsarPath="vs/../../node_modules.asar",e.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";class P{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(m){const g=this.toUri(m,H);return this.uriToBrowserUri(g)}uriToBrowserUri(m){return m.scheme===O.vscodeRemote?e.RemoteAuthorities.rewrite(m):m.scheme===O.file&&(L.isNative||L.isWebWorker&&L.globals.origin===`${O.vscodeFileResource}://${P.FALLBACK_AUTHORITY}`)?m.with({scheme:O.vscodeFileResource,authority:m.authority||P.FALLBACK_AUTHORITY,query:null,fragment:null}):m}asFileUri(m){const g=this.toUri(m,H);return this.uriToFileUri(g)}uriToFileUri(m){return m.scheme===O.vscodeFileResource?m.with({scheme:O.file,authority:m.authority!==P.FALLBACK_AUTHORITY?m.authority:null,query:null,fragment:null}):m}toUri(m,g){return r.URI.isUri(m)?m:r.URI.parse(g.toUrl(m))}}e.FileAccess=new P;var h;(function(u){const m=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);u.CoopAndCoep=Object.freeze(m.get("3"));const g="vscode-coi";function v(y){let E;typeof y=="string"?E=new URL(y).searchParams:y instanceof URL?E=y.searchParams:r.URI.isUri(y)&&(E=new URL(y.toString(!0)).searchParams);const l=E?.get(g);if(l)return m.get(l)}u.getHeadersFromQuery=v;function d(y,E,l){if(!globalThis.crossOriginIsolated)return;const p=E&&l?"3":l?"2":"1";y instanceof URLSearchParams?y.set(g,p):y[g]=p}u.addSearchParam=d})(h||(e.COI=h={}))}),define(Z[19],te([0,1,32,15,10,4,26,7]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalResource=e.DataUri=e.distinctParents=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function h(d){return(0,P.uriToFsPath)(d,!0)}e.originalFSPath=h;class u{constructor(y){this._ignorePathCasing=y}compare(y,E,l=!1){return y===E?0:(0,D.compare)(this.getComparisonKey(y,l),this.getComparisonKey(E,l))}isEqual(y,E,l=!1){return y===E?!0:!y||!E?!1:this.getComparisonKey(y,l)===this.getComparisonKey(E,l)}getComparisonKey(y,E=!1){return y.with({path:this._ignorePathCasing(y)?y.path.toLowerCase():void 0,fragment:E?null:void 0}).toString()}ignorePathCasing(y){return this._ignorePathCasing(y)}isEqualOrParent(y,E,l=!1){if(y.scheme===E.scheme){if(y.scheme===L.Schemas.file)return b.isEqualOrParent(h(y),h(E),this._ignorePathCasing(y))&&y.query===E.query&&(l||y.fragment===E.fragment);if((0,e.isEqualAuthority)(y.authority,E.authority))return b.isEqualOrParent(y.path,E.path,this._ignorePathCasing(y),"/")&&y.query===E.query&&(l||y.fragment===E.fragment)}return!1}joinPath(y,...E){return P.URI.joinPath(y,...E)}basenameOrAuthority(y){return(0,e.basename)(y)||y.authority}basename(y){return r.posix.basename(y.path)}extname(y){return r.posix.extname(y.path)}dirname(y){if(y.path.length===0)return y;let E;return y.scheme===L.Schemas.file?E=P.URI.file(r.dirname(h(y))).path:(E=r.posix.dirname(y.path),y.authority&&E.length&&E.charCodeAt(0)!==47&&(console.error(`dirname("${y.toString})) resulted in a relative path`),E="/")),y.with({path:E})}normalizePath(y){if(!y.path.length)return y;let E;return y.scheme===L.Schemas.file?E=P.URI.file(r.normalize(h(y))).path:E=r.posix.normalize(y.path),y.with({path:E})}relativePath(y,E){if(y.scheme!==E.scheme||!(0,e.isEqualAuthority)(y.authority,E.authority))return;if(y.scheme===L.Schemas.file){const c=r.relative(h(y),h(E));return O.isWindows?b.toSlashes(c):c}let l=y.path||"/";const p=E.path||"/";if(this._ignorePathCasing(y)){let c=0;for(const f=Math.min(l.length,p.length);c<f&&!(l.charCodeAt(c)!==p.charCodeAt(c)&&l.charAt(c).toLowerCase()!==p.charAt(c).toLowerCase());c++);l=p.substr(0,c)+l.substr(c)}return r.posix.relative(l,p)}resolvePath(y,E){if(y.scheme===L.Schemas.file){const l=P.URI.file(r.resolve(h(y),E));return y.with({authority:l.authority,path:l.path})}return E=b.toPosixPath(E),y.with({path:r.posix.resolve(y.path,E)})}isAbsolutePath(y){return!!y.path&&y.path[0]==="/"}isEqualAuthority(y,E){return y===E||y!==void 0&&E!==void 0&&(0,D.equalsIgnoreCase)(y,E)}hasTrailingPathSeparator(y,E=r.sep){if(y.scheme===L.Schemas.file){const l=h(y);return l.length>b.getRoot(l).length&&l[l.length-1]===E}else{const l=y.path;return l.length>1&&l.charCodeAt(l.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(y.fsPath)}}removeTrailingPathSeparator(y,E=r.sep){return(0,e.hasTrailingPathSeparator)(y,E)?y.with({path:y.path.substr(0,y.path.length-1)}):y}addTrailingPathSeparator(y,E=r.sep){let l=!1;if(y.scheme===L.Schemas.file){const p=h(y);l=p!==void 0&&p.length===b.getRoot(p).length&&p[p.length-1]===E}else{E="/";const p=y.path;l=p.length===1&&p.charCodeAt(p.length-1)===47}return!l&&!(0,e.hasTrailingPathSeparator)(y,E)?y.with({path:y.path+"/"}):y}}e.ExtUri=u,e.extUri=new u(()=>!1),e.extUriBiasedIgnorePathCase=new u(d=>d.scheme===L.Schemas.file?!O.isLinux:!0),e.extUriIgnorePathCase=new u(d=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function m(d,y){const E=[];for(let l=0;l<d.length;l++){const p=y(d[l]);d.some((c,f)=>f===l?!1:(0,e.isEqualOrParent)(p,y(c)))||E.push(d[l])}return E}e.distinctParents=m;var g;(function(d){d.META_DATA_LABEL="label",d.META_DATA_DESCRIPTION="description",d.META_DATA_SIZE="size",d.META_DATA_MIME="mime";function y(E){const l=new Map;E.path.substring(E.path.indexOf(";")+1,E.path.lastIndexOf(";")).split(";").forEach(f=>{const[I,w]=f.split(":");I&&w&&l.set(I,w)});const c=E.path.substring(0,E.path.indexOf(";"));return c&&l.set(d.META_DATA_MIME,c),l}d.parseMetaData=y})(g||(e.DataUri=g={}));function v(d,y,E){if(y){let l=d.path;return l&&l[0]!==r.posix.sep&&(l=r.posix.sep+l),d.with({scheme:E,authority:y,path:l})}return d.with({scheme:E})}e.toLocalResource=v}),define(Z[8],te([0,1,23,13,3,2,19,4,143]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.LimitedQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function u(R){return!!R&&typeof R.then=="function"}e.isThenable=u;function m(R){const _=new b.CancellationTokenSource,N=R(_.token),q=new Promise((re,ne)=>{const le=_.token.onCancellationRequested(()=>{le.dispose(),_.dispose(),ne(new L.CancellationError)});Promise.resolve(N).then(V=>{le.dispose(),_.dispose(),re(V)},V=>{le.dispose(),_.dispose(),ne(V)})});return new class{cancel(){_.cancel()}then(re,ne){return q.then(re,ne)}catch(re){return this.then(void 0,re)}finally(re){return q.finally(re)}}}e.createCancelablePromise=m;function g(R,_,N){return new Promise((q,re)=>{const ne=_.onCancellationRequested(()=>{ne.dispose(),q(N)});R.then(q,re).finally(()=>ne.dispose())})}e.raceCancellation=g;function v(R,_){return new Promise((N,q)=>{const re=_.onCancellationRequested(()=>{re.dispose(),q(new L.CancellationError)});R.then(N,q).finally(()=>re.dispose())})}e.raceCancellationError=v;async function d(R){let _=-1;const N=R.map((q,re)=>q.then(ne=>(_=re,ne)));try{return await Promise.race(N)}finally{R.forEach((q,re)=>{re!==_&&q.cancel()})}}e.raceCancellablePromises=d;function y(R,_,N){let q;const re=setTimeout(()=>{q?.(void 0),N?.()},_);return Promise.race([R.finally(()=>clearTimeout(re)),new Promise(ne=>q=ne)])}e.raceTimeout=y;function E(R){return new Promise((_,N)=>{const q=R();u(q)?q.then(_,N):_(q)})}e.asPromise=E;class l{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(_){if(this.isDisposed)throw new Error("Throttler is disposed");if(this.activePromise){if(this.queuedPromiseFactory=_,!this.queuedPromise){const N=()=>{if(this.queuedPromise=null,this.isDisposed)return;const q=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,q};this.queuedPromise=new Promise(q=>{this.activePromise.then(N,N).then(q)})}return new Promise((N,q)=>{this.queuedPromise.then(N,q)})}return this.activePromise=_(),new Promise((N,q)=>{this.activePromise.then(re=>{this.activePromise=null,N(re)},re=>{this.activePromise=null,q(re)})})}dispose(){this.isDisposed=!0}}e.Throttler=l;class p{constructor(){this.current=Promise.resolve(null)}queue(_){return this.current=this.current.then(()=>_(),()=>_())}}e.Sequencer=p;class c{constructor(){this.promiseMap=new Map}queue(_,N){const re=(this.promiseMap.get(_)??Promise.resolve()).catch(()=>{}).then(N).finally(()=>{this.promiseMap.get(_)===re&&this.promiseMap.delete(_)});return this.promiseMap.set(_,re),re}}e.SequencerByKey=c;const f=(R,_)=>{let N=!0;const q=setTimeout(()=>{N=!1,_()},R);return{isTriggered:()=>N,dispose:()=>{clearTimeout(q),N=!1}}},I=R=>{let _=!0;return queueMicrotask(()=>{_&&(_=!1,R())}),{isTriggered:()=>_,dispose:()=>{_=!1}}};class w{constructor(_){this.defaultDelay=_,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(_,N=this.defaultDelay){this.task=_,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((re,ne)=>{this.doResolve=re,this.doReject=ne}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const re=this.task;return this.task=null,re()}}));const q=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=N===h.MicrotaskDelay?I(q):f(N,q),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new L.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=w;class t{constructor(_){this.delayer=new w(_),this.throttler=new l}trigger(_,N){return this.delayer.trigger(()=>this.throttler.queue(_),N)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=t;class a{constructor(){this._isOpen=!1,this._promise=new Promise((_,N)=>{this._completePromise=_})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=a;class s extends a{constructor(_){super(),this._timeout=setTimeout(()=>this.open(),_)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=s;function i(R,_){return _?new Promise((N,q)=>{const re=setTimeout(()=>{ne.dispose(),N()},R),ne=_.onCancellationRequested(()=>{clearTimeout(re),ne.dispose(),q(new L.CancellationError)})}):m(N=>i(R,N))}e.timeout=i;function n(R,_=0){const N=setTimeout(R,_);return(0,O.toDisposable)(()=>clearTimeout(N))}e.disposableTimeout=n;function o(R){const _=[];let N=0;const q=R.length;function re(){return N<q?R[N++]():null}function ne(le){le!=null&&_.push(le);const V=re();return V?V.then(ne):Promise.resolve(_)}return Promise.resolve(null).then(ne)}e.sequence=o;function S(R,_=q=>!!q,N=null){let q=0;const re=R.length,ne=()=>{if(q>=re)return Promise.resolve(N);const le=R[q++];return Promise.resolve(le()).then(ie=>_(ie)?Promise.resolve(ie):ne())};return ne()}e.first=S;function k(R,_=q=>!!q,N=null){if(R.length===0)return Promise.resolve(N);let q=R.length;const re=()=>{q=-1;for(const ne of R)ne.cancel?.()};return new Promise((ne,le)=>{for(const V of R)V.then(ie=>{--q>=0&&_(ie)?(re(),ne(ie)):q===0&&ne(N)}).catch(ie=>{--q>=0&&(re(),le(ie))})})}e.firstParallel=k;class M{constructor(_){this._size=0,this.maxDegreeOfParalellism=_,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new r.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(_){return this._size++,new Promise((N,q)=>{this.outstandingPromises.push({factory:_,c:N,e:q}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const _=this.outstandingPromises.shift();this.runningPromises++;const N=_.factory();N.then(_.c,_.e),N.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=M;class C extends M{constructor(){super(1)}}e.Queue=C;class A{constructor(){this.sequentializer=new G,this.tasks=0}queue(_){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,_())):this.sequentializer.run(this.tasks++,_())}}e.LimitedQueue=A;class T{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const _=new U;return this.drainers.add(_),_.p}isDrained(){for(const[,_]of this.queues)if(_.size>0)return!1;return!0}queueFor(_,N=D.extUri){const q=N.getComparisonKey(_);let re=this.queues.get(q);return re||(re=new C,r.Event.once(re.onDrained)(()=>{re?.dispose(),this.queues.delete(q),this.onDidQueueDrain()}),this.queues.set(q,re)),re}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(const _ of this.drainers)_.complete();this.drainers.clear()}dispose(){for(const[,_]of this.queues)_.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=T;class F{constructor(_,N){this._token=-1,typeof _=="function"&&typeof N=="number"&&this.setIfNotSet(_,N)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(_,N){this.cancel(),this._token=setTimeout(()=>{this._token=-1,_()},N)}setIfNotSet(_,N){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,_()},N))}}e.TimeoutTimer=F;class z{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(_,N){this.cancel(),this._token=setInterval(()=>{_()},N)}}e.IntervalTimer=z;class oe{constructor(_,N){this.timeoutToken=-1,this.runner=_,this.timeout=N,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(_=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,_)}get delay(){return this.timeout}set delay(_){this.timeout=_}isScheduled(){return this.timeoutToken!==-1}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=oe;class ee{constructor(_,N){N%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${N}ms is not a multiple of 1000ms.`),this.runner=_,this.timeout=N,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(_=this.timeout){_%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${_}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(_/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=ee;class ue extends oe{constructor(_,N){super(_,N),this.units=[]}work(_){this.units.push(_),this.isScheduled()||this.schedule()}doRun(){const _=this.units;this.units=[],this.runner?.(_)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=ue;class ae extends O.Disposable{constructor(_,N){super(),this.options=_,this.handler=N,this.pendingWork=[],this.throttler=this._register(new O.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(_){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+_.length>this.options.maxBufferedWork)return!1}else if(this.pending+_.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(const N of _)this.pendingWork.push(N);return this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new oe(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=ae,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=R=>{(0,P.setTimeout0)(()=>{if(_)return;const N=Date.now()+15;R(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,N-Date.now())}}))});let _=!1;return{dispose(){_||(_=!0)}}}:e.runWhenIdle=(R,_)=>{const N=requestIdleCallback(R,typeof _=="number"?{timeout:_}:void 0);let q=!1;return{dispose(){q||(q=!0,cancelIdleCallback(N))}}}}();class de{constructor(_){this._didRun=!1,this._executor=()=>{try{this._value=_()}catch(N){this._error=N}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=de;async function j(R,_,N){let q;for(let re=0;re<N;re++)try{return await R()}catch(ne){q=ne,await i(_)}throw q}e.retry=j;class G{isRunning(_){return typeof _=="number"?this._running?.taskId===_:!!this._running}get running(){return this._running?.promise}cancelRunning(){this._running?.cancel()}run(_,N,q){return this._running={taskId:_,cancel:()=>q?.(),promise:N},N.then(()=>this.doneRunning(_),()=>this.doneRunning(_)),N}doneRunning(_){this._running&&_===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){const _=this._queued;this._queued=void 0,_.run().then(_.promiseResolve,_.promiseReject)}}queue(_){if(this._queued)this._queued.run=_;else{let N,q;const re=new Promise((ne,le)=>{N=ne,q=le});this._queued={run:_,promise:re,promiseResolve:N,promiseReject:q}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}}e.TaskSequentializer=G;class B{constructor(_,N=()=>Date.now()){this.interval=_,this.nowFn=N,this.lastIncrementTime=0,this.value=0}increment(){const _=this.nowFn();return _-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=_,this.value=0),this.value++,this.value}}e.IntervalCounter=B;var W;(function(R){R[R.Resolved=0]="Resolved",R[R.Rejected=1]="Rejected"})(W||(W={}));class U{get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((_,N)=>{this.completeCallback=_,this.errorCallback=N})}complete(_){return new Promise(N=>{this.completeCallback(_),this.outcome={outcome:0,value:_},N()})}error(_){return new Promise(N=>{this.errorCallback(_),this.outcome={outcome:1,value:_},N()})}cancel(){return this.error(new L.CancellationError)}}e.DeferredPromise=U;var $;(function(R){async function _(q){let re;const ne=await Promise.all(q.map(le=>le.then(V=>V,V=>{re||(re=V)})));if(typeof re<"u")throw re;return ne}R.settled=_;function N(q){return new Promise(async(re,ne)=>{try{await q(re,ne)}catch(le){ne(le)}})}R.withAsyncBody=N})($||(e.Promises=$={}));var Y;(function(R){R[R.Initial=0]="Initial",R[R.DoneOK=1]="DoneOK",R[R.DoneError=2]="DoneError"})(Y||(Y={}));class se{static fromArray(_){return new se(N=>{N.emitMany(_)})}static fromPromise(_){return new se(async N=>{N.emitMany(await _)})}static fromPromises(_){return new se(async N=>{await Promise.all(_.map(async q=>N.emitOne(await q)))})}static merge(_){return new se(async N=>{await Promise.all(_.map(async q=>{for await(const re of q)N.emitOne(re)}))})}static{this.EMPTY=se.fromArray([])}constructor(_){this._state=0,this._results=[],this._error=null,this._onStateChanged=new r.Emitter,queueMicrotask(async()=>{const N={emitOne:q=>this.emitOne(q),emitMany:q=>this.emitMany(q),reject:q=>this.reject(q)};try{await Promise.resolve(_(N)),this.resolve()}catch(q){this.reject(q)}finally{N.emitOne=void 0,N.emitMany=void 0,N.reject=void 0}})}[Symbol.asyncIterator](){let _=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(_<this._results.length)return{done:!1,value:this._results[_++]};if(this._state===1)return{done:!0,value:void 0};await r.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(_,N){return new se(async q=>{for await(const re of _)q.emitOne(N(re))})}map(_){return se.map(this,_)}static filter(_,N){return new se(async q=>{for await(const re of _)N(re)&&q.emitOne(re)})}filter(_){return se.filter(this,_)}static coalesce(_){return se.filter(_,N=>!!N)}coalesce(){return se.coalesce(this)}static async toPromise(_){const N=[];for await(const q of _)N.push(q);return N}toPromise(){return se.toPromise(this)}emitOne(_){this._state===0&&(this._results.push(_),this._onStateChanged.fire())}emitMany(_){this._state===0&&(this._results=this._results.concat(_),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(_){this._state===0&&(this._state=2,this._error=_,this._onStateChanged.fire())}}e.AsyncIterableObject=se;class ce extends se{constructor(_,N){super(N),this._source=_}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=ce;function x(R){const _=new b.CancellationTokenSource,N=R(_.token);return new ce(_,async q=>{const re=_.token.onCancellationRequested(()=>{re.dispose(),_.dispose(),q.reject(new L.CancellationError)});try{for await(const ne of N){if(_.token.isCancellationRequested)return;q.emitOne(ne)}re.dispose(),_.dispose()}catch(ne){re.dispose(),_.dispose(),q.reject(ne)}})}e.createCancelableAsyncIterable=x}),define(Z[107],te([0,1,24,8,32,35,10,4,26]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function u(){return Object.create(null)}e.getEmptyExpression=u,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const m="[/\\\\]",g="[^/\\\\]",v=/\//g;function d(G,B){switch(G){case 0:return"";case 1:return`${g}*?`;default:return`(?:${m}|${g}+${m}${B?`|${m}${g}+`:""})*?`}}function y(G,B){if(!G)return[];const W=[];let U=!1,$=!1,Y="";for(const se of G){switch(se){case B:if(!U&&!$){W.push(Y),Y="";continue}break;case"{":U=!0;break;case"}":U=!1;break;case"[":$=!0;break;case"]":$=!1;break}Y+=se}return Y&&W.push(Y),W}e.splitGlobAware=y;function E(G){if(!G)return"";let B="";const W=y(G,e.GLOB_SPLIT);if(W.every(U=>U===e.GLOBSTAR))B=".*";else{let U=!1;W.forEach(($,Y)=>{if($===e.GLOBSTAR){if(U)return;B+=d(2,Y===W.length-1)}else{let se=!1,ce="",x=!1,R="";for(const _ of $){if(_!=="}"&&se){ce+=_;continue}if(x&&(_!=="]"||!R)){let N;_==="-"?N=_:(_==="^"||_==="!")&&!R?N="^":_===e.GLOB_SPLIT?N="":N=(0,h.escapeRegExpCharacters)(_),R+=N;continue}switch(_){case"{":se=!0;continue;case"[":x=!0;continue;case"}":{const q=`(?:${y(ce,",").map(re=>E(re)).join("|")})`;B+=q,se=!1,ce="";break}case"]":{B+="["+R+"]",x=!1,R="";break}case"?":B+=g;continue;case"*":B+=d(1);continue;default:B+=(0,h.escapeRegExpCharacters)(_)}}Y<W.length-1&&(W[Y+1]!==e.GLOBSTAR||Y+2<W.length)&&(B+=m)}U=$===e.GLOBSTAR})}return B}const l=/^\*\*\/\*\.[\w\.-]+$/,p=/^\*\*\/([\w\.-]+)\/?$/,c=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,f=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,I=/^\*\*((\/[\w\.-]+)+)\/?$/,w=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,t=new O.LRUCache(1e4),a=function(){return!1},s=function(){return null};function i(G,B){if(!G)return s;let W;typeof G!="string"?W=G.pattern:W=G,W=W.trim();const U=`${W}_${!!B.trimForExclusions}`;let $=t.get(U);if($)return n($,G);let Y;return l.test(W)?$=S(W.substr(4),W):(Y=p.exec(o(W,B)))?$=k(Y[1],W):(B.trimForExclusions?f:c).test(W)?$=M(W,B):(Y=I.exec(o(W,B)))?$=C(Y[1].substr(1),W,!0):(Y=w.exec(o(W,B)))?$=C(Y[1],W,!1):$=A(W),t.set(U,$),n($,G)}function n(G,B){if(typeof B=="string")return G;const W=function(U,$){return(0,r.isEqualOrParent)(U,B.base,!P.isLinux)?G((0,h.ltrim)(U.substr(B.base.length),D.sep),$):null};return W.allBasenames=G.allBasenames,W.allPaths=G.allPaths,W.basenames=G.basenames,W.patterns=G.patterns,W}function o(G,B){return B.trimForExclusions&&G.endsWith("/**")?G.substr(0,G.length-2):G}function S(G,B){return function(W,U){return typeof W=="string"&&W.endsWith(G)?B:null}}function k(G,B){const W=`/${G}`,U=`\\${G}`,$=function(se,ce){return typeof se!="string"?null:ce?ce===G?B:null:se===G||se.endsWith(W)||se.endsWith(U)?B:null},Y=[G];return $.basenames=Y,$.patterns=[B],$.allBasenames=Y,$}function M(G,B){const W=de(G.slice(1,-1).split(",").map(ce=>i(ce,B)).filter(ce=>ce!==s),G),U=W.length;if(!U)return s;if(U===1)return W[0];const $=function(ce,x){for(let R=0,_=W.length;R<_;R++)if(W[R](ce,x))return G;return null},Y=W.find(ce=>!!ce.allBasenames);Y&&($.allBasenames=Y.allBasenames);const se=W.reduce((ce,x)=>x.allPaths?ce.concat(x.allPaths):ce,[]);return se.length&&($.allPaths=se),$}function C(G,B,W){const U=D.sep===D.posix.sep,$=U?G:G.replace(v,D.sep),Y=D.sep+$,se=D.posix.sep+G;let ce;return W?ce=function(x,R){return typeof x=="string"&&(x===$||x.endsWith(Y)||!U&&(x===G||x.endsWith(se)))?B:null}:ce=function(x,R){return typeof x=="string"&&(x===$||!U&&x===G)?B:null},ce.allPaths=[(W?"*/":"./")+G],ce}function A(G){try{const B=new RegExp(`^${E(G)}$`);return function(W){return B.lastIndex=0,typeof W=="string"&&B.test(W)?G:null}}catch{return s}}function T(G,B,W){return!G||typeof B!="string"?!1:F(G)(B,void 0,W)}e.match=T;function F(G,B={}){if(!G)return a;if(typeof G=="string"||z(G)){const W=i(G,B);if(W===s)return a;const U=function($,Y){return!!W($,Y)};return W.allBasenames&&(U.allBasenames=W.allBasenames),W.allPaths&&(U.allPaths=W.allPaths),U}return ue(G,B)}e.parse=F;function z(G){const B=G;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=z;function oe(G){return G.allBasenames||[]}e.getBasenameTerms=oe;function ee(G){return G.allPaths||[]}e.getPathTerms=ee;function ue(G,B){const W=de(Object.getOwnPropertyNames(G).map(ce=>ae(ce,G[ce],B)).filter(ce=>ce!==s)),U=W.length;if(!U)return s;if(!W.some(ce=>!!ce.requiresSiblings)){if(U===1)return W[0];const ce=function(_,N){let q;for(let re=0,ne=W.length;re<ne;re++){const le=W[re](_,N);if(typeof le=="string")return le;(0,L.isThenable)(le)&&(q||(q=[]),q.push(le))}return q?(async()=>{for(const re of q){const ne=await re;if(typeof ne=="string")return ne}return null})():null},x=W.find(_=>!!_.allBasenames);x&&(ce.allBasenames=x.allBasenames);const R=W.reduce((_,N)=>N.allPaths?_.concat(N.allPaths):_,[]);return R.length&&(ce.allPaths=R),ce}const $=function(ce,x,R){let _,N;for(let q=0,re=W.length;q<re;q++){const ne=W[q];ne.requiresSiblings&&R&&(x||(x=(0,D.basename)(ce)),_||(_=x.substr(0,x.length-(0,D.extname)(ce).length)));const le=ne(ce,x,_,R);if(typeof le=="string")return le;(0,L.isThenable)(le)&&(N||(N=[]),N.push(le))}return N?(async()=>{for(const q of N){const re=await q;if(typeof re=="string")return re}return null})():null},Y=W.find(ce=>!!ce.allBasenames);Y&&($.allBasenames=Y.allBasenames);const se=W.reduce((ce,x)=>x.allPaths?ce.concat(x.allPaths):ce,[]);return se.length&&($.allPaths=se),$}function ae(G,B,W){if(B===!1)return s;const U=i(G,W);if(U===s)return s;if(typeof B=="boolean")return U;if(B){const $=B.when;if(typeof $=="string"){const Y=(se,ce,x,R)=>{if(!R||!U(se,ce))return null;const _=$.replace("$(basename)",()=>x),N=R(_);return(0,L.isThenable)(N)?N.then(q=>q?G:null):N?G:null};return Y.requiresSiblings=!0,Y}}return U}function de(G,B){const W=G.filter(ce=>!!ce.basenames);if(W.length<2)return G;const U=W.reduce((ce,x)=>{const R=x.basenames;return R?ce.concat(R):ce},[]);let $;if(B){$=[];for(let ce=0,x=U.length;ce<x;ce++)$.push(B)}else $=W.reduce((ce,x)=>{const R=x.patterns;return R?ce.concat(R):ce},[]);const Y=function(ce,x){if(typeof ce!="string")return null;if(!x){let _;for(_=ce.length;_>0;_--){const N=ce.charCodeAt(_-1);if(N===47||N===92)break}x=ce.substr(_)}const R=U.indexOf(x);return R!==-1?$[R]:null};Y.basenames=U,Y.patterns=$,Y.allBasenames=U;const se=G.filter(ce=>!ce.basenames);return se.push(Y),se}function j(G,B){return(0,b.equals)(G,B,(W,U)=>typeof W=="string"&&typeof U=="string"?W===U:typeof W!="string"&&typeof U!="string"?W.base===U.base&&W.pattern===U.pattern:!1)}e.patternsEquals=j}),define(Z[46],te([0,1,24,32,10,4,19,26]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitRecentLabel=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getPathLabel=void 0;function h(i,n){const{os:o,tildify:S,relative:k}=n;if(k){const A=u(i,k,o);if(typeof A=="string")return A}let M=i.fsPath;if(o===1&&!O.isWindows?M=M.replace(/\//g,"\\"):o!==1&&O.isWindows&&(M=M.replace(/\\/g,"/")),o!==1&&S?.userHome){const A=S.userHome.fsPath;let T;i.scheme!==S.userHome.scheme&&i.path.startsWith(r.posix.sep)?T=S.userHome.with({path:i.path}).fsPath:T=i.fsPath,M=v(T,A,o)}return(o===1?r.win32:r.posix).normalize(m(M,o===1))}e.getPathLabel=h;function u(i,n,o){const S=o===1?r.win32:r.posix,k=o===3?D.extUri:D.extUriIgnorePathCase,M=n.getWorkspace(),C=(0,b.firstOrDefault)(M.folders);if(!C)return;i.scheme!==C.uri.scheme&&i.path.startsWith(r.posix.sep)&&(i=C.uri.with({path:i.path}));const A=n.getWorkspaceFolder(i);if(!A)return;let T;if(k.isEqual(A.uri,i)?T="":T=k.relativePath(A.uri,i)??"",T&&(T=S.normalize(T)),M.folders.length>1&&!n.noPrefix){const F=A.name?A.name:k.basenameOrAuthority(A.uri);T=T?`${F} \u2022 ${T}`:F}return T}function m(i,n=O.isWindows){return(0,L.hasDriveLetter)(i,n)?i.charAt(0).toUpperCase()+i.slice(1):i}e.normalizeDriveLetter=m;let g=Object.create(null);function v(i,n,o=O.OS){if(o===1||!i||!n)return i;let S=g.original===n?g.normalized:void 0;S||(S=n,O.isWindows&&(S=(0,L.toSlashes)(S)),S=`${(0,P.rtrim)(S,r.posix.sep)}${r.posix.sep}`,g={original:n,normalized:S});let k=i;return O.isWindows&&(k=(0,L.toSlashes)(k)),(o===3?k.startsWith(S):(0,P.startsWithIgnoreCase)(k,S))?`~/${k.substr(S.length)}`:i}e.tildify=v;function d(i,n){return i.replace(/^~($|\/|\\)/,`${n}$1`)}e.untildify=d;const y="\u2026",E="\\\\",l="~";function p(i,n=r.sep){const o=new Array(i.length);let S=!1;for(let k=0;k<i.length;k++){const M=i[k];if(M===""){o[k]=`.${n}`;continue}if(!M){o[k]=M;continue}S=!0;let C="",A=M;A.indexOf(E)===0?(C=A.substr(0,A.indexOf(E)+E.length),A=A.substr(A.indexOf(E)+E.length)):A.indexOf(n)===0?(C=A.substr(0,A.indexOf(n)+n.length),A=A.substr(A.indexOf(n)+n.length)):A.indexOf(l)===0&&(C=A.substr(0,A.indexOf(l)+l.length),A=A.substr(A.indexOf(l)+l.length));const T=A.split(n);for(let F=1;S&&F<=T.length;F++)for(let z=T.length-F;S&&z>=0;z--){S=!1;let oe=T.slice(z,z+F).join(n);for(let ee=0;!S&&ee<i.length;ee++)if(ee!==k&&i[ee]&&i[ee].indexOf(oe)>-1){const ue=z+F===T.length,ae=z>0&&i[ee].indexOf(n)>-1?n+oe:oe,de=i[ee].endsWith(ae);S=!ue||de}if(!S){let ee="";(T[0].endsWith(":")||C!=="")&&(z===1&&(z=0,F++,oe=T[0]+n+oe),z>0&&(ee=T[0]+n),ee=C+ee),z>0&&(ee=ee+y+n),ee=ee+oe,z+F<T.length&&(ee=ee+n+y),o[k]=ee}}S&&(o[k]=M)}return o}e.shorten=p;var c;(function(i){i[i.TEXT=0]="TEXT",i[i.VARIABLE=1]="VARIABLE",i[i.SEPARATOR=2]="SEPARATOR"})(c||(c={}));function f(i,n=Object.create(null)){const o=[];let S=!1,k="";for(const M of i)if(M==="$"||S&&M==="{")k&&o.push({value:k,type:c.TEXT}),k="",S=!0;else if(M==="}"&&S){const C=n[k];if(typeof C=="string")C.length&&o.push({value:C,type:c.VARIABLE});else if(C){const A=o[o.length-1];(!A||A.type!==c.SEPARATOR)&&o.push({value:C.label,type:c.SEPARATOR})}k="",S=!1}else k+=M;return k&&!S&&o.push({value:k,type:c.TEXT}),o.filter((M,C)=>{if(M.type===c.SEPARATOR){const A=o[C-1],T=o[C+1];return[A,T].every(F=>F&&(F.type===c.VARIABLE||F.type===c.TEXT)&&F.value.length>0)}return!0}).map(M=>M.value).join("")}e.template=f;function I(i,n){return O.isMacintosh||n?i.replace(/\(&&\w\)|&&/g,"").replace(/&/g,O.isMacintosh?"&":"&&"):i.replace(/&&|&/g,o=>o==="&"?"&&":"&")}e.mnemonicMenuLabel=I;function w(i,n){return O.isMacintosh||n?i.replace(/\(&&\w\)|&&/g,""):O.isWindows?i.replace(/&&|&/g,o=>o==="&"?"&&":"&"):i.replace(/&&/g,"_")}e.mnemonicButtonLabel=w;function t(i){return i.replace(/&/g,"&&")}e.unmnemonicLabel=t;function a(i){if(i.endsWith("]")){const n=i.lastIndexOf(" [",i.length-2);if(n!==-1){const o=s(i.substring(0,n));return{name:o.name,parentPath:o.parentPath+i.substring(n)}}}return s(i)}e.splitRecentLabel=a;function s(i){const n=i.indexOf("/")!==-1?r.posix:r.win32,o=n.basename(i),S=n.dirname(i);return o.length?{name:o,parentPath:S}:{name:S,parentPath:""}}}),define(Z[157],te([0,1,17,7]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function r(g){return g.toJSON()}class O{constructor(v){this._uriTransformer=v}transformIncoming(v){const d=this._uriTransformer.transformIncoming(v);return d===v?v:r(L.URI.from(d))}transformOutgoing(v){const d=this._uriTransformer.transformOutgoing(v);return d===v?v:r(L.URI.from(d))}transformOutgoingURI(v){const d=this._uriTransformer.transformOutgoing(v);return d===v?v:L.URI.from(d)}transformOutgoingScheme(v){return this._uriTransformer.transformOutgoingScheme(v)}}e.URITransformer=O,e.DefaultURITransformer=new class{transformIncoming(g){return g}transformOutgoing(g){return g}transformOutgoingURI(g){return g}transformOutgoingScheme(g){return g}};function D(g,v,d){if(!g||d>200)return null;if(typeof g=="object"){if(g instanceof L.URI)return v.transformOutgoing(g);for(const y in g)if(Object.hasOwnProperty.call(g,y)){const E=D(g[y],v,d+1);E!==null&&(g[y]=E)}}return null}function P(g,v){const d=D(g,v,0);return d===null?g:d}e.transformOutgoingURIs=P;function h(g,v,d,y){if(!g||y>200)return null;if(typeof g=="object"){if(g.$mid===1)return d?L.URI.revive(v.transformIncoming(g)):v.transformIncoming(g);if(g instanceof b.VSBuffer)return null;for(const E in g)if(Object.hasOwnProperty.call(g,E)){const l=h(g[E],v,d,y+1);l!==null&&(g[E]=l)}}return null}function u(g,v){const d=h(g,v,!1,0);return d===null?g:d}e.transformIncomingURIs=u;function m(g,v){const d=h(g,v,!0,0);return d===null?g:d}e.transformAndReviveIncomingURIs=m}),define(Z[21],te([0,1,45,27,158,8,32,86,10,4,19,7]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.writeFileSync=e.configureFlushOnWrite=e.SymlinkSupport=e.whenDeleted=e.readdirSync=e.rimrafSync=e.RimRafMode=void 0;var v;(function(ae){ae[ae.UNLINK=0]="UNLINK",ae[ae.MOVE=1]="MOVE"})(v||(e.RimRafMode=v={}));async function d(ae,de=v.UNLINK,j){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");return de===v.UNLINK?E(ae):y(ae,j)}async function y(ae,de=(0,D.randomPath)((0,L.tmpdir)())){try{try{await b.promises.rename(ae,de)}catch(j){return j.code==="ENOENT"?void 0:E(ae)}E(de).catch(j=>{})}catch(j){if(j.code!=="ENOENT")throw j}}async function E(ae){return(0,r.promisify)(b.rm)(ae,{recursive:!0,force:!0,maxRetries:3})}function l(ae){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");b.rmSync(ae,{recursive:!0,force:!0,maxRetries:3})}e.rimrafSync=l;async function p(ae,de){return I(await(de?c(ae):(0,r.promisify)(b.readdir)(ae)))}async function c(ae){try{return await(0,r.promisify)(b.readdir)(ae,{withFileTypes:!0})}catch(G){console.warn("[node.js fs] readdir with filetypes failed with error: ",G)}const de=[],j=await p(ae);for(const G of j){let B=!1,W=!1,U=!1;try{const $=await e.Promises.lstat((0,h.join)(ae,G));B=$.isFile(),W=$.isDirectory(),U=$.isSymbolicLink()}catch($){console.warn("[node.js fs] unexpected error from lstat after readdir: ",$)}de.push({name:G,isFile:()=>B,isDirectory:()=>W,isSymbolicLink:()=>U})}return de}function f(ae){return I(b.readdirSync(ae))}e.readdirSync=f;function I(ae){return ae.map(de=>typeof de=="string"?u.isMacintosh?(0,P.normalizeNFC)(de):de:(de.name=u.isMacintosh?(0,P.normalizeNFC)(de.name):de.name,de))}async function w(ae){const de=await p(ae),j=[];for(const G of de)await a.existsDirectory((0,h.join)(ae,G))&&j.push(G);return j}function t(ae,de=1e3){return new Promise(j=>{let G=!1;const B=setInterval(()=>{G||(G=!0,b.access(ae,W=>{G=!1,W&&(clearInterval(B),j(void 0))}))},de)})}e.whenDeleted=t;var a;(function(ae){async function de(B){let W;try{if(W=await e.Promises.lstat(B),!W.isSymbolicLink())return{stat:W}}catch{}try{return{stat:await e.Promises.stat(B),symbolicLink:W?.isSymbolicLink()?{dangling:!1}:void 0}}catch(U){if(U.code==="ENOENT"&&W)return{stat:W,symbolicLink:{dangling:!0}};if(u.isWindows&&U.code==="EACCES")try{return{stat:await e.Promises.stat(await e.Promises.readlink(B)),symbolicLink:{dangling:!1}}}catch($){if($.code==="ENOENT"&&W)return{stat:W,symbolicLink:{dangling:!0}};throw $}throw U}}ae.stat=de;async function j(B){try{const{stat:W,symbolicLink:U}=await ae.stat(B);return W.isFile()&&U?.dangling!==!0}catch{}return!1}ae.existsFile=j;async function G(B){try{const{stat:W,symbolicLink:U}=await ae.stat(B);return W.isDirectory()&&U?.dangling!==!0}catch{}return!1}ae.existsDirectory=G})(a||(e.SymlinkSupport=a={}));const s=new O.ResourceQueue;function i(ae,de,j){return s.queueFor(g.URI.file(ae),m.extUriBiasedIgnorePathCase).queue(()=>{const G=M(j);return new Promise((B,W)=>S(ae,de,G,U=>U?W(U):B()))})}let n=!0;function o(ae){n=ae}e.configureFlushOnWrite=o;function S(ae,de,j,G){if(!n)return b.writeFile(ae,de,{mode:j.mode,flag:j.flag},G);b.open(ae,j.flag,j.mode,(B,W)=>{if(B)return G(B);b.writeFile(W,de,U=>{if(U)return b.close(W,()=>G(U));b.fdatasync(W,$=>($&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",$),o(!1)),b.close(W,Y=>G(Y))))})})}function k(ae,de,j){const G=M(j);if(!n)return b.writeFileSync(ae,de,{mode:G.mode,flag:G.flag});const B=b.openSync(ae,G.flag,G.mode);try{b.writeFileSync(B,de);try{b.fdatasyncSync(B)}catch(W){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",W),o(!1)}}finally{b.closeSync(B)}}e.writeFileSync=k;function M(ae){return ae?{mode:typeof ae.mode=="number"?ae.mode:438,flag:typeof ae.flag=="string"?ae.flag:"w"}:{mode:438,flag:"w"}}async function C(ae,de,j=6e4){if(ae!==de)try{u.isWindows&&typeof j=="number"?await A(ae,de,Date.now(),j):await(0,r.promisify)(b.rename)(ae,de)}catch(G){if(ae.toLowerCase()!==de.toLowerCase()&&G.code==="EXDEV"||ae.endsWith("."))await T(ae,de,{preserveSymlinks:!1}),await d(ae,v.MOVE);else throw G}}async function A(ae,de,j,G,B=0){try{return await(0,r.promisify)(b.rename)(ae,de)}catch(W){if(W.code!=="EACCES"&&W.code!=="EPERM"&&W.code!=="EBUSY")throw W;if(Date.now()-j>=G)throw console.error(`[node.js fs] rename failed after ${B} retries with error: ${W}`),W;if(B===0){let U=!1;try{const{stat:$}=await a.stat(de);$.isFile()||(U=!0)}catch{}if(U)throw W}return await(0,O.timeout)(Math.min(100,B*10)),A(ae,de,j,G,B+1)}}async function T(ae,de,j){return z(ae,de,{root:{source:ae,target:de},options:j,handledSourcePaths:new Set})}const F=511;async function z(ae,de,j){if(j.handledSourcePaths.has(ae))return;j.handledSourcePaths.add(ae);const{stat:G,symbolicLink:B}=await a.stat(ae);if(B){if(j.options.preserveSymlinks)try{return await ue(ae,de,j)}catch(W){console.warn("[node.js fs] copy of symlink failed: ",W)}if(B.dangling)return}return G.isDirectory()?oe(ae,de,G.mode&F,j):ee(ae,de,G.mode&F)}async function oe(ae,de,j,G){await e.Promises.mkdir(de,{recursive:!0,mode:j});const B=await p(ae);for(const W of B)await z((0,h.join)(ae,W),(0,h.join)(de,W),G)}async function ee(ae,de,j){await e.Promises.copyFile(ae,de),await e.Promises.chmod(de,j)}async function ue(ae,de,j){let G=await e.Promises.readlink(ae);(0,D.isEqualOrParent)(G,j.root.source,!u.isLinux)&&(G=(0,h.join)(j.root.target,G.substr(j.root.source.length+1))),await e.Promises.symlink(G,de)}e.Promises=new class{get access(){return(0,r.promisify)(b.access)}get stat(){return(0,r.promisify)(b.stat)}get lstat(){return(0,r.promisify)(b.lstat)}get utimes(){return(0,r.promisify)(b.utimes)}get read(){return(ae,de,j,G,B)=>new Promise((W,U)=>{b.read(ae,de,j,G,B,($,Y,se)=>$?U($):W({bytesRead:Y,buffer:se}))})}get readFile(){return(0,r.promisify)(b.readFile)}get write(){return(ae,de,j,G,B)=>new Promise((W,U)=>{b.write(ae,de,j,G,B,($,Y,se)=>$?U($):W({bytesWritten:Y,buffer:se}))})}get appendFile(){return(0,r.promisify)(b.appendFile)}get fdatasync(){return(0,r.promisify)(b.fdatasync)}get truncate(){return(0,r.promisify)(b.truncate)}get copyFile(){return(0,r.promisify)(b.copyFile)}get open(){return(0,r.promisify)(b.open)}get close(){return(0,r.promisify)(b.close)}get symlink(){return(0,r.promisify)(b.symlink)}get readlink(){return(0,r.promisify)(b.readlink)}get chmod(){return(0,r.promisify)(b.chmod)}get mkdir(){return(0,r.promisify)(b.mkdir)}get unlink(){return(0,r.promisify)(b.unlink)}get rmdir(){return(0,r.promisify)(b.rmdir)}get realpath(){return(0,r.promisify)(b.realpath)}async exists(ae){try{return await e.Promises.access(ae),!0}catch{return!1}}get readdir(){return p}get readDirsInDir(){return w}get writeFile(){return i}get rm(){return d}get rename(){return C}get copy(){return T}}}),define(Z[108],te([0,1,45,10,4,26,21]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.realpathSync=e.realpath=e.realcase=e.realcaseSync=void 0;function P(v){if(r.isLinux)return v;const d=(0,L.dirname)(v);if(v===d)return v;const y=((0,L.basename)(v)||v).toLowerCase();try{const l=(0,D.readdirSync)(d).filter(p=>p.toLowerCase()===y);if(l.length===1){const p=P(d);if(p)return(0,L.join)(p,l[0])}else if(l.length>1){const p=l.indexOf(y);if(p>=0){const c=P(d);if(c)return(0,L.join)(c,l[p])}}}catch{}return null}e.realcaseSync=P;async function h(v){if(r.isLinux)return v;const d=(0,L.dirname)(v);if(v===d)return v;const y=((0,L.basename)(v)||v).toLowerCase();try{const l=(await D.Promises.readdir(d)).filter(p=>p.toLowerCase()===y);if(l.length===1){const p=await h(d);if(p)return(0,L.join)(p,l[0])}else if(l.length>1){const p=l.indexOf(y);if(p>=0){const c=await h(d);if(c)return(0,L.join)(c,l[p])}}}catch{}return null}e.realcase=h;async function u(v){try{return await D.Promises.realpath(v)}catch{const y=g(v);return await D.Promises.access(y,b.constants.R_OK),y}}e.realpath=u;function m(v){try{return b.realpathSync(v)}catch{const y=g(v);return b.accessSync(y,b.constants.R_OK),y}}e.realpathSync=m;function g(v){return(0,O.rtrim)((0,L.normalize)(v),L.sep)}}),define(Z[109],te([0,1,27,10,21]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFirstAvailablePowerShellInstallation=e.enumeratePowerShellInstallations=void 0;const O=/^\d+$/,D=/^Microsoft.PowerShell_.*/,P=/^Microsoft.PowerShellPreview_.*/;var h;(function(I){I[I.x64=0]="x64",I[I.x86=1]="x86",I[I.ARM=2]="ARM"})(h||(h={}));let u;switch(process.arch){case"ia32":u=1;break;case"arm":case"arm64":u=2;break;default:u=0;break}let m;process.env.PROCESSOR_ARCHITEW6432?m=process.env.PROCESSOR_ARCHITEW6432==="ARM64"?2:0:process.env.PROCESSOR_ARCHITECTURE==="ARM64"?m=2:process.env.PROCESSOR_ARCHITECTURE==="X86"?m=1:m=0;class g{constructor(w,t,a){this.exePath=w,this.displayName=t,this.knownToExist=a}async exists(){return this.knownToExist===void 0&&(this.knownToExist=await r.SymlinkSupport.existsFile(this.exePath)),this.knownToExist}}function v({useAlternateBitness:I=!1}={}){return I?u===0?process.env["ProgramFiles(x86)"]||null:m===0&&process.env.ProgramW6432||null:process.env.ProgramFiles||null}async function d({useAlternateBitness:I=!1,findPreview:w=!1}={}){const t=v({useAlternateBitness:I});if(!t)return null;const a=L.join(t,"PowerShell");if(!await r.SymlinkSupport.existsDirectory(a))return null;let s=-1,i=null;for(const S of await r.Promises.readdir(a)){let k=-1;if(w){const C=S.indexOf("-");if(C<0)continue;const A=S.substring(0,C);if(!O.test(A)||S.substring(C+1)!=="preview")continue;k=parseInt(A,10)}else{if(!O.test(S))continue;k=parseInt(S,10)}if(k<=s)continue;const M=L.join(a,S,"pwsh.exe");await r.SymlinkSupport.existsFile(M)&&(i=M,s=k)}if(!i)return null;const n=t.includes("x86")?" (x86)":"",o=w?" Preview":"";return new g(i,`PowerShell${o}${n}`,!0)}async function y({findPreview:I}={}){if(!process.env.LOCALAPPDATA)return null;const w=L.join(process.env.LOCALAPPDATA,"Microsoft","WindowsApps");if(!await r.SymlinkSupport.existsDirectory(w))return null;const{pwshMsixDirRegex:t,pwshMsixName:a}=I?{pwshMsixDirRegex:P,pwshMsixName:"PowerShell Preview (Store)"}:{pwshMsixDirRegex:D,pwshMsixName:"PowerShell (Store)"};for(const s of await r.Promises.readdir(w))if(t.test(s)){const i=L.join(w,s,"pwsh.exe");return new g(i,a)}return null}function E(){const I=L.join(b.homedir(),".dotnet","tools","pwsh.exe");return new g(I,".NET Core PowerShell Global Tool")}function l(){const I=L.join(process.env.windir,u===1&&m!==1?"SysNative":"System32","WindowsPowerShell","v1.0","powershell.exe");return new g(I,"Windows PowerShell",!0)}async function*p(){let I=await d();I&&(yield I),I=await d({useAlternateBitness:!0}),I&&(yield I),I=await y(),I&&(yield I),I=E(),I&&(yield I),I=await d({findPreview:!0}),I&&(yield I),I=await y({findPreview:!0}),I&&(yield I),I=await d({useAlternateBitness:!0,findPreview:!0}),I&&(yield I),I=l(),I&&(yield I)}async function*c(){for await(const I of p())await I.exists()&&(yield I)}e.enumeratePowerShellInstallations=c;async function f(){for await(const I of c())return I;return null}e.getFirstAvailablePowerShellInstallation=f}),define(Z[90],te([0,1,10,4,36,74,12,21]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.win32=e.createQueuedSender=e.getWindowsShell=e.TerminateResponseCode=e.Source=void 0,Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return O.Source}}),Object.defineProperty(e,"TerminateResponseCode",{enumerable:!0,get:function(){return O.TerminateResponseCode}});function h(g=r.env){return g.comspec||"cmd.exe"}e.getWindowsShell=h;function u(g){let v=[],d=!1;const y=function(E){if(d){v.push(E);return}(!g.send(E,p=>{if(p&&console.error(p),d=!1,v.length>0){const c=v.slice(0);v=[],c.forEach(f=>y(f))}})||L.isWindows)&&(d=!0)};return{send:y}}e.createQueuedSender=u;var m;(function(g){async function v(d,y,E){if(b.isAbsolute(d))return d;if(y===void 0&&(y=r.cwd()),b.dirname(d)!=="."||(E===void 0&&D.isString(r.env.PATH)&&(E=r.env.PATH.split(b.delimiter)),E===void 0||E.length===0))return b.join(y,d);async function p(c){if(await P.Promises.exists(c)){let f;try{f=await P.Promises.stat(c)}catch(I){I.message.startsWith("EACCES")&&(f=await P.Promises.lstat(c))}return f?!f.isDirectory():!1}return!1}for(const c of E){let f;if(b.isAbsolute(c)?f=b.join(c,d):f=b.join(y,c,d),await p(f))return f;let I=f+".com";if(await p(I)||(I=f+".exe",await p(I)))return I}return b.join(y,d)}g.findExecutable=v})(m||(e.win32=m={}))}),define(Z[110],te([0,1,47,15]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listProcesses=void 0;function r(D){return new Promise((P,h)=>{let u;const m=new Map;function g(d,y,E,l,p){const c=m.get(y);if(d===D||c){const f={name:v(E),cmd:E,pid:d,ppid:y,load:l,mem:p};m.set(d,f),d===D&&(u=f),c&&(c.children||(c.children=[]),c.children.push(f),c.children.length>1&&(c.children=c.children.sort((I,w)=>I.pid-w.pid)))}}function v(d){const y=/--utility-sub-type=network/i,E=/--crashes-directory/i,l=/\\pipe\\winpty-control/i,p=/conhost\.exe.+--headless/i,c=/--type=([a-zA-Z-]+)/;if(E.exec(d))return"electron-crash-reporter";if(l.exec(d))return"winpty-agent";if(p.exec(d))return"conpty-agent";let f=c.exec(d);if(f&&f.length===2)return f[1]==="renderer"?"window":f[1]==="utility"?y.exec(d)?"utility-network-service":"utility-process":f[1]==="extensionHost"?"extension-host":f[1];const I=/[a-zA-Z-]+\.js/g;let w="";do f=I.exec(d),f&&(w+=f+" ");while(f);return w&&d.indexOf("node ")<0&&d.indexOf("node.exe")<0?`electron-nodejs (${w})`:d}if(process.platform==="win32"){const d=y=>y.indexOf("\\\\?\\")===0||y.indexOf("\\??\\")===0?y.substring(4):y.indexOf('"\\\\?\\')===0||y.indexOf('"\\??\\')===0?'"'+y.substring(5):y;new Promise((y,E)=>{H(["@vscode/windows-process-tree"],y,E)}).then(y=>{y.getProcessList(D,E=>{if(!E){h(new Error(`Root process ${D} not found`));return}y.getProcessCpuUsage(E,l=>{const p=new Map;l.forEach(c=>{const f=d(c.commandLine||"");p.set(c.pid,{name:v(f),cmd:f,pid:c.pid,ppid:c.ppid,load:c.cpu||0,mem:c.memory||0})}),u=p.get(D),u?(p.forEach(c=>{const f=p.get(c.ppid);f&&(f.children||(f.children=[]),f.children.push(c))}),p.forEach(c=>{c.children&&(c.children=c.children.sort((f,I)=>f.pid-I.pid))}),P(u)):h(new Error(`Root process ${D} not found`))})},y.ProcessDataFlag.CommandLine|y.ProcessDataFlag.Memory)})}else{let d=function(){let y=[u];const E=[];for(;y.length;){const p=y.shift();p&&(E.push(p.pid),p.children&&(y=y.concat(p.children)))}let l=JSON.stringify(L.FileAccess.asFileUri("vs/base/node/cpuUsage.sh").fsPath);l+=" "+E.join(" "),(0,b.exec)(l,{},(p,c,f)=>{if(p||f)h(p||new Error(f.toString()));else{const I=c.toString().split(`
`);for(let w=0;w<E.length;w++){const t=m.get(E[w]);t.load=parseFloat(I[w])}if(!u){h(new Error(`Root process ${D} not found`));return}P(u)}})};(0,b.exec)("which ps",{},(y,E,l)=>{if(y||l)if(process.platform!=="linux")h(y||new Error(l.toString()));else{const p=JSON.stringify(L.FileAccess.asFileUri("vs/base/node/ps.sh").fsPath);(0,b.exec)(p,{},(c,f,I)=>{c||I?h(c||new Error(I.toString())):(O(f,g),d())})}else{const p=E.toString().trim(),c="-ax -o pid=,ppid=,pcpu=,pmem=,command=";(0,b.exec)(`${p} ${c}`,{maxBuffer:1e3*1024,env:{LC_NUMERIC:"en_US.UTF-8"}},(f,I,w)=>{f||w&&!w.includes("screen size is bogus")?h(f||new Error(w.toString())):(O(I,g),process.platform==="linux"?d():u?P(u):h(new Error(`Root process ${D} not found`)))})}})}})}e.listProcesses=r;function O(D,P){const h=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/,u=D.toString().split(`
`);for(const m of u){const g=h.exec(m.trim());g&&g.length===6&&P(parseInt(g[1]),parseInt(g[2]),g[5],parseFloat(g[3]),parseFloat(g[4]))}}}),define(Z[111],te([0,1,27,4,109,90]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSystemShell=void 0;async function D(g,v){return g===1?L.isWindows?m():O.getWindowsShell(v):h(g,v)}e.getSystemShell=D;let P=null;function h(g,v){if(L.isLinux&&g===2||L.isMacintosh&&g===3)return"/bin/bash";if(!P){let d;if(L.isWindows)d="/bin/bash";else{if(d=v.SHELL,!d)try{d=(0,b.userInfo)().shell}catch{}d||(d="sh"),d==="/bin/false"&&(d="/bin/bash")}P=d}return P}let u=null;async function m(){return u||(u=(await(0,r.getFirstAvailablePowerShellInstallation)()).exePath),u}});var be=this&&this.__decorate||function(H,e,b,L){var r=arguments.length,O=r<3?e:L===null?L=Object.getOwnPropertyDescriptor(e,b):L,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(H,e,b,L);else for(var P=H.length-1;P>=0;P--)(D=H[P])&&(O=(r<3?D(O):r>3?D(e,b,O):D(e,b))||O);return r>3&&O&&Object.defineProperty(e,b,O),O};define(Z[42],te([0,1,24,8,17,23,55,13,3,2,75,26,12]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.deserialize=e.serialize=e.BufferWriter=e.BufferReader=void 0;var d;(function(B){B[B.Promise=100]="Promise",B[B.PromiseCancel=101]="PromiseCancel",B[B.EventListen=102]="EventListen",B[B.EventDispose=103]="EventDispose"})(d||(d={}));function y(B){switch(B){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var E;(function(B){B[B.Initialize=200]="Initialize",B[B.PromiseSuccess=201]="PromiseSuccess",B[B.PromiseError=202]="PromiseError",B[B.PromiseErrorObj=203]="PromiseErrorObj",B[B.EventFire=204]="EventFire"})(E||(E={}));function l(B){switch(B){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var p;(function(B){B[B.Uninitialized=0]="Uninitialized",B[B.Idle=1]="Idle"})(p||(p={}));function c(B){let W=0;for(let U=0;;U+=7){const $=B.read(1);if(W|=($.buffer[0]&127)<<U,!($.buffer[0]&128))return W}}const f=s(0);function I(B,W){if(W===0){B.write(f);return}let U=0;for(let Y=W;Y!==0;Y=Y>>>7)U++;const $=r.VSBuffer.alloc(U);for(let Y=0;W!==0;Y++)$.buffer[Y]=W&127,W=W>>>7,W>0&&($.buffer[Y]|=128);B.write($)}class w{constructor(W){this.buffer=W,this.pos=0}read(W){const U=this.buffer.slice(this.pos,this.pos+W);return this.pos+=U.byteLength,U}}e.BufferReader=w;class t{constructor(){this.buffers=[]}get buffer(){return r.VSBuffer.concat(this.buffers)}write(W){this.buffers.push(W)}}e.BufferWriter=t;var a;(function(B){B[B.Undefined=0]="Undefined",B[B.String=1]="String",B[B.Buffer=2]="Buffer",B[B.VSBuffer=3]="VSBuffer",B[B.Array=4]="Array",B[B.Object=5]="Object",B[B.Int=6]="Int"})(a||(a={}));function s(B){const W=r.VSBuffer.alloc(1);return W.writeUInt8(B,0),W}const i={Undefined:s(a.Undefined),String:s(a.String),Buffer:s(a.Buffer),VSBuffer:s(a.VSBuffer),Array:s(a.Array),Object:s(a.Object),Uint:s(a.Int)},n=typeof Buffer<"u";function o(B,W){if(typeof W>"u")B.write(i.Undefined);else if(typeof W=="string"){const U=r.VSBuffer.fromString(W);B.write(i.String),I(B,U.byteLength),B.write(U)}else if(n&&Buffer.isBuffer(W)){const U=r.VSBuffer.wrap(W);B.write(i.Buffer),I(B,U.byteLength),B.write(U)}else if(W instanceof r.VSBuffer)B.write(i.VSBuffer),I(B,W.byteLength),B.write(W);else if(Array.isArray(W)){B.write(i.Array),I(B,W.length);for(const U of W)o(B,U)}else if(typeof W=="number"&&(W|0)===W)B.write(i.Uint),I(B,W);else{const U=r.VSBuffer.fromString(JSON.stringify(W));B.write(i.Object),I(B,U.byteLength),B.write(U)}}e.serialize=o;function S(B){switch(B.read(1).readUInt8(0)){case a.Undefined:return;case a.String:return B.read(c(B)).toString();case a.Buffer:return B.read(c(B)).buffer;case a.VSBuffer:return B.read(c(B));case a.Array:{const U=c(B),$=[];for(let Y=0;Y<U;Y++)$.push(S(B));return $}case a.Object:return JSON.parse(B.read(c(B)).toString());case a.Int:return c(B)}}e.deserialize=S;class k{constructor(W,U,$=null,Y=1e3){this.protocol=W,this.ctx=U,this.logger=$,this.timeoutDelay=Y,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(se=>this.onRawMessage(se)),this.sendResponse({type:200})}registerChannel(W,U){this.channels.set(W,U),setTimeout(()=>this.flushPendingRequests(W),0)}sendResponse(W){switch(W.type){case 200:{const U=this.send([W.type]);this.logger?.logOutgoing(U,0,1,l(W.type));return}case 201:case 202:case 204:case 203:{const U=this.send([W.type,W.id],W.data);this.logger?.logOutgoing(U,W.id,1,l(W.type),W.data);return}}}send(W,U=void 0){const $=new t;return o($,W),o($,U),this.sendBuffer($.buffer)}sendBuffer(W){try{return this.protocol.send(W),W.byteLength}catch{return 0}}onRawMessage(W){const U=new w(W),$=S(U),Y=S(U),se=$[0];switch(se){case 100:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}: ${$[2]}.${$[3]}`,Y),this.onPromise({type:se,id:$[1],channelName:$[2],name:$[3],arg:Y});case 102:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}: ${$[2]}.${$[3]}`,Y),this.onEventListen({type:se,id:$[1],channelName:$[2],name:$[3],arg:Y});case 101:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}`),this.disposeActiveRequest({type:se,id:$[1]});case 103:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}`),this.disposeActiveRequest({type:se,id:$[1]})}}onPromise(W){const U=this.channels.get(W.channelName);if(!U){this.collectPendingRequest(W);return}const $=new O.CancellationTokenSource;let Y;try{Y=U.call(this.ctx,W.name,W.arg,$.token)}catch(x){Y=Promise.reject(x)}const se=W.id;Y.then(x=>{this.sendResponse({id:se,data:x,type:201}),this.activeRequests.delete(W.id)},x=>{x instanceof Error?this.sendResponse({id:se,data:{message:x.message,name:x.name,stack:x.stack?x.stack.split?x.stack.split(`
`):x.stack:void 0},type:202}):this.sendResponse({id:se,data:x,type:203}),this.activeRequests.delete(W.id)});const ce=(0,u.toDisposable)(()=>$.cancel());this.activeRequests.set(W.id,ce)}onEventListen(W){const U=this.channels.get(W.channelName);if(!U){this.collectPendingRequest(W);return}const $=W.id,se=U.listen(this.ctx,W.name,W.arg)(ce=>this.sendResponse({id:$,data:ce,type:204}));this.activeRequests.set(W.id,se)}disposeActiveRequest(W){const U=this.activeRequests.get(W.id);U&&(U.dispose(),this.activeRequests.delete(W.id))}collectPendingRequest(W){let U=this.pendingRequests.get(W.channelName);U||(U=[],this.pendingRequests.set(W.channelName,U));const $=setTimeout(()=>{console.error(`Unknown channel: ${W.channelName}`),W.type===100&&this.sendResponse({id:W.id,data:{name:"Unknown channel",message:`Channel name '${W.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);U.push({request:W,timeoutTimer:$})}flushPendingRequests(W){const U=this.pendingRequests.get(W);if(U){for(const $ of U)switch(clearTimeout($.timeoutTimer),$.request.type){case 100:this.onPromise($.request);break;case 102:this.onEventListen($.request);break}this.pendingRequests.delete(W)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,u.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=k;var M;(function(B){B[B.LocalSide=0]="LocalSide",B[B.OtherSide=1]="OtherSide"})(M||(e.RequestInitiator=M={}));class C{constructor(W,U=null){this.protocol=W,this.isDisposed=!1,this.state=p.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new h.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage($=>this.onBuffer($)),this.logger=U}getChannel(W){const U=this;return{call($,Y,se){return U.isDisposed?Promise.reject(new P.CancellationError):U.requestPromise(W,$,Y,se)},listen($,Y){return U.isDisposed?h.Event.None:U.requestEvent(W,$,Y)}}}requestPromise(W,U,$,Y=O.CancellationToken.None){const se=this.lastRequestId++,x={id:se,type:100,channelName:W,name:U,arg:$};if(Y.isCancellationRequested)return Promise.reject(new P.CancellationError);let R;return new Promise((N,q)=>{if(Y.isCancellationRequested)return q(new P.CancellationError);const re=()=>{const ie=Q=>{switch(Q.type){case 201:this.handlers.delete(se),N(Q.data);break;case 202:{this.handlers.delete(se);const fe=new Error(Q.data.message);fe.stack=Array.isArray(Q.data.stack)?Q.data.stack.join(`
`):Q.data.stack,fe.name=Q.data.name,q(fe);break}case 203:this.handlers.delete(se),q(Q.data);break}};this.handlers.set(se,ie),this.sendRequest(x)};let ne=null;this.state===p.Idle?re():(ne=(0,L.createCancelablePromise)(ie=>this.whenInitialized()),ne.then(()=>{ne=null,re()}));const le=()=>{ne?(ne.cancel(),ne=null):this.sendRequest({id:se,type:101}),q(new P.CancellationError)},V=Y.onCancellationRequested(le);R=(0,u.combinedDisposable)((0,u.toDisposable)(le),V),this.activeRequests.add(R)}).finally(()=>{this.activeRequests.delete(R)})}requestEvent(W,U,$){const Y=this.lastRequestId++,ce={id:Y,type:102,channelName:W,name:U,arg:$};let x=null;const R=new h.Emitter({onWillAddFirstListener:()=>{x=(0,L.createCancelablePromise)(N=>this.whenInitialized()),x.then(()=>{x=null,this.activeRequests.add(R),this.sendRequest(ce)})},onDidRemoveLastListener:()=>{x?(x.cancel(),x=null):(this.activeRequests.delete(R),this.sendRequest({id:Y,type:103}))}}),_=N=>R.fire(N.data);return this.handlers.set(Y,_),R.event}sendRequest(W){switch(W.type){case 100:case 102:{const U=this.send([W.type,W.id,W.channelName,W.name],W.arg);this.logger?.logOutgoing(U,W.id,0,`${y(W.type)}: ${W.channelName}.${W.name}`,W.arg);return}case 101:case 103:{const U=this.send([W.type,W.id]);this.logger?.logOutgoing(U,W.id,0,y(W.type));return}}}send(W,U=void 0){const $=new t;return o($,W),o($,U),this.sendBuffer($.buffer)}sendBuffer(W){try{return this.protocol.send(W),W.byteLength}catch{return 0}}onBuffer(W){const U=new w(W),$=S(U),Y=S(U),se=$[0];switch(se){case 200:return this.logger?.logIncoming(W.byteLength,0,0,l(se)),this.onResponse({type:$[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(W.byteLength,$[1],0,l(se),Y),this.onResponse({type:$[0],id:$[1],data:Y})}}onResponse(W){if(W.type===200){this.state=p.Idle,this._onDidInitialize.fire();return}this.handlers.get(W.id)?.(W)}get onDidInitializePromise(){return h.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===p.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,u.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelClient=C,be([D.memoize],C.prototype,"onDidInitializePromise",null);class A{get connections(){const W=[];return this._connections.forEach(U=>W.push(U)),W}constructor(W){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new h.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new h.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,W(({protocol:U,onDidClientDisconnect:$})=>{h.Event.once(U.onMessage)(se=>{const ce=new w(se),x=S(ce),R=new k(U,x),_=new C(U);this.channels.forEach((q,re)=>R.registerChannel(re,q));const N={channelServer:R,channelClient:_,ctx:x};this._connections.add(N),this._onDidAddConnection.fire(N),$(()=>{R.dispose(),_.dispose(),this._connections.delete(N),this._onDidRemoveConnection.fire(N)})})})}getChannel(W,U){const $=this;return{call(Y,se,ce){let x;if((0,v.isFunction)(U)){const _=(0,b.getRandomElement)($.connections.filter(U));x=_?Promise.resolve(_):h.Event.toPromise(h.Event.filter($.onDidAddConnection,U))}else x=U.routeCall($,Y,se);const R=x.then(_=>_.channelClient.getChannel(W));return F(R).call(Y,se,ce)},listen(Y,se){if((0,v.isFunction)(U))return $.getMulticastEvent(W,U,Y,se);const ce=U.routeEvent($,Y,se).then(x=>x.channelClient.getChannel(W));return F(ce).listen(Y,se)}}}getMulticastEvent(W,U,$,Y){const se=this;let ce=new u.DisposableStore;const x=new h.Emitter({onWillAddFirstListener:()=>{ce=new u.DisposableStore;const R=new h.EventMultiplexer,_=new Map,N=re=>{const le=re.channelClient.getChannel(W).listen($,Y),V=R.add(le);_.set(re,V)},q=re=>{const ne=_.get(re);ne&&(ne.dispose(),_.delete(re))};se.connections.filter(U).forEach(N),h.Event.filter(se.onDidAddConnection,U)(N,void 0,ce),se.onDidRemoveConnection(q,void 0,ce),R.event(x.fire,x,ce),ce.add(R)},onDidRemoveLastListener:()=>{ce.dispose()}});return x.event}registerChannel(W,U){this.channels.set(W,U),this._connections.forEach($=>{$.channelServer.registerChannel(W,U)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=A;class T{constructor(W,U,$=null){const Y=new t;o(Y,U),W.send(Y.buffer),this.channelClient=new C(W,$),this.channelServer=new k(W,U,$)}getChannel(W){return this.channelClient.getChannel(W)}registerChannel(W,U){this.channelServer.registerChannel(W,U)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=T;function F(B){return{call(W,U,$){return B.then(Y=>Y.call(W,U,$))},listen(W,U){const $=new h.Relay;return B.then(Y=>$.input=Y.listen(W,U)),$.event}}}e.getDelayedChannel=F;function z(B){let W=!1;return{call(U,$,Y){return W?B.call(U,$,Y):(0,L.timeout)(0).then(()=>W=!0).then(()=>B.call(U,$,Y))},listen(U,$){if(W)return B.listen(U,$);const Y=new h.Relay;return(0,L.timeout)(0).then(()=>W=!0).then(()=>Y.input=B.listen(U,$)),Y.event}}}e.getNextTickChannel=z;class oe{constructor(W){this.fn=W}routeCall(W){return this.route(W)}routeEvent(W){return this.route(W)}async route(W){for(const U of W.connections)if(await Promise.resolve(this.fn(U.ctx)))return Promise.resolve(U);return await h.Event.toPromise(W.onDidAddConnection),await this.route(W)}}e.StaticRouter=oe;var ee;(function(B){function W(se,ce){const x=se,R=ce&&ce.disableMarshalling,_=new Map;for(const N in x)$(N)&&_.set(N,h.Event.buffer(x[N],!0));return new class{listen(N,q,re){const ne=_.get(q);if(ne)return ne;if(Y(q)){const le=x[q];if(typeof le=="function")return le.call(x,re)}throw new P.ErrorNoTelemetry(`Event not found: ${q}`)}call(N,q,re){const ne=x[q];if(typeof ne=="function"){if(!R&&Array.isArray(re))for(let le=0;le<re.length;le++)re[le]=(0,m.revive)(re[le]);return ne.apply(x,re)}throw new P.ErrorNoTelemetry(`Method not found: ${q}`)}}}B.fromService=W;function U(se,ce){const x=ce&&ce.disableMarshalling;return new Proxy({},{get(R,_){if(typeof _=="string")return ce?.properties?.has(_)?ce.properties.get(_):Y(_)?function(N){return se.listen(_,N)}:$(_)?se.listen(_):async function(...N){let q;ce&&!(0,v.isUndefinedOrNull)(ce.context)?q=[ce.context,...N]:q=N;const re=await se.call(_,q);return x?re:(0,m.revive)(re)};throw new P.ErrorNoTelemetry(`Property not found: ${String(_)}`)}})}B.toService=U;function $(se){return se[0]==="o"&&se[1]==="n"&&g.isUpperAsciiLetter(se.charCodeAt(2))}function Y(se){return/^onDynamic/.test(se)&&g.isUpperAsciiLetter(se.charCodeAt(9))}})(ee||(e.ProxyChannel=ee={}));const ue=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function ae(B){if(Array.isArray(B))return B;if(B&&typeof B=="object"&&typeof B.toString=="function"){const W=B.toString();if(W!=="[object Object]")return W}return B}function de(B){return Array.isArray(B)?B.map(ae):ae(B)}function j(B,W,U,$,Y,se,ce){ce=de(ce);const x=ue[Y],R=x[$%x.length];let _=[`%c[${B}]%c[${String(W).padStart(7," ")}]%c[len: ${String(U).padStart(5," ")}]%c${String($).padStart(5," ")} - ${se}`,"color: darkgreen","color: grey","color: grey",`color: ${R}`];/\($/.test(se)?(_=_.concat(ce),_.push(")")):_.push(ce),console.log.apply(console,_)}class G{constructor(W,U){this._outgoingPrefix=W,this._incomingPrefix=U,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(W,U,$,Y,se){this._totalOutgoing+=W,j(this._outgoingPrefix,this._totalOutgoing,W,U,$,Y,se)}logIncoming(W,U,$,Y,se){this._totalIncoming+=W,j(this._incomingPrefix,this._totalIncoming,W,U,$,Y,se)}}e.IPCLogger=G}),define(Z[159],te([0,1,17,3,42]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Protocol=void 0;class O{constructor(h){this.port=h,this.onMessage=L.Event.fromDOMEventEmitter(this.port,"message",u=>b.VSBuffer.wrap(u.data)),h.start()}send(h){this.port.postMessage(h.buffer)}disconnect(){this.port.close()}}e.Protocol=O;class D extends r.IPCClient{constructor(h,u){const m=new O(h);super(m,u),this.protocol=m}dispose(){this.protocol.disconnect()}}e.Client=D}),define(Z[112],te([0,1,17,3,2,42]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentProtocol=e.BufferedEmitter=e.Client=e.Protocol=e.ProtocolConstants=e.ChunkStream=e.SocketCloseEventType=e.SocketDiagnostics=e.SocketDiagnosticsEventType=void 0;var D;(function(i){i.Created="created",i.Read="read",i.Write="write",i.Open="open",i.Error="error",i.Close="close",i.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",i.NodeEndReceived="nodeEndReceived",i.NodeEndSent="nodeEndSent",i.NodeDrainBegin="nodeDrainBegin",i.NodeDrainEnd="nodeDrainEnd",i.zlibInflateError="zlibInflateError",i.zlibInflateData="zlibInflateData",i.zlibInflateInitialWrite="zlibInflateInitialWrite",i.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",i.zlibInflateWrite="zlibInflateWrite",i.zlibInflateFlushFired="zlibInflateFlushFired",i.zlibDeflateError="zlibDeflateError",i.zlibDeflateData="zlibDeflateData",i.zlibDeflateWrite="zlibDeflateWrite",i.zlibDeflateFlushFired="zlibDeflateFlushFired",i.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",i.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",i.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",i.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",i.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",i.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",i.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",i.ProtocolHeaderRead="protocolHeaderRead",i.ProtocolMessageRead="protocolMessageRead",i.ProtocolHeaderWrite="protocolHeaderWrite",i.ProtocolMessageWrite="protocolMessageWrite",i.ProtocolWrite="protocolWrite"})(D||(e.SocketDiagnosticsEventType=D={}));var P;(function(i){i.enableDiagnostics=!1,i.records=[];const n=new WeakMap;let o=0;function S(M,C){if(!n.has(M)){const A=String(++o);n.set(M,A)}return n.get(M)}function k(M,C,A,T){if(!i.enableDiagnostics)return;const F=S(M,C);if(T instanceof b.VSBuffer||T instanceof Uint8Array||T instanceof ArrayBuffer||ArrayBuffer.isView(T)){const z=b.VSBuffer.alloc(T.byteLength);z.set(T),i.records.push({timestamp:Date.now(),id:F,label:C,type:A,buff:z})}else i.records.push({timestamp:Date.now(),id:F,label:C,type:A,data:T})}i.traceSocketEvent=k})(P||(e.SocketDiagnostics=P={}));var h;(function(i){i[i.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",i[i.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(h||(e.SocketCloseEventType=h={}));let u=null;function m(){return u||(u=b.VSBuffer.alloc(0)),u}class g{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(n){this._chunks.push(n),this._totalLength+=n.byteLength}read(n){return this._read(n,!0)}peek(n){return this._read(n,!1)}_read(n,o){if(n===0)return m();if(n>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===n){const C=this._chunks[0];return o&&(this._chunks.shift(),this._totalLength-=n),C}if(this._chunks[0].byteLength>n){const C=this._chunks[0].slice(0,n);return o&&(this._chunks[0]=this._chunks[0].slice(n),this._totalLength-=n),C}const S=b.VSBuffer.alloc(n);let k=0,M=0;for(;n>0;){const C=this._chunks[M];if(C.byteLength>n){const A=C.slice(0,n);S.set(A,k),k+=n,o&&(this._chunks[M]=C.slice(n),this._totalLength-=n),n-=n}else S.set(C,k),k+=C.byteLength,o?(this._chunks.shift(),this._totalLength-=C.byteLength):M++,n-=C.byteLength}return S}}e.ChunkStream=g;var v;(function(i){i[i.None=0]="None",i[i.Regular=1]="Regular",i[i.Control=2]="Control",i[i.Ack=3]="Ack",i[i.Disconnect=5]="Disconnect",i[i.ReplayRequest=6]="ReplayRequest",i[i.Pause=7]="Pause",i[i.Resume=8]="Resume",i[i.KeepAlive=9]="KeepAlive"})(v||(v={}));function d(i){switch(i){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting";case 9:return"KeepAlive"}}var y;(function(i){i[i.HeaderLength=13]="HeaderLength",i[i.AcknowledgeTime=2e3]="AcknowledgeTime",i[i.TimeoutTime=2e4]="TimeoutTime",i[i.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",i[i.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime",i[i.KeepAliveSendTime=5e3]="KeepAliveSendTime"})(y||(e.ProtocolConstants=y={}));class E{constructor(n,o,S,k){this.type=n,this.id=o,this.ack=S,this.data=k,this.writtenTime=0}get size(){return this.data.byteLength}}class l extends r.Disposable{constructor(n){super(),this._onMessage=this._register(new L.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=n,this._isDisposed=!1,this._incomingData=new g,this._register(this._socket.onData(o=>this.acceptChunk(o))),this.lastReadTime=Date.now()}acceptChunk(n){if(!(!n||n.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(n);this._incomingData.byteLength>=this._state.readLen;){const o=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=o.readUInt32BE(9),this._state.messageType=o.readUInt8(0),this._state.id=o.readUInt32BE(1),this._state.ack=o.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:d(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const S=this._state.messageType,k=this._state.id,M=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._socket.traceSocketEvent("protocolMessageRead",o),this._onMessage.fire(new E(S,k,M,o)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class p{constructor(n){this._writeNowTimeout=null,this._isDisposed=!1,this._isPaused=!1,this._socket=n,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(n){if(this._isDisposed)return;n.writtenTime=Date.now(),this.lastWriteTime=Date.now();const o=b.VSBuffer.alloc(13);o.writeUInt8(n.type,0),o.writeUInt32BE(n.id,1),o.writeUInt32BE(n.ack,5),o.writeUInt32BE(n.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:d(n.type),id:n.id,ack:n.ack,messageSize:n.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",n.data),this._writeSoon(o,n.data)}_bufferAdd(n,o){const S=this._totalLength===0;return this._data.push(n,o),this._totalLength+=n.byteLength+o.byteLength,S}_bufferTake(){const n=b.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,n}_writeSoon(n,o){this._bufferAdd(n,o)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;const n=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:n.byteLength}),this._socket.write(n)}}class c extends r.Disposable{constructor(n){super(),this._onMessage=new L.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new L.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=n,this._socketWriter=this._register(new p(this._socket)),this._socketReader=this._register(new l(this._socket)),this._register(this._socketReader.onMessage(o=>{o.type===1&&this._onMessage.fire(o.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(n){this._socketWriter.write(new E(1,0,0,n))}}e.Protocol=c;class f extends O.IPCClient{static fromSocket(n,o){return new f(new c(n),o)}get onDidDispose(){return this.protocol.onDidDispose}constructor(n,o,S=null){super(n,o,S),this.protocol=n}dispose(){super.dispose();const n=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),n.end()}}e.Client=f;class I{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new L.Emitter({onWillAddFirstListener:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onDidRemoveLastListener:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(n){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(n):this._emitter.fire(n):this._bufferedMessages.push(n)}flushBuffer(){this._bufferedMessages=[]}}e.BufferedEmitter=I;class w{constructor(n){this.data=n,this.next=null}}class t{constructor(){this._first=null,this._last=null}length(){let n=0,o=this._first;for(;o;)o=o.next,n++;return n}peek(){return this._first?this._first.data:null}toArray(){const n=[];let o=0,S=this._first;for(;S;)n[o++]=S.data,S=S.next;return n}pop(){if(this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(n){const o=new w(n);if(!this._first){this._first=o,this._last=o;return}this._last.next=o,this._last=o}}class a{static{this._HISTORY_LENGTH=10}static{this._INSTANCE=null}static getInstance(){return a._INSTANCE||(a._INSTANCE=new a),a._INSTANCE}constructor(){this.lastRuns=[];const n=Date.now();for(let o=0;o<a._HISTORY_LENGTH;o++)this.lastRuns[o]=n-1e3*o;setInterval(()=>{for(let o=a._HISTORY_LENGTH;o>=1;o--)this.lastRuns[o]=this.lastRuns[o-1];this.lastRuns[0]=Date.now()},1e3)}load(){const n=Date.now(),o=(1+a._HISTORY_LENGTH)*1e3;let S=0;for(let k=0;k<a._HISTORY_LENGTH;k++)n-this.lastRuns[k]<=o&&S++;return 1-S/a._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}class s{get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}constructor(n){this._onControlMessage=new I,this.onControlMessage=this._onControlMessage.event,this._onMessage=new I,this.onMessage=this._onMessage.event,this._onDidDispose=new I,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new I,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new I,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=n.loadEstimator??a.getInstance(),this._shouldSendKeepAlive=n.sendKeepAlive??!0,this._isReconnecting=!1,this._outgoingUnackMsg=new t,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=new r.DisposableStore,this._socket=n.socket,this._socketWriter=this._socketDisposables.add(new p(this._socket)),this._socketReader=this._socketDisposables.add(new l(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(o=>this._receiveMessage(o))),this._socketDisposables.add(this._socket.onClose(o=>this._onSocketClose.fire(o))),n.initialChunk&&this._socketReader.acceptChunk(n.initialChunk),this._shouldSendKeepAlive?this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3):this._keepAliveInterval=null}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables.dispose()}drain(){return this._socketWriter.drain()}sendDisconnect(){const n=new E(5,0,0,m());this._socketWriter.write(n),this._socketWriter.flush()}sendPause(){const n=new E(7,0,0,m());this._socketWriter.write(n)}sendResume(){const n=new E(8,0,0,m());this._socketWriter.write(n)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(n,o){this._isReconnecting=!0,this._socketDisposables.dispose(),this._socketDisposables=new r.DisposableStore,this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=n,this._socketWriter=this._socketDisposables.add(new p(this._socket)),this._socketReader=this._socketDisposables.add(new l(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(S=>this._receiveMessage(S))),this._socketDisposables.add(this._socket.onClose(S=>this._onSocketClose.fire(S))),this._socketReader.acceptChunk(o)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const n=new E(3,0,this._incomingAckId,m());this._socketWriter.write(n);const o=this._outgoingUnackMsg.toArray();for(let S=0,k=o.length;S<k;S++)this._socketWriter.write(o[S]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(n){if(n.ack>this._outgoingAckId){this._outgoingAckId=n.ack;do{const o=this._outgoingUnackMsg.peek();if(o&&o.id<=n.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(n.type){case 0:break;case 1:{if(n.id>this._incomingMsgId)if(n.id!==this._incomingMsgId+1){const o=Date.now();o-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=o,this._socketWriter.write(new E(6,0,0,m())))}else this._incomingMsgId=n.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(n.data);break}case 2:{this._onControlMessage.fire(n.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{const o=this._outgoingUnackMsg.toArray();for(let S=0,k=o.length;S<k;S++)this._socketWriter.write(o[S]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}case 9:break}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(n){const o=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const S=new E(1,o,this._incomingAckId,n);this._outgoingUnackMsg.push(S),this._isReconnecting||(this._socketWriter.write(S),this._recvAckCheck())}sendControl(n){const o=new E(2,0,0,n);this._socketWriter.write(o)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId||this._incomingAckTimeout)return;const n=Date.now()-this._incomingMsgLastTime;if(n>=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-n+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;const n=this._outgoingUnackMsg.peek(),o=Date.now()-n.writtenTime,S=Date.now()-this._socketReader.lastReadTime,k=Date.now()-this._lastSocketTimeoutTime;if(o>=2e4&&S>=2e4&&k>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:o,timeSinceLastReceivedSomeData:S});return}const M=Math.max(2e4-o,2e4-S,2e4-k,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},M)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const n=new E(3,0,this._incomingAckId,m());this._socketWriter.write(n)}_sendKeepAlive(){this._incomingAckId=this._incomingMsgId;const n=new E(9,0,this._incomingAckId,m());this._socketWriter.write(n)}}e.PersistentProtocol=s}),define(Z[160],te([0,1,38,17,3,2,42,147]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;function h(m,g){const v=r.Event.fromNodeEventEmitter(b.validatedIpcMain,g,(y,E)=>({event:y,message:E})),d=r.Event.filter(v,({event:y})=>y.sender.id===m);return r.Event.map(d,({message:y})=>y&&L.VSBuffer.wrap(y))}class u extends D.IPCServer{static{this.Clients=new Map}static getOnDidClientConnect(){const g=r.Event.fromNodeEventEmitter(b.validatedIpcMain,"vscode:hello",({sender:v})=>v);return r.Event.map(g,v=>{const d=v.id;u.Clients.get(d)?.dispose();const E=new r.Emitter;u.Clients.set(d,(0,O.toDisposable)(()=>E.fire()));const l=h(d,"vscode:message"),p=r.Event.any(r.Event.signal(h(d,"vscode:disconnect")),E.event);return{protocol:new P.Protocol(v,l),onDidClientDisconnect:p}})}constructor(){super(u.getOnDidClientConnect())}}e.Server=u}),define(Z[113],te([0,1,38,3,31,159]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.Client=void 0;class D extends O.Client{constructor(u,m){super({addEventListener:(g,v)=>u.addListener(g,v),removeEventListener:(g,v)=>u.removeListener(g,v),postMessage:g=>u.postMessage(g),start:()=>u.start(),close:()=>u.close()},m)}}e.Client=D;async function P(h){if(h.isDestroyed()||h.webContents.isDestroyed())throw new Error("ipc.mp#connect: Cannot talk to window because it is closed or destroyed");const u=(0,r.generateUuid)();h.webContents.send("vscode:createMessageChannel",u);const m=L.Event.fromNodeEventEmitter(b.validatedIpcMain,"vscode:createMessageChannelResult",(v,d)=>({nonce:d,port:v.ports[0]})),{port:g}=await L.Event.toPromise(L.Event.once(L.Event.filter(m,v=>v.nonce===u)));return g}e.connect=P}),define(Z[161],te([0,1,47,8,17,23,156,13,3,2,37,90,74,42]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Server=void 0;class y extends d.ChannelServer{constructor(p){super({send:c=>{try{process.send?.(c.buffer.toString("base64"))}catch{}},onMessage:h.Event.fromNodeEventEmitter(process,"message",c=>r.VSBuffer.wrap(Buffer.from(c,"base64")))},p),process.once("disconnect",()=>this.dispose())}}e.Server=y;class E{constructor(p,c){this.modulePath=p,this.options=c,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new h.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const f=c&&c.timeout?c.timeout:6e4;this.disposeDelayer=new L.Delayer(f),this.child=null,this._client=null}getChannel(p){const c=this;return{call(f,I,w){return c.requestPromise(p,f,I,w)},listen(f,I){return c.requestEvent(p,f,I)}}}requestPromise(p,c,f,I=O.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(I.isCancellationRequested)return Promise.reject(P.canceled());this.disposeDelayer.cancel();const w=this.getCachedChannel(p),t=(0,L.createCancelablePromise)(i=>w.call(c,f,i)),a=I.onCancellationRequested(()=>t.cancel()),s=(0,u.toDisposable)(()=>t.cancel());return this.activeRequests.add(s),t.finally(()=>{a.dispose(),this.activeRequests.delete(s),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),t}requestEvent(p,c,f){if(!this.disposeDelayer)return h.Event.None;this.disposeDelayer.cancel();let I;const w=new h.Emitter({onWillAddFirstListener:()=>{I=this.getCachedChannel(p).listen(c,f)(w.fire,w),this.activeRequests.add(I)},onDidRemoveLastListener:()=>{this.activeRequests.delete(I),I.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return w.event}get client(){if(!this._client){const p=this.options&&this.options.args?this.options.args:[],c=Object.create(null);c.env={...(0,m.deepClone)(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options&&this.options.env&&(c.env={...c.env,...this.options.env}),this.options&&this.options.freshExecArgv&&(c.execArgv=[]),this.options&&typeof this.options.debug=="number"&&(c.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&typeof this.options.debugBrk=="number"&&(c.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),c.execArgv===void 0&&(c.execArgv=process.execArgv.filter(n=>!/^--inspect(-brk)?=/.test(n)).filter(n=>!n.startsWith("--vscode-"))),(0,v.removeDangerousEnvVariables)(c.env),this.child=(0,b.fork)(this.modulePath,p,c);const f=new h.Emitter;h.Event.fromNodeEventEmitter(this.child,"message",n=>n)(n=>{if((0,D.isRemoteConsoleLog)(n)){(0,D.log)(n,`IPC Library: ${this.options.serverName}`);return}f.fire(r.VSBuffer.wrap(Buffer.from(n,"base64")))});const w=this.options.useQueue?(0,g.createQueuedSender)(this.child):this.child,t=n=>this.child&&this.child.connected&&w.send(n.buffer.toString("base64")),a=f.event,s={send:t,onMessage:a};this._client=new d.ChannelClient(s);const i=()=>this.disposeClient();process.once("exit",i),this.child.on("error",n=>console.warn('IPC "'+this.options.serverName+'" errored with '+n)),this.child.on("exit",(n,o)=>{process.removeListener("exit",i),this.activeRequests.forEach(S=>(0,u.dispose)(S)),this.activeRequests.clear(),n!==0&&o!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+n+" and signal "+o),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:n,signal:o})})}return this._client}getCachedChannel(p){let c=this.channels.get(p);return c||(c=this.client.getChannel(p),this.channels.set(p,c)),c}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer?.cancel(),this.disposeDelayer=void 0,this.disposeClient(),this.activeRequests.clear()}}e.Client=E}),define(Z[114],te([0,1,8,3,2,75,12]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var P;(function(v){v[v.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",v[v.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(P||(e.StorageHint=P={}));function h(v){const d=v;return d?.changed instanceof Map||d?.deleted instanceof Set}e.isStorageItemsChangeEvent=h;var u;(function(v){v[v.None=0]="None",v[v.Initialized=1]="Initialized",v[v.Closed=2]="Closed"})(u||(e.StorageState=u={}));class m extends r.Disposable{static{this.DEFAULT_FLUSH_DELAY=100}constructor(d,y=Object.create(null)){super(),this.database=d,this.options=y,this._onDidChangeStorage=this._register(new L.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=u.None,this.cache=new Map,this.flushDelayer=new b.ThrottledDelayer(m.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(d=>this.onDidChangeItemsExternal(d)))}onDidChangeItemsExternal(d){this._onDidChangeStorage.pause();try{d.changed?.forEach((y,E)=>this.acceptExternal(E,y)),d.deleted?.forEach(y=>this.acceptExternal(y,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(d,y){if(this.state===u.Closed)return;let E=!1;(0,D.isUndefinedOrNull)(y)?E=this.cache.delete(d):this.cache.get(d)!==y&&(this.cache.set(d,y),E=!0),E&&this._onDidChangeStorage.fire({key:d,external:!0})}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===u.None&&(this.state=u.Initialized,this.options.hint!==P.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(d,y){const E=this.cache.get(d);return(0,D.isUndefinedOrNull)(E)?y:E}getBoolean(d,y){const E=this.get(d);return(0,D.isUndefinedOrNull)(E)?y:E==="true"}getNumber(d,y){const E=this.get(d);return(0,D.isUndefinedOrNull)(E)?y:parseInt(E,10)}getObject(d,y){const E=this.get(d);return(0,D.isUndefinedOrNull)(E)?y:(0,O.parse)(E)}async set(d,y,E=!1){if(this.state===u.Closed)return;if((0,D.isUndefinedOrNull)(y))return this.delete(d,E);const l=(0,D.isObject)(y)||Array.isArray(y)?(0,O.stringify)(y):String(y);if(this.cache.get(d)!==l)return this.cache.set(d,l),this.pendingInserts.set(d,l),this.pendingDeletes.delete(d),this._onDidChangeStorage.fire({key:d,external:E}),this.doFlush()}async delete(d,y=!1){if(!(this.state===u.Closed||!this.cache.delete(d)))return this.pendingDeletes.has(d)||this.pendingDeletes.add(d),this.pendingInserts.delete(d),this._onDidChangeStorage.fire({key:d,external:y}),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=u.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const d={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(d).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(d){if(this.hasPending)return this.doFlush(d)}async doFlush(d){return this.flushDelayer.trigger(()=>this.flushPending(),d)}async whenFlushed(){if(this.hasPending)return new Promise(d=>this.whenFlushedCallbacks.push(d))}isInMemory(){return this.options.hint===P.STORAGE_IN_MEMORY}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=m;class g{constructor(){this.onDidChangeItemsExternal=L.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(d){d.insert?.forEach((y,E)=>this.items.set(E,y)),d.delete?.forEach(y=>this.items.delete(y))}async close(){}}e.InMemoryStorageDatabase=g}),define(Z[162],te([0,1,8,3,35,10,21]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteStorageDatabase=void 0;class P{static{this.IN_MEMORY_PATH=":memory:"}get onDidChangeItemsExternal(){return L.Event.None}static{this.BUSY_OPEN_TIMEOUT=2e3}static{this.MAX_HOST_PARAMETERS=256}constructor(m,g=Object.create(null)){this.path=m,this.options=g,this.name=(0,O.basename)(this.path),this.logger=new h(this.options.logging),this.whenConnected=this.connect(this.path)}async getItems(){const m=await this.whenConnected,g=new Map;return(await this.all(m,"SELECT * FROM ItemTable")).forEach(d=>g.set(d.key,d.value)),this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] getItems(): ${g.size} rows`),g}async updateItems(m){const g=await this.whenConnected;return this.doUpdateItems(g,m)}doUpdateItems(m,g){return this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] updateItems(): insert(${g.insert?(0,r.mapToString)(g.insert):"0"}), delete(${g.delete?(0,r.setToString)(g.delete):"0"})`),this.transaction(m,()=>{const v=g.insert,d=g.delete;if(v&&v.size>0){const y=[];y.push([]);let E=0;v.forEach((l,p)=>{let c=y[E];c.length>P.MAX_HOST_PARAMETERS&&(E++,c=[],y.push(c)),c.push(p,l)}),y.forEach(l=>{this.prepare(m,`INSERT INTO ItemTable VALUES ${new Array(l.length/2).fill("(?,?)").join(",")}`,p=>p.run(l),()=>{const p=[];let c=0;return v.forEach((f,I)=>{p.push(I),c+=f.length}),`Keys: ${p.join(", ")} Length: ${c}`})})}if(d&&d.size){const y=[];y.push([]);let E=0;d.forEach(l=>{let p=y[E];p.length>P.MAX_HOST_PARAMETERS&&(E++,p=[],y.push(p)),p.push(l)}),y.forEach(l=>{this.prepare(m,`DELETE FROM ItemTable WHERE key IN (${new Array(l.length).fill("?").join(",")})`,p=>p.run(l),()=>{const p=[];return d.forEach(c=>{p.push(c)}),`Keys: ${p.join(", ")}`})})}})}async close(m){this.logger.trace(`[storage ${this.name}] close()`);const g=await this.whenConnected;return this.doClose(g,m)}doClose(m,g){return new Promise((v,d)=>{m.db.close(y=>(y&&this.handleSQLiteError(m,`[storage ${this.name}] close(): ${y}`),this.path===P.IN_MEMORY_PATH?v():!m.isErroneous&&!m.isInMemory?this.backup().then(v,E=>(this.logger.error(`[storage ${this.name}] backup(): ${E}`),v())):typeof g=="function"?D.Promises.unlink(this.path).then(()=>this.doConnect(this.path).then(E=>{const l=()=>this.doClose(E,void 0);return this.doUpdateItems(E,{insert:g()}).then(()=>l(),p=>(l(),Promise.reject(p)))})).then(v,d):d(y||new Error("Database has errors or is in-memory without recovery option"))))})}backup(){const m=this.toBackupPath(this.path);return D.Promises.copy(this.path,m,{preserveSymlinks:!1})}toBackupPath(m){return`${m}.backup`}async checkIntegrity(m){this.logger.trace(`[storage ${this.name}] checkIntegrity(full: ${m})`);const g=await this.whenConnected,v=await this.get(g,m?"PRAGMA integrity_check":"PRAGMA quick_check"),d=m?v.integrity_check:v.quick_check;return g.isErroneous?`${d} (last error: ${g.lastError})`:g.isInMemory?`${d} (in-memory!)`:d}async connect(m,g=!0){this.logger.trace(`[storage ${this.name}] open(${m}, retryOnBusy: ${g})`);try{return await this.doConnect(m)}catch(v){if(this.logger.error(`[storage ${this.name}] open(): Unable to open DB due to ${v}`),v.code==="SQLITE_BUSY"&&g)return await(0,b.timeout)(P.BUSY_OPEN_TIMEOUT),this.connect(m,!1);try{await D.Promises.unlink(m);try{await D.Promises.rename(this.toBackupPath(m),m,!1)}catch{}return await this.doConnect(m)}catch(d){return this.logger.error(`[storage ${this.name}] open(): Unable to use backup due to ${d}`),this.doConnect(P.IN_MEMORY_PATH)}}}handleSQLiteError(m,g){m.isErroneous=!0,m.lastError=g,this.logger.error(g)}doConnect(m){return new Promise((g,v)=>{new Promise((d,y)=>{H(["@vscode/sqlite3"],d,y)}).then(d=>{const y={db:new(this.logger.isTracing?d.verbose().Database:d.Database)(m,E=>E?y.db&&E.code!=="SQLITE_CANTOPEN"?y.db.close(()=>v(E)):v(E):this.exec(y,["PRAGMA user_version = 1;","CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)"].join("")).then(()=>g(y),l=>y.db.close(()=>v(l)))),isInMemory:m===P.IN_MEMORY_PATH};y.db.on("error",E=>this.handleSQLiteError(y,`[storage ${this.name}] Error (event): ${E}`)),this.logger.isTracing&&y.db.on("trace",E=>this.logger.trace(`[storage ${this.name}] Trace (event): ${E}`))},v)})}exec(m,g){return new Promise((v,d)=>{m.db.exec(g,y=>y?(this.handleSQLiteError(m,`[storage ${this.name}] exec(): ${y}`),d(y)):v())})}get(m,g){return new Promise((v,d)=>{m.db.get(g,(y,E)=>y?(this.handleSQLiteError(m,`[storage ${this.name}] get(): ${y}`),d(y)):v(E))})}all(m,g){return new Promise((v,d)=>{m.db.all(g,(y,E)=>y?(this.handleSQLiteError(m,`[storage ${this.name}] all(): ${y}`),d(y)):v(E))})}transaction(m,g){return new Promise((v,d)=>{m.db.serialize(()=>{m.db.run("BEGIN TRANSACTION"),g(),m.db.run("END TRANSACTION",y=>y?(this.handleSQLiteError(m,`[storage ${this.name}] transaction(): ${y}`),d(y)):v())})})}prepare(m,g,v,d){const y=m.db.prepare(g),E=l=>{this.handleSQLiteError(m,`[storage ${this.name}] prepare(): ${l} (${g}). Details: ${d()}`)};y.on("error",E),v(y),y.finalize(l=>{l&&E(l),y.removeListener("error",E)})}}e.SQLiteStorageDatabase=P;class h{static{this.VSCODE_TRACE_STORAGE="VSCODE_TRACE_STORAGE"}constructor(m){m&&typeof m.logTrace=="function"&&process.env[h.VSCODE_TRACE_STORAGE]&&(this.logTrace=m.logTrace),m&&typeof m.logError=="function"&&(this.logError=m.logError)}get isTracing(){return!!this.logTrace}trace(m){this.logTrace?.(m)}error(m){this.logError?.(m)}}}),define(Z[163],te([11,9]),function(H,e){return H.create("vs/code/electron-main/app",e)}),define(Z[164],te([11,9]),function(H,e){return H.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Z[165],te([11,9]),function(H,e){return H.create("vs/platform/contextkey/common/contextkey",e)}),define(Z[166],te([11,9]),function(H,e){return H.create("vs/platform/contextkey/common/scanner",e)}),define(Z[167],te([11,9]),function(H,e){return H.create("vs/platform/dialogs/common/dialogs",e)}),define(Z[168],te([11,9]),function(H,e){return H.create("vs/platform/dialogs/electron-main/dialogMainService",e)}),define(Z[169],te([11,9]),function(H,e){return H.create("vs/platform/environment/node/argv",e)}),define(Z[170],te([11,9]),function(H,e){return H.create("vs/platform/environment/node/argvHelper",e)}),define(Z[171],te([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(Z[172],te([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(Z[173],te([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(Z[174],te([11,9]),function(H,e){return H.create("vs/platform/extensions/common/extensionValidator",e)}),define(Z[175],te([11,9]),function(H,e){return H.create("vs/platform/externalTerminal/node/externalTerminalService",e)}),define(Z[176],te([11,9]),function(H,e){return H.create("vs/platform/files/common/fileService",e)}),define(Z[177],te([11,9]),function(H,e){return H.create("vs/platform/files/common/files",e)}),define(Z[178],te([11,9]),function(H,e){return H.create("vs/platform/files/common/io",e)}),define(Z[179],te([11,9]),function(H,e){return H.create("vs/platform/files/electron-main/diskFileSystemProviderServer",e)}),define(Z[180],te([11,9]),function(H,e){return H.create("vs/platform/files/node/diskFileSystemProvider",e)}),define(Z[181],te([11,9]),function(H,e){return H.create("vs/platform/issue/electron-main/issueMainService",e)}),define(Z[182],te([11,9]),function(H,e){return H.create("vs/platform/menubar/electron-main/menubar",e)}),define(Z[183],te([11,9]),function(H,e){return H.create("vs/platform/native/electron-main/nativeHostMainService",e)}),define(Z[184],te([11,9]),function(H,e){return H.create("vs/platform/request/common/request",e)}),define(Z[185],te([11,9]),function(H,e){return H.create("vs/platform/shell/node/shellEnv",e)}),define(Z[186],te([11,9]),function(H,e){return H.create("vs/platform/telemetry/common/telemetryService",e)}),define(Z[187],te([11,9]),function(H,e){return H.create("vs/platform/terminal/common/terminalPlatformConfiguration",e)}),define(Z[188],te([11,9]),function(H,e){return H.create("vs/platform/terminal/common/terminalProfiles",e)}),define(Z[189],te([11,9]),function(H,e){return H.create("vs/platform/update/common/update.config.contribution",e)}),define(Z[190],te([11,9]),function(H,e){return H.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(Z[191],te([11,9]),function(H,e){return H.create("vs/platform/windows/electron-main/windowImpl",e)}),define(Z[192],te([11,9]),function(H,e){return H.create("vs/platform/windows/electron-main/windowsMainService",e)}),define(Z[193],te([11,9]),function(H,e){return H.create("vs/platform/workspace/common/workspace",e)}),define(Z[194],te([11,9]),function(H,e){return H.create("vs/platform/workspaces/electron-main/workspacesHistoryMainService",e)}),define(Z[195],te([11,9]),function(H,e){return H.create("vs/platform/workspaces/electron-main/workspacesManagementMainService",e)}),define(Z[196],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function b(r){return r&&r.hasOwnProperty("folderUri")}e.isFolderBackupInfo=b;function L(r){return r&&r.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=L}),define(Z[197],te([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeFolderInfos=e.deserializeWorkspaceInfos=e.isEmptyWindowBackupInfo=void 0;function L(D){return typeof D?.backupFolder=="string"}e.isEmptyWindowBackupInfo=L;function r(D){let P=[];try{Array.isArray(D.workspaces)&&(P=D.workspaces.map(h=>({workspace:{id:h.id,configPath:b.URI.parse(h.configURIPath)},remoteAuthority:h.remoteAuthority})))}catch{}return P}e.deserializeWorkspaceInfos=r;function O(D){let P=[];try{Array.isArray(D.folders)&&(P=D.folders.map(h=>({folderUri:b.URI.parse(h.folderUri),remoteAuthority:h.remoteAuthority})))}catch{}return P}e.deserializeFolderInfos=O}),define(Z[198],te([0,1,13,166]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=e.TokenType=void 0;var r;(function(u){u[u.LParen=0]="LParen",u[u.RParen=1]="RParen",u[u.Neg=2]="Neg",u[u.Eq=3]="Eq",u[u.NotEq=4]="NotEq",u[u.Lt=5]="Lt",u[u.LtEq=6]="LtEq",u[u.Gt=7]="Gt",u[u.GtEq=8]="GtEq",u[u.RegexOp=9]="RegexOp",u[u.RegexStr=10]="RegexStr",u[u.True=11]="True",u[u.False=12]="False",u[u.In=13]="In",u[u.Not=14]="Not",u[u.And=15]="And",u[u.Or=16]="Or",u[u.Str=17]="Str",u[u.QuotedStr=18]="QuotedStr",u[u.Error=19]="Error",u[u.EOF=20]="EOF"})(r||(e.TokenType=r={}));function O(...u){switch(u.length){case 1:return(0,L.localize)(0,null,u[0]);case 2:return(0,L.localize)(1,null,u[0],u[1]);case 3:return(0,L.localize)(2,null,u[0],u[1],u[2]);default:return}}const D=(0,L.localize)(3,null),P=(0,L.localize)(4,null);class h{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(m){switch(m.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return m.isTripleEq?"===":"==";case 4:return m.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return m.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return m.lexeme;case 18:return m.lexeme;case 19:return m.lexeme;case 20:return"EOF";default:throw(0,b.illegalState)(`unhandled token type: ${JSON.stringify(m)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(m=>m.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(m){return this._input=m,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const g=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:g})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const g=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:g})}else this._match(126)?this._addToken(9):this._error(O("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(O("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(O("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(m){return this._isAtEnd()||this._input.charCodeAt(this._current)!==m?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(m){this._tokens.push({type:m,offset:this._start})}_error(m){const g=this._start,v=this._input.substring(this._start,this._current),d={type:19,offset:this._start,lexeme:v};this._errors.push({offset:g,lexeme:v,additionalInfo:m}),this._tokens.push(d)}_string(){this.stringRe.lastIndex=this._start;const m=this.stringRe.exec(this._input);if(m){this._current=this._start+m[0].length;const g=this._input.substring(this._start,this._current),v=h._keywords.get(g);v?this._addToken(v):this._tokens.push({type:17,lexeme:g,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(D);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let m=this._current,g=!1,v=!1;for(;;){if(m>=this._input.length){this._current=m,this._error(P);return}const y=this._input.charCodeAt(m);if(g)g=!1;else if(y===47&&!v){m++;break}else y===91?v=!0:y===92?g=!0:y===93&&(v=!1);m++}for(;m<this._input.length&&h._regexFlags.has(this._input.charCodeAt(m));)m++;this._current=m;const d=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:d,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}e.Scanner=h}),define(Z[199],te([0,1,3,2]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class r{constructor(){this._onCloseEmitter=new b.Emitter,this._onReloadEmitter=new b.Emitter,this._onTerminateEmitter=new b.Emitter,this._onAttachEmitter=new b.Emitter}static{this.ChannelName="extensionhostdebugservice"}call(P,h,u){switch(h){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:u[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:u[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:u[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:u[0],port:u[1],subId:u[2]}))}throw new Error("Method not implemented.")}listen(P,h,u){switch(h){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}e.ExtensionHostDebugBroadcastChannel=r;class O extends L.Disposable{constructor(P){super(),this.channel=P}reload(P){this.channel.call("reload",[P])}get onReload(){return this.channel.listen("reload")}close(P){this.channel.call("close",[P])}get onClose(){return this.channel.listen("close")}attachSession(P,h,u){this.channel.call("attach",[P,h,u])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(P,h){this.channel.call("terminate",[P,h])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(P,h){return this.channel.call("openExtensionDevelopmentHostWindow",[P,h])}}e.ExtensionHostDebugChannelClient=O}),define(Z[200],te([0,1,151,55,15,10,36,19,7]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDebugParams=e.parseExtensionHostDebugPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class u{get appRoot(){return(0,O.dirname)(r.FileAccess.asFileUri("").fsPath)}get userHome(){return h.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return h.URI.file((0,O.join)(this.userDataPath,"User"))}get tmpDir(){return h.URI.file(this.paths.tmpDir)}get cacheHome(){return h.URI.file(this.userDataPath)}get stateResource(){return(0,P.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:r.Schemas.vscodeUserData})}get userDataSyncHome(){return(0,P.joinPath)(this.appSettingsHome,"sync")}get logsHome(){if(!this.args.logsPath){const d=(0,b.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,O.join)(this.userDataPath,"logs",d)}return h.URI.file(this.args.logsPath)}get sync(){return this.args.sync}get machineSettingsResource(){return(0,P.joinPath)(h.URI.file((0,O.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,P.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,P.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,P.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const d=D.env.VSCODE_PORTABLE;return d?h.URI.file((0,O.join)(d,"argv.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return h.URI.file((0,O.join)(this.userDataPath,"Workspaces"))}get builtinExtensionsPath(){const d=this.args["builtin-extensions-dir"];return d?(0,O.resolve)(d):(0,O.normalize)((0,O.join)(r.FileAccess.asFileUri("").fsPath,"..","extensions"))}get extensionsDownloadLocation(){const d=this.args["extensions-download-dir"];return d?h.URI.file((0,O.resolve)(d)):h.URI.file((0,O.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const d=this.args["extensions-dir"];if(d)return(0,O.resolve)(d);const y=D.env.ADS_EXTENSIONS||D.env.VSCODE_EXTENSIONS;if(y)return y;const E=D.env.VSCODE_PORTABLE;return E?(0,O.join)(E,"extensions"):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const d=this.args.extensionDevelopmentPath;if(Array.isArray(d))return d.map(y=>/^[^:/?#]+?:\/\//.test(y)?h.URI.parse(y):h.URI.file((0,O.normalize)(y)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(d=>d==="ui"||d==="workspace"||d==="web"?d:"workspace")}get extensionTestsLocationURI(){const d=this.args.extensionTestsPath;if(d)return/^[^:/?#]+?:\/\//.test(d)?h.URI.parse(d):h.URI.file((0,O.normalize)(d))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const d=this.args["disable-extension"];if(d){if(typeof d=="string")return[d];if(Array.isArray(d)&&d.length>0)return d}return!1}get debugExtensionHost(){return m(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!D.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(d=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(d))}get extensionLogLevel(){const d=[];for(const y of this.args.log||[]){const E=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(y);E&&E[1]&&E[2]&&d.push([E[1],E[2]])}return d.length?d:void 0}get serviceMachineIdResource(){return(0,P.joinPath)(h.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get disableKeytar(){return!!this.args["disable-keytar"]}get policyFile(){if(this.args["__enable-file-policy"]){const d=D.env.VSCODE_PORTABLE;return d?h.URI.file((0,O.join)(d,"policy.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(d){this.args.continueOn=d}get args(){return this._args}constructor(d,y,E){this._args=d,this.paths=y,this.productService=E,this.editSessionId=this.args.editSessionId}}e.AbstractNativeEnvironmentService=u,be([L.memoize],u.prototype,"appRoot",null),be([L.memoize],u.prototype,"userHome",null),be([L.memoize],u.prototype,"userDataPath",null),be([L.memoize],u.prototype,"appSettingsHome",null),be([L.memoize],u.prototype,"tmpDir",null),be([L.memoize],u.prototype,"cacheHome",null),be([L.memoize],u.prototype,"stateResource",null),be([L.memoize],u.prototype,"userRoamingDataHome",null),be([L.memoize],u.prototype,"userDataSyncHome",null),be([L.memoize],u.prototype,"sync",null),be([L.memoize],u.prototype,"machineSettingsResource",null),be([L.memoize],u.prototype,"workspaceStorageHome",null),be([L.memoize],u.prototype,"localHistoryHome",null),be([L.memoize],u.prototype,"keyboardLayoutResource",null),be([L.memoize],u.prototype,"argvResource",null),be([L.memoize],u.prototype,"isExtensionDevelopment",null),be([L.memoize],u.prototype,"untitledWorkspacesHome",null),be([L.memoize],u.prototype,"builtinExtensionsPath",null),be([L.memoize],u.prototype,"extensionsPath",null),be([L.memoize],u.prototype,"extensionDevelopmentLocationURI",null),be([L.memoize],u.prototype,"extensionDevelopmentKind",null),be([L.memoize],u.prototype,"extensionTestsLocationURI",null),be([L.memoize],u.prototype,"debugExtensionHost",null),be([L.memoize],u.prototype,"logLevel",null),be([L.memoize],u.prototype,"extensionLogLevel",null),be([L.memoize],u.prototype,"serviceMachineIdResource",null),be([L.memoize],u.prototype,"disableTelemetry",null),be([L.memoize],u.prototype,"disableWorkspaceTrust",null),be([L.memoize],u.prototype,"disableKeytar",null),be([L.memoize],u.prototype,"policyFile",null);function m(v,d){return g(v["inspect-extensions"],v["inspect-brk-extensions"],5870,d,v.debugId,v.extensionEnvironment)}e.parseExtensionHostDebugPort=m;function g(v,d,y,E,l,p){const f=Number(d||v)||(E?null:y),I=f?!!d:!1;let w;if(p)try{w=JSON.parse(p)}catch{}return{port:f,break:I,debugId:l,env:w}}e.parseDebugParams=g}),define(Z[115],te([0,1,311,4,169]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildVersionMessage=e.buildHelpMessage=e.formatOptions=e.parseArgs=e.OPTIONS=e.NATIVE_CLI_COMMANDS=void 0;const O={o:(0,r.localize)(0,null),e:(0,r.localize)(1,null),t:(0,r.localize)(2,null)};e.NATIVE_CLI_COMMANDS=["tunnel","serve-web"],e.OPTIONS={tunnel:{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,r.localize)(3,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"},user:{type:"subcommand",options:{login:{type:"subcommand",options:{provider:{type:"string"},"access-token":{type:"string"}}}}}}},"serve-web":{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,r.localize)(4,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"}}},diff:{type:"boolean",cat:"o",alias:"d",args:["file","file"],description:(0,r.localize)(5,null)},merge:{type:"boolean",cat:"o",alias:"m",args:["path1","path2","base","result"],description:(0,r.localize)(6,null)},add:{type:"boolean",cat:"o",alias:"a",args:"folder",description:(0,r.localize)(7,null)},goto:{type:"boolean",cat:"o",alias:"g",args:"file:line[:character]",description:(0,r.localize)(8,null)},"new-window":{type:"boolean",cat:"o",alias:"n",description:(0,r.localize)(9,null)},"reuse-window":{type:"boolean",cat:"o",alias:"r",description:(0,r.localize)(10,null)},wait:{type:"boolean",cat:"o",alias:"w",description:(0,r.localize)(11,null)},waitMarkerFilePath:{type:"string"},locale:{type:"string",cat:"o",args:"locale",description:(0,r.localize)(12,null)},"user-data-dir":{type:"string",cat:"o",args:"dir",description:(0,r.localize)(13,null)},profile:{type:"string",cat:"o",args:"profileName",description:(0,r.localize)(14,null)},help:{type:"boolean",cat:"o",alias:"h",description:(0,r.localize)(15,null)},"extensions-dir":{type:"string",deprecates:["extensionHomePath"],cat:"e",args:"dir",description:(0,r.localize)(16,null)},"extensions-download-dir":{type:"string"},"builtin-extensions-dir":{type:"string"},"list-extensions":{type:"boolean",cat:"e",description:(0,r.localize)(17,null)},"show-versions":{type:"boolean",cat:"e",description:(0,r.localize)(18,null)},category:{type:"string",allowEmptyValue:!0,cat:"e",description:(0,r.localize)(19,null),args:"category"},"install-extension":{type:"string[]",cat:"e",args:"ext-id | path",description:(0,r.localize)(20,null)},"pre-release":{type:"boolean",cat:"e",description:(0,r.localize)(21,null)},"uninstall-extension":{type:"string[]",cat:"e",args:"ext-id",description:(0,r.localize)(22,null)},"enable-proposed-api":{type:"string[]",allowEmptyValue:!0,cat:"e",args:"ext-id",description:(0,r.localize)(23,null)},version:{type:"boolean",cat:"t",alias:"v",description:(0,r.localize)(24,null)},verbose:{type:"boolean",cat:"t",global:!0,description:(0,r.localize)(25,null)},log:{type:"string[]",cat:"t",args:"level",global:!0,description:(0,r.localize)(26,null)},status:{type:"boolean",alias:"s",cat:"t",description:(0,r.localize)(27,null)},"prof-startup":{type:"boolean",cat:"t",description:(0,r.localize)(28,null)},"prof-append-timers":{type:"string"},"prof-duration-markers":{type:"string[]"},"prof-duration-markers-file":{type:"string"},"no-cached-data":{type:"boolean"},"prof-startup-prefix":{type:"string"},"prof-v8-extensions":{type:"boolean"},"disable-extensions":{type:"boolean",deprecates:["disableExtensions"],cat:"t",description:(0,r.localize)(29,null)},"disable-extension":{type:"string[]",cat:"t",args:"ext-id",description:(0,r.localize)(30,null)},sync:{type:"string",cat:"t",description:(0,r.localize)(31,null),args:["on | off"]},"inspect-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugPluginHost"],args:"port",cat:"t",description:(0,r.localize)(32,null)},"inspect-brk-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugBrkPluginHost"],args:"port",cat:"t",description:(0,r.localize)(33,null)},"disable-gpu":{type:"boolean",cat:"t",description:(0,r.localize)(34,null)},"disable-chromium-sandbox":{type:"boolean",cat:"t",description:(0,r.localize)(35,null)},telemetry:{type:"boolean",cat:"t",description:(0,r.localize)(36,null)},remote:{type:"string",allowEmptyValue:!0},"folder-uri":{type:"string[]",cat:"o",args:"uri"},"file-uri":{type:"string[]",cat:"o",args:"uri"},"locate-extension":{type:"string[]"},extensionDevelopmentPath:{type:"string[]"},extensionDevelopmentKind:{type:"string[]"},extensionTestsPath:{type:"string"},extensionEnvironment:{type:"string"},debugId:{type:"string"},debugRenderer:{type:"boolean"},"inspect-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-brk-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-search":{type:"string",deprecates:["debugSearch"],allowEmptyValue:!0},"inspect-brk-search":{type:"string",deprecates:["debugBrkSearch"],allowEmptyValue:!0},"inspect-sharedprocess":{type:"string",allowEmptyValue:!0},"inspect-brk-sharedprocess":{type:"string",allowEmptyValue:!0},"export-default-configuration":{type:"string"},"install-source":{type:"string"},"enable-smoke-test-driver":{type:"boolean"},logExtensionHostCommunication:{type:"boolean"},"skip-release-notes":{type:"boolean"},"skip-welcome":{type:"boolean"},"disable-telemetry":{type:"boolean"},"disable-updates":{type:"boolean"},"disable-keytar":{type:"boolean"},"password-store":{type:"string"},"disable-workspace-trust":{type:"boolean"},"disable-crash-reporter":{type:"boolean"},"crash-reporter-directory":{type:"string"},"crash-reporter-id":{type:"string"},"skip-add-to-recently-opened":{type:"boolean"},"unity-launch":{type:"boolean"},"open-url":{type:"boolean"},"file-write":{type:"boolean"},"file-chmod":{type:"boolean"},"install-builtin-extension":{type:"string[]"},force:{type:"boolean"},"do-not-sync":{type:"boolean"},trace:{type:"boolean"},"trace-category-filter":{type:"string"},"trace-options":{type:"string"},"force-user-env":{type:"boolean"},"force-disable-user-env":{type:"boolean"},"open-devtools":{type:"boolean"},"disable-gpu-sandbox":{type:"boolean"},logsPath:{type:"string"},"__enable-file-policy":{type:"boolean"},editSessionId:{type:"string"},continueOn:{type:"string"},"locate-shell-integration-path":{type:"string",args:["bash","pwsh","zsh","fish"]},"enable-coi":{type:"boolean"},aad:{type:"boolean",cat:"o",description:(0,r.localize)(37,null)},applicationName:{type:"string",alias:"A",cat:"o",allowEmptyValue:!0,description:(0,r.localize)(38,null)},authenticationType:{type:"string",alias:"T",cat:"o",allowEmptyValue:!0,deprecates:["aad","integrated"],description:(0,r.localize)(39,null)},command:{type:"string",alias:"c",cat:"o",args:"command-name",allowEmptyValue:!0,description:(0,r.localize)(40,null)},connectionProperties:{type:"string",alias:"Z",cat:"o",allowEmptyValue:!0,description:(0,r.localize)(41,null)},database:{type:"string",alias:"D",cat:"o",args:"database",allowEmptyValue:!0,description:(0,r.localize)(42,null)},integrated:{type:"boolean",alias:"E",cat:"o",description:(0,r.localize)(43,null)},provider:{type:"string",alias:"P",cat:"o",allowEmptyValue:!0,description:(0,r.localize)(44,null)},server:{type:"string",alias:"S",cat:"o",args:"server",allowEmptyValue:!0,description:(0,r.localize)(45,null)},showDashboard:{type:"boolean",cat:"o",description:(0,r.localize)(46,null)},user:{type:"string",alias:"U",cat:"o",args:"user-name",allowEmptyValue:!0,description:(0,r.localize)(47,null)},"no-proxy-server":{type:"boolean"},"no-sandbox":{type:"boolean",alias:"sandbox"},"proxy-server":{type:"string"},"proxy-bypass-list":{type:"string"},"proxy-pac-url":{type:"string"},"js-flags":{type:"string"},inspect:{type:"string",allowEmptyValue:!0},"inspect-brk":{type:"string",allowEmptyValue:!0},nolazy:{type:"boolean"},"force-device-scale-factor":{type:"string"},"force-renderer-accessibility":{type:"boolean"},"ignore-certificate-errors":{type:"boolean"},"allow-insecure-localhost":{type:"boolean"},"log-net-log":{type:"string"},vmodule:{type:"string"},_urls:{type:"string[]"},"disable-dev-shm-usage":{type:"boolean"},"profile-temp":{type:"boolean"},_:{type:"string[]"}};const D={onUnknownOption:()=>{},onMultipleValues:()=>{},onEmptyValue:()=>{},onDeprecatedOption:()=>{}};function P(E,l,p=D){const c=E.find(o=>o.length>0&&o[0]!=="-"),f={},I=["_"],w=[],t={};let a;for(const o in l){const S=l[o];S.type==="subcommand"?o===c&&(a=S):(S.alias&&(f[o]=S.alias),S.type==="string"||S.type==="string[]"?(I.push(o),S.deprecates&&I.push(...S.deprecates)):S.type==="boolean"&&(w.push(o),S.deprecates&&w.push(...S.deprecates)),S.global&&(t[o]=S))}if(a&&c){const o=t;for(const C in a.options)o[C]=a.options[C];const S=E.filter(C=>C!==c),k=p.getSubcommandReporter?p.getSubcommandReporter(c):void 0,M=P(S,o,k);return{[c]:M,_:[]}}const s=b(E,{string:I,boolean:w,alias:f}),i={},n=s;i._=s._.map(o=>String(o)).filter(o=>o.length>0),delete n._;for(const o in l){const S=l[o];if(S.type==="subcommand")continue;S.alias&&delete n[S.alias];let k=n[o];if(S.deprecates)for(const M of S.deprecates)n.hasOwnProperty(M)&&(k||(k=n[M],k&&p.onDeprecatedOption(M,S.deprecationMessage||(0,r.localize)(48,null,o))),delete n[M]);if(typeof k<"u"){if(S.type==="string[]"){if(Array.isArray(k)||(k=[k]),!S.allowEmptyValue){const M=k.filter(C=>C.length>0);M.length!==k.length&&(p.onEmptyValue(o),k=M.length>0?M:void 0)}}else S.type==="string"&&(Array.isArray(k)?(k=k.pop(),p.onMultipleValues(o,k)):!k&&!S.allowEmptyValue&&(p.onEmptyValue(o),k=void 0));i[o]=k,S.deprecationMessage&&p.onDeprecatedOption(o,S.deprecationMessage)}delete n[o]}for(const o in n)p.onUnknownOption(o);return i}e.parseArgs=P;function h(E,l){let p="";return l.args&&(Array.isArray(l.args)?p=` <${l.args.join("> <")}>`:p=` <${l.args}>`),l.alias?`-${l.alias} --${E}${p}`:`--${E}${p}`}function u(E,l){const p=[];for(const c in E){const f=E[c],I=h(c,f);p.push([I,f.description])}return m(p,l)}e.formatOptions=u;function m(E,l){const c=E.reduce((w,t)=>Math.max(w,t[0].length),12)+2+1;if(l-c<25)return E.reduce((w,t)=>w.concat([`  ${t[0]}`,`      ${t[1]}`]),[]);const f=l-c-1,I=[];for(const w of E){const t=w[0],a=v(w[1],f),s=g(c-t.length-2);I.push("  "+t+s+a[0]);for(let i=1;i<a.length;i++)I.push(g(c)+a[i])}return I}function g(E){return" ".repeat(E)}function v(E,l){const p=[];for(;E.length;){const c=E.length<l?E.length:E.lastIndexOf(" ",l),f=E.slice(0,c).trim();E=E.slice(c),p.push(f)}return p}function d(E,l,p,c,f){const I=process.stdout.isTTY&&process.stdout.columns||80,w=f?.noInputFiles!==!0?`[${(0,r.localize)(49,null)}...]`:"",t=[`${E} ${p}`];t.push(""),t.push(`${(0,r.localize)(50,null)}: ${l} [${(0,r.localize)(51,null)}]${w}`),t.push(""),f?.noPipe!==!0&&(L.isWindows?t.push((0,r.localize)(52,null,l)):t.push((0,r.localize)(53,null,l)),t.push(""));const a={},s=[];for(const i in c){const n=c[i];if(n.type==="subcommand")n.description&&s.push({command:i,description:n.description});else if(n.description&&n.cat){let o=a[n.cat];o||(a[n.cat]=o={}),o[i]=n}}for(const i in a){const n=i,o=a[n];o&&(t.push(O[n]),t.push(...u(o,I)),t.push(""))}return s.length&&(t.push((0,r.localize)(54,null)),t.push(...m(s.map(i=>[i.command,i.description]),I)),t.push("")),t.join(`
`)}e.buildHelpMessage=d;function y(E,l){return`${E||(0,r.localize)(55,null)}
${l||(0,r.localize)(56,null)}
${process.arch}`}e.buildVersionMessage=y}),define(Z[201],te([0,1,88,199,115]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronExtensionHostDebugBroadcastChannel=void 0;class O extends L.ExtensionHostDebugBroadcastChannel{constructor(P){super(),this.windowsMainService=P}call(P,h,u){return h==="openExtensionDevelopmentHostWindow"?this.openExtensionDevelopmentHostWindow(u[0],u[1]):super.call(P,h,u)}async openExtensionDevelopmentHostWindow(P,h){const u=(0,r.parseArgs)(P,r.OPTIONS);u.debugRenderer=h;const m=u.extensionDevelopmentPath;if(!m)return{success:!1};const[g]=await this.windowsMainService.openExtensionDevelopmentHostWindow(m,{context:5,cli:u,forceProfile:u.profile,forceTempProfile:u["profile-temp"]});if(!h)return{success:!0};const v=g.win;if(!v)return{success:!0};const d=v.webContents.debugger;let y=d.isAttached()?1/0:0;const E=(0,b.createServer)(l=>{y++===0&&d.attach();let p=!1;const c=w=>{p||l.write(JSON.stringify(w)+"\0")},f=(w,t,a,s)=>c({method:t,params:a,sessionId:s});v.on("close",()=>{d.removeListener("message",f),l.end(),p=!0}),d.addListener("message",f);let I=Buffer.alloc(0);l.on("data",w=>{I=Buffer.concat([I,w]);for(let t=I.indexOf(0);t!==-1;t=I.indexOf(0)){let a;try{const s=I.slice(0,t).toString("utf8");I=I.slice(t+1),a=JSON.parse(s)}catch(s){console.error("error reading cdp line",s)}d.sendCommand(a.method,a.params,a.sessionId).then(s=>c({id:a.id,sessionId:a.sessionId,result:s})).catch(s=>c({id:a.id,sessionId:a.sessionId,error:{code:0,message:s.message}}))}}),l.on("error",w=>{console.error("error on cdp pipe:",w)}),l.on("close",()=>{p=!0,--y===0&&d.detach()})});return await new Promise(l=>E.listen(0,l)),v.on("close",()=>E.close()),{rendererDebugPort:E.address().port,success:!0}}}e.ElectronExtensionHostDebugBroadcastChannel=O}),define(Z[63],te([0,1,312,170,115]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isLaunchedFromCli=e.addArg=e.parseCLIProcessArgv=e.parseMainProcessArgv=void 0;function O(g,v){const d=(f,I)=>{console.warn((0,L.localize)(0,null,f,I))},y=f=>{console.warn((0,L.localize)(1,null,f))},E=(f,I)=>{console.warn((0,L.localize)(2,null,f,I))},l=f=>({onUnknownOption:I=>{r.NATIVE_CLI_COMMANDS.includes(f)||console.warn((0,L.localize)(3,null,I,f))},onMultipleValues:d,onEmptyValue:y,onDeprecatedOption:E,getSubcommandReporter:r.NATIVE_CLI_COMMANDS.includes(f)?l:void 0}),p={onUnknownOption:f=>{console.warn((0,L.localize)(4,null,f))},onMultipleValues:d,onEmptyValue:y,onDeprecatedOption:E,getSubcommandReporter:l},c=(0,r.parseArgs)(g,r.OPTIONS,v?p:void 0);return c.goto&&c._.forEach(f=>b(/^(\w:)?[^:]+(:\d*){0,2}:?$/.test(f),(0,L.localize)(5,null))),c}function D(g){const v=g.findIndex(d=>!/^-/.test(d));if(v>-1)return[...g.slice(0,v),...g.slice(v+1)]}function P(g){let[,...v]=g;process.env.VSCODE_DEV&&(v=D(v)||[]);const d=!m(process.env);return O(v,d)}e.parseMainProcessArgv=P;function h(g){let[,,...v]=g;return process.env.VSCODE_DEV&&(v=D(v)||[]),O(v,!0)}e.parseCLIProcessArgv=h;function u(g,...v){const d=g.indexOf("--");return d===-1?g.push(...v):g.splice(d,0,...v),g}e.addArg=u;function m(g){return g.VSCODE_CLI==="1"}e.isLaunchedFromCli=m}),function(){"use strict";function H(e,b,L){function r(D,P){const h=O(D,P),u=[h];return e.isAbsolute(h)||u.unshift(L),e.resolve(...u)}function O(D,P){process.env.VSCODE_DEV&&(P="code-oss-dev");const h=process.env.VSCODE_PORTABLE;if(h)return e.join(h,"user-data");let u=process.env.VSCODE_APPDATA;if(u)return e.join(u,P);const m=D["user-data-dir"];if(m)return m;switch(process.platform){case"win32":if(u=process.env.APPDATA,!u){const g=process.env.USERPROFILE;if(typeof g!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");u=e.join(g,"AppData","Roaming")}break;case"darwin":u=e.join(b.homedir(),"Library","Application Support");break;case"linux":u=process.env.XDG_CONFIG_HOME||e.join(b.homedir(),".config");break;default:throw new Error("Platform not supported")}return e.join(u,"azuredatastudio")}return{getUserDataPath:r}}if(typeof define=="function")define(Z[202],te([116,27,36]),function(e,b,L){return H(e,b,L.cwd())});else if(typeof module=="object"&&typeof module.exports=="object"){const e=require("path"),b=require("os");module.exports=H(e,b,process.env.VSCODE_CWD||process.cwd())}else throw new Error("Unknown context")}(),define(Z[91],te([0,1,27,200,202]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSharedProcessDebugPort=e.parsePtyHostDebugPort=e.NativeEnvironmentService=void 0;class O extends L.AbstractNativeEnvironmentService{constructor(u,m){super(u,{homeDir:(0,b.homedir)(),tmpDir:(0,b.tmpdir)(),userDataDir:(0,r.getUserDataPath)(u,m.nameShort)},m)}}e.NativeEnvironmentService=O;function D(h,u){return(0,L.parseDebugParams)(h["inspect-ptyhost"],h["inspect-brk-ptyhost"],5877,u,h.extensionEnvironment)}e.parsePtyHostDebugPort=D;function P(h,u){return(0,L.parseDebugParams)(h["inspect-sharedprocess"],h["inspect-brk-sharedprocess"],5879,u,h.extensionEnvironment)}e.parseSharedProcessDebugPort=P}),define(Z[203],te([0,1,45,27,32]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWaitMarkerFileSync=void 0;function O(D){const P=(0,r.randomPath)((0,L.tmpdir)());try{return(0,b.writeFileSync)(P,""),D&&console.log(`Marker file for --wait created: ${P}`),P}catch(h){D&&console.error(`Failed to create marker file for --wait: ${h}`);return}}e.createWaitMarkerFileSync=O}),define(Z[204],te([0,1,12,172]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function r(D,P,h){try{O(D,P,h)}catch(u){console.error(u?.message??u)}return D}e.localizeManifest=r;function O(D,P,h){const u=(m,g,v)=>{const d=m[g];if((0,b.isString)(d)){const y=d,E=y.length;if(E>1&&y[0]==="%"&&y[E-1]==="%"){const l=y.substr(1,E-2);let p=P[l];p===void 0&&h&&(p=h[l]);const c=typeof p=="string"?p:p?.message,f=h?.[l],I=typeof f=="string"?f:f?.message;if(!c){I||console.warn(`[${D.name}]: ${(0,L.localize)(0,null,l)}`);return}if(v&&(g==="title"||g==="category")&&I&&I!==c){const w={value:c,original:I};m[g]=w}else m[g]=c}}else if((0,b.isObject)(d))for(const y in d)d.hasOwnProperty(y)&&(y==="commands"?u(d,y,!0):u(d,y,v));else if(Array.isArray(d))for(let y=0;y<d.length;y++)u(d,y,v)};for(const m in D)D.hasOwnProperty(m)&&u(D,m)}}),define(Z[205],te([0,1,19,71,174,206,89]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.validateExtensionManifest=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const P=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,h=/^-(\d{4})(\d{2})(\d{2})$/;function u(c){return c=c.trim(),c==="*"||P.test(c)}e.isValidVersionStr=u;function m(c){if(!u(c))return null;if(c=c.trim(),c==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const f=c.match(P);return f?{hasCaret:f[1]==="^",hasGreaterEquals:f[1]===">=",majorBase:f[2]==="x"?0:parseInt(f[2],10),majorMustEqual:f[2]!=="x",minorBase:f[4]==="x"?0:parseInt(f[4],10),minorMustEqual:f[4]!=="x",patchBase:f[6]==="x"?0:parseInt(f[6],10),patchMustEqual:f[6]!=="x",preRelease:f[8]||null}:null}e.parseVersion=m;function g(c){if(!c)return null;const f=c.majorBase,I=c.majorMustEqual,w=c.minorBase;let t=c.minorMustEqual;const a=c.patchBase;let s=c.patchMustEqual;c.hasCaret&&(f===0||(t=!1),s=!1);let i=0;if(c.preRelease){const n=h.exec(c.preRelease);if(n){const[,o,S,k]=n;i=Date.UTC(Number(o),Number(S)-1,Number(k))}}return{majorBase:f,majorMustEqual:I,minorBase:w,minorMustEqual:t,patchBase:a,patchMustEqual:s,isMinimum:c.hasGreaterEquals,notBefore:i}}e.normalizeVersion=g;function v(c,f,I){let w;typeof c=="string"?w=g(m(c)):w=c;let t;f instanceof Date?t=f.getTime():typeof f=="string"&&(t=new Date(f).getTime());let a;if(typeof I=="string"?a=g(m(I)):a=I,!w||!a)return!1;const s=w.majorBase,i=w.minorBase,n=w.patchBase;let o=a.majorBase,S=a.minorBase,k=a.patchBase;const M=a.notBefore;let C=a.majorMustEqual,A=a.minorMustEqual,T=a.patchMustEqual;return a.isMinimum?s>o?!0:s<o?!1:i>S?!0:i<S||t&&t<M?!1:n>=k:(s===1&&o===0&&(!C||!A||!T)&&(o=1,S=0,k=0,C=!0,A=!1,T=!1),s<o?!1:s>o?!C:i<S?!1:i>S?!A:n<k?!1:n>k?!T:!(t&&t<M))}e.isValidVersion=v;function d(c,f,I,w,t,a){const s=[];if(typeof t.publisher<"u"&&typeof t.publisher!="string")return s.push([L.default.Error,r.localize(0,null)]),s;if(typeof t.name!="string")return s.push([L.default.Error,r.localize(1,null,"name")]),s;if(typeof t.version!="string")return s.push([L.default.Error,r.localize(2,null,"version")]),s;if(!t.engines)return s.push([L.default.Error,r.localize(3,null,"engines")]),s;if(typeof t.engines.vscode!="string")return s.push([L.default.Error,r.localize(4,null,"engines.vscode")]),s;if(typeof t.extensionDependencies<"u"&&!p(t.extensionDependencies))return s.push([L.default.Error,r.localize(5,null,"extensionDependencies")]),s;if(typeof t.activationEvents<"u"){if(!p(t.activationEvents))return s.push([L.default.Error,r.localize(6,null,"activationEvents")]),s;if(typeof t.main>"u"&&typeof t.browser>"u")return s.push([L.default.Error,r.localize(7,null,"activationEvents","main","browser")]),s}if(typeof t.extensionKind<"u"&&typeof t.main>"u"&&s.push([L.default.Warning,r.localize(8,null,"extensionKind")]),typeof t.main<"u"){if(typeof t.main!="string")return s.push([L.default.Error,r.localize(9,null,"main")]),s;{const o=(0,b.joinPath)(w,t.main);(0,b.isEqualOrParent)(o,w)||s.push([L.default.Warning,r.localize(10,null,o.path,w.path)])}}if(typeof t.browser<"u"){if(typeof t.browser!="string")return s.push([L.default.Error,r.localize(11,null,"browser")]),s;{const o=(0,b.joinPath)(w,t.browser);(0,b.isEqualOrParent)(o,w)||s.push([L.default.Warning,r.localize(12,null,o.path,w.path)])}}if(!O.valid(t.version))return s.push([L.default.Error,r.localize(13,null)]),s;const i=[];if(!y(c,f,I,t,a,i))for(const o of i)s.push([L.default.Error,o]);return s}e.validateExtensionManifest=d;function y(c,f,I,w,t,a){if(t||typeof w.main>"u"&&typeof w.browser>"u")return!0;const s=w.engines.azdata,i=w.engines.vscode,n=s?s==="*"||l(c,I,s,D.versionSyntax("engines.azdata",s),D.versionMismatch(c,s),a):!0,o=i?i==="*"||l(f,I,i,D.versionSyntax("engines.vscode",i),D.versionMismatchVsCode(c,i,f),a):!0;return n&&o}e.isValidExtensionVersion=y;function E(c,f,I){return c==="*"||l(f,I,c,"","")}e.isEngineValid=E;function l(c,f,I,w,t,a=[]){const s=g(m(I));return s?v(c,f,s)?!0:(a.push(t),!1):(a.push(w),!1)}function p(c){if(!Array.isArray(c))return!1;for(let f=0,I=c.length;f<I;f++)if(typeof c[f]!="string")return!1;return!0}}),define(Z[207],te([0,1,17,31]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getServiceMachineId=void 0;async function r(O,D,P){let h=P&&P.get("storage.serviceMachineId",-1)||null;if(h)return h;try{const m=(await D.readFile(O.serviceMachineIdResource)).value.toString();h=(0,L.isUUID)(m)?m:null}catch{h=null}if(!h){h=(0,L.generateUuid)();try{await D.writeFile(O.serviceMachineIdResource,b.VSBuffer.fromString(h))}catch{}}return P?.store("storage.serviceMachineId",h,-1,1),h}e.getServiceMachineId=r}),define(Z[76],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class b{constructor(r,O=[],D=!1){this.ctor=r,this.staticArguments=O,this.supportsDelayedInstantiation=D}}e.SyncDescriptor=b}),define(Z[208],te([0,1,76]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=e.InstantiationType=void 0;const L=[];var r;(function(P){P[P.Eager=0]="Eager",P[P.Delayed=1]="Delayed"})(r||(e.InstantiationType=r={}));function O(P,h,u){h instanceof b.SyncDescriptor||(h=new b.SyncDescriptor(h,[],!!u)),L.push([P,h])}e.registerSingleton=O;function D(){return L}e.getSingletonServiceDescriptors=D}),define(Z[209],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class b{constructor(O,D){this.key=O,this.data=D,this.incoming=new Map,this.outgoing=new Map}}e.Node=b;class L{constructor(O){this._hashFn=O,this._nodes=new Map}roots(){const O=[];for(const D of this._nodes.values())D.outgoing.size===0&&O.push(D);return O}insertEdge(O,D){const P=this.lookupOrInsertNode(O),h=this.lookupOrInsertNode(D);P.outgoing.set(h.key,h),h.incoming.set(P.key,P)}removeNode(O){const D=this._hashFn(O);this._nodes.delete(D);for(const P of this._nodes.values())P.outgoing.delete(D),P.incoming.delete(D)}lookupOrInsertNode(O){const D=this._hashFn(O);let P=this._nodes.get(D);return P||(P=new b(D,O),this._nodes.set(D,P)),P}lookup(O){return this._nodes.get(this._hashFn(O))}isEmpty(){return this._nodes.size===0}toString(){const O=[];for(const[D,P]of this._nodes)O.push(`${D}
	(-> incoming)[${[...P.incoming.keys()].join(", ")}]
	(outgoing ->)[${[...P.outgoing.keys()].join(",")}]
`);return O.join(`
`)}findCycleSlow(){for(const[O,D]of this._nodes){const P=new Set([O]),h=this._findCycle(D,P);if(h)return h}}_findCycle(O,D){for(const[P,h]of O.outgoing){if(D.has(P))return[...D,P].join(" -> ");D.add(P);const u=this._findCycle(h,D);if(u)return u;D.delete(P)}}}e.Graph=L}),define(Z[6],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var b;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function P(h){return h[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=P})(b||(e._util=b={})),e.IInstantiationService=r("instantiationService");function L(D,P,h){P[b.DI_TARGET]===P?P[b.DI_DEPENDENCIES].push({id:D,index:h}):(P[b.DI_DEPENDENCIES]=[{id:D,index:h}],P[b.DI_TARGET]=P)}function r(D){if(b.serviceIds.has(D))return b.serviceIds.get(D);const P=function(h,u,m){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");L(P,h,m)};return P.toString=()=>D,b.serviceIds.set(D,P),P}e.createDecorator=r;function O(D){return D}e.refineServiceDecorator=O}),define(Z[64],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupMainService=void 0,e.IBackupMainService=(0,b.createDecorator)("backupMainService")}),define(Z[18],te([0,1,12,7,6]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.isConfigured=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,r.createDecorator)("configurationService");function O(p){return p&&typeof p=="object"&&(!p.overrideIdentifier||typeof p.overrideIdentifier=="string")&&(!p.resource||p.resource instanceof L.URI)}e.isConfigurationOverrides=O;function D(p){return p&&typeof p=="object"&&(!p.overrideIdentifiers||Array.isArray(p.overrideIdentifiers))&&!p.overrideIdentifier&&(!p.resource||p.resource instanceof L.URI)}e.isConfigurationUpdateOverrides=D;var P;(function(p){p[p.APPLICATION=1]="APPLICATION",p[p.USER=2]="USER",p[p.USER_LOCAL=3]="USER_LOCAL",p[p.USER_REMOTE=4]="USER_REMOTE",p[p.WORKSPACE=5]="WORKSPACE",p[p.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",p[p.DEFAULT=7]="DEFAULT",p[p.MEMORY=8]="MEMORY"})(P||(e.ConfigurationTarget=P={}));function h(p){switch(p){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=h;function u(p){return p.applicationValue!==void 0||p.userValue!==void 0||p.userLocalValue!==void 0||p.userRemoteValue!==void 0||p.workspaceValue!==void 0||p.workspaceFolderValue!==void 0}e.isConfigured=u;function m(p,c){const f=Object.create(null);for(const I in p)g(f,I,p[I],c);return f}e.toValuesTree=m;function g(p,c,f,I){const w=c.split("."),t=w.pop();let a=p;for(let s=0;s<w.length;s++){const i=w[s];let n=a[i];switch(typeof n){case"undefined":n=a[i]=Object.create(null);break;case"object":break;default:I(`Ignoring ${c} as ${w.slice(0,s+1).join(".")} is ${JSON.stringify(n)}`);return}a=n}if(typeof a=="object"&&a!==null)try{a[t]=f}catch{I(`Ignoring ${c} as ${w.join(".")} is ${JSON.stringify(a)}`)}else I(`Ignoring ${c} as ${w.join(".")} is ${JSON.stringify(a)}`)}e.addToValueTree=g;function v(p,c){const f=c.split(".");d(p,f)}e.removeFromValueTree=v;function d(p,c){const f=c.shift();if(c.length===0){delete p[f];return}if(Object.keys(p).indexOf(f)!==-1){const I=p[f];typeof I=="object"&&!Array.isArray(I)&&(d(I,c),Object.keys(I).length===0&&delete p[f])}}function y(p,c,f){function I(a,s){let i=a;for(const n of s){if(typeof i!="object"||i===null)return;i=i[n]}return i}const w=c.split("."),t=I(p,w);return typeof t>"u"?f:t}e.getConfigurationValue=y;function E(p,c,f){Object.keys(c).forEach(I=>{I!=="__proto__"&&(I in p?b.isObject(p[I])&&b.isObject(c[I])?E(p[I],c[I],f):f&&(p[I]=c[I]):p[I]=c[I])})}e.merge=E;function l(p){return p.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=l}),define(Z[117],te([0,1,4,26,198,6,165,13]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.validateWhenClauses=e.ContextKeyExpr=e.Parser=e.ContextKeyExprType=e.setConstant=void 0;const h=new Map;h.set("false",!1),h.set("true",!0),h.set("isMac",b.isMacintosh),h.set("isLinux",b.isLinux),h.set("isWindows",b.isWindows),h.set("isWeb",b.isWeb),h.set("isMacNative",b.isMacintosh&&!b.isWeb),h.set("isEdge",b.isEdge),h.set("isFirefox",b.isFirefox),h.set("isChrome",b.isChrome),h.set("isSafari",b.isSafari);function u(x,R){if(h.get(x)!==void 0)throw(0,P.illegalArgument)("contextkey.setConstant(k, v) invoked with already set constant `k`");h.set(x,R)}e.setConstant=u;const m=Object.prototype.hasOwnProperty;var g;(function(x){x[x.False=0]="False",x[x.True=1]="True",x[x.Defined=2]="Defined",x[x.Not=3]="Not",x[x.Equals=4]="Equals",x[x.NotEquals=5]="NotEquals",x[x.And=6]="And",x[x.Regex=7]="Regex",x[x.NotRegex=8]="NotRegex",x[x.Or=9]="Or",x[x.In=10]="In",x[x.NotIn=11]="NotIn",x[x.Greater=12]="Greater",x[x.GreaterEquals=13]="GreaterEquals",x[x.Smaller=14]="Smaller",x[x.SmallerEquals=15]="SmallerEquals"})(g||(e.ContextKeyExprType=g={}));const v={regexParsingWithErrorRecovery:!0},d=(0,D.localize)(0,null),y=(0,D.localize)(1,null),E=(0,D.localize)(2,null),l=(0,D.localize)(3,null),p=(0,D.localize)(4,null),c=(0,D.localize)(5,null),f=(0,D.localize)(6,null),I=(0,D.localize)(7,null);class w{static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}constructor(R=v){this._config=R,this._scanner=new r.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(R){if(R===""){this._parsingErrors.push({message:d,offset:0,lexeme:"",additionalInfo:y});return}this._tokens=this._scanner.reset(R).scan(),this._current=0,this._parsingErrors=[];try{const _=this._expr();if(!this._isAtEnd()){const N=this._peek(),q=N.type===17?c:void 0;throw this._parsingErrors.push({message:p,offset:N.offset,lexeme:r.Scanner.getLexeme(N),additionalInfo:q}),w._parseError}return _}catch(_){if(_!==w._parseError)throw _;return}}_expr(){return this._or()}_or(){const R=[this._and()];for(;this._matchOne(16);){const _=this._and();R.push(_)}return R.length===1?R[0]:t.or(...R)}_and(){const R=[this._term()];for(;this._matchOne(15);){const _=this._term();R.push(_)}return R.length===1?R[0]:t.and(...R)}_term(){if(this._matchOne(2)){const R=this._peek();switch(R.type){case 11:return this._advance(),n.INSTANCE;case 12:return this._advance(),o.INSTANCE;case 0:{this._advance();const _=this._expr();return this._consume(1,l),_?.negate()}case 17:return this._advance(),T.create(R.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",R)}}return this._primary()}_primary(){const R=this._peek();switch(R.type){case 11:return this._advance(),t.true();case 12:return this._advance(),t.false();case 0:{this._advance();const _=this._expr();return this._consume(1,l),_}case 17:{const _=R.lexeme;if(this._advance(),this._matchOne(9)){const q=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),q.type!==10)throw this._errExpectedButGot("REGEX",q);const re=q.lexeme,ne=re.lastIndexOf("/"),le=ne===re.length-1?void 0:this._removeFlagsGY(re.substring(ne+1));let V;try{V=new RegExp(re.substring(1,ne),le)}catch{throw this._errExpectedButGot("REGEX",q)}return ae.create(_,V)}switch(q.type){case 10:case 19:{const re=[q.lexeme];this._advance();let ne=this._peek(),le=0;for(let pe=0;pe<q.lexeme.length;pe++)q.lexeme.charCodeAt(pe)===40?le++:q.lexeme.charCodeAt(pe)===41&&le--;for(;!this._isAtEnd()&&ne.type!==15&&ne.type!==16;){switch(ne.type){case 0:le++;break;case 1:le--;break;case 10:case 18:for(let pe=0;pe<ne.lexeme.length;pe++)ne.lexeme.charCodeAt(pe)===40?le++:q.lexeme.charCodeAt(pe)===41&&le--}if(le<0)break;re.push(r.Scanner.getLexeme(ne)),this._advance(),ne=this._peek()}const V=re.join(""),ie=V.lastIndexOf("/"),Q=ie===V.length-1?void 0:this._removeFlagsGY(V.substring(ie+1));let fe;try{fe=new RegExp(V.substring(1,ie),Q)}catch{throw this._errExpectedButGot("REGEX",q)}return t.regex(_,fe)}case 18:{const re=q.lexeme;this._advance();let ne=null;if(!(0,L.isFalsyOrWhitespace)(re)){const le=re.indexOf("/"),V=re.lastIndexOf("/");if(le!==V&&le>=0){const ie=re.slice(le+1,V),Q=re[V+1]==="i"?"i":"";try{ne=new RegExp(ie,Q)}catch{throw this._errExpectedButGot("REGEX",q)}}}if(ne===null)throw this._errExpectedButGot("REGEX",q);return ae.create(_,ne)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,E);const q=this._value();return t.notIn(_,q)}switch(this._peek().type){case 3:{this._advance();const q=this._value();if(this._previous().type===18)return t.equals(_,q);switch(q){case"true":return t.has(_);case"false":return t.not(_);default:return t.equals(_,q)}}case 4:{this._advance();const q=this._value();if(this._previous().type===18)return t.notEquals(_,q);switch(q){case"true":return t.not(_);case"false":return t.has(_);default:return t.notEquals(_,q)}}case 5:return this._advance(),ee.create(_,this._value());case 6:return this._advance(),ue.create(_,this._value());case 7:return this._advance(),z.create(_,this._value());case 8:return this._advance(),oe.create(_,this._value());case 13:return this._advance(),t.in(_,this._value());default:return t.has(_)}}case 20:throw this._parsingErrors.push({message:f,offset:R.offset,lexeme:"",additionalInfo:I}),w._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const R=this._peek();switch(R.type){case 17:case 18:return this._advance(),R.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(R){return R.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(R){return this._check(R)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(R,_){if(this._check(R))return this._advance();throw this._errExpectedButGot(_,this._peek())}_errExpectedButGot(R,_,N){const q=(0,D.localize)(8,null,R,r.Scanner.getLexeme(_)),re=_.offset,ne=r.Scanner.getLexeme(_);return this._parsingErrors.push({message:q,offset:re,lexeme:ne,additionalInfo:N}),w._parseError}_check(R){return this._peek().type===R}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=w;class t{static false(){return n.INSTANCE}static true(){return o.INSTANCE}static has(R){return S.create(R)}static equals(R,_){return k.create(R,_)}static notEquals(R,_){return A.create(R,_)}static regex(R,_){return ae.create(R,_)}static in(R,_){return M.create(R,_)}static notIn(R,_){return C.create(R,_)}static not(R){return T.create(R)}static and(...R){return G.create(R,null,!0)}static or(...R){return B.create(R,null,!0)}static greater(R,_){return z.create(R,_)}static greaterEquals(R,_){return oe.create(R,_)}static smaller(R,_){return ee.create(R,_)}static smallerEquals(R,_){return ue.create(R,_)}static{this._parser=new w({regexParsingWithErrorRecovery:!1})}static deserialize(R){return R==null?void 0:this._parser.parse(R)}}e.ContextKeyExpr=t;function a(x){const R=new w({regexParsingWithErrorRecovery:!1});return x.map(_=>(R.parse(_),R.lexingErrors.length>0?R.lexingErrors.map(N=>({errorMessage:N.additionalInfo?(0,D.localize)(9,null,N.additionalInfo):(0,D.localize)(10,null),offset:N.offset,length:N.lexeme.length})):R.parsingErrors.length>0?R.parsingErrors.map(N=>({errorMessage:N.additionalInfo?`${N.message}. ${N.additionalInfo}`:N.message,offset:N.offset,length:N.lexeme.length})):[]))}e.validateWhenClauses=a;function s(x,R){const _=x?x.substituteConstants():void 0,N=R?R.substituteConstants():void 0;return!_&&!N?!0:!_||!N?!1:_.equals(N)}e.expressionsAreEqualWithConstantSubstitution=s;function i(x,R){return x.cmp(R)}class n{static{this.INSTANCE=new n}constructor(){this.type=0}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!1}serialize(){return"false"}keys(){return[]}map(R){return this}negate(){return o.INSTANCE}}e.ContextKeyFalseExpr=n;class o{static{this.INSTANCE=new o}constructor(){this.type=1}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!0}serialize(){return"true"}keys(){return[]}map(R){return this}negate(){return n.INSTANCE}}e.ContextKeyTrueExpr=o;class S{static create(R,_=null){const N=h.get(R);return typeof N=="boolean"?N?o.INSTANCE:n.INSTANCE:new S(R,_)}constructor(R,_){this.key=R,this.negated=_,this.type=2}cmp(R){return R.type!==this.type?this.type-R.type:U(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=h.get(this.key);return typeof R=="boolean"?R?o.INSTANCE:n.INSTANCE:this}evaluate(R){return!!R.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(R){return R.mapDefined(this.key)}negate(){return this.negated||(this.negated=T.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=S;class k{static create(R,_,N=null){if(typeof _=="boolean")return _?S.create(R,N):T.create(R,N);const q=h.get(R);return typeof q=="boolean"?_===(q?"true":"false")?o.INSTANCE:n.INSTANCE:new k(R,_,N)}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=4}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=h.get(this.key);if(typeof R=="boolean"){const _=R?"true":"false";return this.value===_?o.INSTANCE:n.INSTANCE}return this}evaluate(R){return R.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(R){return R.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=k;class M{static create(R,_){return new M(R,_)}constructor(R,_){this.key=R,this.valueKey=_,this.type=10,this.negated=null}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.valueKey,R.key,R.valueKey)}equals(R){return R.type===this.type?this.key===R.key&&this.valueKey===R.valueKey:!1}substituteConstants(){return this}evaluate(R){const _=R.getValue(this.valueKey),N=R.getValue(this.key);return Array.isArray(_)?_.includes(N):typeof N=="string"&&typeof _=="object"&&_!==null?m.call(_,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(R){return R.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=C.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=M;class C{static create(R,_){return new C(R,_)}constructor(R,_){this.key=R,this.valueKey=_,this.type=11,this._negated=M.create(R,_)}cmp(R){return R.type!==this.type?this.type-R.type:this._negated.cmp(R._negated)}equals(R){return R.type===this.type?this._negated.equals(R._negated):!1}substituteConstants(){return this}evaluate(R){return!this._negated.evaluate(R)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(R){return R.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=C;class A{static create(R,_,N=null){if(typeof _=="boolean")return _?T.create(R,N):S.create(R,N);const q=h.get(R);return typeof q=="boolean"?_===(q?"true":"false")?n.INSTANCE:o.INSTANCE:new A(R,_,N)}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=5}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=h.get(this.key);if(typeof R=="boolean"){const _=R?"true":"false";return this.value===_?n.INSTANCE:o.INSTANCE}return this}evaluate(R){return R.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(R){return R.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=k.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=A;class T{static create(R,_=null){const N=h.get(R);return typeof N=="boolean"?N?n.INSTANCE:o.INSTANCE:new T(R,_)}constructor(R,_){this.key=R,this.negated=_,this.type=3}cmp(R){return R.type!==this.type?this.type-R.type:U(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=h.get(this.key);return typeof R=="boolean"?R?n.INSTANCE:o.INSTANCE:this}evaluate(R){return!R.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(R){return R.mapNot(this.key)}negate(){return this.negated||(this.negated=S.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=T;function F(x,R){if(typeof x=="string"){const _=parseFloat(x);isNaN(_)||(x=_)}return typeof x=="string"||typeof x=="number"?R(x):n.INSTANCE}class z{static create(R,_,N=null){return F(_,q=>new z(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=12}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(R){return R.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=ue.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=z;class oe{static create(R,_,N=null){return F(_,q=>new oe(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=13}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(R){return R.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=ee.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=oe;class ee{static create(R,_,N=null){return F(_,q=>new ee(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=14}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(R){return R.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=oe.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=ee;class ue{static create(R,_,N=null){return F(_,q=>new ue(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=15}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(R){return R.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=ue;class ae{static create(R,_){return new ae(R,_)}constructor(R,_){this.key=R,this.regexp=_,this.type=7,this.negated=null}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.key<R.key)return-1;if(this.key>R.key)return 1;const _=this.regexp?this.regexp.source:"",N=R.regexp?R.regexp.source:"";return _<N?-1:_>N?1:0}equals(R){if(R.type===this.type){const _=this.regexp?this.regexp.source:"",N=R.regexp?R.regexp.source:"";return this.key===R.key&&_===N}return!1}substituteConstants(){return this}evaluate(R){const _=R.getValue(this.key);return this.regexp?this.regexp.test(_):!1}serialize(){const R=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${R}`}keys(){return[this.key]}map(R){return R.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=de.create(this)),this.negated}}e.ContextKeyRegexExpr=ae;class de{static create(R){return new de(R)}constructor(R){this._actual=R,this.type=8}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(R){return new de(this._actual.map(R))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=de;function j(x){let R=null;for(let _=0,N=x.length;_<N;_++){const q=x[_].substituteConstants();if(x[_]!==q&&R===null){R=[];for(let re=0;re<_;re++)R[re]=x[re]}R!==null&&(R[_]=q)}return R===null?x:R}class G{static create(R,_,N){return G._normalizeArr(R,_,N)}constructor(R,_){this.expr=R,this.negated=_,this.type=6}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let _=0,N=this.expr.length;_<N;_++){const q=i(this.expr[_],R.expr[_]);if(q!==0)return q}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].equals(R.expr[_]))return!1;return!0}return!1}substituteConstants(){const R=j(this.expr);return R===this.expr?this:G.create(R,this.negated,!1)}evaluate(R){for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].evaluate(R))return!1;return!0}static _normalizeArr(R,_,N){const q=[];let re=!1;for(const ne of R)if(ne){if(ne.type===1){re=!0;continue}if(ne.type===0)return n.INSTANCE;if(ne.type===6){q.push(...ne.expr);continue}q.push(ne)}if(q.length===0&&re)return o.INSTANCE;if(q.length!==0){if(q.length===1)return q[0];q.sort(i);for(let ne=1;ne<q.length;ne++)q[ne-1].equals(q[ne])&&(q.splice(ne,1),ne--);if(q.length===1)return q[0];for(;q.length>1;){const ne=q[q.length-1];if(ne.type!==9)break;q.pop();const le=q.pop(),V=q.length===0,ie=B.create(ne.expr.map(Q=>G.create([Q,le],null,N)),null,V);ie&&(q.push(ie),q.sort(i))}if(q.length===1)return q[0];if(N){for(let ne=0;ne<q.length;ne++)for(let le=ne+1;le<q.length;le++)if(q[ne].negate().equals(q[le]))return n.INSTANCE;if(q.length===1)return q[0]}return new G(q,_)}}serialize(){return this.expr.map(R=>R.serialize()).join(" && ")}keys(){const R=[];for(const _ of this.expr)R.push(..._.keys());return R}map(R){return new G(this.expr.map(_=>_.map(R)),null)}negate(){if(!this.negated){const R=[];for(const _ of this.expr)R.push(_.negate());this.negated=B.create(R,this,!0)}return this.negated}}e.ContextKeyAndExpr=G;class B{static create(R,_,N){return B._normalizeArr(R,_,N)}constructor(R,_){this.expr=R,this.negated=_,this.type=9}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let _=0,N=this.expr.length;_<N;_++){const q=i(this.expr[_],R.expr[_]);if(q!==0)return q}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].equals(R.expr[_]))return!1;return!0}return!1}substituteConstants(){const R=j(this.expr);return R===this.expr?this:B.create(R,this.negated,!1)}evaluate(R){for(let _=0,N=this.expr.length;_<N;_++)if(this.expr[_].evaluate(R))return!0;return!1}static _normalizeArr(R,_,N){let q=[],re=!1;if(R){for(let ne=0,le=R.length;ne<le;ne++){const V=R[ne];if(V){if(V.type===0){re=!0;continue}if(V.type===1)return o.INSTANCE;if(V.type===9){q=q.concat(V.expr);continue}q.push(V)}}if(q.length===0&&re)return n.INSTANCE;q.sort(i)}if(q.length!==0){if(q.length===1)return q[0];for(let ne=1;ne<q.length;ne++)q[ne-1].equals(q[ne])&&(q.splice(ne,1),ne--);if(q.length===1)return q[0];if(N){for(let ne=0;ne<q.length;ne++)for(let le=ne+1;le<q.length;le++)if(q[ne].negate().equals(q[le]))return o.INSTANCE;if(q.length===1)return q[0]}return new B(q,_)}}serialize(){return this.expr.map(R=>R.serialize()).join(" || ")}keys(){const R=[];for(const _ of this.expr)R.push(..._.keys());return R}map(R){return new B(this.expr.map(_=>_.map(R)),null)}negate(){if(!this.negated){const R=[];for(const _ of this.expr)R.push(_.negate());for(;R.length>1;){const _=R.shift(),N=R.shift(),q=[];for(const re of ce(_))for(const ne of ce(N))q.push(G.create([re,ne],null,!1));R.unshift(B.create(q,null,!1))}this.negated=B.create(R,this,!0)}return this.negated}}e.ContextKeyOrExpr=B;class W extends S{static{this._info=[]}static all(){return W._info.values()}constructor(R,_,N){super(R,null),this._defaultValue=_,typeof N=="object"?W._info.push({...N,key:R}):N!==!0&&W._info.push({key:R,description:N,type:_!=null?typeof _:void 0})}bindTo(R){return R.createKey(this.key,this._defaultValue)}getValue(R){return R.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(R){return k.create(this.key,R)}notEqualsTo(R){return A.create(this.key,R)}}e.RawContextKey=W,e.IContextKeyService=(0,O.createDecorator)("contextKeyService");function U(x,R){return x<R?-1:x>R?1:0}function $(x,R,_,N){return x<_?-1:x>_?1:R<N?-1:R>N?1:0}function Y(x,R){if(x.type===0||R.type===1)return!0;if(x.type===9)return R.type===9?se(x.expr,R.expr):!1;if(R.type===9){for(const _ of R.expr)if(Y(x,_))return!0;return!1}if(x.type===6){if(R.type===6)return se(R.expr,x.expr);for(const _ of x.expr)if(Y(_,R))return!0;return!1}return x.equals(R)}e.implies=Y;function se(x,R){let _=0,N=0;for(;_<x.length&&N<R.length;){const q=x[_].cmp(R[N]);if(q<0)return!1;q===0&&_++,N++}return _===x.length}function ce(x){return x.type===9?x.expr:[x]}}),define(Z[77],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryCredentialsProvider=e.ICredentialsMainService=e.ICredentialsService=void 0,e.ICredentialsService=(0,b.createDecorator)("credentialsService"),e.ICredentialsMainService=(0,b.createDecorator)("credentialsMainService");class L{constructor(){this.secretVault={}}async getPassword(O,D){return this.secretVault[O]?.[D]??null}async setPassword(O,D,P){this.secretVault[O]=this.secretVault[O]??{},this.secretVault[O][D]=P}async deletePassword(O,D){return this.secretVault[O]?.[D]?(delete this.secretVault[O][D],Object.keys(this.secretVault[O]).length===0&&delete this.secretVault[O],!0):!1}async findPassword(O){return JSON.stringify(this.secretVault[O])??null}async findCredentials(O){const D=[];for(const P of Object.keys(this.secretVault[O]||{}))D.push({account:P,password:this.secretVault[O][P]});return D}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=L}),define(Z[92],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullDiagnosticsService=e.isRemoteDiagnosticError=e.IDiagnosticsService=e.ID=void 0,e.ID="diagnosticsService",e.IDiagnosticsService=(0,b.createDecorator)(e.ID);function L(O){return!!O.hostName&&!!O.errorMessage}e.isRemoteDiagnosticError=L;class r{async getPerformanceInfo(D,P){return{}}async getSystemInfo(D,P){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(D,P){return""}async getWorkspaceFileExtensions(D){return{extensions:[]}}async reportWorkspaceStats(D){}}e.NullDiagnosticsService=r}),define(Z[93],te([0,1,19,71,167,6,46,4,37]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.massageMessageBoxOptions=e.getFileNamesMessage=e.ConfirmResult=e.IFileDialogService=e.AbstractDialogHandler=e.IDialogService=void 0,e.IDialogService=(0,O.createDecorator)("dialogService");var u;(function(E){E[E.Confirmation=1]="Confirmation",E[E.Prompt=2]="Prompt",E[E.Input=3]="Input"})(u||(u={}));class m{getConfirmationButtons(l){return this.getButtons(l,u.Confirmation)}getPromptButtons(l){return this.getButtons(l,u.Prompt)}getInputButtons(l){return this.getButtons(l,u.Input)}getButtons(l,p){const c=[];switch(p){case u.Confirmation:{const f=l;f.primaryButton?c.push(f.primaryButton):c.push((0,r.localize)(0,null)),f.cancelButton?c.push(f.cancelButton):c.push((0,r.localize)(1,null));break}case u.Prompt:{const f=l;Array.isArray(f.buttons)&&f.buttons.length>0&&c.push(...f.buttons.map(I=>I.label)),f.cancelButton&&(f.cancelButton===!0?c.push((0,r.localize)(2,null)):typeof f.cancelButton=="string"?c.push(f.cancelButton):f.cancelButton.label?c.push(f.cancelButton.label):c.push((0,r.localize)(3,null))),c.length===0&&c.push((0,r.localize)(4,null));break}case u.Input:{const f=l;f.primaryButton?c.push(f.primaryButton):c.push((0,r.localize)(5,null)),f.cancelButton?c.push(f.cancelButton):c.push((0,r.localize)(6,null));break}}return c}getDialogType(l){if(typeof l=="string")return l;if(typeof l=="number")return l===L.default.Info?"info":l===L.default.Error?"error":l===L.default.Warning?"warning":"none"}async getPromptResult(l,p,c){const f=[...l.buttons??[]];return l.cancelButton&&typeof l.cancelButton!="string"&&typeof l.cancelButton!="boolean"&&f.push(l.cancelButton),{result:await f[p]?.run({checkboxChecked:c}),checkboxChecked:c}}}e.AbstractDialogHandler=m,e.IFileDialogService=(0,O.createDecorator)("fileDialogService");var g;(function(E){E[E.SAVE=0]="SAVE",E[E.DONT_SAVE=1]="DONT_SAVE",E[E.CANCEL=2]="CANCEL"})(g||(e.ConfirmResult=g={}));const v=10;function d(E){const l=[];return l.push(...E.slice(0,v).map(p=>typeof p=="string"?p:(0,b.basename)(p))),E.length>v&&(E.length-v===1?l.push((0,r.localize)(7,null)):l.push((0,r.localize)(8,null,E.length-v))),l.push(""),l.join(`
`)}e.getFileNamesMessage=d;function y(E,l){const p=(0,h.deepClone)(E);let c=(p.buttons??[]).map(t=>(0,D.mnemonicButtonLabel)(t)),f=(E.buttons||[]).map((t,a)=>a),I=0,w=p.cancelId??c.length-1;if(c.length>1){const t=typeof w=="number"?c[w]:void 0;if(P.isLinux||P.isMacintosh){if(typeof t=="string"&&c.length>1&&w!==1){c.splice(w,1),c.splice(1,0,t);const a=f[w];f.splice(w,1),f.splice(1,0,a),w=1}P.isLinux&&c.length>1&&(c=c.reverse(),f=f.reverse(),I=c.length-1,typeof t=="string"&&(w=I-1))}else if(P.isWindows&&typeof t=="string"&&c.length>1&&w!==c.length-1){c.splice(w,1),c.push(t);const a=f[w];f.splice(w,1),f.push(a),w=c.length-1}}return p.buttons=c,p.defaultId=I,p.cancelId=w,p.noLink=!0,p.title=p.title||l.nameLong,{options:p,buttonIndeces:f}}e.massageMessageBoxOptions=y}),define(Z[118],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isGnome=e.isKwallet=e.KnownStorageProvider=e.PasswordStoreCLIOption=e.IEncryptionMainService=e.IEncryptionService=void 0,e.IEncryptionService=(0,b.createDecorator)("encryptionService"),e.IEncryptionMainService=(0,b.createDecorator)("encryptionMainService");var L;(function(P){P.kwallet="kwallet",P.kwallet5="kwallet5",P.gnome="gnome",P.gnomeKeyring="gnome-keyring",P.gnomeLibsecret="gnome-libsecret",P.basic="basic"})(L||(e.PasswordStoreCLIOption=L={}));var r;(function(P){P.unknown="unknown",P.basicText="basic_text",P.gnomeAny="gnome_any",P.gnomeLibsecret="gnome_libsecret",P.gnomeKeyring="gnome_keyring",P.kwallet="kwallet",P.kwallet5="kwallet5",P.kwallet6="kwallet6",P.dplib="dpapi",P.keychainAccess="keychain_access"})(r||(e.KnownStorageProvider=r={}));function O(P){return P==="kwallet"||P==="kwallet5"||P==="kwallet6"}e.isKwallet=O;function D(P){return P==="gnome_any"||P==="gnome_libsecret"||P==="gnome_keyring"}e.isGnome=D}),define(Z[33],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,b.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,b.refineServiceDecorator)(e.IEnvironmentService)}),define(Z[119],te([0,1,171,6]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionSignaturetErrorCode=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.EXTENSION_INSTALL_DEP_PACK_CONTEXT=e.EXTENSION_INSTALL_SYNC_CONTEXT=e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension",e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT="skipWalkthrough",e.EXTENSION_INSTALL_SYNC_CONTEXT="extensionsSync",e.EXTENSION_INSTALL_DEP_PACK_CONTEXT="dependecyOrPackExtensionInstall";function r(c){switch(c){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=r;function O(c){switch(c){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=O;function D(c,f){switch(c){case 3:return f==="x64"?"win32-x64":f==="ia32"?"win32-ia32":f==="arm64"?"win32-arm64":"unknown";case 2:return f==="x64"?"linux-x64":f==="arm64"?"linux-arm64":f==="arm"?"linux-armhf":"unknown";case"alpine":return f==="x64"?"alpine-x64":f==="arm64"?"alpine-arm64":"unknown";case 1:return f==="x64"?"darwin-x64":f==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=D;function P(c,f){return f==="web"&&!c.includes("web")}e.isNotWebExtensionInWebTargetPlatform=P;function h(c,f,I){return P(f,I)?!1:c==="undefined"||c==="universal"?!0:c==="unknown"?!1:c===I?!0:u(I).includes(c)}e.isTargetPlatformCompatible=h;function u(c){switch(c){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=u;function m(c){return c&&typeof c=="object"&&typeof c.id=="string"&&(!c.uuid||typeof c.uuid=="string")}e.isIExtensionIdentifier=m;var g;(function(c){c[c.NoneOrRelevance=0]="NoneOrRelevance",c[c.LastUpdatedDate=1]="LastUpdatedDate",c[c.Title=2]="Title",c[c.PublisherName=3]="PublisherName",c[c.InstallCount=4]="InstallCount",c[c.PublishedDate=10]="PublishedDate",c[c.AverageRating=6]="AverageRating",c[c.WeightedRating=12]="WeightedRating"})(g||(e.SortBy=g={}));var v;(function(c){c[c.Default=0]="Default",c[c.Ascending=1]="Ascending",c[c.Descending=2]="Descending"})(v||(e.SortOrder=v={}));var d;(function(c){c.Install="install",c.Uninstall="uninstall"})(d||(e.StatisticType=d={}));var y;(function(c){c[c.None=1]="None",c[c.Install=2]="Install",c[c.Update=3]="Update",c[c.Migrate=4]="Migrate"})(y||(e.InstallOperation=y={})),e.IExtensionGalleryService=(0,L.createDecorator)("extensionGalleryService");var E;(function(c){c.Unsupported="Unsupported",c.Deprecated="Deprecated",c.Malicious="Malicious",c.Incompatible="Incompatible",c.IncompatibleTargetPlatform="IncompatibleTargetPlatform",c.ReleaseVersionNotFound="ReleaseVersionNotFound",c.Invalid="Invalid",c.Download="Download",c.Extract="Extract",c.Delete="Delete",c.Rename="Rename",c.CorruptZip="CorruptZip",c.IncompleteZip="IncompleteZip",c.Signature="Signature",c.Internal="Internal"})(E||(e.ExtensionManagementErrorCode=E={}));var l;(function(c){c.UnknownError="UnknownError",c.PackageIsInvalidZip="PackageIsInvalidZip",c.SignatureArchiveIsInvalidZip="SignatureArchiveIsInvalidZip"})(l||(e.ExtensionSignaturetErrorCode=l={}));class p extends Error{constructor(f,I){super(f),this.code=I,this.name=I}}e.ExtensionManagementError=p,e.IExtensionManagementService=(0,L.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,L.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,L.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,b.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLocalizedLabel={value:(0,b.localize)(1,null),original:"Preferences"}}),define(Z[210],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,b.createDecorator)("extensionUrlTrustService")}),define(Z[211],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcExtensionHostStarterChannelName=e.IExtensionHostStarter=void 0,e.IExtensionHostStarter=(0,b.createDecorator)("extensionHostStarter"),e.ipcExtensionHostStarterChannelName="extensionHostStarter"}),define(Z[120],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=e.DEFAULT_TERMINAL_OSX=e.IExternalTerminalService=void 0,e.IExternalTerminalService=(0,b.createDecorator)("externalTerminal"),e.DEFAULT_TERMINAL_OSX="Terminal.app",e.IExternalTerminalMainService=(0,b.createDecorator)("externalTerminal")}),define(Z[212],te([0,1,47,15,10,4,74,21,90,175,120]),function(H,e,b,L,r,O,D,P,h,u,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxExternalTerminalService=e.MacExternalTerminalService=e.WindowsExternalTerminalService=void 0;const g=u.localize(0,null);class v{async getDefaultTerminalForPlatforms(){return{windows:d.getDefaultTerminalWindows(),linux:await E.getDefaultTerminalLinuxReady(),osx:"xterm"}}}class d extends v{static{this.CMD="cmd.exe"}openTerminal(I,w){return this.spawnTerminal(b,I,h.getWindowsShell(),w)}spawnTerminal(I,w,t,a){const s=w.windowsExec||d.getDefaultTerminalWindows();a&&a[1]===":"&&(a=a[0].toUpperCase()+a.substr(1));const i=r.basename(s,".exe").toLowerCase();if(i==="cmder")return I.spawn(s,a?[a]:void 0),Promise.resolve(void 0);const n=["/c","start","/wait"];return s.indexOf(" ")>=0&&n.push('""'),n.push(s),i==="wt"&&n.push("-d ."),new Promise((o,S)=>{const k=l(process),M=I.spawn(t,n,{cwd:a,env:k});M.on("error",S),M.on("exit",()=>o())})}runInTerminal(I,w,t,a,s){const i="windowsExec"in s&&s.windowsExec?s.windowsExec:d.getDefaultTerminalWindows();return new Promise((n,o)=>{const S=`"${w} - ${g}"`,k=`""${t.join('" "')}" & pause"`,M=Object.assign({},l(process),a);Object.keys(M).filter(z=>M[z]===null).forEach(z=>delete M[z]);const C={cwd:w,env:M,windowsVerbatimArguments:!0};let A,T;r.basename(i,".exe")==="wt"?(A=i,T=["-d",".",d.CMD,"/c",k]):(A=d.CMD,T=["/c","start",S,"/wait",i,"/c",k]),b.spawn(A,T,C).on("error",z=>{o(p(z))}),n(void 0)})}static getDefaultTerminalWindows(){if(!d._DEFAULT_TERMINAL_WINDOWS){const I=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");d._DEFAULT_TERMINAL_WINDOWS=`${process.env.windir?process.env.windir:"C:\\Windows"}\\${I?"Sysnative":"System32"}\\cmd.exe`}return d._DEFAULT_TERMINAL_WINDOWS}}e.WindowsExternalTerminalService=d;class y extends v{static{this.OSASCRIPT="/usr/bin/osascript"}openTerminal(I,w){return this.spawnTerminal(b,I,w)}runInTerminal(I,w,t,a,s){const i=s.osxExec||m.DEFAULT_TERMINAL_OSX;return new Promise((n,o)=>{if(i===m.DEFAULT_TERMINAL_OSX||i==="iTerm.app"){const S=i===m.DEFAULT_TERMINAL_OSX?"TerminalHelper":"iTermHelper",M=[L.FileAccess.asFileUri(`vs/workbench/contrib/externalTerminal/node/${S}.scpt`).fsPath,"-t",I||g,"-w",w];for(const T of t)M.push("-a"),M.push(T);if(a){const T=Object.assign({},l(process),a);for(const F in T){const z=T[F];z===null?(M.push("-u"),M.push(F)):(M.push("-e"),M.push(`${F}=${z}`))}}let C="";const A=b.spawn(y.OSASCRIPT,M);A.on("error",T=>{o(p(T))}),A.stderr.on("data",T=>{C+=T.toString()}),A.on("exit",T=>{if(T===0)n(void 0);else if(C){const F=C.split(`
`,1);o(new Error(F[0]))}else o(new Error(u.localize(1,null,S,T)))})}else o(new Error(u.localize(2,null,i)))})}spawnTerminal(I,w,t){const a=w.osxExec||m.DEFAULT_TERMINAL_OSX;return new Promise((s,i)=>{const n=["-a",a];t&&n.push(t);const o=l(process),S=I.spawn("/usr/bin/open",n,{cwd:t,env:o});S.on("error",i),S.on("exit",()=>s())})}}e.MacExternalTerminalService=y;class E extends v{static{this.WAIT_MESSAGE=u.localize(3,null)}openTerminal(I,w){return this.spawnTerminal(b,I,w)}runInTerminal(I,w,t,a,s){const i=s.linuxExec?Promise.resolve(s.linuxExec):E.getDefaultTerminalLinuxReady();return new Promise((n,o)=>{const S=[];i.then(k=>{k.indexOf("gnome-terminal")>=0?S.push("-x"):S.push("-e"),S.push("bash"),S.push("-c");const M=`${c(t)}; echo; read -p "${E.WAIT_MESSAGE}" -n1;`;S.push(`''${M}''`);const C=Object.assign({},l(process),a);Object.keys(C).filter(z=>C[z]===null).forEach(z=>delete C[z]);const A={cwd:w,env:C};let T="";const F=b.spawn(k,S,A);F.on("error",z=>{o(p(z))}),F.stderr.on("data",z=>{T+=z.toString()}),F.on("exit",z=>{if(z===0)n(void 0);else if(T){const oe=T.split(`
`,1);o(new Error(oe[0]))}else o(new Error(u.localize(4,null,k,z)))})})})}static async getDefaultTerminalLinuxReady(){if(!E._DEFAULT_TERMINAL_LINUX_READY)if(!O.isLinux)E._DEFAULT_TERMINAL_LINUX_READY=Promise.resolve("xterm");else{const I=await P.Promises.exists("/etc/debian_version");E._DEFAULT_TERMINAL_LINUX_READY=new Promise(w=>{I?w("x-terminal-emulator"):process.env.DESKTOP_SESSION==="gnome"||process.env.DESKTOP_SESSION==="gnome-classic"?w("gnome-terminal"):process.env.DESKTOP_SESSION==="kde-plasma"?w("konsole"):process.env.COLORTERM?w(process.env.COLORTERM):process.env.TERM?w(process.env.TERM):w("xterm")})}return E._DEFAULT_TERMINAL_LINUX_READY}spawnTerminal(I,w,t){const a=w.linuxExec?Promise.resolve(w.linuxExec):E.getDefaultTerminalLinuxReady();return new Promise((s,i)=>{a.then(n=>{const o=l(process),S=I.spawn(n,[],{cwd:t,env:o});S.on("error",i),S.on("exit",()=>s())})})}}e.LinuxExternalTerminalService=E;function l(f){const I={...f.env};return(0,D.sanitizeProcessEnvironment)(I),I}function p(f){return"errno"in f&&f.errno==="ENOENT"&&"path"in f&&typeof f.path=="string"?new Error(u.localize(5,null,f.path)):f}function c(f){let I="";for(const w of f)w.indexOf(" ")>=0?I+='"'+w+'"':I+=w,I+=" ";return I}}),define(Z[16],te([0,1,58,10,26,12,7,177,6,4,15]),function(H,e,b,L,r,O,D,P,h,u,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLargeFileConfirmationLimit=e.ByteSize=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_READONLY_FROM_PERMISSIONS_CONFIG=e.FILES_READONLY_EXCLUDE_CONFIG=e.FILES_READONLY_INCLUDE_CONFIG=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.TooLargeFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasReadonlyCapability=e.hasFileAtomicDeleteCapability=e.hasFileAtomicWriteCapability=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,h.createDecorator)("fileService");function g(U){return U.create===!0}e.isFileOpenForWriteOptions=g;var v;(function(U){U[U.Unknown=0]="Unknown",U[U.File=1]="File",U[U.Directory=2]="Directory",U[U.SymbolicLink=64]="SymbolicLink"})(v||(e.FileType=v={}));var d;(function(U){U[U.Readonly=1]="Readonly",U[U.Locked=2]="Locked"})(d||(e.FilePermission=d={}));var y;(function(U){U[U.None=0]="None",U[U.FileReadWrite=2]="FileReadWrite",U[U.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",U[U.FileReadStream=16]="FileReadStream",U[U.FileFolderCopy=8]="FileFolderCopy",U[U.PathCaseSensitive=1024]="PathCaseSensitive",U[U.Readonly=2048]="Readonly",U[U.Trash=4096]="Trash",U[U.FileWriteUnlock=8192]="FileWriteUnlock",U[U.FileAtomicRead=16384]="FileAtomicRead",U[U.FileAtomicWrite=32768]="FileAtomicWrite",U[U.FileAtomicDelete=65536]="FileAtomicDelete",U[U.FileClone=131072]="FileClone"})(y||(e.FileSystemProviderCapabilities=y={}));function E(U){return!!(U.capabilities&2)}e.hasReadWriteCapability=E;function l(U){return!!(U.capabilities&8)}e.hasFileFolderCopyCapability=l;function p(U){return!!(U.capabilities&131072)}e.hasFileCloneCapability=p;function c(U){return!!(U.capabilities&4)}e.hasOpenReadWriteCloseCapability=c;function f(U){return!!(U.capabilities&16)}e.hasFileReadStreamCapability=f;function I(U){return E(U)?!!(U.capabilities&16384):!1}e.hasFileAtomicReadCapability=I;function w(U){return E(U)?!!(U.capabilities&32768):!1}e.hasFileAtomicWriteCapability=w;function t(U){return!!(U.capabilities&65536)}e.hasFileAtomicDeleteCapability=t;function a(U){return!!(U.capabilities&2048)}e.hasReadonlyCapability=a;var s;(function(U){U.FileExists="EntryExists",U.FileNotFound="EntryNotFound",U.FileNotADirectory="EntryNotADirectory",U.FileIsADirectory="EntryIsADirectory",U.FileExceedsStorageQuota="EntryExceedsStorageQuota",U.FileTooLarge="EntryTooLarge",U.FileWriteLocked="EntryWriteLocked",U.NoPermissions="NoPermissions",U.Unavailable="Unavailable",U.Unknown="Unknown"})(s||(e.FileSystemProviderErrorCode=s={}));class i extends Error{static create($,Y){const se=new i($.toString(),Y);return S(se,Y),se}constructor($,Y){super($),this.code=Y}}e.FileSystemProviderError=i;function n(U,$){return i.create(U,$)}e.createFileSystemProviderError=n;function o(U){return U||n((0,P.localize)(0,null),s.Unknown)}e.ensureFileSystemProviderError=o;function S(U,$){return U.name=$?`${$} (FileSystemError)`:"FileSystemError",U}e.markAsFileSystemProviderError=S;function k(U){if(!U)return s.Unknown;if(U instanceof i)return U.code;const $=/^(.+) \(FileSystemError\)$/.exec(U.name);if(!$)return s.Unknown;switch($[1]){case s.FileExists:return s.FileExists;case s.FileIsADirectory:return s.FileIsADirectory;case s.FileNotADirectory:return s.FileNotADirectory;case s.FileNotFound:return s.FileNotFound;case s.FileTooLarge:return s.FileTooLarge;case s.FileWriteLocked:return s.FileWriteLocked;case s.NoPermissions:return s.NoPermissions;case s.Unavailable:return s.Unavailable}return s.Unknown}e.toFileSystemProviderErrorCode=k;function M(U){if(U instanceof oe)return U.fileOperationResult;switch(k(U)){case s.FileNotFound:return 1;case s.FileIsADirectory:return 0;case s.FileNotADirectory:return 9;case s.FileWriteLocked:return 5;case s.NoPermissions:return 6;case s.FileExists:return 4;case s.FileTooLarge:return 7;default:return 10}}e.toFileOperationResult=M;var C;(function(U){U[U.CREATE=0]="CREATE",U[U.DELETE=1]="DELETE",U[U.MOVE=2]="MOVE",U[U.COPY=3]="COPY",U[U.WRITE=4]="WRITE"})(C||(e.FileOperation=C={}));class A{constructor($,Y,se){this.resource=$,this.operation=Y,this.target=se}isOperation($){return this.operation===$}}e.FileOperationEvent=A;var T;(function(U){U[U.UPDATED=0]="UPDATED",U[U.ADDED=1]="ADDED",U[U.DELETED=2]="DELETED"})(T||(e.FileChangeType=T={}));class F{constructor($,Y){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[];const se=new Map;for(const ce of $){const x=se.get(ce.type);switch(x?x.push([ce.resource,ce]):se.set(ce.type,[[ce.resource,ce]]),ce.type){case 1:this.rawAdded.push(ce.resource);break;case 0:this.rawUpdated.push(ce.resource);break;case 2:this.rawDeleted.push(ce.resource);break}}for(const[ce,x]of se)switch(ce){case 1:this.added=b.TernarySearchTree.forUris(()=>Y),this.added.fill(x);break;case 0:this.updated=b.TernarySearchTree.forUris(()=>Y),this.updated.fill(x);break;case 2:this.deleted=b.TernarySearchTree.forUris(()=>Y),this.deleted.fill(x);break}}contains($,...Y){return this.doContains($,{includeChildren:!1},...Y)}affects($,...Y){return this.doContains($,{includeChildren:!0},...Y)}doContains($,Y,...se){if(!$)return!1;const ce=se.length>0;return!!((!ce||se.includes(1))&&(this.added?.get($)||Y.includeChildren&&this.added?.findSuperstr($))||(!ce||se.includes(0))&&(this.updated?.get($)||Y.includeChildren&&this.updated?.findSuperstr($))||(!ce||se.includes(2))&&(this.deleted?.findSubstr($)||Y.includeChildren&&this.deleted?.findSuperstr($)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=F;function z(U,$,Y){return!U||!$||U===$||$.length>U.length?!1:($.charAt($.length-1)!==L.sep&&($+=L.sep),Y?(0,r.startsWithIgnoreCase)(U,$):U.indexOf($)===0)}e.isParent=z;class oe extends Error{constructor($,Y,se){super($),this.fileOperationResult=Y,this.options=se}}e.FileOperationError=oe;class ee extends oe{constructor($,Y,se,ce){super($,Y,ce),this.fileOperationResult=Y,this.size=se}}e.TooLargeFileOperationError=ee;class ue extends oe{constructor($,Y,se){super($,2,se),this.stat=Y}}e.NotModifiedSinceFileOperationError=ue;var ae;(function(U){U[U.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",U[U.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",U[U.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",U[U.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",U[U.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",U[U.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",U[U.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",U[U.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",U[U.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",U[U.FILE_NOT_DIRECTORY=9]="FILE_NOT_DIRECTORY",U[U.FILE_OTHER_ERROR=10]="FILE_OTHER_ERROR"})(ae||(e.FileOperationResult=ae={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude",e.FILES_READONLY_INCLUDE_CONFIG="files.readonlyInclude",e.FILES_READONLY_EXCLUDE_CONFIG="files.readonlyExclude",e.FILES_READONLY_FROM_PERMISSIONS_CONFIG="files.readonlyFromPermissions";var de;(function(U){U[U.FILE=0]="FILE",U[U.FOLDER=1]="FOLDER",U[U.ROOT_FOLDER=2]="ROOT_FOLDER"})(de||(e.FileKind=de={})),e.ETAG_DISABLED="";function j(U){if(!(typeof U.size!="number"||typeof U.mtime!="number"))return U.mtime.toString(29)+U.size.toString(31)}e.etag=j;async function G(U,$){if(!$.hasProvider(D.URI.from({scheme:U.scheme})))return new Promise(Y=>{const se=$.onDidChangeFileSystemProviderRegistrations(ce=>{ce.scheme===U.scheme&&ce.added&&(se.dispose(),Y())})})}e.whenProviderRegistered=G;class B{static{this.KB=1024}static{this.MB=B.KB*B.KB}static{this.GB=B.MB*B.KB}static{this.TB=B.GB*B.KB}static formatSize($){return(0,O.isNumber)($)||($=0),$<B.KB?(0,P.localize)(1,null,$.toFixed(0)):$<B.MB?(0,P.localize)(2,null,($/B.KB).toFixed(2)):$<B.GB?(0,P.localize)(3,null,($/B.MB).toFixed(2)):$<B.TB?(0,P.localize)(4,null,($/B.GB).toFixed(2)):(0,P.localize)(5,null,($/B.TB).toFixed(2))}}e.ByteSize=B;function W(U){const $=typeof U=="string"||U?.scheme===m.Schemas.vscodeRemote;return typeof U!="string"&&U?.scheme===m.Schemas.file?1024*B.MB:$?10*B.MB:u.isWeb?50*B.MB:1024*B.MB}e.getLargeFileConfirmationLimit=W}),define(Z[213],te([0,1,17,50,13,3,2,56,7,31,16]),function(H,e,b,L,r,O,D,P,h,u,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderClient=e.LOCAL_FILE_SYSTEM_CHANNEL_NAME=void 0,e.LOCAL_FILE_SYSTEM_CHANNEL_NAME="localFilesystem";class g extends D.Disposable{constructor(d,y){super(),this.channel=d,this.extraCapabilities=y,this.onDidChangeCapabilities=O.Event.None,this._onDidChange=this._register(new O.Emitter),this.onDidChangeFile=this._onDidChange.event,this._onDidWatchError=this._register(new O.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.sessionId=(0,u.generateUuid)(),this.registerFileChangeListeners()}get capabilities(){return this._capabilities||(this._capabilities=253982,this.extraCapabilities.pathCaseSensitive&&(this._capabilities|=1024),this.extraCapabilities.trash&&(this._capabilities|=4096)),this._capabilities}stat(d){return this.channel.call("stat",[d])}readdir(d){return this.channel.call("readdir",[d])}async readFile(d,y){const{buffer:E}=await this.channel.call("readFile",[d,y]);return E}readFileStream(d,y,E){const l=(0,P.newWriteableStream)(c=>b.VSBuffer.concat(c.map(f=>b.VSBuffer.wrap(f))).buffer),p=this.channel.listen("readFileStream",[d,y])(c=>{if(c instanceof b.VSBuffer)l.write(c.buffer);else{if(c==="end")l.end();else{let f;if(c instanceof Error)f=c;else{const I=c;f=(0,m.createFileSystemProviderError)(I.message??(0,L.toErrorMessage)(I),I.code??m.FileSystemProviderErrorCode.Unknown)}l.error(f),l.end()}p.dispose()}});return E.onCancellationRequested(()=>{l.error((0,r.canceled)()),l.end(),p.dispose()}),l}writeFile(d,y,E){return this.channel.call("writeFile",[d,b.VSBuffer.wrap(y),E])}open(d,y){return this.channel.call("open",[d,y])}close(d){return this.channel.call("close",[d])}async read(d,y,E,l,p){const[c,f]=await this.channel.call("read",[d,y,p]);return E.set(c.buffer.slice(0,f),l),f}write(d,y,E,l,p){return this.channel.call("write",[d,y,b.VSBuffer.wrap(E),l,p])}mkdir(d){return this.channel.call("mkdir",[d])}delete(d,y){return this.channel.call("delete",[d,y])}rename(d,y,E){return this.channel.call("rename",[d,y,E])}copy(d,y,E){return this.channel.call("copy",[d,y,E])}cloneFile(d,y){return this.channel.call("cloneFile",[d,y])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(d=>{if(Array.isArray(d)){const y=d;this._onDidChange.fire(y.map(E=>({resource:h.URI.revive(E.resource),type:E.type})))}else{const y=d;this._onDidWatchError.fire(y)}}))}watch(d,y){const E=(0,u.generateUuid)();return this.channel.call("watch",[this.sessionId,E,d,y]),(0,D.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,E]))}}e.DiskFileSystemProviderClient=g}),define(Z[121],te([0,1,17,13,178,16]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function D(m,g,v,d,y,E){let l;try{await P(m,g,v,d,y,E)}catch(p){l=p}finally{l&&y.errorTransformer&&(l=y.errorTransformer(l)),typeof l<"u"&&v.error(l),v.end()}}e.readFileIntoStream=D;async function P(m,g,v,d,y,E){h(E);const l=await m.open(g,{create:!1});try{h(E);let p=0,c=0,f=y&&typeof y.length=="number"?y.length:void 0,I=b.VSBuffer.alloc(Math.min(y.bufferSize,typeof f=="number"?f:y.bufferSize)),w=y&&typeof y.position=="number"?y.position:0,t=0;do c=await m.read(l,w,I.buffer,t,I.byteLength-t),w+=c,t+=c,p+=c,typeof f=="number"&&(f-=c),t===I.byteLength&&(await v.write(d(I)),I=b.VSBuffer.alloc(Math.min(y.bufferSize,typeof f=="number"?f:y.bufferSize)),t=0);while(c>0&&(typeof f!="number"||f>0)&&h(E)&&u(p,y));if(t>0){let a=t;typeof f=="number"&&(a=Math.min(t,f)),v.write(d(I.slice(0,a)))}}catch(p){throw(0,O.ensureFileSystemProviderError)(p)}finally{await m.close(l)}}function h(m){if(m.isCancellationRequested)throw(0,L.canceled)();return!0}function u(m,g){if(typeof g?.limits?.size=="number"&&m>g.limits.size)throw(0,O.createFileSystemProviderError)((0,r.localize)(0,null),O.FileSystemProviderErrorCode.FileTooLarge);return!0}}),define(Z[78],te([0,1,107,2,10,4,7,16]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWatcherPatterns=e.normalizeWatcherPattern=e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function h(p){return p.recursive===!0}e.isRecursiveWatchRequest=h;class u extends L.Disposable{static{this.MAX_RESTARTS=5}constructor(c,f,I,w){super(),this.onFileChanges=c,this.onLogMessage=f,this.verboseLogging=I,this.options=w,this.watcherDisposables=this._register(new L.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const c=new L.DisposableStore;this.watcherDisposables.value=c,this.watcher=this.createWatcher(c),this.watcher.setVerboseLogging(this.verboseLogging),c.add(this.watcher.onDidChangeFile(f=>this.onFileChanges(f))),c.add(this.watcher.onDidLogMessage(f=>this.onLogMessage(f))),c.add(this.watcher.onDidError(f=>this.onError(f)))}onError(c){this.options.restartOnError?this.restartCounter<u.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after error: ${c}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after error: ${c}`):this.error(c)}restart(c){this.restartCounter++,this.init(),this.watch(c)}async watch(c){this.requests=c,await this.watcher?.watch(c)}async setVerboseLogging(c){this.verboseLogging=c,await this.watcher?.setVerboseLogging(c)}error(c){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${c}`})}trace(c){this.onLogMessage({type:"trace",message:`[File Watcher (${this.options.type})] ${c}`})}dispose(){return this.watcher=void 0,super.dispose()}}e.AbstractWatcherClient=u;class m extends u{constructor(c,f,I){super(c,f,I,{type:"node.js",restartOnError:!1})}}e.AbstractNonRecursiveWatcherClient=m;class g extends u{constructor(c,f,I){super(c,f,I,{type:"universal",restartOnError:!0})}}e.AbstractUniversalWatcherClient=g;function v(p){return p.map(c=>({type:c.type,resource:D.URI.file(c.path)}))}e.toFileChanges=v;function d(p){const c=new l;for(const f of p)c.processEvent(f);return c.coalesce()}e.coalesceEvents=d;function y(p,c){return typeof c=="string"&&!c.startsWith(b.GLOBSTAR)&&!(0,r.isAbsolute)(c)?{base:p,pattern:c}:c}e.normalizeWatcherPattern=y;function E(p,c){const f=[];for(const I of c)f.push((0,b.parse)(y(p,I)));return f}e.parseWatcherPatterns=E;class l{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(c){return O.isLinux?c.path:c.path.toLowerCase()}processEvent(c){const f=this.mapPathToChange.get(this.toKey(c));let I=!1;if(f){const w=f.type,t=c.type;f.path!==c.path&&(c.type===2||c.type===1)?I=!0:w===1&&t===2?(this.mapPathToChange.delete(this.toKey(c)),this.coalesced.delete(f)):w===2&&t===1?f.type=0:w===1&&t===0||(f.type=t)}else I=!0;I&&(this.coalesced.add(c),this.mapPathToChange.set(this.toKey(c),c))}coalesce(){const c=[],f=[];return Array.from(this.coalesced).filter(I=>I.type!==2?(c.push(I),!1):!0).sort((I,w)=>I.path.length-w.path.length).filter(I=>f.some(w=>(0,P.isParent)(I.path,w,!O.isLinux))?!1:(f.push(I.path),!0)).concat(c)}}}),define(Z[214],te([0,1,45,8,23,32,2,86,10,4,108,21,78]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchFileContents=e.NodeJSFileWatcherLibrary=void 0;class d extends D.Disposable{static{this.FILE_DELETE_HANDLER_DELAY=100}static{this.FILE_CHANGES_HANDLER_DELAY=75}constructor(l,p,c,f){super(),this.request=l,this.onDidFilesChange=p,this.onLogMessage=c,this.verboseLogging=f,this.throttledFileChangesEmitter=this._register(new L.ThrottledWorker({maxWorkChunkSize:100,throttleDelay:200,maxBufferedWork:1e4},I=>this.onDidFilesChange(I))),this.fileChangesAggregator=this._register(new L.RunOnceWorker(I=>this.handleFileChanges(I),d.FILE_CHANGES_HANDLER_DELAY)),this.excludes=(0,v.parseWatcherPatterns)(this.request.path,this.request.excludes),this.includes=this.request.includes?(0,v.parseWatcherPatterns)(this.request.path,this.request.includes):void 0,this.cts=new r.CancellationTokenSource,this.ready=this.watch()}async watch(){try{const l=await this.normalizePath(this.request);if(this.cts.token.isCancellationRequested)return;const p=await g.Promises.stat(l);this._register(await this.doWatch(l,p.isDirectory()))}catch(l){l.code!=="ENOENT"?this.error(l):this.trace(l)}}async normalizePath(l){let p=l.path;try{p=await g.Promises.realpath(l.path),l.path===p&&(p=await(0,m.realcase)(l.path)??l.path),l.path!==p&&this.trace(`correcting a path to watch that seems to be a symbolic link or wrong casing (original: ${l.path}, real: ${p})`)}catch{}return p}async doWatch(l,p){if(u.isMacintosh&&(0,O.isEqualOrParent)(l,"/Volumes/",!0))return this.error(`Refusing to watch ${l} for changes using fs.watch() for possibly being a network share where watching is unreliable and unstable.`),D.Disposable.None;const c=new r.CancellationTokenSource(this.cts.token),f=new D.DisposableStore;try{const I=(0,h.basename)(l),w=(0,b.watch)(l);f.add((0,D.toDisposable)(()=>{w.removeAllListeners(),w.close()})),this.trace(`Started watching: '${l}'`);const t=new Set;if(p)try{for(const s of await g.Promises.readdir(l))t.add(s)}catch(s){this.error(s)}const a=new Map;f.add((0,D.toDisposable)(()=>{for(const[,s]of a)s.dispose();a.clear()})),w.on("error",(s,i)=>{this.error(`Failed to watch ${l} for changes using fs.watch() (${s}, ${i})`),this.dispose()}),w.on("change",(s,i)=>{if(c.token.isCancellationRequested)return;this.trace(`[raw] ["${s}"] ${i}`);let n="";if(i&&(n=i.toString(),u.isMacintosh&&(n=(0,P.normalizeNFC)(n))),!(!n||s!=="change"&&s!=="rename"))if(p)if(s==="rename"){a.get(n)?.dispose();const o=setTimeout(async()=>{if(a.delete(n),n===I&&!await g.Promises.exists(l)){this.warn("Watcher shutdown because watched path got deleted"),this.dispose();return}const S=await this.existsChildStrictCase((0,h.join)(l,n));if(c.token.isCancellationRequested)return;let k;S?t.has(n)?k=0:(k=1,t.add(n)):(t.delete(n),k=2),this.onFileChange({path:(0,h.join)(this.request.path,n),type:k})},d.FILE_DELETE_HANDLER_DELAY);a.set(n,(0,D.toDisposable)(()=>clearTimeout(o)))}else{let o;t.has(n)?o=0:(o=1,t.add(n)),this.onFileChange({path:(0,h.join)(this.request.path,n),type:o})}else if(s==="rename"||n!==I){const o=setTimeout(async()=>{const S=await g.Promises.exists(l);c.token.isCancellationRequested||(S?(this.onFileChange({path:this.request.path,type:0},!0),f.add(await this.doWatch(l,!1))):(this.onFileChange({path:this.request.path,type:2},!0),this.fileChangesAggregator.flush(),this.dispose()))},d.FILE_DELETE_HANDLER_DELAY);f.clear(),f.add((0,D.toDisposable)(()=>clearTimeout(o)))}else this.onFileChange({path:this.request.path,type:0},!0)})}catch(I){await g.Promises.exists(l)&&!c.token.isCancellationRequested&&this.error(`Failed to watch ${l} for changes using fs.watch() (${I.toString()})`)}return(0,D.toDisposable)(()=>{c.dispose(!0),f.dispose()})}onFileChange(l,p=!1){this.cts.token.isCancellationRequested||(this.verboseLogging&&this.trace(`${l.type===1?"[ADDED]":l.type===2?"[DELETED]":"[CHANGED]"} ${l.path}`),!p&&this.excludes.some(c=>c(l.path))?this.verboseLogging&&this.trace(` >> ignored (excluded) ${l.path}`):!p&&this.includes&&this.includes.length>0&&!this.includes.some(c=>c(l.path))?this.verboseLogging&&this.trace(` >> ignored (not included) ${l.path}`):this.fileChangesAggregator.work(l))}handleFileChanges(l){const p=(0,v.coalesceEvents)(l);if(p.length>0){if(this.verboseLogging)for(const f of p)this.trace(`>> normalized ${f.type===1?"[ADDED]":f.type===2?"[DELETED]":"[CHANGED]"} ${f.path}`);this.throttledFileChangesEmitter.work(p)?this.throttledFileChangesEmitter.pending>0&&this.trace(`started throttling events due to large amount of file change events at once (pending: ${this.throttledFileChangesEmitter.pending}, most recent change: ${p[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`):this.warn(`started ignoring events due to too many file change events at once (incoming: ${p.length}, most recent change: ${p[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`)}}async existsChildStrictCase(l){if(u.isLinux)return g.Promises.exists(l);try{const p=(0,h.basename)(l);return(await g.Promises.readdir((0,h.dirname)(l))).some(f=>f===p)}catch(p){return this.trace(p),!1}}setVerboseLogging(l){this.verboseLogging=l}error(l){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"error",message:`[File Watcher (node.js)] ${l}`})}warn(l){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"warn",message:`[File Watcher (node.js)] ${l}`})}trace(l){!this.cts.token.isCancellationRequested&&this.verboseLogging&&this.onLogMessage?.({type:"trace",message:`[File Watcher (node.js)] ${l}`})}dispose(){this.trace(`stopping file watcher on ${this.request.path}`),this.cts.dispose(!0),super.dispose()}}e.NodeJSFileWatcherLibrary=d;async function y(E,l,p,c,f=512){const I=await g.Promises.open(E,"r"),w=Buffer.allocUnsafe(f),t=new r.CancellationTokenSource(c);let a,s=!1;const i={path:E,excludes:[],recursive:!1},n=new d(i,o=>{(async()=>{for(const{type:S}of o)if(S===0){if(s)return;s=!0;try{for(;!t.token.isCancellationRequested;){const{bytesRead:k}=await g.Promises.read(I,w,0,f,null);if(!k||t.token.isCancellationRequested)break;l(w.slice(0,k))}}catch(k){a=new Error(k),t.dispose(!0)}finally{s=!1}}})()});return await n.ready,p(),new Promise((o,S)=>{t.token.onCancellationRequested(async()=>{n.dispose();try{await g.Promises.close(I)}catch(k){a=new Error(k)}a?S(a):o()})})}e.watchFileContents=y}),define(Z[215],te([0,1,3,107,2,4,214]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcher=void 0;class P extends r.Disposable{constructor(){super(...arguments),this._onDidChangeFile=this._register(new b.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidLogMessage=this._register(new b.Emitter),this.onDidLogMessage=this._onDidLogMessage.event,this.onDidError=b.Event.None,this.watchers=new Map,this.verboseLogging=!1}async watch(u){const m=this.normalizeRequests(u),g=m.filter(d=>{const y=this.watchers.get(d.path);return y?!(0,L.patternsEquals)(y.request.excludes,d.excludes)||!(0,L.patternsEquals)(y.request.includes,d.includes):!0}),v=Array.from(this.watchers.values()).filter(({request:d})=>!m.find(y=>y.path===d.path&&(0,L.patternsEquals)(y.excludes,d.excludes)&&(0,L.patternsEquals)(y.includes,d.includes))).map(({request:d})=>d.path);g.length&&this.trace(`Request to start watching: ${g.map(d=>`${d.path} (excludes: ${d.excludes.length>0?d.excludes:"<none>"}, includes: ${d.includes&&d.includes.length>0?JSON.stringify(d.includes):"<all>"})`).join(",")}`),v.length&&this.trace(`Request to stop watching: ${v.join(",")}`);for(const d of v)this.stopWatching(d);for(const d of g)this.startWatching(d)}startWatching(u){const m=new D.NodeJSFileWatcherLibrary(u,v=>this._onDidChangeFile.fire(v),v=>this._onDidLogMessage.fire(v),this.verboseLogging),g={request:u,instance:m};this.watchers.set(u.path,g)}async stop(){for(const[u]of this.watchers)this.stopWatching(u);this.watchers.clear()}stopWatching(u){const m=this.watchers.get(u);m&&(this.watchers.delete(u),m.instance.dispose())}normalizeRequests(u){const m=new Map;for(const g of u){const v=O.isLinux?g.path:g.path.toLowerCase();m.set(v,g)}return Array.from(m.values())}async setVerboseLogging(u){this.verboseLogging=u;for(const[,m]of this.watchers)m.instance.setVerboseLogging(u)}trace(u){this.verboseLogging&&this._onDidLogMessage.fire({type:"trace",message:this.toMessage(u)})}toMessage(u,m){return m?`[File Watcher (node.js)] ${u} (path: ${m.request.path})`:`[File Watcher (node.js)] ${u}`}}e.NodeJSWatcher=P}),define(Z[216],te([0,1,78,215]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcherClient=void 0;class r extends b.AbstractNonRecursiveWatcherClient{constructor(D,P,h){super(D,P,h),this.init()}createWatcher(){return new L.NodeJSWatcher}}e.NodeJSWatcherClient=r}),define(Z[217],te([0,1,15,42,161,78]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class D extends O.AbstractUniversalWatcherClient{constructor(h,u,m){super(h,u,m),this.init()}createWatcher(h){const u=h.add(new r.Client(b.FileAccess.asFileUri("bootstrap-fork").fsPath,{serverName:"File Watcher",args:["--type=fileWatcher"],env:{VSCODE_AMD_ENTRYPOINT:"vs/platform/files/node/watcher/watcherMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true"}}));return h.add(u.onDidProcessExit(({code:m,signal:g})=>this.onError(`terminated by itself with code ${m}, signal: ${g}`))),L.ProxyChannel.toService((0,L.getNextTickChannel)(u.getChannel("watcher")))}}e.UniversalWatcherClient=D}),define(Z[94],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class b{constructor(...r){this._entries=new Map;for(const[O,D]of r)this.set(O,D)}set(r,O){const D=this._entries.get(r);return this._entries.set(r,O),D}has(r){return this._entries.has(r)}get(r){return this._entries.get(r)}}e.ServiceCollection=b}),define(Z[218],te([0,1,8,13,2,76,209,6,94,104]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const m=!1;class g extends Error{constructor(l){super("cyclic dependency between services"),this.message=l.findCycleSlow()??`UNABLE to detect cycle, dumping graph: 
${l.toString()}`}}class v{constructor(l=new h.ServiceCollection,p=!1,c,f=m){this._services=l,this._strict=p,this._parent=c,this._enableTracing=f,this._activeInstantiations=new Set,this._services.set(P.IInstantiationService,this),this._globalGraph=f?c?._globalGraph??new D.Graph(I=>I):void 0}createChild(l){return new v(l,this._strict,this,this._enableTracing)}invokeFunction(l,...p){const c=y.traceInvocation(this._enableTracing,l);let f=!1;try{return l({get:w=>{if(f)throw(0,L.illegalState)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(w,c);if(!t)throw new Error(`[invokeFunction] unknown service '${w}'`);return t}},...p)}finally{f=!0,c.stop()}}createInstance(l,...p){let c,f;return l instanceof O.SyncDescriptor?(c=y.traceCreation(this._enableTracing,l.ctor),f=this._createInstance(l.ctor,l.staticArguments.concat(p),c)):(c=y.traceCreation(this._enableTracing,l),f=this._createInstance(l,p,c)),c.stop(),f}_createInstance(l,p=[],c){const f=P._util.getServiceDependencies(l).sort((t,a)=>t.index-a.index),I=[];for(const t of f){const a=this._getOrCreateServiceInstance(t.id,c);a||this._throwIfStrict(`[createInstance] ${l.name} depends on UNKNOWN service ${t.id}.`,!1),I.push(a)}const w=f.length>0?f[0].index:p.length;if(p.length!==w){console.trace(`[createInstance] First service dependency of ${l.name} at position ${w+1} conflicts with ${p.length} static arguments`);const t=w-p.length;t>0?p=p.concat(new Array(t)):p=p.slice(0,w)}return Reflect.construct(l,p.concat(I))}_setServiceInstance(l,p){if(this._services.get(l)instanceof O.SyncDescriptor)this._services.set(l,p);else if(this._parent)this._parent._setServiceInstance(l,p);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(l){const p=this._services.get(l);return!p&&this._parent?this._parent._getServiceInstanceOrDescriptor(l):p}_getOrCreateServiceInstance(l,p){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(l));const c=this._getServiceInstanceOrDescriptor(l);return c instanceof O.SyncDescriptor?this._safeCreateAndCacheServiceInstance(l,c,p.branch(l,!0)):(p.branch(l,!1),c)}_safeCreateAndCacheServiceInstance(l,p,c){if(this._activeInstantiations.has(l))throw new Error(`illegal state - RECURSIVELY instantiating service '${l}'`);this._activeInstantiations.add(l);try{return this._createAndCacheServiceInstance(l,p,c)}finally{this._activeInstantiations.delete(l)}}_createAndCacheServiceInstance(l,p,c){const f=new D.Graph(t=>t.id.toString());let I=0;const w=[{id:l,desc:p,_trace:c}];for(;w.length;){const t=w.pop();if(f.lookupOrInsertNode(t),I++>1e3)throw new g(f);for(const a of P._util.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(a.id);if(s||this._throwIfStrict(`[createInstance] ${l} depends on ${a.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(a.id)),s instanceof O.SyncDescriptor){const i={id:a.id,desc:s,_trace:t._trace.branch(a.id,!0)};f.insertEdge(t,i),w.push(i)}}}for(;;){const t=f.roots();if(t.length===0){if(!f.isEmpty())throw new g(f);break}for(const{data:a}of t){if(this._getServiceInstanceOrDescriptor(a.id)instanceof O.SyncDescriptor){const i=this._createServiceInstanceWithOwner(a.id,a.desc.ctor,a.desc.staticArguments,a.desc.supportsDelayedInstantiation,a._trace);this._setServiceInstance(a.id,i)}f.removeNode(a)}}return this._getServiceInstanceOrDescriptor(l)}_createServiceInstanceWithOwner(l,p,c=[],f,I){if(this._services.get(l)instanceof O.SyncDescriptor)return this._createServiceInstance(l,p,c,f,I);if(this._parent)return this._parent._createServiceInstanceWithOwner(l,p,c,f,I);throw new Error(`illegalState - creating UNKNOWN service instance ${p.name}`)}_createServiceInstance(l,p,c=[],f,I){if(f){const w=new v(void 0,this._strict,this,this._enableTracing);w._globalGraphImplicitDependency=String(l);const t=new Map,a=new b.IdleValue(()=>{const s=w._createInstance(p,c,I);for(const[i,n]of t){const o=s[i];if(typeof o=="function")for(const S of n)o.apply(s,S)}return t.clear(),s});return new Proxy(Object.create(null),{get(s,i){if(!a.isInitialized&&typeof i=="string"&&(i.startsWith("onDid")||i.startsWith("onWill"))){let S=t.get(i);return S||(S=new u.LinkedList,t.set(i,S)),(M,C,A)=>{const T=S.push([M,C,A]);return(0,r.toDisposable)(T)}}if(i in s)return s[i];const n=a.value;let o=n[i];return typeof o!="function"||(o=o.bind(n),s[i]=o),o},set(s,i,n){return a.value[i]=n,!0},getPrototypeOf(s){return p.prototype}})}else return this._createInstance(p,c,I)}_throwIfStrict(l,p){if(p&&console.warn(l),this._strict)throw new Error(l)}}e.InstantiationService=v;var d;(function(E){E[E.None=0]="None",E[E.Creation=1]="Creation",E[E.Invocation=2]="Invocation",E[E.Branch=3]="Branch"})(d||(d={}));class y{static{this.all=new Set}static{this._None=new class extends y{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(l,p){return l?new y(2,p.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):y._None}static traceCreation(l,p){return l?new y(1,p.name):y._None}static{this._totals=0}constructor(l,p){this.type=l,this.name=p,this._start=Date.now(),this._dep=[]}branch(l,p){const c=new y(3,l.toString());return this._dep.push([l,p,c]),c}stop(){const l=Date.now()-this._start;y._totals+=l;let p=!1;function c(I,w){const t=[],a=new Array(I+1).join("	");for(const[s,i,n]of w._dep)if(i&&n){p=!0,t.push(`${a}CREATES -> ${s}`);const o=c(I+1,n);o&&t.push(o)}else t.push(`${a}uses -> ${s}`);return t.join(`
`)}const f=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${c(1,this)}`,`DONE, took ${l.toFixed(2)}ms (grand total ${y._totals.toFixed(2)}ms)`];(l>2||p)&&y.all.add(f.join(`
`))}}e.Trace=y}),define(Z[219],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIssueMainService=e.IssueType=void 0;var L;(function(r){r[r.Bug=0]="Bug",r[r.PerformanceIssue=1]="PerformanceIssue",r[r.FeatureRequest=2]="FeatureRequest"})(L||(e.IssueType=L={})),e.IIssueMainService=(0,b.createDecorator)("issueService")}),define(Z[5],te([0,1,50,3,57,2,35,4,19,12,7,117,6]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.parseLogLevel=e.LogLevelToString=e.getLogLevel=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.MultiplexLogger=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.isLogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,v.createDecorator)("logService"),e.ILoggerService=(0,v.createDecorator)("loggerService");function d(){return new Date().toISOString()}function y(M){return(0,u.isNumber)(M)}e.isLogLevel=y;var E;(function(M){M[M.Off=0]="Off",M[M.Trace=1]="Trace",M[M.Debug=2]="Debug",M[M.Info=3]="Info",M[M.Warning=4]="Warning",M[M.Error=5]="Error"})(E||(e.LogLevel=E={})),e.DEFAULT_LOG_LEVEL=E.Info;function l(M,C,A){switch(C){case E.Trace:M.trace(A);break;case E.Debug:M.debug(A);break;case E.Info:M.info(A);break;case E.Warning:M.warn(A);break;case E.Error:M.error(A);break;case E.Off:break;default:throw new Error(`Invalid log level ${C}`)}}e.log=l;function p(M,C=!1){let A="";for(let T=0;T<M.length;T++){let F=M[T];if(F instanceof Error&&(F=(0,b.toErrorMessage)(F,C)),typeof F=="object")try{F=JSON.stringify(F)}catch{}A+=(T>0?" ":"")+F}return A}class c extends O.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new L.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(C){this.level!==C&&(this.level=C,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(C){return this.level!==E.Off&&this.level<=C}}e.AbstractLogger=c;class f extends c{constructor(C){super(),this.logAlways=C}checkLogLevel(C){return this.logAlways||super.checkLogLevel(C)}trace(C,...A){this.checkLogLevel(E.Trace)&&this.log(E.Trace,p([C,...A],!0))}debug(C,...A){this.checkLogLevel(E.Debug)&&this.log(E.Debug,p([C,...A]))}info(C,...A){this.checkLogLevel(E.Info)&&this.log(E.Info,p([C,...A]))}warn(C,...A){this.checkLogLevel(E.Warning)&&this.log(E.Warning,p([C,...A]))}error(C,...A){if(this.checkLogLevel(E.Error))if(C instanceof Error){const T=Array.prototype.slice.call(arguments);T[0]=C.stack,this.log(E.Error,p(T))}else this.log(E.Error,p([C,...A]))}flush(){}}e.AbstractMessageLogger=f;class I extends c{constructor(C=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(C),this.useColors=!P.isWindows}trace(C,...A){this.checkLogLevel(E.Trace)&&(this.useColors?console.log(`\x1B[90m[main ${d()}]\x1B[0m`,C,...A):console.log(`[main ${d()}]`,C,...A))}debug(C,...A){this.checkLogLevel(E.Debug)&&(this.useColors?console.log(`\x1B[90m[main ${d()}]\x1B[0m`,C,...A):console.log(`[main ${d()}]`,C,...A))}info(C,...A){this.checkLogLevel(E.Info)&&(this.useColors?console.log(`\x1B[90m[main ${d()}]\x1B[0m`,C,...A):console.log(`[main ${d()}]`,C,...A))}warn(C,...A){this.checkLogLevel(E.Warning)&&(this.useColors?console.warn(`\x1B[93m[main ${d()}]\x1B[0m`,C,...A):console.warn(`[main ${d()}]`,C,...A))}error(C,...A){this.checkLogLevel(E.Error)&&(this.useColors?console.error(`\x1B[91m[main ${d()}]\x1B[0m`,C,...A):console.error(`[main ${d()}]`,C,...A))}dispose(){}flush(){}}e.ConsoleMainLogger=I;class w extends c{constructor(C=e.DEFAULT_LOG_LEVEL,A=!0){super(),this.useColors=A,this.setLevel(C)}trace(C,...A){this.checkLogLevel(E.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",C,...A):console.log(C,...A))}debug(C,...A){this.checkLogLevel(E.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",C,...A):console.log(C,...A))}info(C,...A){this.checkLogLevel(E.Info)&&(this.useColors?console.log("%c INFO","color: #33f",C,...A):console.log(C,...A))}warn(C,...A){this.checkLogLevel(E.Warning)&&(this.useColors?console.log("%c WARN","color: #993",C,...A):console.log(C,...A))}error(C,...A){this.checkLogLevel(E.Error)&&(this.useColors?console.log("%c  ERR","color: #f33",C,...A):console.error(C,...A))}dispose(){}flush(){}}e.ConsoleLogger=w;class t extends c{constructor(C,A=e.DEFAULT_LOG_LEVEL){super(),this.adapter=C,this.setLevel(A)}trace(C,...A){this.checkLogLevel(E.Trace)&&this.adapter.log(E.Trace,[this.extractMessage(C),...A])}debug(C,...A){this.checkLogLevel(E.Debug)&&this.adapter.log(E.Debug,[this.extractMessage(C),...A])}info(C,...A){this.checkLogLevel(E.Info)&&this.adapter.log(E.Info,[this.extractMessage(C),...A])}warn(C,...A){this.checkLogLevel(E.Warning)&&this.adapter.log(E.Warning,[this.extractMessage(C),...A])}error(C,...A){this.checkLogLevel(E.Error)&&this.adapter.log(E.Error,[this.extractMessage(C),...A])}extractMessage(C){return typeof C=="string"?C:(0,b.toErrorMessage)(C,this.checkLogLevel(E.Trace))}dispose(){}flush(){}}e.AdapterLogger=t;class a extends c{constructor(C){super(),this.loggers=C,C.length&&this.setLevel(C[0].getLevel())}setLevel(C){for(const A of this.loggers)A.setLevel(C);super.setLevel(C)}trace(C,...A){for(const T of this.loggers)T.trace(C,...A)}debug(C,...A){for(const T of this.loggers)T.debug(C,...A)}info(C,...A){for(const T of this.loggers)T.info(C,...A)}warn(C,...A){for(const T of this.loggers)T.warn(C,...A)}error(C,...A){for(const T of this.loggers)T.error(C,...A)}flush(){for(const C of this.loggers)C.flush()}dispose(){for(const C of this.loggers)C.dispose()}}e.MultiplexLogger=a;class s extends O.Disposable{constructor(C,A,T){if(super(),this.logLevel=C,this.logsHome=A,this._loggers=new D.ResourceMap,this._onDidChangeLoggers=this._register(new L.Emitter),this.onDidChangeLoggers=this._onDidChangeLoggers.event,this._onDidChangeLogLevel=this._register(new L.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event,this._onDidChangeVisibility=this._register(new L.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,T)for(const F of T)this._loggers.set(F.resource,{logger:void 0,info:F})}getLoggerEntry(C){return(0,u.isString)(C)?[...this._loggers.values()].find(A=>A.info.id===C):this._loggers.get(C)}getLogger(C){return this.getLoggerEntry(C)?.logger}createLogger(C,A){const T=this.toResource(C),F=(0,u.isString)(C)?C:A?.id??(0,r.hash)(T.toString()).toString(16);let z=this._loggers.get(T)?.logger;const oe=A?.logLevel==="always"?E.Trace:A?.logLevel;z||(z=this.doCreateLogger(T,oe??this.getLogLevel(T)??this.logLevel,{...A,id:F}));const ee={logger:z,info:{resource:T,id:F,logLevel:oe,name:A?.name,hidden:A?.hidden,extensionId:A?.extensionId,when:A?.when}};return this.registerLogger(ee.info),this._loggers.set(T,ee),z}toResource(C){return(0,u.isString)(C)?(0,h.joinPath)(this.logsHome,`${C}.log`):C}setLogLevel(C,A){if(m.URI.isUri(C)){const T=C,F=A,z=this._loggers.get(T);z&&F!==z.info.logLevel&&(z.info.logLevel=F===this.logLevel?void 0:F,z.logger?.setLevel(F),this._loggers.set(z.info.resource,z),this._onDidChangeLogLevel.fire([T,F]))}else{this.logLevel=C;for(const[T,F]of this._loggers.entries())this._loggers.get(T)?.info.logLevel===void 0&&F.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(C,A){const T=this.getLoggerEntry(C);T&&A!==!T.info.hidden&&(T.info.hidden=!A,this._loggers.set(T.info.resource,T),this._onDidChangeVisibility.fire([T.info.resource,A]))}getLogLevel(C){let A;return C&&(A=this._loggers.get(C)?.info.logLevel),A??this.logLevel}registerLogger(C){const A=this._loggers.get(C.resource);A?A.info.hidden!==C.hidden&&this.setVisibility(C.resource,!C.hidden):(this._loggers.set(C.resource,{info:C,logger:void 0}),this._onDidChangeLoggers.fire({added:[C],removed:[]}))}deregisterLogger(C){const A=this._loggers.get(C);A&&(A.logger&&A.logger.dispose(),this._loggers.delete(C),this._onDidChangeLoggers.fire({added:[],removed:[A.info]}))}*getRegisteredLoggers(){for(const C of this._loggers.values())yield C.info}getRegisteredLogger(C){return this._loggers.get(C)?.info}dispose(){this._loggers.forEach(C=>C.logger?.dispose()),this._loggers.clear(),super.dispose()}}e.AbstractLoggerService=s;class i{constructor(){this.onDidChangeLogLevel=new L.Emitter().event}setLevel(C){}getLevel(){return E.Info}trace(C,...A){}debug(C,...A){}info(C,...A){}warn(C,...A){}error(C,...A){}critical(C,...A){}dispose(){}flush(){}}e.NullLogger=i;class n extends i{}e.NullLogService=n;function o(M){if(M.verbose)return E.Trace;if(typeof M.logLevel=="string"){const C=k(M.logLevel.toLowerCase());if(C!==void 0)return C}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=o;function S(M){switch(M){case E.Trace:return"trace";case E.Debug:return"debug";case E.Info:return"info";case E.Warning:return"warn";case E.Error:return"error";case E.Off:return"off"}}e.LogLevelToString=S;function k(M){switch(M){case"trace":return E.Trace;case"debug":return E.Debug;case"info":return E.Info;case"warn":return E.Warning;case"error":return E.Error;case"critical":return E.Error;case"off":return E.Off}}e.parseLogLevel=k,e.CONTEXT_LOG_LEVEL=new g.RawContextKey("logLevel",S(E.Info))});var X=this&&this.__param||function(H,e){return function(b,L){e(b,L,H)}};define(Z[220],te([0,1,77,3,2,5,4,8]),function(H,e,b,L,r,O,D,P){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCredentialsMainService=void 0;let u=class extends r.Disposable{static{h=this}static{this.MAX_PASSWORD_LENGTH=2500}static{this.PASSWORD_CHUNK_SIZE=h.MAX_PASSWORD_LENGTH-100}constructor(g){super(),this.logService=g,this._onDidChangePassword=this._register(new L.Emitter),this.onDidChangePassword=this._onDidChangePassword.event,this._sequencer=new P.SequencerByKey}async getPassword(g,v){this.logService.trace("Going to get password from keytar:",g,v);let d;try{d=await this.withKeytar()}catch{return null}return await this._sequencer.queue(g+v,()=>this.doGetPassword(d,g,v))}async doGetPassword(g,v,d){this.logService.trace("Doing get password from keytar:",v,d);const y=await(0,P.retry)(()=>g.getPassword(v,d),50,3);if(!y)return this.logService.trace("Did not get a password from keytar for account:",d),y;let E,l;try{const p=JSON.parse(y);E=p.content,l=p.hasNextChunk}catch{}if(!E||!l)return this.logService.trace("Got password from keytar for account:",d),y;try{let p=1;for(;l;){const c=await(0,P.retry)(()=>g.getPassword(v,`${d}-${p}`),50,3),f=JSON.parse(c);E+=f.content,l=f.hasNextChunk,p++}return this.logService.trace(`Got ${p}-chunked password from keytar for account:`,d),E}catch(p){return this.logService.error(p),y}}async setPassword(g,v,d){this.logService.trace("Going to set password using keytar:",g,v);let y;try{y=await this.withKeytar()}catch(E){throw this.surfaceKeytarLoadError?.(E),E}await this._sequencer.queue(g+v,()=>this.doSetPassword(y,g,v,d)),this._onDidChangePassword.fire({service:g,account:v})}async doSetPassword(g,v,d,y){if(this.logService.trace("Doing set password from keytar:",v,d),!D.isWindows){await(0,P.retry)(()=>g.setPassword(v,d,y),50,3),this.logService.trace("Set password from keytar for account:",d);return}if(await this.doDeletePassword(g,v,d),y.length<=h.PASSWORD_CHUNK_SIZE){await(0,P.retry)(()=>g.setPassword(v,d,y),50,3),this.logService.trace("Set password from keytar for account:",d);return}let E=0,l=0,p=!0;for(;p;){const c=y.substring(E,E+h.PASSWORD_CHUNK_SIZE);E+=h.PASSWORD_CHUNK_SIZE,p=y.length-E>0;const f={content:c,hasNextChunk:p};await(0,P.retry)(()=>g.setPassword(v,l?`${d}-${l}`:d,JSON.stringify(f)),50,3),l++}this.logService.trace(`Set${l?` ${l}-chunked`:""} password from keytar for account:`,d)}async deletePassword(g,v){this.logService.trace("Going to delete password using keytar:",g,v);let d;try{d=await this.withKeytar()}catch(E){throw this.surfaceKeytarLoadError?.(E),E}const y=await this._sequencer.queue(g+v,()=>this.doDeletePassword(d,g,v));return y&&this._onDidChangePassword.fire({service:g,account:v}),y}async doDeletePassword(g,v,d){this.logService.trace("Doing delete password from keytar:",v,d);const y=await g.getPassword(v,d);if(!y)return this.logService.trace("Did not get a password to delete from keytar for account:",d),!1;let E,l;try{const c=JSON.parse(y);E=c.content,l=c.hasNextChunk}catch{}let p=0;if(E&&l)try{for(p++;l;){const c=`${d}-${p}`,f=await g.getPassword(v,c);await g.deletePassword(v,c),l=JSON.parse(f).hasNextChunk,p++}}catch(c){this.logService.error(c)}return await g.deletePassword(v,d)?(this.logService.trace(`Deleted${p?` ${p}-chunked`:""} password from keytar for account:`,d),!0):(this.logService.trace(`Keytar failed to delete${p?` ${p}-chunked`:""} password for account:`,d),!1)}async findPassword(g){let v;try{v=await this.withKeytar()}catch{return null}return await v.findPassword(g)}async findCredentials(g){let v;try{v=await this.withKeytar()}catch{return[]}return await v.findCredentials(g)}clear(){return this._keytarCache instanceof b.InMemoryCredentialsProvider?this._keytarCache.clear():Promise.resolve()}};e.BaseCredentialsMainService=u,e.BaseCredentialsMainService=u=h=be([X(0,O.ILogService)],u)}),define(Z[221],te([0,1,14,4,5]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncryptionMainService=void 0;const O=b.safeStorage;let D=class{constructor(h,u){this.machineId=h,this.logService=u,b.app.commandLine.getSwitchValue("password-store")==="basic"&&O.setUsePlainTextEncryption?.(!0)}async encrypt(h){this.logService.trace("[EncryptionMainService] Encrypting value.");try{const u=JSON.stringify(O.encryptString(h));return this.logService.trace("[EncryptionMainService] Encrypted value."),u}catch(u){throw this.logService.error(u),u}}async decrypt(h){let u;try{if(u=JSON.parse(h),!u.data)return this.logService.trace("[EncryptionMainService] Unable to parse encrypted value. Attempting old decryption."),this.oldDecrypt(h)}catch(g){return this.logService.trace("[EncryptionMainService] Unable to parse encrypted value. Attempting old decryption.",g),this.oldDecrypt(h)}const m=Buffer.from(u.data);this.logService.trace("[EncryptionMainService] Decrypting value.");try{const g=O.decryptString(m);return this.logService.trace("[EncryptionMainService] Decrypted value."),g}catch(g){throw this.logService.error(g),g}}isEncryptionAvailable(){return Promise.resolve(O.isEncryptionAvailable())}getKeyStorageProvider(){if(L.isWindows)return Promise.resolve("dpapi");if(L.isMacintosh)return Promise.resolve("keychain_access");if(O.getSelectedStorageBackend)try{const h=O.getSelectedStorageBackend();return Promise.resolve(h)}catch(h){this.logService.error(h)}return Promise.resolve("unknown")}async setUsePlainTextEncryption(){if(L.isWindows)throw new Error("Setting plain text encryption is not supported on Windows.");if(L.isMacintosh)throw new Error("Setting plain text encryption is not supported on macOS.");if(!O.setUsePlainTextEncryption)throw new Error("Setting plain text encryption is not supported.");O.setUsePlainTextEncryption(!0)}async oldDecrypt(h){let u;try{u=await new Promise((m,g)=>H(["vscode-encrypt"],m,g))}catch{return h}try{return u.decrypt(this.machineId,h)}catch(m){return this.logService.error(m),h}}};e.EncryptionMainService=D,e.EncryptionMainService=D=be([X(1,r.ILogService)],D)}),define(Z[222],te([0,1,24,8,13,3,2,10,78,5]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class m extends D.Disposable{constructor(v,d){super(),this.logService=v,this.options=d,this._onDidChangeFile=this._register(new O.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new O.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new L.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new L.ThrottledDelayer(0))}watch(v,d){return d.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(v,d):this.watchNonRecursive(v,d)}watchUniversal(v,d){const y={path:this.toFilePath(v),excludes:d.excludes,includes:d.includes,recursive:d.recursive},E=(0,b.insert)(this.universalPathsToWatch,y);return this.refreshUniversalWatchers(),(0,D.toDisposable)(()=>{E(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(v=>(0,r.onUnexpectedError)(v))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(d=>this._onDidChangeFile.fire((0,h.toFileChanges)(d)),d=>this.onWatcherLogMessage(d),this.logService.getLevel()===u.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===u.LogLevel.Trace)})));const v=this.options?.watcher?.recursive?.usePolling;if(v===!0)for(const d of this.universalPathsToWatch)(0,h.isRecursiveWatchRequest)(d)&&(d.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(v))for(const d of this.universalPathsToWatch)(0,h.isRecursiveWatchRequest)(d)&&v.includes(d.path)&&(d.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(v,d){const y={path:this.toFilePath(v),excludes:d.excludes,includes:d.includes,recursive:!1},E=(0,b.insert)(this.nonRecursivePathsToWatch,y);return this.refreshNonRecursiveWatchers(),(0,D.toDisposable)(()=>{E(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(v=>(0,r.onUnexpectedError)(v))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(v=>this._onDidChangeFile.fire((0,h.toFileChanges)(v)),v=>this.onWatcherLogMessage(v),this.logService.getLevel()===u.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===u.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(v){v.type==="error"&&this._onDidWatchError.fire(v.message),this.logService[v.type](v.message)}toFilePath(v){return(0,P.normalize)(v.fsPath)}}e.AbstractDiskFileSystemProvider=m}),define(Z[223],te([0,1,24,8,17,23,3,57,69,2,58,15,65,19,56,176,16,121,5,13]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let I=class extends u.Disposable{constructor(t){super(),this.logService=t,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new D.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new D.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new D.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new D.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new D.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new D.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new L.ResourceQueue)}registerProvider(t,a){if(this.provider.has(t))throw new Error(`A filesystem provider for the scheme '${t}' is already registered.`);(0,v.mark)(`code/registerFilesystem/${t}`);const s=new u.DisposableStore;return this.provider.set(t,a),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:t,provider:a}),s.add(a.onDidChangeFile(i=>this._onDidFilesChange.fire(new l.FileChangesEvent(i,!this.isPathCaseSensitive(a))))),typeof a.onDidWatchError=="function"&&s.add(a.onDidWatchError(i=>this._onDidWatchError.fire(new Error(i)))),s.add(a.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:a,scheme:t}))),(0,u.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:t,provider:a}),this.provider.delete(t),(0,u.dispose)(s)})}getProvider(t){return this.provider.get(t)}async activateProvider(t){const a=[];this._onWillActivateFileSystemProvider.fire({scheme:t,join(s){a.push(s)}}),!this.provider.has(t)&&await L.Promises.settled(a)}async canHandleResource(t){return await this.activateProvider(t.scheme),this.hasProvider(t)}hasProvider(t){return this.provider.has(t.scheme)}hasCapability(t,a){const s=this.provider.get(t.scheme);return!!(s&&s.capabilities&a)}listCapabilities(){return h.Iterable.map(this.provider,([t,a])=>({scheme:t,capabilities:a.capabilities}))}async withProvider(t){if(!(0,d.isAbsolutePath)(t))throw new l.FileOperationError((0,E.localize)(0,null,this.resourceForError(t)),8);await this.activateProvider(t.scheme);const a=this.provider.get(t.scheme);if(!a){const s=new f.ErrorNoTelemetry;throw s.message=(0,E.localize)(1,null,t.toString()),s}return a}async withReadProvider(t){const a=await this.withProvider(t);if((0,l.hasOpenReadWriteCloseCapability)(a)||(0,l.hasReadWriteCapability)(a)||(0,l.hasFileReadStreamCapability)(a))return a;throw new Error(`Filesystem provider for scheme '${t.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(t){const a=await this.withProvider(t);if((0,l.hasOpenReadWriteCloseCapability)(a)||(0,l.hasReadWriteCapability)(a))return a;throw new Error(`Filesystem provider for scheme '${t.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(t,a){try{return await this.doResolveFile(t,a)}catch(s){throw(0,l.toFileSystemProviderErrorCode)(s)===l.FileSystemProviderErrorCode.FileNotFound?new l.FileOperationError((0,E.localize)(2,null,this.resourceForError(t)),1):(0,l.ensureFileSystemProviderError)(s)}}async doResolveFile(t,a){const s=await this.withProvider(t),i=this.isPathCaseSensitive(s),n=a?.resolveTo,o=a?.resolveSingleChildDescendants,S=a?.resolveMetadata,k=await s.stat(t);let M;return this.toFileStat(s,t,k,void 0,!!S,(C,A)=>(M||(M=m.TernarySearchTree.forUris(()=>!i),M.set(t,!0),n&&M.fill(!0,n)),M.get(C.resource)||M.findSuperstr(C.resource.with({query:null,fragment:null}))?!0:C.isDirectory&&o?A===1:!1))}async toFileStat(t,a,s,i,n,o){const{providerExtUri:S}=this.getExtUri(t),k={resource:a,name:S.basename(a),isFile:(s.type&l.FileType.File)!==0,isDirectory:(s.type&l.FileType.Directory)!==0,isSymbolicLink:(s.type&l.FileType.SymbolicLink)!==0,mtime:s.mtime,ctime:s.ctime,size:s.size,readonly:!!((s.permissions??0)&l.FilePermission.Readonly)||!!(t.capabilities&2048),locked:!!((s.permissions??0)&l.FilePermission.Locked),etag:(0,l.etag)({mtime:s.mtime,size:s.size}),children:void 0};if(k.isDirectory&&o(k,i)){try{const M=await t.readdir(a),C=await L.Promises.settled(M.map(async([A,T])=>{try{const F=S.joinPath(a,A),z=n?await t.stat(F):{type:T};return await this.toFileStat(t,F,z,M.length,n,o)}catch(F){return this.logService.trace(F),null}}));k.children=(0,b.coalesce)(C)}catch(M){this.logService.trace(M),k.children=[]}return k}return k}async resolveAll(t){return L.Promises.settled(t.map(async a=>{try{return{stat:await this.doResolveFile(a.resource,a.options),success:!0}}catch(s){return this.logService.trace(s),{stat:void 0,success:!1}}}))}async stat(t){const a=await this.withProvider(t),s=await a.stat(t);return this.toFileStat(a,t,s,void 0,!0,()=>!1)}async exists(t){const a=await this.withProvider(t);try{return!!await a.stat(t)}catch{return!1}}async canCreateFile(t,a){try{await this.doValidateCreateFile(t,a)}catch(s){return s}return!0}async doValidateCreateFile(t,a){if(!a?.overwrite&&await this.exists(t))throw new l.FileOperationError((0,E.localize)(3,null,this.resourceForError(t)),3,a)}async createFile(t,a=r.VSBuffer.fromString(""),s){await this.doValidateCreateFile(t,s);const i=await this.writeFile(t,a);return this._onDidRunOperation.fire(new l.FileOperationEvent(t,0,i)),i}async writeFile(t,a,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),{providerExtUri:n}=this.getExtUri(i);try{await this.validateWriteFile(i,t,s)||await this.mkdirp(i,n.dirname(t));let S;if((0,l.hasReadWriteCapability)(i)&&!(a instanceof r.VSBuffer))if((0,y.isReadableStream)(a)){const k=await(0,y.peekStream)(a,3);k.ended?S=r.VSBuffer.concat(k.buffer):S=k}else S=(0,y.peekReadable)(a,k=>r.VSBuffer.concat(k),3);else S=a;if(!(0,l.hasOpenReadWriteCloseCapability)(i)||(0,l.hasReadWriteCapability)(i)&&S instanceof r.VSBuffer)await this.doWriteUnbuffered(i,t,s,S);else{const k=S instanceof r.VSBuffer?(0,r.bufferToReadable)(S):S;s?.atomic!==!1&&s?.atomic?.postfix?await this.doWriteBufferedAtomic(i,t,(0,d.joinPath)((0,d.dirname)(t),`${(0,d.basename)(t)}${s.atomic.postfix}`),s,k):await this.doWriteBuffered(i,t,s,k)}this._onDidRunOperation.fire(new l.FileOperationEvent(t,4))}catch(o){throw new l.FileOperationError((0,E.localize)(4,null,this.resourceForError(t),(0,l.ensureFileSystemProviderError)(o).toString()),(0,l.toFileOperationResult)(o),s)}return this.resolve(t,{resolveMetadata:!0})}async validateWriteFile(t,a,s){const i=!!s?.unlock;if(i&&!(t.capabilities&8192))throw new Error((0,E.localize)(5,null,this.resourceForError(a)));if(!!s?.atomic){if(!(t.capabilities&32768))throw new Error((0,E.localize)(6,null,this.resourceForError(a)));if(i)throw new Error((0,E.localize)(7,null,this.resourceForError(a)))}let o;try{o=await t.stat(a)}catch{return}if(o.type&l.FileType.Directory)throw new l.FileOperationError((0,E.localize)(8,null,this.resourceForError(a)),0,s);if(this.throwIfFileIsReadonly(a,o),typeof s?.mtime=="number"&&typeof s.etag=="string"&&s.etag!==l.ETAG_DISABLED&&typeof o.mtime=="number"&&typeof o.size=="number"&&s.mtime<o.mtime&&s.etag!==(0,l.etag)({mtime:s.mtime,size:o.size}))throw new l.FileOperationError((0,E.localize)(9,null),3,s);return o}async readFile(t,a,s){const i=await this.withReadProvider(t);return a?.atomic?this.doReadFileAtomic(i,t,a,s):this.doReadFile(i,t,a,s)}async doReadFileAtomic(t,a,s,i){return new Promise((n,o)=>{this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(async()=>{try{const S=await this.doReadFile(t,a,s,i);n(S)}catch(S){o(S)}})})}async doReadFile(t,a,s,i){const n=await this.doReadFileStream(t,a,{...s,preferUnbuffered:!0},i);return{...n,value:await(0,r.streamToBuffer)(n.value)}}async readFileStream(t,a,s){const i=await this.withReadProvider(t);return this.doReadFileStream(i,t,a,s)}async doReadFileStream(t,a,s,i){const n=new O.CancellationTokenSource(i),o=this.validateReadFile(a,s).then(k=>k,k=>{throw n.cancel(),k});let S;try{return typeof s?.etag=="string"&&s.etag!==l.ETAG_DISABLED&&await o,s?.atomic&&(0,l.hasFileAtomicReadCapability)(t)||!((0,l.hasOpenReadWriteCloseCapability)(t)||(0,l.hasFileReadStreamCapability)(t))||(0,l.hasReadWriteCapability)(t)&&s?.preferUnbuffered?S=this.readFileUnbuffered(t,a,s):(0,l.hasFileReadStreamCapability)(t)?S=this.readFileStreamed(t,a,n.token,s):S=this.readFileBuffered(t,a,n.token,s),{...await o,value:S}}catch(k){throw S&&await(0,y.consumeStream)(S),this.restoreReadError(k,a,s)}}restoreReadError(t,a,s){const i=(0,E.localize)(10,null,this.resourceForError(a),(0,l.ensureFileSystemProviderError)(t).toString());return t instanceof l.NotModifiedSinceFileOperationError?new l.NotModifiedSinceFileOperationError(i,t.stat,s):t instanceof l.TooLargeFileOperationError?new l.TooLargeFileOperationError(i,t.fileOperationResult,t.size,t.options):new l.FileOperationError(i,(0,l.toFileOperationResult)(t),s)}readFileStreamed(t,a,s,i=Object.create(null)){const n=t.readFileStream(a,i,s);return(0,y.transform)(n,{data:o=>o instanceof r.VSBuffer?o:r.VSBuffer.wrap(o),error:o=>this.restoreReadError(o,a,i)},o=>r.VSBuffer.concat(o))}readFileBuffered(t,a,s,i=Object.create(null)){const n=(0,r.newWriteableBufferStream)();return(0,p.readFileIntoStream)(t,a,n,o=>o,{...i,bufferSize:this.BUFFER_SIZE,errorTransformer:o=>this.restoreReadError(o,a,i)},s),n}readFileUnbuffered(t,a,s){const i=(0,y.newWriteableStream)(n=>r.VSBuffer.concat(n));return(async()=>{try{let n;s?.atomic&&(0,l.hasFileAtomicReadCapability)(t)?n=await t.readFile(a,{atomic:!0}):n=await t.readFile(a),typeof s?.position=="number"&&(n=n.slice(s.position)),typeof s?.length=="number"&&(n=n.slice(0,s.length)),this.validateReadFileLimits(a,n.byteLength,s),i.end(r.VSBuffer.wrap(n))}catch(n){i.error(n),i.end()}})(),i}async validateReadFile(t,a){const s=await this.resolve(t,{resolveMetadata:!0});if(s.isDirectory)throw new l.FileOperationError((0,E.localize)(11,null,this.resourceForError(t)),0,a);if(typeof a?.etag=="string"&&a.etag!==l.ETAG_DISABLED&&a.etag===s.etag)throw new l.NotModifiedSinceFileOperationError((0,E.localize)(12,null),s,a);return this.validateReadFileLimits(t,s.size,a),s}validateReadFileLimits(t,a,s){if(typeof s?.limits?.size=="number"&&a>s.limits.size)throw new l.TooLargeFileOperationError((0,E.localize)(13,null,this.resourceForError(t)),7,a,s)}async canMove(t,a,s){return this.doCanMoveCopy(t,a,"move",s)}async canCopy(t,a,s){return this.doCanMoveCopy(t,a,"copy",s)}async doCanMoveCopy(t,a,s,i){if(t.toString()!==a.toString())try{const n=s==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t):await this.withReadProvider(t),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a);await this.doValidateMoveCopy(n,t,o,a,s,i)}catch(n){return n}return!0}async move(t,a,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),n=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),o=await this.doMoveCopy(i,t,n,a,"move",!!s),S=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,o==="move"?2:3,S)),S}async copy(t,a,s){const i=await this.withReadProvider(t),n=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),o=await this.doMoveCopy(i,t,n,a,"copy",!!s),S=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,o==="copy"?3:2,S)),S}async doMoveCopy(t,a,s,i,n,o){if(a.toString()===i.toString())return n;const{exists:S,isSameResourceWithDifferentPathCase:k}=await this.doValidateMoveCopy(t,a,s,i,n,o);if(S&&!k&&o&&await this.del(i,{recursive:!0}),await this.mkdirp(s,this.getExtUri(s).providerExtUri.dirname(i)),n==="copy"){if(t===s&&(0,l.hasFileFolderCopyCapability)(t))await t.copy(a,i,{overwrite:o});else{const M=await this.resolve(a);M.isDirectory?await this.doCopyFolder(t,M,s,i):await this.doCopyFile(t,a,s,i)}return n}else return t===s?(await t.rename(a,i,{overwrite:o}),n):(await this.doMoveCopy(t,a,s,i,"copy",o),await this.del(a,{recursive:!0}),"copy")}async doCopyFile(t,a,s,i){if((0,l.hasOpenReadWriteCloseCapability)(t)&&(0,l.hasOpenReadWriteCloseCapability)(s))return this.doPipeBuffered(t,a,s,i);if((0,l.hasOpenReadWriteCloseCapability)(t)&&(0,l.hasReadWriteCapability)(s))return this.doPipeBufferedToUnbuffered(t,a,s,i);if((0,l.hasReadWriteCapability)(t)&&(0,l.hasOpenReadWriteCloseCapability)(s))return this.doPipeUnbufferedToBuffered(t,a,s,i);if((0,l.hasReadWriteCapability)(t)&&(0,l.hasReadWriteCapability)(s))return this.doPipeUnbuffered(t,a,s,i)}async doCopyFolder(t,a,s,i){await s.mkdir(i),Array.isArray(a.children)&&await L.Promises.settled(a.children.map(async n=>{const o=this.getExtUri(s).providerExtUri.joinPath(i,n.name);return n.isDirectory?this.doCopyFolder(t,await this.resolve(n.resource),s,o):this.doCopyFile(t,n.resource,s,o)}))}async doValidateMoveCopy(t,a,s,i,n,o){let S=!1;if(t===s){const{providerExtUri:M,isPathCaseSensitive:C}=this.getExtUri(t);if(C||(S=M.isEqual(a,i)),S&&n==="copy")throw new Error((0,E.localize)(14,null,this.resourceForError(a),this.resourceForError(i)));if(!S&&M.isEqualOrParent(i,a))throw new Error((0,E.localize)(15,null,this.resourceForError(a),this.resourceForError(i)))}const k=await this.exists(i);if(k&&!S){if(!o)throw new l.FileOperationError((0,E.localize)(16,null,this.resourceForError(a),this.resourceForError(i)),4);if(t===s){const{providerExtUri:M}=this.getExtUri(t);if(M.isEqualOrParent(a,i))throw new Error((0,E.localize)(17,null,this.resourceForError(a),this.resourceForError(i)))}}return{exists:k,isSameResourceWithDifferentPathCase:S}}getExtUri(t){const a=this.isPathCaseSensitive(t);return{providerExtUri:a?d.extUri:d.extUriIgnorePathCase,isPathCaseSensitive:a}}isPathCaseSensitive(t){return!!(t.capabilities&1024)}async createFolder(t){const a=this.throwIfFileSystemIsReadonly(await this.withProvider(t),t);await this.mkdirp(a,t);const s=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,0,s)),s}async mkdirp(t,a){const s=[],{providerExtUri:i}=this.getExtUri(t);for(;!i.isEqual(a,i.dirname(a));)try{if(!((await t.stat(a)).type&l.FileType.Directory))throw new Error((0,E.localize)(18,null,this.resourceForError(a)));break}catch(n){if((0,l.toFileSystemProviderErrorCode)(n)!==l.FileSystemProviderErrorCode.FileNotFound)throw n;s.push(i.basename(a)),a=i.dirname(a)}for(let n=s.length-1;n>=0;n--){a=i.joinPath(a,s[n]);try{await t.mkdir(a)}catch(o){if((0,l.toFileSystemProviderErrorCode)(o)!==l.FileSystemProviderErrorCode.FileExists)throw o}}}async canDelete(t,a){try{await this.doValidateDelete(t,a)}catch(s){return s}return!0}async doValidateDelete(t,a){const s=this.throwIfFileSystemIsReadonly(await this.withProvider(t),t),i=!!a?.useTrash;if(i&&!(s.capabilities&4096))throw new Error((0,E.localize)(19,null,this.resourceForError(t)));const n=a?.atomic;if(n&&!(s.capabilities&65536))throw new Error((0,E.localize)(20,null,this.resourceForError(t)));if(i&&n)throw new Error((0,E.localize)(21,null,this.resourceForError(t)));let o;try{o=await s.stat(t)}catch{}if(o)this.throwIfFileIsReadonly(t,o);else throw new l.FileOperationError((0,E.localize)(22,null,this.resourceForError(t)),1);if(!!!a?.recursive){const k=await this.resolve(t);if(k.isDirectory&&Array.isArray(k.children)&&k.children.length>0)throw new Error((0,E.localize)(23,null,this.resourceForError(t)))}return s}async del(t,a){const s=await this.doValidateDelete(t,a),i=!!a?.useTrash,n=!!a?.recursive,o=a?.atomic??!1;await s.delete(t,{recursive:n,useTrash:i,atomic:o}),this._onDidRunOperation.fire(new l.FileOperationEvent(t,1))}async cloneFile(t,a){const s=await this.withProvider(t),i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a);if(s===i&&this.getExtUri(s).providerExtUri.isEqual(t,a))return;if(s===i&&(0,l.hasFileCloneCapability)(s))return s.cloneFile(t,a);await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(a));const n=this.writeQueue.queueFor(t,this.getExtUri(s).providerExtUri);return s===i&&(0,l.hasFileFolderCopyCapability)(s)?n.queue(()=>s.copy(t,a,{overwrite:!0})):n.queue(()=>this.doCopyFile(s,t,i,a))}watch(t,a={recursive:!1,excludes:[]}){const s=new u.DisposableStore;let i=!1,n=()=>{i=!0};return s.add((0,u.toDisposable)(()=>n())),(async()=>{try{const o=await this.doWatch(t,a);i?(0,u.dispose)(o):n=()=>(0,u.dispose)(o)}catch(o){this.logService.error(o)}})(),s}async doWatch(t,a){const s=await this.withProvider(t),i=(0,P.hash)([this.getExtUri(s).providerExtUri.getComparisonKey(t),a]);let n=this.activeWatchers.get(i);return n||(n={count:0,disposable:s.watch(t,a)},this.activeWatchers.set(i,n)),n.count+=1,(0,u.toDisposable)(()=>{n&&(n.count--,n.count===0&&((0,u.dispose)(n.disposable),this.activeWatchers.delete(i)))})}dispose(){super.dispose();for(const[,t]of this.activeWatchers)(0,u.dispose)(t.disposable);this.activeWatchers.clear()}async doWriteBufferedAtomic(t,a,s,i,n){await this.doWriteBuffered(t,s,i,n);try{await t.rename(s,a,{overwrite:!0})}catch(o){try{await t.delete(s,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw o}}async doWriteBuffered(t,a,s,i){return this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(async()=>{const n=await t.open(a,{create:!0,unlock:s?.unlock??!1});try{(0,y.isReadableStream)(i)||(0,y.isReadableBufferedStream)(i)?await this.doWriteStreamBufferedQueued(t,n,i):await this.doWriteReadableBufferedQueued(t,n,i)}catch(o){throw(0,l.ensureFileSystemProviderError)(o)}finally{await t.close(n)}})}async doWriteStreamBufferedQueued(t,a,s){let i=0,n;if((0,y.isReadableBufferedStream)(s)){if(s.buffer.length>0){const o=r.VSBuffer.concat(s.buffer);await this.doWriteBuffer(t,a,o,o.byteLength,i,0),i+=o.byteLength}if(s.ended)return;n=s.stream}else n=s;return new Promise((o,S)=>{(0,y.listenStream)(n,{onData:async k=>{n.pause();try{await this.doWriteBuffer(t,a,k,k.byteLength,i,0)}catch(M){return S(M)}i+=k.byteLength,setTimeout(()=>n.resume())},onError:k=>S(k),onEnd:()=>o()})})}async doWriteReadableBufferedQueued(t,a,s){let i=0,n;for(;(n=s.read())!==null;)await this.doWriteBuffer(t,a,n,n.byteLength,i,0),i+=n.byteLength}async doWriteBuffer(t,a,s,i,n,o){let S=0;for(;S<i;){const k=await t.write(a,n+S,s.buffer,o+S,i-S);S+=k}}async doWriteUnbuffered(t,a,s,i){return this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(()=>this.doWriteUnbufferedQueued(t,a,s,i))}async doWriteUnbufferedQueued(t,a,s,i){let n;i instanceof r.VSBuffer?n=i:(0,y.isReadableStream)(i)?n=await(0,r.streamToBuffer)(i):(0,y.isReadableBufferedStream)(i)?n=await(0,r.bufferedStreamToBuffer)(i):n=(0,r.readableToBuffer)(i),await t.writeFile(a,n.buffer,{create:!0,overwrite:!0,unlock:s?.unlock??!1,atomic:s?.atomic??!1})}async doPipeBuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeBufferedQueued(t,a,s,i))}async doPipeBufferedQueued(t,a,s,i){let n,o;try{n=await t.open(a,{create:!1}),o=await s.open(i,{create:!0,unlock:!1});const S=r.VSBuffer.alloc(this.BUFFER_SIZE);let k=0,M=0,C=0;do C=await t.read(n,k,S.buffer,M,S.byteLength-M),await this.doWriteBuffer(s,o,S,C,k,M),k+=C,M+=C,M===S.byteLength&&(M=0);while(C>0)}catch(S){throw(0,l.ensureFileSystemProviderError)(S)}finally{await L.Promises.settled([typeof n=="number"?t.close(n):Promise.resolve(),typeof o=="number"?s.close(o):Promise.resolve()])}}async doPipeUnbuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(t,a,s,i))}async doPipeUnbufferedQueued(t,a,s,i){return s.writeFile(i,await t.readFile(a),{create:!0,overwrite:!0,unlock:!1,atomic:!1})}async doPipeUnbufferedToBuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(t,a,s,i))}async doPipeUnbufferedToBufferedQueued(t,a,s,i){const n=await s.open(i,{create:!0,unlock:!1});try{const o=await t.readFile(a);await this.doWriteBuffer(s,n,r.VSBuffer.wrap(o),o.byteLength,0,0)}catch(o){throw(0,l.ensureFileSystemProviderError)(o)}finally{await s.close(n)}}async doPipeBufferedToUnbuffered(t,a,s,i){const n=await(0,r.streamToBuffer)(this.readFileBuffered(t,a,O.CancellationToken.None));await this.doWriteUnbuffered(s,i,void 0,n)}throwIfFileSystemIsReadonly(t,a){if(t.capabilities&2048)throw new l.FileOperationError((0,E.localize)(24,null,this.resourceForError(a)),6);return t}throwIfFileIsReadonly(t,a){if((a.permissions??0)&l.FilePermission.Readonly)throw new l.FileOperationError((0,E.localize)(25,null,this.resourceForError(t)),6)}resourceForError(t){return t.scheme===g.Schemas.file?t.fsPath:t.toString(!0)}};e.FileService=I,e.FileService=I=be([X(0,c.ILogService)],I)}),define(Z[95],te([0,1,45,313,8,35,17,3,32,2,10,4,19,56,21,180,16,121,222,50,217,216]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0,(()=>{try{(0,L.gracefulify)(b)}catch(a){console.error(`Error enabling graceful-fs: ${(0,f.toErrorMessage)(a)}`)}})();class t extends c.AbstractDiskFileSystemProvider{static{this.TRACE_LOG_RESOURCE_LOCKS=!1}constructor(s,i){super(s,i),this.onDidChangeCapabilities=P.Event.None,this.resourceLocks=new O.ResourceMap(n=>v.extUriBiasedIgnorePathCase.getComparisonKey(n)),this.mapHandleToPos=new Map,this.mapHandleToLock=new Map,this.writeHandles=new Map}get capabilities(){return this._capabilities||(this._capabilities=253982,g.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(s){try{const{stat:i,symbolicLink:n}=await y.SymlinkSupport.stat(this.toFilePath(s));return{type:this.toType(i,n),ctime:i.birthtime.getTime(),mtime:i.mtime.getTime(),size:i.size,permissions:i.mode&128?void 0:l.FilePermission.Locked}}catch(i){throw this.toFileSystemProviderError(i)}}async statIgnoreError(s){try{return await this.stat(s)}catch{return}}async readdir(s){try{const i=await y.Promises.readdir(this.toFilePath(s),{withFileTypes:!0}),n=[];return await Promise.all(i.map(async o=>{try{let S;o.isSymbolicLink()?S=(await this.stat((0,v.joinPath)(s,o.name))).type:S=this.toType(o),n.push([o.name,S])}catch(S){this.logService.trace(S)}})),n}catch(i){throw this.toFileSystemProviderError(i)}}toType(s,i){let n;return i?.dangling?n=l.FileType.Unknown:s.isFile()?n=l.FileType.File:s.isDirectory()?n=l.FileType.Directory:n=l.FileType.Unknown,i&&(n|=l.FileType.SymbolicLink),n}async createResourceLock(s){const i=this.toFilePath(s);this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${i})`);let n;for(;n=this.resourceLocks.get(s);)this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${i})`),await n.wait();const o=new r.Barrier;return this.resourceLocks.set(s,o),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${i})`),(0,u.toDisposable)(()=>{this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${i})`),this.resourceLocks.get(s)===o&&(this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${i})`),this.resourceLocks.delete(s)),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${i})`),o.open()})}async readFile(s,i){let n;try{i?.atomic&&(this.traceLock(`[Disk FileSystemProvider]: atomic read operation started (${this.toFilePath(s)})`),n=await this.createResourceLock(s));const o=this.toFilePath(s);return await y.Promises.readFile(o)}catch(o){throw this.toFileSystemProviderError(o)}finally{n?.dispose()}}traceLock(s){t.TRACE_LOG_RESOURCE_LOCKS&&this.logService.trace(s)}readFileStream(s,i,n){const o=(0,d.newWriteableStream)(S=>D.VSBuffer.concat(S.map(k=>D.VSBuffer.wrap(k))).buffer);return(0,p.readFileIntoStream)(this,s,o,S=>S.buffer,{...i,bufferSize:256*1024},n),o}async writeFile(s,i,n){return n?.atomic!==!1&&n?.atomic?.postfix?this.doWriteFileAtomic(s,(0,v.joinPath)((0,v.dirname)(s),`${(0,v.basename)(s)}${n.atomic.postfix}`),i,n):this.doWriteFile(s,i,n)}async doWriteFileAtomic(s,i,n,o){await this.doWriteFile(i,n,o);try{await this.rename(i,s,{overwrite:!0})}catch(S){try{await this.delete(i,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw S}}async doWriteFile(s,i,n){let o;try{const S=this.toFilePath(s);if(!n.create||!n.overwrite){if(await y.Promises.exists(S)){if(!n.overwrite)throw(0,l.createFileSystemProviderError)((0,E.localize)(0,null),l.FileSystemProviderErrorCode.FileExists)}else if(!n.create)throw(0,l.createFileSystemProviderError)((0,E.localize)(1,null),l.FileSystemProviderErrorCode.FileNotFound)}o=await this.open(s,{create:!0,unlock:n.unlock}),await this.write(o,0,i,0,i.byteLength)}catch(S){throw await this.toFileSystemProviderWriteError(s,S)}finally{typeof o=="number"&&await this.close(o)}}static{this.canFlush=!0}static configureFlushOnWrite(s){t.canFlush=s}async open(s,i){const n=this.toFilePath(s);let o;(0,l.isFileOpenForWriteOptions)(i)&&(o=await this.createResourceLock(s));let S;try{if((0,l.isFileOpenForWriteOptions)(i)&&i.unlock)try{const{stat:M}=await y.SymlinkSupport.stat(n);M.mode&128||await y.Promises.chmod(n,M.mode|128)}catch(M){M.code!=="ENOENT"&&this.logService.trace(M)}let k;if((0,l.isFileOpenForWriteOptions)(i)){if(g.isWindows)try{await y.Promises.truncate(n,0),k="r+"}catch(M){M.code!=="ENOENT"&&this.logService.trace(M)}k||(k="w")}else k="r";S=await y.Promises.open(n,k)}catch(k){throw o?.dispose(),(0,l.isFileOpenForWriteOptions)(i)?await this.toFileSystemProviderWriteError(s,k):this.toFileSystemProviderError(k)}if(this.mapHandleToPos.set(S,0),(0,l.isFileOpenForWriteOptions)(i)&&this.writeHandles.set(S,s),o){const k=this.mapHandleToLock.get(S);this.traceLock(`[Disk FileSystemProvider]: open() - storing lock for handle ${S} (${n})`),this.mapHandleToLock.set(S,o),k&&(this.traceLock(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${S} (${n})`),k.dispose())}return S}async close(s){const i=this.mapHandleToLock.get(s);try{if(this.mapHandleToPos.delete(s),this.writeHandles.delete(s)&&t.canFlush)try{await y.Promises.fdatasync(s)}catch(n){t.configureFlushOnWrite(!1),this.logService.error(n)}return await y.Promises.close(s)}catch(n){throw this.toFileSystemProviderError(n)}finally{i&&(this.mapHandleToLock.get(s)===i&&(this.traceLock(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${s}`),this.mapHandleToLock.delete(s)),this.traceLock(`[Disk FileSystemProvider]: close() - disposing lock for handle ${s}`),i.dispose())}}async read(s,i,n,o,S){const k=this.normalizePos(s,i);let M=null;try{M=(await y.Promises.read(s,n,o,S,k)).bytesRead}catch(C){throw this.toFileSystemProviderError(C)}finally{this.updatePos(s,k,M)}return M}normalizePos(s,i){return i===this.mapHandleToPos.get(s)?null:i}updatePos(s,i,n){const o=this.mapHandleToPos.get(s);typeof o=="number"&&(typeof i=="number"||(typeof n=="number"?this.mapHandleToPos.set(s,o+n):this.mapHandleToPos.delete(s)))}async write(s,i,n,o,S){return(0,r.retry)(()=>this.doWrite(s,i,n,o,S),100,3)}async doWrite(s,i,n,o,S){const k=this.normalizePos(s,i);let M=null;try{M=(await y.Promises.write(s,n,o,S,k)).bytesWritten}catch(C){throw await this.toFileSystemProviderWriteError(this.writeHandles.get(s),C)}finally{this.updatePos(s,k,M)}return M}async mkdir(s){try{await y.Promises.mkdir(this.toFilePath(s))}catch(i){throw this.toFileSystemProviderError(i)}}async delete(s,i){try{const n=this.toFilePath(s);if(i.recursive){let o;i?.atomic!==!1&&i.atomic.postfix&&(o=(0,m.join)((0,m.dirname)(n),`${(0,m.basename)(n)}${i.atomic.postfix}`)),await y.Promises.rm(n,y.RimRafMode.MOVE,o)}else try{await y.Promises.unlink(n)}catch(o){if(o.code==="EPERM"||o.code==="EISDIR"){let S=!1;try{const{stat:k,symbolicLink:M}=await y.SymlinkSupport.stat(n);S=k.isDirectory()&&!M}catch{}if(S)await y.Promises.rmdir(n);else throw o}else throw o}}catch(n){throw this.toFileSystemProviderError(n)}}async rename(s,i,n){const o=this.toFilePath(s),S=this.toFilePath(i);if(o!==S)try{await this.validateMoveCopy(s,i,"move",n.overwrite),await y.Promises.rename(o,S)}catch(k){throw(k.code==="EINVAL"||k.code==="EBUSY"||k.code==="ENAMETOOLONG")&&(k=new Error((0,E.localize)(2,null,(0,m.basename)(o),(0,m.basename)((0,m.dirname)(S)),k.toString()))),this.toFileSystemProviderError(k)}}async copy(s,i,n){const o=this.toFilePath(s),S=this.toFilePath(i);if(o!==S)try{await this.validateMoveCopy(s,i,"copy",n.overwrite),await y.Promises.copy(o,S,{preserveSymlinks:!0})}catch(k){throw(k.code==="EINVAL"||k.code==="EBUSY"||k.code==="ENAMETOOLONG")&&(k=new Error((0,E.localize)(3,null,(0,m.basename)(o),(0,m.basename)((0,m.dirname)(S)),k.toString()))),this.toFileSystemProviderError(k)}}async validateMoveCopy(s,i,n,o){const S=this.toFilePath(s),k=this.toFilePath(i);let M=!1;if(!!(this.capabilities&1024)||(M=(0,h.isEqual)(S,k,!0)),M){if(n==="copy")throw(0,l.createFileSystemProviderError)((0,E.localize)(4,null),l.FileSystemProviderErrorCode.FileExists);if(n==="move")return}const A=await this.statIgnoreError(s);if(!A)throw(0,l.createFileSystemProviderError)((0,E.localize)(5,null),l.FileSystemProviderErrorCode.FileNotFound);const T=await this.statIgnoreError(i);if(T){if(!o)throw(0,l.createFileSystemProviderError)((0,E.localize)(6,null),l.FileSystemProviderErrorCode.FileExists);A.type&l.FileType.File&&T.type&l.FileType.File||await this.delete(i,{recursive:!0,useTrash:!1,atomic:!1})}}async cloneFile(s,i){return this.doCloneFile(s,i,!1)}async doCloneFile(s,i,n){const o=this.toFilePath(s),S=this.toFilePath(i),k=!!(this.capabilities&1024);if((0,h.isEqual)(o,S,!k))return;const M=new u.DisposableStore;try{const[C,A]=await Promise.all([this.createResourceLock(s),this.createResourceLock(i)]);M.add(C),M.add(A),n&&await y.Promises.mkdir((0,m.dirname)(S),{recursive:!0}),await y.Promises.copyFile(o,S)}catch(C){if(C.code==="ENOENT"&&!n)return this.doCloneFile(s,i,!0);throw this.toFileSystemProviderError(C)}finally{M.dispose()}}createUniversalWatcher(s,i,n){return new I.UniversalWatcherClient(o=>s(o),o=>i(o),n)}createNonRecursiveWatcher(s,i,n){return new w.NodeJSWatcherClient(o=>s(o),o=>i(o),n)}toFileSystemProviderError(s){if(s instanceof l.FileSystemProviderError)return s;let i=s,n;switch(s.code){case"ENOENT":n=l.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":n=l.FileSystemProviderErrorCode.FileIsADirectory;break;case"ENOTDIR":n=l.FileSystemProviderErrorCode.FileNotADirectory;break;case"EEXIST":n=l.FileSystemProviderErrorCode.FileExists;break;case"EPERM":case"EACCES":n=l.FileSystemProviderErrorCode.NoPermissions;break;case"ERR_UNC_HOST_NOT_ALLOWED":i=`${s.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`,n=l.FileSystemProviderErrorCode.Unknown;break;default:n=l.FileSystemProviderErrorCode.Unknown}return(0,l.createFileSystemProviderError)(i,n)}async toFileSystemProviderWriteError(s,i){let n=this.toFileSystemProviderError(i);if(s&&n.code===l.FileSystemProviderErrorCode.NoPermissions)try{const{stat:o}=await y.SymlinkSupport.stat(this.toFilePath(s));o.mode&128||(n=(0,l.createFileSystemProviderError)(i,l.FileSystemProviderErrorCode.FileWriteLocked))}catch(o){this.logService.trace(o)}return n}}e.DiskFileSystemProvider=t}),define(Z[224],te([0,1,3,95,2,17,56,23]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSessionFileWatcher=e.AbstractDiskFileSystemProviderChannel=void 0;class h extends r.Disposable{constructor(g,v){super(),this.provider=g,this.logService=v,this.sessionToWatcher=new Map,this.watchRequests=new Map}call(g,v,d){const y=this.getUriTransformer(g);switch(v){case"stat":return this.stat(y,d[0]);case"readdir":return this.readdir(y,d[0]);case"open":return this.open(y,d[0],d[1]);case"close":return this.close(d[0]);case"read":return this.read(d[0],d[1],d[2]);case"readFile":return this.readFile(y,d[0],d[1]);case"write":return this.write(d[0],d[1],d[2],d[3],d[4]);case"writeFile":return this.writeFile(y,d[0],d[1],d[2]);case"rename":return this.rename(y,d[0],d[1],d[2]);case"copy":return this.copy(y,d[0],d[1],d[2]);case"cloneFile":return this.cloneFile(y,d[0],d[1]);case"mkdir":return this.mkdir(y,d[0]);case"delete":return this.delete(y,d[0],d[1]);case"watch":return this.watch(y,d[0],d[1],d[2],d[3]);case"unwatch":return this.unwatch(d[0],d[1])}throw new Error(`IPC Command ${v} not found`)}listen(g,v,d){const y=this.getUriTransformer(g);switch(v){case"fileChange":return this.onFileChange(y,d[0]);case"readFileStream":return this.onReadFileStream(y,d[0],d[1])}throw new Error(`Unknown event ${v}`)}stat(g,v){const d=this.transformIncoming(g,v,!0);return this.provider.stat(d)}readdir(g,v){const d=this.transformIncoming(g,v);return this.provider.readdir(d)}async readFile(g,v,d){const y=this.transformIncoming(g,v,!0),E=await this.provider.readFile(y,d);return O.VSBuffer.wrap(E)}onReadFileStream(g,v,d){const y=this.transformIncoming(g,v,!0),E=new P.CancellationTokenSource,l=new b.Emitter({onDidRemoveLastListener:()=>{E.cancel()}}),p=this.provider.readFileStream(y,d,E.token);return(0,D.listenStream)(p,{onData:c=>l.fire(O.VSBuffer.wrap(c)),onError:c=>l.fire(c),onEnd:()=>{l.fire("end"),l.dispose(),E.dispose()}}),l.event}writeFile(g,v,d,y){const E=this.transformIncoming(g,v);return this.provider.writeFile(E,d.buffer,y)}open(g,v,d){const y=this.transformIncoming(g,v,!0);return this.provider.open(y,d)}close(g){return this.provider.close(g)}async read(g,v,d){const y=O.VSBuffer.alloc(d),E=0,l=await this.provider.read(g,v,y.buffer,E,d);return[y,l]}write(g,v,d,y,E){return this.provider.write(g,v,d.buffer,y,E)}mkdir(g,v){const d=this.transformIncoming(g,v);return this.provider.mkdir(d)}delete(g,v,d){const y=this.transformIncoming(g,v);return this.provider.delete(y,d)}rename(g,v,d,y){const E=this.transformIncoming(g,v),l=this.transformIncoming(g,d);return this.provider.rename(E,l,y)}copy(g,v,d,y){const E=this.transformIncoming(g,v),l=this.transformIncoming(g,d);return this.provider.copy(E,l,y)}cloneFile(g,v,d){const y=this.transformIncoming(g,v),E=this.transformIncoming(g,d);return this.provider.cloneFile(y,E)}onFileChange(g,v){const d=new b.Emitter({onWillAddFirstListener:()=>{this.sessionToWatcher.set(v,this.createSessionFileWatcher(g,d))},onDidRemoveLastListener:()=>{(0,r.dispose)(this.sessionToWatcher.get(v)),this.sessionToWatcher.delete(v)}});return d.event}async watch(g,v,d,y,E){const l=this.sessionToWatcher.get(v);if(l){const p=this.transformIncoming(g,y),c=l.watch(d,p,E);this.watchRequests.set(v+d,c)}}async unwatch(g,v){const d=g+v,y=this.watchRequests.get(d);y&&((0,r.dispose)(y),this.watchRequests.delete(d))}dispose(){super.dispose();for(const[,g]of this.watchRequests)g.dispose();this.watchRequests.clear();for(const[,g]of this.sessionToWatcher)g.dispose();this.sessionToWatcher.clear()}}e.AbstractDiskFileSystemProviderChannel=h;class u extends r.Disposable{constructor(g,v,d,y){super(),this.uriTransformer=g,this.logService=d,this.environmentService=y,this.watcherRequests=new Map,this.fileWatcher=this._register(new L.DiskFileSystemProvider(this.logService,{watcher:{recursive:this.getRecursiveWatcherOptions(this.environmentService)}})),this.registerListeners(v)}registerListeners(g){const v=this._register(new b.Emitter);this._register(v.event(d=>{g.fire(d.map(y=>({resource:this.uriTransformer.transformOutgoingURI(y.resource),type:y.type})))})),this._register(this.fileWatcher.onDidChangeFile(d=>v.fire(d))),this._register(this.fileWatcher.onDidWatchError(d=>g.fire(d)))}getRecursiveWatcherOptions(g){}getExtraExcludes(g){}watch(g,v,d){const y=this.getExtraExcludes(this.environmentService);return Array.isArray(y)&&(d.excludes=[...d.excludes,...y]),this.watcherRequests.set(g,this.fileWatcher.watch(v,d)),(0,r.toDisposable)(()=>{(0,r.dispose)(this.watcherRequests.get(g)),this.watcherRequests.delete(g)})}dispose(){super.dispose();for(const[,g]of this.watcherRequests)g.dispose();this.watcherRequests.clear()}}e.AbstractSessionFileWatcher=u}),define(Z[225],te([0,1,14,179,4,7,16,10,224,157]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderChannel=void 0;class m extends h.AbstractDiskFileSystemProviderChannel{constructor(d,y,E){super(d,y),this.environmentService=E}getUriTransformer(d){return u.DefaultURITransformer}transformIncoming(d,y){return O.URI.revive(y)}async delete(d,y,E){if(!E.useTrash)return super.delete(d,y,E);const l=this.transformIncoming(d,y),p=(0,P.normalize)(l.fsPath);try{await b.shell.trashItem(p)}catch{throw(0,D.createFileSystemProviderError)(r.isWindows?(0,L.localize)(0,null,(0,P.basename)(p)):(0,L.localize)(1,null,(0,P.basename)(p)),D.FileSystemProviderErrorCode.Unknown)}}createSessionFileWatcher(d,y){return new g(d,y,this.logService,this.environmentService)}}e.DiskFileSystemProviderChannel=m;class g extends h.AbstractSessionFileWatcher{watch(d,y,E){if(E.recursive)throw(0,D.createFileSystemProviderError)("Recursive file watching is not supported from main process for performance reasons.",D.FileSystemProviderErrorCode.Unavailable);return super.watch(d,y,E)}}}),define(Z[226],te([0,1,5]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferLogger=void 0;class L extends b.AbstractMessageLogger{constructor(O=b.DEFAULT_LOG_LEVEL){super(),this.buffer=[],this._logger=void 0,this.setLevel(O),this._register(this.onDidChangeLogLevel(D=>{this._logger?.setLevel(D)}))}set logger(O){this._logger=O;for(const{level:D,message:P}of this.buffer)(0,b.log)(O,D,P);this.buffer=[]}log(O,D){this._logger?(0,b.log)(this._logger,O,D):this.getLevel()<=O&&this.buffer.push({level:O,message:D})}dispose(){this._logger?.dispose()}flush(){this._logger?.flush()}}e.BufferLogger=L}),define(Z[227],te([0,1,7,3,5,2]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteLoggerChannelClient=e.LoggerChannel=e.LoggerChannelClient=void 0;class D extends r.AbstractLoggerService{constructor(g,v,d,y,E){super(v,d,y),this.windowId=g,this.channel=E,this._register(E.listen("onDidChangeLogLevel",g)(l=>{(0,r.isLogLevel)(l)?super.setLogLevel(l):super.setLogLevel(b.URI.revive(l[0]),l[1])})),this._register(E.listen("onDidChangeVisibility",g)(([l,p])=>super.setVisibility(b.URI.revive(l),p))),this._register(E.listen("onDidChangeLoggers",g)(({added:l,removed:p})=>{for(const c of l)super.registerLogger({...c,resource:b.URI.revive(c.resource)});for(const c of p)super.deregisterLogger(c.resource)}))}createConsoleMainLogger(){return new r.AdapterLogger({log:(g,v)=>{this.channel.call("consoleLog",[g,v])}})}registerLogger(g){super.registerLogger(g),this.channel.call("registerLogger",[g,this.windowId])}deregisterLogger(g){super.deregisterLogger(g),this.channel.call("deregisterLogger",[g,this.windowId])}setLogLevel(g,v){super.setLogLevel(g,v),this.channel.call("setLogLevel",[g,v])}setVisibility(g,v){super.setVisibility(g,v),this.channel.call("setVisibility",[this.toResource(g),v])}doCreateLogger(g,v,d){return new P(this.channel,g,v,d,this.windowId)}static setLogLevel(g,v,d){return g.call("setLogLevel",[v,d])}}e.LoggerChannelClient=D;class P extends r.AbstractMessageLogger{constructor(g,v,d,y,E){super(y?.logLevel==="always"),this.channel=g,this.file=v,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(d),this.channel.call("createLogger",[v,y,E]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(g,v){const d=[[g,v]];this.isLoggerCreated?this.doLog(d):this.buffer.push(...d)}doLog(g){this.channel.call("log",[this.file,g])}}class h{constructor(g,v){this.loggerService=g,this.getUriTransformer=v}listen(g,v){const d=this.getUriTransformer(g);switch(v){case"onDidChangeLoggers":return L.Event.map(this.loggerService.onDidChangeLoggers,y=>({added:[...y.added].map(E=>this.transformLogger(E,d)),removed:[...y.removed].map(E=>this.transformLogger(E,d))}));case"onDidChangeVisibility":return L.Event.map(this.loggerService.onDidChangeVisibility,y=>[d.transformOutgoingURI(y[0]),y[1]]);case"onDidChangeLogLevel":return L.Event.map(this.loggerService.onDidChangeLogLevel,y=>(0,r.isLogLevel)(y)?y:[d.transformOutgoingURI(y[0]),y[1]])}throw new Error(`Event not found: ${v}`)}async call(g,v,d){const y=this.getUriTransformer(g);switch(v){case"setLogLevel":return(0,r.isLogLevel)(d[0])?this.loggerService.setLogLevel(d[0]):this.loggerService.setLogLevel(b.URI.revive(y.transformIncoming(d[0][0])),d[0][1]);case"getRegisteredLoggers":return Promise.resolve([...this.loggerService.getRegisteredLoggers()].map(E=>this.transformLogger(E,y)))}throw new Error(`Call not found: ${v}`)}transformLogger(g,v){return{...g,resource:v.transformOutgoingURI(g.resource)}}}e.LoggerChannel=h;class u extends O.Disposable{constructor(g,v){super(),v.call("setLogLevel",[g.getLogLevel()]),this._register(g.onDidChangeLogLevel(d=>v.call("setLogLevel",[d]))),v.call("getRegisteredLoggers").then(d=>{for(const y of d)g.registerLogger({...y,resource:b.URI.revive(y.resource)})}),this._register(v.listen("onDidChangeVisibility")(([d,y])=>g.setVisibility(b.URI.revive(d),y))),this._register(v.listen("onDidChangeLoggers")(({added:d,removed:y})=>{for(const E of d)g.registerLogger({...E,resource:b.URI.revive(E.resource)});for(const E of y)g.deregisterLogger(E.resource)}))}}e.RemoteLoggerChannelClient=u}),define(Z[228],te([0,1,2,5]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class r extends b.Disposable{constructor(D,P=[]){super(),this.logger=new L.MultiplexLogger([D,...P]),this._register(D.onDidChangeLogLevel(h=>this.setLevel(h)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(D){this.logger.setLevel(D)}getLevel(){return this.logger.getLevel()}trace(D,...P){this.logger.trace(D,...P)}debug(D,...P){this.logger.debug(D,...P)}info(D,...P){this.logger.info(D,...P)}warn(D,...P){this.logger.warn(D,...P)}error(D,...P){this.logger.error(D,...P)}flush(){this.logger.flush()}}e.LogService=r}),define(Z[229],te([0,1,35,7,5]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerChannel=void 0;class O{constructor(P){this.loggerService=P,this.loggers=new b.ResourceMap}listen(P,h,u){switch(h){case"onDidChangeLoggers":return u?this.loggerService.getOnDidChangeLoggersEvent(u):this.loggerService.onDidChangeLoggers;case"onDidChangeLogLevel":return u?this.loggerService.getOnDidChangeLogLevelEvent(u):this.loggerService.onDidChangeLogLevel;case"onDidChangeVisibility":return u?this.loggerService.getOnDidChangeVisibilityEvent(u):this.loggerService.onDidChangeVisibility}throw new Error(`Event not found: ${h}`)}async call(P,h,u){switch(h){case"createLogger":this.createLogger(L.URI.revive(u[0]),u[1],u[2]);return;case"log":return this.log(L.URI.revive(u[0]),u[1]);case"consoleLog":return this.consoleLog(u[0],u[1]);case"setLogLevel":return(0,r.isLogLevel)(u[0])?this.loggerService.setLogLevel(u[0]):this.loggerService.setLogLevel(L.URI.revive(u[0]),u[1]);case"setVisibility":return this.loggerService.setVisibility(L.URI.revive(u[0]),u[1]);case"registerLogger":return this.loggerService.registerLogger({...u[0],resource:L.URI.revive(u[0].resource)},u[1]);case"deregisterLogger":return this.loggerService.deregisterLogger(L.URI.revive(u[0]))}throw new Error(`Call not found: ${h}`)}createLogger(P,h,u){this.loggers.set(P,this.loggerService.createLogger(P,h,u))}consoleLog(P,h){let u=console.log;switch(P){case r.LogLevel.Error:u=console.error;break;case r.LogLevel.Warning:u=console.warn;break;case r.LogLevel.Info:u=console.info;break}u.call(console,...h)}log(P,h){const u=this.loggers.get(P);if(!u)throw new Error("Create the logger before logging");for(const[m,g]of h)(0,r.log)(u,m,g)}}e.LoggerChannel=O}),define(Z[230],te([0,1,16,5]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpdLogLogger=void 0;var r;(function(u){u[u.Trace=0]="Trace",u[u.Debug=1]="Debug",u[u.Info=2]="Info",u[u.Warning=3]="Warning",u[u.Error=4]="Error",u[u.Critical=5]="Critical",u[u.Off=6]="Off"})(r||(r={}));async function O(u,m,g,v,d){try{const y=await new Promise((l,p)=>{H(["@vscode/spdlog"],l,p)});y.setFlushOn(r.Trace);const E=await y.createAsyncRotatingLogger(u,m,g,v);return d?E.clearFormatters():E.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),E}catch(y){console.error(y)}return null}function D(u,m,g){switch(m){case L.LogLevel.Trace:u.trace(g);break;case L.LogLevel.Debug:u.debug(g);break;case L.LogLevel.Info:u.info(g);break;case L.LogLevel.Warning:u.warn(g);break;case L.LogLevel.Error:u.error(g);break;case L.LogLevel.Off:break;default:throw new Error(`Invalid log level ${m}`)}}function P(u,m){switch(m){case L.LogLevel.Trace:u.setLevel(r.Trace);break;case L.LogLevel.Debug:u.setLevel(r.Debug);break;case L.LogLevel.Info:u.setLevel(r.Info);break;case L.LogLevel.Warning:u.setLevel(r.Warning);break;case L.LogLevel.Error:u.setLevel(r.Error);break;case L.LogLevel.Off:u.setLevel(r.Off);break;default:throw new Error(`Invalid log level ${m}`)}}class h extends L.AbstractMessageLogger{constructor(m,g,v,d,y){super(),this.buffer=[],this.setLevel(y),this._loggerCreationPromise=this._createSpdLogLogger(m,g,v,d),this._register(this.onDidChangeLogLevel(E=>{this._logger&&P(this._logger,E)}))}async _createSpdLogLogger(m,g,v,d){const y=v?6:1,E=30/y*b.ByteSize.MB,l=await O(m,g,E,y,d);if(l){this._logger=l,P(this._logger,this.getLevel());for(const{level:p,message:c}of this.buffer)D(this._logger,p,c);this.buffer=[]}}log(m,g){this._logger?D(this._logger,m,g):this.getLevel()<=m&&this.buffer.push({level:m,message:g})}flush(){this._logger?this._logger.flush():this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger())}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}e.SpdLogLogger=h}),define(Z[231],te([0,1,31,5,230]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerService=void 0;class O extends L.AbstractLoggerService{doCreateLogger(P,h,u){return new r.SpdLogLogger((0,b.generateUuid)(),P.fsPath,!u?.donotRotate,!!u?.donotUseFormatters,h)}}e.LoggerService=O}),define(Z[66],te([0,1,35,3,6,5,231]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerMainService=e.ILoggerMainService=void 0,e.ILoggerMainService=(0,r.refineServiceDecorator)(O.ILoggerService);class P extends D.LoggerService{constructor(){super(...arguments),this.loggerResourcesByWindow=new b.ResourceMap}createLogger(u,m,g){g!==void 0&&this.loggerResourcesByWindow.set(this.toResource(u),g);try{return super.createLogger(u,m)}catch(v){throw this.loggerResourcesByWindow.delete(this.toResource(u)),v}}registerLogger(u,m){m!==void 0&&this.loggerResourcesByWindow.set(u.resource,m),super.registerLogger(u)}deregisterLogger(u){this.loggerResourcesByWindow.delete(u),super.deregisterLogger(u)}getRegisteredLoggers(u){const m=[];for(const g of super.getRegisteredLoggers())u===this.loggerResourcesByWindow.get(g.resource)&&m.push(g);return m}getOnDidChangeLogLevelEvent(u){return L.Event.filter(this.onDidChangeLogLevel,m=>(0,O.isLogLevel)(m)||this.isInterestedLoggerResource(m[0],u))}getOnDidChangeVisibilityEvent(u){return L.Event.filter(this.onDidChangeVisibility,([m])=>this.isInterestedLoggerResource(m,u))}getOnDidChangeLoggersEvent(u){return L.Event.filter(L.Event.map(this.onDidChangeLoggers,m=>({added:[...m.added].filter(v=>this.isInterestedLoggerResource(v.resource,u)),removed:[...m.removed].filter(v=>this.isInterestedLoggerResource(v.resource,u))})),m=>m.added.length>0||m.removed.length>0)}deregisterLoggers(u){for(const[m,g]of this.loggerResourcesByWindow)g===u&&this.deregisterLogger(m)}isInterestedLoggerResource(u,m){const g=this.loggerResourcesByWindow.get(u);return g===void 0||g===m}dispose(){super.dispose(),this.loggerResourcesByWindow.clear()}}e.LoggerMainService=P}),define(Z[232],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMenubarMenuItemAction=e.isMenubarMenuItemRecentAction=e.isMenubarMenuItemSeparator=e.isMenubarMenuItemSubmenu=void 0;function b(D){return D.submenu!==void 0}e.isMenubarMenuItemSubmenu=b;function L(D){return D.id==="vscode.menubar.separator"}e.isMenubarMenuItemSeparator=L;function r(D){return D.uri!==void 0}e.isMenubarMenuItemRecentAction=r;function O(D){return!b(D)&&!L(D)&&!r(D)}e.isMenubarMenuItemAction=O}),define(Z[39],te([0,1,3,69,2,6]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,O.createDecorator)("policy");class D extends r.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event}async updatePolicyDefinitions(u){const m=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...u,...this.policyDefinitions},m!==Object.keys(this.policyDefinitions).length&&await this._updatePolicyDefinitions(u),L.Iterable.reduce(this.policies.entries(),(g,[v,d])=>({...g,[v]:d}),{})}getPolicyValue(u){return this.policies.get(u)}serialize(){return L.Iterable.reduce(Object.entries(this.policyDefinitions),(u,[m,g])=>({...u,[m]:{definition:g,value:this.policies.get(m)}}),{})}}e.AbstractPolicyService=D;class P{constructor(){this.onDidChange=b.Event.None}async updatePolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=P}),define(Z[233],te([0,1,8,3,69,12,16,5,39]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilePolicyService=void 0;function u(g,v){const d=[];for(const y of new Set(r.Iterable.concat(g.keys(),v.keys())))g.get(y)!==v.get(y)&&d.push(y);return d}let m=class extends h.AbstractPolicyService{constructor(v,d,y){super(),this.file=v,this.fileService=d,this.logService=y,this.throttledDelayer=this._register(new b.ThrottledDelayer(500));const E=L.Event.filter(d.onDidFilesChange,l=>l.affects(v));this._register(d.watch(v)),this._register(E(()=>this.throttledDelayer.trigger(()=>this.refresh())))}async _updatePolicyDefinitions(){await this.refresh()}async read(){const v=new Map;try{const d=await this.fileService.readFile(this.file),y=JSON.parse(d.value.toString());if(!(0,O.isObject)(y))throw new Error("Policy file isn't a JSON object");for(const E of Object.keys(y))this.policyDefinitions[E]&&v.set(E,y[E])}catch(d){d.fileOperationResult!==1&&this.logService.error("[FilePolicyService] Failed to read policies",d)}return v}async refresh(){const v=await this.read(),d=u(this.policies,v);this.policies=v,d.length>0&&this._onDidChange.fire(d)}};e.FilePolicyService=m,e.FilePolicyService=m=be([X(1,D.IFileService),X(2,P.ILogService)],m)}),define(Z[234],te([0,1,3,2,39]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyChannelClient=e.PolicyChannel=void 0;class O{constructor(h){this.service=h,this.disposables=new L.DisposableStore}listen(h,u){switch(u){case"onDidChange":return b.Event.map(this.service.onDidChange,m=>m.reduce((g,v)=>({...g,[v]:this.service.getPolicyValue(v)??null}),{}),this.disposables)}throw new Error(`Event not found: ${u}`)}call(h,u,m){switch(u){case"updatePolicyDefinitions":return this.service.updatePolicyDefinitions(m)}throw new Error(`Call not found: ${u}`)}dispose(){this.disposables.dispose()}}e.PolicyChannel=O;class D extends r.AbstractPolicyService{constructor(h,u){super(),this.channel=u;for(const m in h){const{definition:g,value:v}=h[m];this.policyDefinitions[m]=g,v!==void 0&&this.policies.set(m,v)}this.channel.listen("onDidChange")(m=>{for(const g in m){const v=m[g];v===null?this.policies.delete(g):this.policies.set(g,v)}this._onDidChange.fire(Object.keys(m))})}async _updatePolicyDefinitions(h){const u=await this.channel.call("updatePolicyDefinitions",h);for(const m in u)this.policies.set(m,u[m])}}e.PolicyChannelClient=D}),define(Z[235],te([0,1,39,8,314,2,5]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePolicyService=void 0;let P=class extends b.AbstractPolicyService{constructor(u,m){super(),this.logService=u,this.productName=m,this.throttler=new L.Throttler,this.watcher=this._register(new O.MutableDisposable)}async _updatePolicyDefinitions(u){this.logService.trace(`NativePolicyService#_updatePolicyDefinitions - Found ${Object.keys(u).length} policy definitions`),await this.throttler.queue(()=>new Promise((m,g)=>{try{this.watcher.value=(0,r.createWatcher)(this.productName,u,v=>{this._onDidPolicyChange(v),m()})}catch(v){this.logService.error("NativePolicyService#_updatePolicyDefinitions - Error creating watcher:",v),g(v)}}))}_onDidPolicyChange(u){this.logService.trace(`NativePolicyService#_onDidPolicyChange - Updated policy values: ${JSON.stringify(u)}`);for(const m in u){const g=u[m];g===void 0?this.policies.delete(m):this.policies.set(m,g)}this._onDidChange.fire(Object.keys(u))}};e.NativePolicyService=P,e.NativePolicyService=P=be([X(0,D.ILogService)],P)}),define(Z[67],te([0,1,4,36]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let r;if(typeof b.globals.vscode<"u"&&typeof b.globals.vscode.context<"u"){const O=b.globals.vscode.context.configuration();if(O)r=O.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(r=globalThis._VSCODE_PRODUCT_JSON,L.env.VSCODE_DEV&&Object.assign(r,{nameShort:`${r.nameShort} Dev`,nameLong:`${r.nameLong} Dev`,dataFolderName:`${r.dataFolderName}-dev`,serverDataFolderName:r.serverDataFolderName?`${r.serverDataFolderName}-dev`:void 0}),!r.version){const O=globalThis._VSCODE_PACKAGE_JSON;Object.assign(r,{version:O.version})}}else r={},Object.keys(r).length===0&&Object.assign(r,{version:"1.78.0-dev",nameShort:"Azure Data Studio Dev",nameLong:"Azure Data Studio Dev",applicationName:"azuredatastudio-oss",dataFolderName:"azuredatastudio-oss",urlProtocol:"azuredatastudio-oss",reportIssueUrl:"https://github.com/microsoft/azuredatastudio/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=r}),define(Z[22],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,b.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(Z[236],te([0,1,73,5,22]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionUrlTrustService=void 0;let O=class{constructor(P,h){this.productService=P,this.logService=h,this.trustedExtensionUrlPublicKeys=new Map}async isExtensionUrlTrusted(P,h){if(!this.productService.trustedExtensionUrlPublicKeys)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","There are no configured trusted keys"),!1;const u=/^(.*)#([^#]+)$/.exec(h);if(!u)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri has no fragment",h),!1;const[,m,g]=u;let v=this.trustedExtensionUrlPublicKeys.get(P);if(!v){if(v=this.productService.trustedExtensionUrlPublicKeys[P],!v||v.length===0)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Extension doesn't have any trusted keys",P),!1;this.trustedExtensionUrlPublicKeys.set(P,[...v])}const d=Buffer.from(decodeURIComponent(g),"base64");if(d.length<=6)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri fragment is not a signature",h),!1;const y=d.slice(0,6),E=d.readUIntBE(0,6),l=Date.now()-E;if(l<0||l>36e5)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri has expired",h),!1;const p=d.slice(6),c=b.createVerify("SHA256");c.write(y),c.write(Buffer.from(m)),c.end();for(let f=0;f<v.length;f++){let I=v[f];if(I!==null){if(typeof I=="string")try{I=b.createPublicKey({key:Buffer.from(I,"base64"),format:"der",type:"spki"}),v[f]=I}catch(w){this.logService.warn("ExtensionUrlTrustService#isExtensionUrlTrusted",`Failed to parse trusted extension uri public key #${f+1} for ${P}:`,w),v[f]=null;continue}if(c.verify(I,p))return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri is valid",h),!0}}return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri could not be verified",h),!1}};e.ExtensionUrlTrustService=O,e.ExtensionUrlTrustService=O=be([X(0,r.IProductService),X(1,L.ILogService)],O)}),define(Z[237],te([0,1,8,5]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowProfiler=void 0;let r=class{constructor(D,P,h){this._window=D,this._sessionId=P,this._logService=h}async inspect(D){await this._connect();const P=this._window.webContents.debugger;await P.sendCommand("Profiler.start"),this._logService.warn("[perf] profiling STARTED",this._sessionId),await(0,b.timeout)(D);const h=await P.sendCommand("Profiler.stop");return this._logService.warn("[perf] profiling DONE",this._sessionId),await this._disconnect(),h.profile}async _connect(){const D=this._window.webContents.debugger;D.attach(),await D.sendCommand("Profiler.enable")}async _disconnect(){const D=this._window.webContents.debugger;await D.sendCommand("Profiler.disable"),D.detach()}};e.WindowProfiler=r,e.WindowProfiler=r=be([X(2,L.ILogService)],r)}),define(Z[79],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IProtocolMainService=void 0,e.IProtocolMainService=(0,b.createDecorator)("protocolMainService")}),define(Z[43],te([0,1,137,12]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class r{constructor(){this.data=new Map}add(D,P){b.ok(L.isString(D)),b.ok(L.isObject(P)),b.ok(!this.data.has(D),"There is already an extension with this id"),this.data.set(D,P)}knows(D){return this.data.has(D)}as(D){return this.data.get(D)||null}}e.Registry=new r}),define(Z[238],te([0,1,3,43]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function r(P){return P.length>0&&P.charAt(P.length-1)==="#"?P.substring(0,P.length-1):P}class O{constructor(){this._onDidChangeSchema=new b.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(h,u){this.schemasById[r(h)]=u,this._onDidChangeSchema.fire(h)}notifySchemaChanged(h){this._onDidChangeSchema.fire(h)}getSchemaContributions(){return{schemas:this.schemasById}}}const D=new O;L.Registry.add(e.Extensions.JSONContribution,D)}),define(Z[59],te([0,1,24,3,12,164,18,238,43]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var u;(function(w){w.Multiline="multilineText",w.Singleline="singlelineText"})(u||(e.EditPresentationTypes=u={})),e.Extensions={Configuration:"base.contributions.configuration"};var m;(function(w){w[w.APPLICATION=1]="APPLICATION",w[w.MACHINE=2]="MACHINE",w[w.WINDOW=3]="WINDOW",w[w.RESOURCE=4]="RESOURCE",w[w.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",w[w.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(m||(e.ConfigurationScope=m={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const g=h.Registry.as(P.Extensions.JSONContribution);class v{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new L.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new L.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:O.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(t,a=!0){this.registerConfigurations([t],a)}registerConfigurations(t,a=!0){const s=new Set;this.doRegisterConfigurations(t,a,s),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}deregisterConfigurations(t){const a=new Set;this.doDeregisterConfigurations(t,a),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}updateConfigurations({add:t,remove:a}){const s=new Set;this.doDeregisterConfigurations(a,s),this.doRegisterConfigurations(t,!1,s),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}registerDefaultConfigurations(t){const a=new Set;this.doRegisterDefaultConfigurations(t,a),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}doRegisterDefaultConfigurations(t,a){const s=[];for(const{overrides:i,source:n}of t)for(const o in i)if(a.add(o),e.OVERRIDE_PROPERTY_REGEX.test(o)){const S=this.configurationDefaultsOverrides.get(o),k=S?.valuesSources??new Map;if(n)for(const T of Object.keys(i[o]))k.set(T,n);const M={...S?.value||{},...i[o]};this.configurationDefaultsOverrides.set(o,{source:n,value:M,valuesSources:k});const C=(0,D.getLanguageTagSettingPlainKey)(o),A={type:"object",default:M,description:O.localize(1,null,C),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:M,source:r.isString(n)?void 0:n,defaultValueSource:n};s.push(...E(o)),this.configurationProperties[o]=A,this.defaultLanguageConfigurationOverridesNode.properties[o]=A}else{this.configurationDefaultsOverrides.set(o,{value:i[o],source:n});const S=this.configurationProperties[o];S&&(this.updatePropertyDefaultValue(o,S),this.updateSchema(o,S))}this.doRegisterOverrideIdentifiers(s)}deregisterDefaultConfigurations(t){const a=new Set;this.doDeregisterDefaultConfigurations(t,a),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}doDeregisterDefaultConfigurations(t,a){for(const{overrides:s,source:i}of t)for(const n in s){const o=this.configurationDefaultsOverrides.get(n),S=r.isString(i)?i:i?.id,k=r.isString(o?.source)?o?.source:o?.source?.id;if(S===k)if(a.add(n),this.configurationDefaultsOverrides.delete(n),e.OVERRIDE_PROPERTY_REGEX.test(n))delete this.configurationProperties[n],delete this.defaultLanguageConfigurationOverridesNode.properties[n];else{const M=this.configurationProperties[n];M&&(this.updatePropertyDefaultValue(n,M),this.updateSchema(n,M))}}this.updateOverridePropertyPatternKey()}deltaConfiguration(t){let a=!1;const s=new Set;t.removedDefaults&&(this.doDeregisterDefaultConfigurations(t.removedDefaults,s),a=!0),t.addedDefaults&&(this.doRegisterDefaultConfigurations(t.addedDefaults,s),a=!0),t.removedConfigurations&&this.doDeregisterConfigurations(t.removedConfigurations,s),t.addedConfigurations&&this.doRegisterConfigurations(t.addedConfigurations,!1,s),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s,defaultsOverrides:a})}notifyConfigurationSchemaUpdated(...t){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(t){this.doRegisterOverrideIdentifiers(t),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(t){for(const a of t)this.overrideIdentifiers.add(a);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(t,a,s){t.forEach(i=>{this.validateAndRegisterProperties(i,a,i.extensionInfo,i.restrictedProperties,void 0,s),this.configurationContributors.push(i),this.registerJSONConfiguration(i)})}doDeregisterConfigurations(t,a){const s=i=>{if(i.properties)for(const n in i.properties){a.add(n);const o=this.configurationProperties[n];o?.policy?.name&&this.policyConfigurations.delete(o.policy.name),delete this.configurationProperties[n],this.removeFromSchema(n,i.properties[n])}i.allOf?.forEach(n=>s(n))};for(const i of t){s(i);const n=this.configurationContributors.indexOf(i);n!==-1&&this.configurationContributors.splice(n,1)}}validateAndRegisterProperties(t,a=!0,s,i,n=3,o){n=r.isUndefinedOrNull(t.scope)?n:t.scope;const S=t.properties;if(S)for(const M in S){const C=S[M];if(a&&f(M,C)){delete S[M];continue}if(C.source=s,C.defaultDefaultValue=S[M].default,this.updatePropertyDefaultValue(M,C),e.OVERRIDE_PROPERTY_REGEX.test(M)?C.scope=void 0:(C.scope=r.isUndefinedOrNull(C.scope)?n:C.scope,C.restricted=r.isUndefinedOrNull(C.restricted)?!!i?.includes(M):C.restricted),S[M].hasOwnProperty("included")&&!S[M].included){this.excludedConfigurationProperties[M]=S[M],delete S[M];continue}else this.configurationProperties[M]=S[M],S[M].policy?.name&&this.policyConfigurations.set(S[M].policy.name,M);!S[M].deprecationMessage&&S[M].markdownDeprecationMessage&&(S[M].deprecationMessage=S[M].markdownDeprecationMessage),o.add(M)}const k=t.allOf;if(k)for(const M of k)this.validateAndRegisterProperties(M,a,s,i,n,o)}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(t){const a=s=>{const i=s.properties;if(i)for(const o in i)this.updateSchema(o,i[o]);s.allOf?.forEach(a)};a(t)}updateSchema(t,a){switch(e.allSettings.properties[t]=a,a.scope){case 1:e.applicationSettings.properties[t]=a;break;case 2:e.machineSettings.properties[t]=a;break;case 6:e.machineOverridableSettings.properties[t]=a;break;case 3:e.windowSettings.properties[t]=a;break;case 4:e.resourceSettings.properties[t]=a;break;case 5:e.resourceSettings.properties[t]=a,this.resourceLanguageSettingsSchema.properties[t]=a;break}}removeFromSchema(t,a){switch(delete e.allSettings.properties[t],a.scope){case 1:delete e.applicationSettings.properties[t];break;case 2:delete e.machineSettings.properties[t];break;case 6:delete e.machineOverridableSettings.properties[t];break;case 3:delete e.windowSettings.properties[t];break;case 4:case 5:delete e.resourceSettings.properties[t],delete this.resourceLanguageSettingsSchema.properties[t];break}}updateOverridePropertyPatternKey(){for(const t of this.overrideIdentifiers.values()){const a=`[${t}]`,s={type:"object",description:O.localize(2,null),errorMessage:O.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(a,s),e.allSettings.properties[a]=s,e.applicationSettings.properties[a]=s,e.machineSettings.properties[a]=s,e.machineOverridableSettings.properties[a]=s,e.windowSettings.properties[a]=s,e.resourceSettings.properties[a]=s}}registerOverridePropertyPatternKey(){const t={type:"object",description:O.localize(4,null),errorMessage:O.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(t,a){const s=this.configurationDefaultsOverrides.get(t);let i=s?.value,n=s?.source;r.isUndefined(i)&&(i=a.defaultDefaultValue,n=void 0),r.isUndefined(i)&&(i=p(a.type)),a.default=i,a.defaultValueSource=n}}const d="\\[([^\\]]+)\\]",y=new RegExp(d,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${d})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function E(w){const t=[];if(e.OVERRIDE_PROPERTY_REGEX.test(w)){let a=y.exec(w);for(;a?.length;){const s=a[1].trim();s&&t.push(s),a=y.exec(w)}}return(0,b.distinct)(t)}e.overrideIdentifiersFromKey=E;function l(w){return w.reduce((t,a)=>`${t}[${a}]`,"")}e.keyFromOverrideIdentifiers=l;function p(w){switch(Array.isArray(w)?w[0]:w){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=p;const c=new v;h.Registry.add(e.Extensions.Configuration,c);function f(w,t){return w.trim()?e.OVERRIDE_PROPERTY_REGEX.test(w)?O.localize(7,null,w):c.getConfigurationProperties()[w]!==void 0?O.localize(8,null,w):t.policy?.name&&c.getPolicyConfigurations().get(t.policy?.name)!==void 0?O.localize(9,null,w,t.policy?.name,c.getPolicyConfigurations().get(t.policy?.name)):null:O.localize(6,null)}e.validateProperty=f;function I(){const w=[],t=c.getConfigurationProperties();for(const a of Object.keys(t))w.push([a,t[a].scope]);return w.push(["launch",4]),w.push(["task",4]),w}e.getScopes=I}),define(Z[122],te([0,1,24,3,44,2,35,37,12,7,18,59,43]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function d(a){return Object.isFrozen(a)?a:P.deepFreeze(a)}class y{constructor(s={},i=[],n=[],o){this._contents=s,this._keys=i,this._overrides=n,this.raw=o,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const s=this.raw.map(i=>{if(i instanceof y)return i;const n=new E("");return n.parseRaw(i),n.configurationModel});this._rawConfiguration=s.reduce((i,n)=>n===i?n:i.merge(n),s[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(s){return s?(0,m.getConfigurationValue)(this.contents,s):this.contents}inspect(s,i){const n=this.rawConfiguration.getValue(s),o=i?this.rawConfiguration.getOverrideValue(s,i):void 0,S=i?this.rawConfiguration.override(i).getValue(s):n;return{value:n,override:o,merged:S}}getOverrideValue(s,i){const n=this.getContentsForOverrideIdentifer(i);return n?s?(0,m.getConfigurationValue)(n,s):n:void 0}getKeysForOverrideIdentifier(s){const i=[];for(const n of this.overrides)n.identifiers.includes(s)&&i.push(...n.keys);return b.distinct(i)}getAllOverrideIdentifiers(){const s=[];for(const i of this.overrides)s.push(...i.identifiers);return b.distinct(s)}override(s){let i=this.overrideConfigurations.get(s);return i||(i=this.createOverrideConfigurationModel(s),this.overrideConfigurations.set(s,i)),i}merge(...s){const i=P.deepClone(this.contents),n=P.deepClone(this.overrides),o=[...this.keys],S=this.raw?.length?[...this.raw]:[this];for(const k of s)if(S.push(...k.raw?.length?k.raw:[k]),!k.isEmpty()){this.mergeContents(i,k.contents);for(const M of k.overrides){const[C]=n.filter(A=>b.equals(A.identifiers,M.identifiers));C?(this.mergeContents(C.contents,M.contents),C.keys.push(...M.keys),C.keys=b.distinct(C.keys)):n.push(P.deepClone(M))}for(const M of k.keys)o.indexOf(M)===-1&&o.push(M)}return new y(i,o,n,S.every(k=>k instanceof y)?void 0:S)}createOverrideConfigurationModel(s){const i=this.getContentsForOverrideIdentifer(s);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const n={};for(const o of b.distinct([...Object.keys(this.contents),...Object.keys(i)])){let S=this.contents[o];const k=i[o];k&&(typeof S=="object"&&typeof k=="object"?(S=P.deepClone(S),this.mergeContents(S,k)):S=k),n[o]=S}return new y(n,this.keys,this.overrides)}mergeContents(s,i){for(const n of Object.keys(i)){if(n in s&&h.isObject(s[n])&&h.isObject(i[n])){this.mergeContents(s[n],i[n]);continue}s[n]=P.deepClone(i[n])}}getContentsForOverrideIdentifer(s){let i=null,n=null;const o=S=>{S&&(n?this.mergeContents(n,S):n=P.deepClone(S))};for(const S of this.overrides)S.identifiers.length===1&&S.identifiers[0]===s?i=S.contents:S.identifiers.includes(s)&&o(S.contents);return o(i),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(s,i){this.updateValue(s,i,!0)}setValue(s,i){this.updateValue(s,i,!1)}removeValue(s){const i=this.keys.indexOf(s);i!==-1&&(this.keys.splice(i,1),(0,m.removeFromValueTree)(this.contents,s),g.OVERRIDE_PROPERTY_REGEX.test(s)&&this.overrides.splice(this.overrides.findIndex(n=>b.equals(n.identifiers,(0,g.overrideIdentifiersFromKey)(s))),1))}updateValue(s,i,n){(0,m.addToValueTree)(this.contents,s,i,o=>console.error(o)),n=n||this.keys.indexOf(s)===-1,n&&this.keys.push(s),g.OVERRIDE_PROPERTY_REGEX.test(s)&&this.overrides.push({identifiers:(0,g.overrideIdentifiersFromKey)(s),keys:Object.keys(this.contents[s]),contents:(0,m.toValuesTree)(this.contents[s],o=>console.error(o))})}}e.ConfigurationModel=y;class E{constructor(s){this._name=s,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new y}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(s,i){if(!h.isUndefinedOrNull(s)){const n=this.doParseContent(s);this.parseRaw(n,i)}}reparse(s){this._raw&&this.parseRaw(this._raw,s)}parseRaw(s,i){this._raw=s;const{contents:n,keys:o,overrides:S,restricted:k,hasExcludedProperties:M}=this.doParseRaw(s,i);this._configurationModel=new y(n,o,S,M?[s]:void 0),this._restrictedConfigurations=k||[]}doParseContent(s){let i={},n=null,o=[];const S=[],k=[];function M(A){Array.isArray(o)?o.push(A):n!==null&&(o[n]=A)}const C={onObjectBegin:()=>{const A={};M(A),S.push(o),o=A,n=null},onObjectProperty:A=>{n=A},onObjectEnd:()=>{o=S.pop()},onArrayBegin:()=>{const A=[];M(A),S.push(o),o=A,n=null},onArrayEnd:()=>{o=S.pop()},onLiteralValue:M,onError:(A,T,F)=>{k.push({error:A,offset:T,length:F})}};if(s)try{r.visit(s,C),i=o[0]||{}}catch(A){console.error(`Error while parsing settings file ${this._name}: ${A}`),this._parseErrors=[A]}return i}doParseRaw(s,i){const n=v.Registry.as(g.Extensions.Configuration).getConfigurationProperties(),o=this.filter(s,n,!0,i);s=o.raw;const S=(0,m.toValuesTree)(s,C=>console.error(`Conflict in settings file ${this._name}: ${C}`)),k=Object.keys(s),M=this.toOverrides(s,C=>console.error(`Conflict in settings file ${this._name}: ${C}`));return{contents:S,keys:k,overrides:M,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(s,i,n,o){let S=!1;if(!o?.scopes&&!o?.skipRestricted&&!o?.exclude?.length)return{raw:s,restricted:[],hasExcludedProperties:S};const k={},M=[];for(const C in s)if(g.OVERRIDE_PROPERTY_REGEX.test(C)&&n){const A=this.filter(s[C],i,!1,o);k[C]=A.raw,S=S||A.hasExcludedProperties,M.push(...A.restricted)}else{const A=i[C],T=A?typeof A.scope<"u"?A.scope:3:void 0;A?.restricted&&M.push(C),!o.exclude?.includes(C)&&(o.include?.includes(C)||(T===void 0||o.scopes===void 0||o.scopes.includes(T))&&!(o.skipRestricted&&A?.restricted))?k[C]=s[C]:S=!0}return{raw:k,restricted:M,hasExcludedProperties:S}}toOverrides(s,i){const n=[];for(const o of Object.keys(s))if(g.OVERRIDE_PROPERTY_REGEX.test(o)){const S={};for(const k in s[o])S[k]=s[o][k];n.push({identifiers:(0,g.overrideIdentifiersFromKey)(o),keys:Object.keys(S),contents:(0,m.toValuesTree)(S,i)})}return n}}e.ConfigurationModelParser=E;class l extends O.Disposable{constructor(s,i,n,o){super(),this.userSettingsResource=s,this.parseOptions=i,this.fileService=o,this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new E(this.userSettingsResource.toString()),this._register(this.fileService.watch(n.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(L.Event.any(L.Event.filter(this.fileService.onDidFilesChange,S=>S.contains(this.userSettingsResource)),L.Event.filter(this.fileService.onDidRunOperation,S=>(S.isOperation(0)||S.isOperation(3)||S.isOperation(1)||S.isOperation(4))&&n.isEqual(S.resource,s)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const s=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(s.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new y}}reparse(s){return s&&(this.parseOptions=s),this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=l;class p{constructor(s,i,n,o,S,k,M,C,A,T,F,z,oe){this.key=s,this.overrides=i,this._value=n,this.overrideIdentifiers=o,this.defaultConfiguration=S,this.policyConfiguration=k,this.applicationConfiguration=M,this.userConfiguration=C,this.localUserConfiguration=A,this.remoteUserConfiguration=T,this.workspaceConfiguration=F,this.folderConfigurationModel=z,this.memoryConfigurationModel=oe}get value(){return d(this._value)}inspect(s,i,n){const o=s.inspect(i,n);return{get value(){return d(o.value)},get override(){return d(o.override)},get merged(){return d(o.merged)}}}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.inspect(this.defaultConfiguration,this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.inspect(this.policyConfiguration,this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.inspect(this.applicationConfiguration,this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.inspect(this.localUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.inspect(this.remoteUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.inspect(this.workspaceConfiguration,this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.inspect(this.folderConfigurationModel,this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.inspect(this.memoryConfigurationModel,this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class c{constructor(s,i,n,o,S=new y,k=new y,M=new D.ResourceMap,C=new y,A=new D.ResourceMap){this._defaultConfiguration=s,this._policyConfiguration=i,this._applicationConfiguration=n,this._localUserConfiguration=o,this._remoteUserConfiguration=S,this._workspaceConfiguration=k,this._folderConfigurations=M,this._memoryConfiguration=C,this._memoryConfigurationByResource=A,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new D.ResourceMap,this._userConfiguration=null}getValue(s,i,n){return this.getConsolidatedConfigurationModel(s,i,n).getValue(s)}updateValue(s,i,n={}){let o;n.resource?(o=this._memoryConfigurationByResource.get(n.resource),o||(o=new y,this._memoryConfigurationByResource.set(n.resource,o))):o=this._memoryConfiguration,i===void 0?o.removeValue(s):o.setValue(s,i),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(s,i,n){const o=this.getConsolidatedConfigurationModel(s,i,n),S=this.getFolderConfigurationModelForResource(i.resource,n),k=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,M=new Set;for(const C of o.overrides)for(const A of C.identifiers)o.getOverrideValue(s,A)!==void 0&&M.add(A);return new p(s,i,o.getValue(s),M.size?[...M]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,S||void 0,k)}keys(s){const i=this.getFolderConfigurationModelForResource(void 0,s);return{default:this._defaultConfiguration.keys.slice(0),user:this.userConfiguration.keys.slice(0),workspace:this._workspaceConfiguration.keys.slice(0),workspaceFolder:i?i.keys.slice(0):[]}}updateDefaultConfiguration(s){this._defaultConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(s){this._policyConfiguration=s}updateApplicationConfiguration(s){this._applicationConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(s){this._localUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(s){this._remoteUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(s){this._workspaceConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(s,i){this._folderConfigurations.set(s,i),this._foldersConsolidatedConfigurations.delete(s)}deleteFolderConfiguration(s){this.folderConfigurations.delete(s),this._foldersConsolidatedConfigurations.delete(s)}compareAndUpdateDefaultConfiguration(s,i){const n=[];if(!i){const{added:o,updated:S,removed:k}=w(this._defaultConfiguration,s);i=[...o,...S,...k]}for(const o of i)for(const S of(0,g.overrideIdentifiersFromKey)(o)){const k=this._defaultConfiguration.getKeysForOverrideIdentifier(S),M=s.getKeysForOverrideIdentifier(S),C=[...M.filter(A=>k.indexOf(A)===-1),...k.filter(A=>M.indexOf(A)===-1),...k.filter(A=>!P.equals(this._defaultConfiguration.override(S).getValue(A),s.override(S).getValue(A)))];n.push([S,C])}return this.updateDefaultConfiguration(s),{keys:i,overrides:n}}compareAndUpdatePolicyConfiguration(s){const{added:i,updated:n,removed:o}=w(this._policyConfiguration,s),S=[...i,...n,...o];return S.length&&this.updatePolicyConfiguration(s),{keys:S,overrides:[]}}compareAndUpdateApplicationConfiguration(s){const{added:i,updated:n,removed:o,overrides:S}=w(this.applicationConfiguration,s),k=[...i,...n,...o];return k.length&&this.updateApplicationConfiguration(s),{keys:k,overrides:S}}compareAndUpdateLocalUserConfiguration(s){const{added:i,updated:n,removed:o,overrides:S}=w(this.localUserConfiguration,s),k=[...i,...n,...o];return k.length&&this.updateLocalUserConfiguration(s),{keys:k,overrides:S}}compareAndUpdateRemoteUserConfiguration(s){const{added:i,updated:n,removed:o,overrides:S}=w(this.remoteUserConfiguration,s),k=[...i,...n,...o];return k.length&&this.updateRemoteUserConfiguration(s),{keys:k,overrides:S}}compareAndUpdateWorkspaceConfiguration(s){const{added:i,updated:n,removed:o,overrides:S}=w(this.workspaceConfiguration,s),k=[...i,...n,...o];return k.length&&this.updateWorkspaceConfiguration(s),{keys:k,overrides:S}}compareAndUpdateFolderConfiguration(s,i){const n=this.folderConfigurations.get(s),{added:o,updated:S,removed:k,overrides:M}=w(n,i),C=[...o,...S,...k];return(C.length||!n)&&this.updateFolderConfiguration(s,i),{keys:C,overrides:M}}compareAndDeleteFolderConfiguration(s){const i=this.folderConfigurations.get(s);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(s);const{added:n,updated:o,removed:S,overrides:k}=w(i,void 0);return{keys:[...n,...o,...S],overrides:k}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(s,i,n){let o=this.getConsolidatedConfigurationModelForResource(i,n);return i.overrideIdentifier&&(o=o.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(s)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:s},i){let n=this.getWorkspaceConsolidatedConfiguration();if(i&&s){const o=i.getFolder(s);o&&(n=this.getFolderConsolidatedConfiguration(o.uri)||n);const S=this._memoryConfigurationByResource.get(s);S&&(n=n.merge(S))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(s){let i=this._foldersConsolidatedConfigurations.get(s);if(!i){const n=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(s);o?(i=n.merge(o),this._foldersConsolidatedConfigurations.set(s,i)):i=n}return i}getFolderConfigurationModelForResource(s,i){if(i&&s){const n=i.getFolder(s);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((s,i)=>{const{contents:n,overrides:o,keys:S}=this._folderConfigurations.get(i);return s.push([i,{contents:n,overrides:o,keys:S}]),s},[])}}allKeys(){const s=new Set;return this._defaultConfiguration.keys.forEach(i=>s.add(i)),this.userConfiguration.keys.forEach(i=>s.add(i)),this._workspaceConfiguration.keys.forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.keys.forEach(n=>s.add(n))),[...s.values()]}allOverrideIdentifiers(){const s=new Set;return this._defaultConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this.userConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.getAllOverrideIdentifiers().forEach(n=>s.add(n))),[...s.values()]}getAllKeysForOverrideIdentifier(s){const i=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(s).forEach(n=>i.add(n)),this.userConfiguration.getKeysForOverrideIdentifier(s).forEach(n=>i.add(n)),this._workspaceConfiguration.getKeysForOverrideIdentifier(s).forEach(n=>i.add(n)),this._folderConfigurations.forEach(n=>n.getKeysForOverrideIdentifier(s).forEach(o=>i.add(o))),[...i.values()]}static parse(s){const i=this.parseConfigurationModel(s.defaults),n=this.parseConfigurationModel(s.policy),o=this.parseConfigurationModel(s.application),S=this.parseConfigurationModel(s.user),k=this.parseConfigurationModel(s.workspace),M=s.folders.reduce((C,A)=>(C.set(u.URI.revive(A[0]),this.parseConfigurationModel(A[1])),C),new D.ResourceMap);return new c(i,n,o,S,new y,k,M,new y,new D.ResourceMap)}static parseConfigurationModel(s){return new y(s.contents,s.keys,s.overrides)}}e.Configuration=c;function f(...a){if(a.length===0)return{keys:[],overrides:[]};if(a.length===1)return a[0];const s=new Set,i=new Map;for(const o of a)o.keys.forEach(S=>s.add(S)),o.overrides.forEach(([S,k])=>{const M=(0,D.getOrSet)(i,S,new Set);k.forEach(C=>M.add(C))});const n=[];return i.forEach((o,S)=>n.push([S,[...o.values()]])),{keys:[...s.values()],overrides:n}}e.mergeChanges=f;class I{constructor(s,i,n,o){this.change=s,this.previous=i,this.currentConfiguraiton=n,this.currentWorkspace=o,this._marker=`
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const S of s.keys)this.affectedKeys.add(S);for(const[,S]of s.overrides)for(const k of S)this.affectedKeys.add(k);this._affectsConfigStr=this._marker;for(const S of this.affectedKeys)this._affectsConfigStr+=S+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=c.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(s,i){const n=this._marker+s,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;const S=o+n.length;if(S>=this._affectsConfigStr.length)return!1;const k=this._affectsConfigStr.charCodeAt(S);if(k!==this._markerCode1&&k!==this._markerCode2)return!1;if(i){const M=this.previousConfiguration?this.previousConfiguration.getValue(s,i,this.previous?.workspace):void 0,C=this.currentConfiguraiton.getValue(s,i,this.currentWorkspace);return!P.equals(M,C)}return!0}}e.ConfigurationChangeEvent=I;function w(a,s){const{added:i,removed:n,updated:o}=t(s?.rawConfiguration,a?.rawConfiguration),S=[],k=a?.getAllOverrideIdentifiers()||[],M=s?.getAllOverrideIdentifiers()||[];if(s){const C=M.filter(A=>!k.includes(A));for(const A of C)S.push([A,s.getKeysForOverrideIdentifier(A)])}if(a){const C=k.filter(A=>!M.includes(A));for(const A of C)S.push([A,a.getKeysForOverrideIdentifier(A)])}if(s&&a){for(const C of k)if(M.includes(C)){const A=t({contents:a.getOverrideValue(void 0,C)||{},keys:a.getKeysForOverrideIdentifier(C)},{contents:s.getOverrideValue(void 0,C)||{},keys:s.getKeysForOverrideIdentifier(C)});S.push([C,[...A.added,...A.removed,...A.updated]])}}return{added:i,removed:n,updated:o,overrides:S}}function t(a,s){const i=a?s?a.keys.filter(S=>s.keys.indexOf(S)===-1):[...a.keys]:[],n=s?a?s.keys.filter(S=>a.keys.indexOf(S)===-1):[...s.keys]:[],o=[];if(a&&s){for(const S of s.keys)if(a.keys.indexOf(S)!==-1){const k=(0,m.getConfigurationValue)(s.contents,S),M=(0,m.getConfigurationValue)(a.contents,S);P.equals(k,M)||o.push(S)}}return{added:i,removed:n,updated:o}}}),define(Z[239],te([0,1,24,3,2,37,12,122,59,5,39,43]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfiguration=void 0;class v extends r.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new L.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new P.ConfigurationModel}get configurationModel(){return this._configurationModel}async initialize(){return this.resetConfigurationModel(),this._register(g.Registry.as(h.Extensions.Configuration).onDidUpdateConfiguration(({properties:l,defaultsOverrides:p})=>this.onDidUpdateConfiguration(Array.from(l),p))),this.configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}onDidUpdateConfiguration(l,p){this.updateConfigurationModel(l,g.Registry.as(h.Extensions.Configuration).getConfigurationProperties()),this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:l})}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new P.ConfigurationModel;const l=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(l),l)}updateConfigurationModel(l,p){const c=this.getConfigurationDefaultOverrides();for(const f of l){const I=c[f],w=p[f];I!==void 0?this._configurationModel.addValue(f,I):w?this._configurationModel.addValue(f,w.default):this._configurationModel.removeValue(f)}}}e.DefaultConfiguration=v;class d{constructor(){this.onDidChangeConfiguration=L.Event.None,this.configurationModel=new P.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=d;let y=class extends r.Disposable{get configurationModel(){return this._configurationModel}constructor(l,p,c){super(),this.defaultConfiguration=l,this.policyService=p,this.logService=c,this._onDidChangeConfiguration=this._register(new L.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new P.ConfigurationModel}async initialize(){return this.logService.trace("PolicyConfiguration#initialize"),this.update(await this.updatePolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(l=>this.onDidChangePolicies(l))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:l})=>this.update(await this.updatePolicyDefinitions(l),!0))),this._configurationModel}async updatePolicyDefinitions(l){this.logService.trace("PolicyConfiguration#updatePolicyDefinitions",l);const p={},c=[],f=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties();for(const I of l){const w=f[I];if(!w){c.push(I);continue}if(w.policy){if(w.type!=="string"&&w.type!=="number"){this.logService.warn(`Policy ${w.policy.name} has unsupported type ${w.type}`);continue}c.push(I),p[w.policy.name]={type:w.type}}}return(0,D.isEmptyObject)(p)||await this.policyService.updatePolicyDefinitions(p),c}onDidChangePolicies(l){this.logService.trace("PolicyConfiguration#onDidChangePolicies",l);const p=g.Registry.as(h.Extensions.Configuration).getPolicyConfigurations(),c=(0,b.coalesce)(l.map(f=>p.get(f)));this.update(c,!0)}update(l,p){this.logService.trace("PolicyConfiguration#update",l);const c=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties(),f=[],I=this._configurationModel.isEmpty();for(const w of l){const t=c[w]?.policy?.name;if(t){const a=this.policyService.getPolicyValue(t);(I?a!==void 0:!(0,O.equals)(this._configurationModel.getValue(w),a))&&f.push([w,a])}else this._configurationModel.getValue(w)!==void 0&&f.push([w,void 0])}if(f.length){this.logService.trace("PolicyConfiguration#changed",f);const w=this._configurationModel;this._configurationModel=new P.ConfigurationModel;for(const t of w.keys)this._configurationModel.setValue(t,w.getValue(t));for(const[t,a]of f)a===void 0?this._configurationModel.removeValue(t):this._configurationModel.setValue(t,a);p&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};e.PolicyConfiguration=y,e.PolicyConfiguration=y=be([X(1,m.IPolicyService),X(2,u.ILogService)],y)}),define(Z[240],te([0,1,8,3,2,19,18,122,239,39]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationService=void 0;class m extends r.Disposable{constructor(v,d,y,E){super(),this.settingsResource=v,this._onDidChangeConfiguration=this._register(new L.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.defaultConfiguration=this._register(new h.DefaultConfiguration),this.policyConfiguration=y instanceof u.NullPolicyService?new h.NullPolicyConfiguration:this._register(new h.PolicyConfiguration(this.defaultConfiguration,y,E)),this.userConfiguration=this._register(new P.UserSettings(this.settingsResource,{},O.extUriBiasedIgnorePathCase,d)),this.configuration=new P.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,new P.ConfigurationModel,new P.ConfigurationModel),this.reloadConfigurationScheduler=this._register(new b.RunOnceScheduler(()=>this.reloadConfiguration(),50)),this._register(this.defaultConfiguration.onDidChangeConfiguration(({defaults:l,properties:p})=>this.onDidDefaultConfigurationChange(l,p))),this._register(this.policyConfiguration.onDidChangeConfiguration(l=>this.onDidPolicyConfigurationChange(l))),this._register(this.userConfiguration.onDidChange(()=>this.reloadConfigurationScheduler.schedule()))}async initialize(){const[v,d,y]=await Promise.all([this.defaultConfiguration.initialize(),this.policyConfiguration.initialize(),this.userConfiguration.loadConfiguration()]);this.configuration=new P.Configuration(v,d,new P.ConfigurationModel,y)}getConfigurationData(){return this.configuration.toData()}getValue(v,d){const y=typeof v=="string"?v:void 0,E=(0,D.isConfigurationOverrides)(v)?v:(0,D.isConfigurationOverrides)(d)?d:{};return this.configuration.getValue(y,E,void 0)}updateValue(v,d,y,E){return Promise.reject(new Error("not supported"))}inspect(v){return this.configuration.inspect(v,{},void 0)}keys(){return this.configuration.keys(void 0)}async reloadConfiguration(){const v=await this.userConfiguration.loadConfiguration();this.onDidChangeUserConfiguration(v)}onDidChangeUserConfiguration(v){const d=this.configuration.toData(),y=this.configuration.compareAndUpdateLocalUserConfiguration(v);this.trigger(y,d,2)}onDidDefaultConfigurationChange(v,d){const y=this.configuration.toData(),E=this.configuration.compareAndUpdateDefaultConfiguration(v,d);this.trigger(E,y,7)}onDidPolicyConfigurationChange(v){const d=this.configuration.toData(),y=this.configuration.compareAndUpdatePolicyConfiguration(v);this.trigger(y,d,7)}trigger(v,d,y){const E=new P.ConfigurationChangeEvent(v,{data:d},this.configuration);E.source=y,E.sourceConfig=this.getTargetConfiguration(y),this._onDidChangeConfiguration.fire(E)}getTargetConfiguration(v){switch(v){case 7:return this.configuration.defaults.contents;case 2:return this.configuration.localUserConfiguration.contents}return{}}}e.ConfigurationService=m}),define(Z[241],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRemoteResourceRouter=e.NODE_REMOTE_RESOURCE_CHANNEL_NAME=e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME=void 0,e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME="request",e.NODE_REMOTE_RESOURCE_CHANNEL_NAME="remoteResourceHandler";class b{async routeCall(r,O,D){if(O!==e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME)throw new Error(`Call not found: ${O}`);const P=D[0];if(P?.authority){const h=r.connections.find(u=>u.ctx===P.authority);if(h)return h}throw new Error("Caller not found")}routeEvent(r,O){throw new Error(`Event not found: ${O}`)}}e.NodeRemoteResourceRouter=b}),define(Z[242],te([0,1,13,6]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemoteAuthorityPrefix=e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.WebSocketRemoteConnection=e.ManagedRemoteConnection=e.RemoteConnectionType=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,L.createDecorator)("remoteAuthorityResolverService");var r;(function(m){m[m.WebSocket=0]="WebSocket",m[m.Managed=1]="Managed"})(r||(e.RemoteConnectionType=r={}));class O{constructor(g){this.id=g,this.type=1}toString(){return`Managed(${this.id})`}}e.ManagedRemoteConnection=O;class D{constructor(g,v){this.host=g,this.port=v,this.type=0}toString(){return`WebSocket(${this.host}:${this.port})`}}e.WebSocketRemoteConnection=D;var P;(function(m){m.Unknown="Unknown",m.NotAvailable="NotAvailable",m.TemporarilyNotAvailable="TemporarilyNotAvailable",m.NoResolverFound="NoResolverFound",m.InvalidAuthority="InvalidAuthority"})(P||(e.RemoteAuthorityResolverErrorCode=P={}));class h extends b.ErrorNoTelemetry{static isNotAvailable(g){return g instanceof h&&g._code===P.NotAvailable}static isTemporarilyNotAvailable(g){return g instanceof h&&g._code===P.TemporarilyNotAvailable}static isNoResolverFound(g){return g instanceof h&&g._code===P.NoResolverFound}static isInvalidAuthority(g){return g instanceof h&&g._code===P.InvalidAuthority}static isHandled(g){return g instanceof h&&g.isHandled}constructor(g,v=P.Unknown,d){super(g),this._message=g,this._code=v,this._detail=d,this.isHandled=v===P.NotAvailable&&d===!0,Object.setPrototypeOf(this,h.prototype)}}e.RemoteAuthorityResolverError=h;function u(m){const g=m.indexOf("+");return g===-1?m:m.substring(0,g)}e.getRemoteAuthorityPrefix=u}),define(Z[60],te([0,1,15]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function L(u){return u.scheme===b.Schemas.vscodeRemote?u.authority:void 0}e.getRemoteAuthority=L;function r(u){if(!u)return;const m=u.indexOf("+");return m<0?u:u.substr(0,m)}e.getRemoteName=r;function O(u){return`/${u.quality??"oss"}-${u.commit??"dev"}`}e.getRemoteServerRootPath=O;function D(u){const{host:m,port:g}=h(u);if(typeof g>"u")throw new Error("Remote authority doesn't contain a port!");return{host:m,port:g}}e.parseAuthorityWithPort=D;function P(u,m){let{host:g,port:v}=h(u);return typeof v>"u"&&(v=m),{host:g,port:v}}e.parseAuthorityWithOptionalPort=P;function h(u){const m=u.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(m)return{host:m[1],port:parseInt(m[2],10)};const g=u.match(/^(\[[0-9a-z:]+\])$/);if(g)return{host:g[1],port:void 0};const v=u.match(/(.*):(\d+)$/);return v?{host:v[1],port:parseInt(v[2],10)}:{host:u,port:void 0}}}),define(Z[123],te([0,1,26,6,60]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifierMap=e.ExtensionIdentifierSet=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.ExtensionsPolicy=e.ExtensionsPolicyKey=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=void 0,e.USER_MANIFEST_CACHE_FILE="extensions.user.cache",e.BUILTIN_MANIFEST_CACHE_FILE="extensions.builtin.cache",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ExtensionsPolicyKey="extensions.extensionsPolicy";var O;(function(l){l.allowAll="allowAll",l.allowNone="allowNone",l.allowMicrosoft="allowMicrosoft"})(O||(e.ExtensionsPolicy=O={})),e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function D(l){if(typeof l=="object"&&l!==null&&l.supported!==!0)return l.description}e.getWorkspaceSupportTypeMessage=D,e.EXTENSION_CATEGORIES=["Language Packs"];var P;(function(l){l[l.System=0]="System",l[l.User=1]="User"})(P||(e.ExtensionType=P={}));var h;(function(l){l.WIN32_X64="win32-x64",l.WIN32_IA32="win32-ia32",l.WIN32_ARM64="win32-arm64",l.LINUX_X64="linux-x64",l.LINUX_ARM64="linux-arm64",l.LINUX_ARMHF="linux-armhf",l.ALPINE_X64="alpine-x64",l.ALPINE_ARM64="alpine-arm64",l.DARWIN_X64="darwin-x64",l.DARWIN_ARM64="darwin-arm64",l.WEB="web",l.UNIVERSAL="universal",l.UNKNOWN="unknown",l.UNDEFINED="undefined"})(h||(e.TargetPlatform=h={}));class u{constructor(p){this.value=p,this._lower=p.toLowerCase()}static equals(p,c){if(typeof p>"u"||p===null)return typeof c>"u"||c===null;if(typeof c>"u"||c===null)return!1;if(typeof p=="string"||typeof c=="string"){const f=typeof p=="string"?p:p.value,I=typeof c=="string"?c:c.value;return b.equalsIgnoreCase(f,I)}return p._lower===c._lower}static toKey(p){return typeof p=="string"?p.toLowerCase():p._lower}}e.ExtensionIdentifier=u;class m{get size(){return this._set.size}constructor(p){if(this._set=new Set,p)for(const c of p)this.add(c)}add(p){this._set.add(u.toKey(p))}delete(p){return this._set.delete(u.toKey(p))}has(p){return this._set.has(u.toKey(p))}}e.ExtensionIdentifierSet=m;class g{constructor(){this._map=new Map}clear(){this._map.clear()}delete(p){this._map.delete(u.toKey(p))}get(p){return this._map.get(u.toKey(p))}has(p){return this._map.has(u.toKey(p))}set(p,c){this._map.set(u.toKey(p),c)}values(){return this._map.values()}forEach(p){this._map.forEach(p)}[Symbol.iterator](){return this._map[Symbol.iterator]()}}e.ExtensionIdentifierMap=g;function v(l){return d(l)}e.isApplicationScopedExtension=v;function d(l){return l.contributes&&l.contributes.localizations?l.contributes.localizations.length>0:!1}e.isLanguagePackExtension=d;function y(l){return l.contributes&&l.contributes.authentication?l.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=y;function E(l,p){if(p){const c=`onResolveRemoteAuthority:${(0,r.getRemoteName)(p)}`;return!!l.activationEvents?.includes(c)}return!1}e.isResolverExtension=E,e.IBuiltinExtensionsScannerService=(0,L.createDecorator)("IBuiltinExtensionsScannerService")}),define(Z[243],te([0,1,8,17,23,13,3,2,65,70,31,112,242,60]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostPersistentConnection=e.ManagementPersistentConnection=e.PersistentConnection=e.ReconnectionPermanentFailureEvent=e.ConnectionGainEvent=e.ReconnectionRunningEvent=e.ReconnectionWaitEvent=e.ConnectionLostEvent=e.PersistentConnectionEventType=e.connectRemoteAgentTunnel=e.connectRemoteAgentExtensionHost=e.connectRemoteAgentManagement=e.ConnectionType=void 0;const y=30*1e3;var E;(function(x){x[x.Management=1]="Management",x[x.ExtensionHost=2]="ExtensionHost",x[x.Tunnel=3]="Tunnel"})(E||(e.ConnectionType=E={}));function l(x){switch(x){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function p(x){const R=new r.CancellationTokenSource;return setTimeout(()=>R.cancel(),x),R.token}function c(x,R){if(x.isCancellationRequested||R.isCancellationRequested)return r.CancellationToken.Cancelled;const _=new r.CancellationTokenSource;return x.onCancellationRequested(()=>_.cancel()),R.onCancellationRequested(()=>_.cancel()),_.token}class f{get didTimeout(){return this._state==="timedout"}constructor(R){this._state="pending",this._disposables=new P.DisposableStore,this.promise=new Promise((_,N)=>{this._resolvePromise=_,this._rejectPromise=N}),R.isCancellationRequested?this._timeout():this._disposables.add(R.onCancellationRequested(()=>this._timeout()))}registerDisposable(R){this._state==="pending"?this._disposables.add(R):R.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){const R=new Error("Time limit reached");return R.code="ETIMEDOUT",R.syscall="connect",R}resolve(R){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise(R))}reject(R){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise(R))}}function I(x,R){const _=new f(R);return _.registerDisposable(x.onControlMessage(N=>{const q=JSON.parse(N.toString()),re=W(q);re?_.reject(re):_.resolve(q)})),_.promise}function w(x,R,_,N,q,re,ne,le){const V=new f(le),ie=u.StopWatch.create(!1);return x.info(`Creating a socket (${ne})...`),h.mark(`code/willCreateSocket/${re}`),R.connect(_,N,q,ne).then(Q=>{V.didTimeout?(h.mark(`code/didCreateSocketError/${re}`),x.info(`Creating a socket (${ne}) finished after ${ie.elapsed()} ms, but this is too late and has timed out already.`),Q?.dispose()):(h.mark(`code/didCreateSocketOK/${re}`),x.info(`Creating a socket (${ne}) was successful after ${ie.elapsed()} ms.`),V.resolve(Q))},Q=>{h.mark(`code/didCreateSocketError/${re}`),x.info(`Creating a socket (${ne}) returned an error after ${ie.elapsed()} ms.`),x.error(Q),V.reject(Q)}),V.promise}function t(x,R){const _=new f(R);return x.then(N=>{_.didTimeout||_.resolve(N)},N=>{_.didTimeout||_.reject(N)}),_.promise}async function a(x,R,_,N){const q=se(x,R);x.logService.trace(`${q} 1/6. invoking socketFactory.connect().`);let re;try{re=await w(x.logService,x.remoteSocketFactoryService,x.connectTo,(0,d.getRemoteServerRootPath)(x),`reconnectionToken=${x.reconnectionToken}&reconnection=${x.reconnectionProtocol?"true":"false"}`,l(R),`renderer-${l(R)}-${x.reconnectionToken}`,N)}catch(Q){throw x.logService.error(`${q} socketFactory.connect() failed or timed out. Error:`),x.logService.error(Q),Q}x.logService.trace(`${q} 2/6. socketFactory.connect() was successful.`);let ne,le;x.reconnectionProtocol?(x.reconnectionProtocol.beginAcceptReconnection(re,null),ne=x.reconnectionProtocol,le=!1):(ne=new g.PersistentProtocol({socket:re}),le=!0),x.logService.trace(`${q} 3/6. sending AuthRequest control message.`);const V=await t(x.signService.createNewMessage((0,m.generateUuid)()),N),ie={type:"auth",auth:x.connectionToken||"00000000000000000000",data:V.data};ne.sendControl(L.VSBuffer.fromString(JSON.stringify(ie)));try{const Q=await I(ne,c(N,p(1e4)));if(Q.type!=="sign"||typeof Q.data!="string"){const De=new Error("Unexpected handshake message");throw De.code="VSCODE_CONNECTION_ERROR",De}if(x.logService.trace(`${q} 4/6. received SignRequest control message.`),!await t(x.signService.validate(V,Q.signedData),N)){const De=new Error("Refused to connect to unsupported server");throw De.code="VSCODE_CONNECTION_ERROR",De}const pe=await t(x.signService.sign(Q.data),N),Pe={type:"connectionType",commit:x.commit,signedData:pe,desiredConnectionType:R};return _&&(Pe.args=_),x.logService.trace(`${q} 5/6. sending ConnectionTypeRequest control message.`),ne.sendControl(L.VSBuffer.fromString(JSON.stringify(Pe))),{protocol:ne,ownsProtocol:le}}catch(Q){throw Q&&Q.code==="ETIMEDOUT"&&(x.logService.error(`${q} the handshake timed out. Error:`),x.logService.error(Q)),Q&&Q.code==="VSCODE_CONNECTION_ERROR"&&(x.logService.error(`${q} received error control message when negotiating connection. Error:`),x.logService.error(Q)),le&&B(ne),Q}}async function s(x,R,_,N){const q=Date.now(),re=se(x,R),{protocol:ne,ownsProtocol:le}=await a(x,R,_,N),V=new f(N);return V.registerDisposable(ne.onControlMessage(ie=>{const Q=JSON.parse(ie.toString()),fe=W(Q);fe?(x.logService.error(`${re} received error control message when negotiating connection. Error:`),x.logService.error(fe),le&&B(ne),V.reject(fe)):(x.reconnectionProtocol?.endAcceptReconnection(),x.logService.trace(`${re} 6/6. handshake finished, connection is up and running after ${ce(q)}!`),V.resolve({protocol:ne,firstMessage:Q}))})),V.promise}async function i(x,R){const{protocol:_}=await s(x,1,void 0,R);return{protocol:_}}async function n(x,R,_){const{protocol:N,firstMessage:q}=await s(x,2,R,_),re=q&&q.debugPort;return{protocol:N,debugPort:re}}async function o(x,R,_){const N=Date.now(),q=se(x,3),{protocol:re}=await a(x,3,R,_);return x.logService.trace(`${q} 6/6. handshake finished, connection is up and running after ${ce(N)}!`),re}async function S(x,R,_){const{connectTo:N,connectionToken:q}=await x.addressProvider.getAddress();return{commit:x.commit,quality:x.quality,connectTo:N,connectionToken:q,reconnectionToken:R,reconnectionProtocol:_,remoteSocketFactoryService:x.remoteSocketFactoryService,signService:x.signService,logService:x.logService}}async function k(x,R,_){return C(x,async N=>{const{protocol:q}=await i(N,r.CancellationToken.None);return new j(x,R,_,N.reconnectionToken,q)})}e.connectRemoteAgentManagement=k;async function M(x,R){return C(x,async _=>{const{protocol:N,debugPort:q}=await n(_,R,r.CancellationToken.None);return new G(x,R,_.reconnectionToken,N,q)})}e.connectRemoteAgentExtensionHost=M;async function C(x,R){for(let N=1;;N++)try{const q=(0,m.generateUuid)(),re=await S(x,q,null);return await R(re)}catch(q){if(N<5)x.logService.error(`[remote-connection][attempt ${N}] An error occurred in initial connection! Will retry... Error:`),x.logService.error(q);else throw x.logService.error(`[remote-connection][attempt ${N}]  An error occurred in initial connection! It will be treated as a permanent error. Error:`),x.logService.error(q),de.triggerPermanentFailure(0,0,v.RemoteAuthorityResolverError.isHandled(q)),q}}async function A(x,R,_){const N=await S(x,(0,m.generateUuid)(),null);return await o(N,{host:R,port:_},r.CancellationToken.None)}e.connectRemoteAgentTunnel=A;function T(x){return(0,b.createCancelablePromise)(R=>new Promise((_,N)=>{const q=setTimeout(_,x*1e3);R.onCancellationRequested(()=>{clearTimeout(q),_()})}))}var F;(function(x){x[x.ConnectionLost=0]="ConnectionLost",x[x.ReconnectionWait=1]="ReconnectionWait",x[x.ReconnectionRunning=2]="ReconnectionRunning",x[x.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",x[x.ConnectionGain=4]="ConnectionGain"})(F||(e.PersistentConnectionEventType=F={}));class z{constructor(R,_){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.type=0}}e.ConnectionLostEvent=z;class oe{constructor(R,_,N,q){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.durationSeconds=N,this.cancellableTimer=q,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=oe;class ee{constructor(R,_,N){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.type=2}}e.ReconnectionRunningEvent=ee;class ue{constructor(R,_,N){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.type=4}}e.ConnectionGainEvent=ue;class ae{constructor(R,_,N,q){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.handled=q,this.type=3}}e.ReconnectionPermanentFailureEvent=ae;class de extends P.Disposable{static triggerPermanentFailure(R,_,N){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=R,this._permanentFailureAttempt=_,this._permanentFailureHandled=N,this._instances.forEach(q=>q._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach(R=>R._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach(R=>R._pauseSocketWriting())}static{this._permanentFailure=!1}static{this._permanentFailureMillisSinceLastIncomingData=0}static{this._permanentFailureAttempt=0}static{this._permanentFailureHandled=!1}static{this._instances=[]}get _isPermanentFailure(){return this._permanentFailure||de._permanentFailure}constructor(R,_,N,q,re){super(),this._connectionType=R,this._options=_,this.reconnectionToken=N,this.protocol=q,this._reconnectionFailureIsFatal=re,this._onDidStateChange=this._register(new D.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._isDisposed=!1,this._onDidStateChange.fire(new ue(this.reconnectionToken,0,0)),this._register(q.onSocketClose(ne=>{const le=Y(this._connectionType,this.reconnectionToken,!0);ne?ne.type===0?(this._options.logService.info(`${le} received socket close event (hadError: ${ne.hadError}).`),ne.error&&this._options.logService.error(ne.error)):(this._options.logService.info(`${le} received socket close event (wasClean: ${ne.wasClean}, code: ${ne.code}, reason: ${ne.reason}).`),ne.event&&this._options.logService.error(ne.event)):this._options.logService.info(`${le} received socket close event.`),this._beginReconnecting()})),this._register(q.onSocketTimeout(ne=>{const le=Y(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${le} received socket timeout event (unacknowledgedMsgCount: ${ne.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${ne.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${ne.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),de._instances.push(this),this._register((0,P.toDisposable)(()=>{const ne=de._instances.indexOf(this);ne>=0&&de._instances.splice(ne,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(de._permanentFailureMillisSinceLastIncomingData,de._permanentFailureAttempt,de._permanentFailureHandled)}dispose(){super.dispose(),this._isDisposed=!0}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure||this._isDisposed)return;const R=Y(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${R} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new z(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const _=[0,5,5,10,10,10,10,10,30];let N=-1;do{N++;const q=N<_.length?_[N]:_[_.length-1];try{if(q>0){const ne=T(q);this._onDidStateChange.fire(new oe(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),q,ne)),this._options.logService.info(`${R} waiting for ${q} seconds before reconnecting...`);try{await ne}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${R} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new ee(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),N+1)),this._options.logService.info(`${R} resolving connection...`);const re=await S(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${R} connecting to ${re.connectTo}...`),await this._reconnect(re,p(y)),this._options.logService.info(`${R} reconnected!`),this._onDidStateChange.fire(new ue(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),N+1));break}catch(re){if(re.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${R} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}if(N>360){this._options.logService.error(`${R} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}if(v.RemoteAuthorityResolverError.isTemporarilyNotAvailable(re)){this._options.logService.info(`${R} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((re.code==="ETIMEDOUT"||re.code==="ENETUNREACH"||re.code==="ECONNREFUSED"||re.code==="ECONNRESET")&&re.syscall==="connect"){this._options.logService.info(`${R} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((0,O.isCancellationError)(re)){this._options.logService.info(`${R} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if(re instanceof v.RemoteAuthorityResolverError){this._options.logService.error(`${R} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,v.RemoteAuthorityResolverError.isHandled(re));break}this._options.logService.error(`${R} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}}while(!this._isPermanentFailure&&!this._isDisposed)}_onReconnectionPermanentFailure(R,_,N){this._reconnectionFailureIsFatal?de.triggerPermanentFailure(R,_,N):this._gotoPermanentFailure(R,_,N)}_gotoPermanentFailure(R,_,N){this._onDidStateChange.fire(new ae(this.reconnectionToken,R,_,N)),B(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=de;class j extends de{constructor(R,_,N,q,re){super(1,R,q,re,!0),this.client=this._register(new g.Client(re,{remoteAuthority:_,clientId:N},R.ipcLogger))}async _reconnect(R,_){await i(R,_)}}e.ManagementPersistentConnection=j;class G extends de{constructor(R,_,N,q,re){super(2,R,N,q,!1),this._startArguments=_,this.debugPort=re}async _reconnect(R,_){await n(R,this._startArguments,_)}}e.ExtensionHostPersistentConnection=G;function B(x){try{x.acceptDisconnect();const R=x.getSocket();x.dispose(),R.dispose()}catch(R){(0,O.onUnexpectedError)(R)}}function W(x){if(x&&x.type==="error"){const R=new Error(`Connection error: ${x.reason}`);return R.code="VSCODE_CONNECTION_ERROR",R}return null}function U(x,R){for(;x.length<R;)x+=" ";return x}function $(x,R){return`[remote-connection][${U(l(x),13)}][${R.substr(0,5)}\u2026]`}function Y(x,R,_){return`${$(x,R)}[${_?"reconnect":"initial"}]`}function se(x,R){return`${Y(R,x.reconnectionToken,!!x.reconnectionProtocol)}[${x.connectTo}]`}function ce(x){return`${Date.now()-x} ms`}}),define(Z[244],te([0,1,2,6]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteSocketFactoryService=e.IRemoteSocketFactoryService=void 0,e.IRemoteSocketFactoryService=(0,L.createDecorator)("remoteSocketFactoryService");class r{constructor(){this.factories={}}register(D,P){return this.factories[D]??=[],this.factories[D].push(P),(0,b.toDisposable)(()=>{const h=this.factories[D]?.indexOf(P);typeof h=="number"&&h>=0&&this.factories[D]?.splice(h,1)})}getSocketFactory(D){return(this.factories[D.type]||[]).find(h=>h.supports(D))}connect(D,P,h,u){const m=this.getSocketFactory(D);if(!m)throw new Error(`No socket factory found for ${D}`);return m.connect(D,P,h,u)}}e.RemoteSocketFactoryService=r}),define(Z[245],te([0,1,27,47,21,116]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWSLFeatureInstalled=void 0;let D;async function P(d=!1){return(D===void 0||d)&&(D=h()),D}e.hasWSLFeatureInstalled=P;async function h(){const d=u();if(d===void 0)return!1;if(d>=22e3){const y=g();if(y)return new Promise(E=>{L.execFile(y,["--status"],l=>E(!l))})}else{const y=v();if(y)try{if((await r.Promises.stat(y)).isFile())return!0}catch{}}return!1}function u(){const d=/(\d+)\.(\d+)\.(\d+)/g.exec(b.release());if(d)return parseInt(d[3])}function m(d){const y=process.env.SystemRoot;if(y){const E=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");return O.join(y,E?"Sysnative":"System32",d)}}function g(){return m("wsl.exe")}function v(){return m("lxss\\LxssManager.dll")}}),define(Z[51],te([0,1,17,13,2,184,59,6,5,43]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.AbstractRequestService=e.IRequestService=void 0,e.IRequestService=(0,P.createDecorator)("requestService");class m{constructor(w){this.original=w}toJSON(){if(!this.headers){const w=Object.create(null);for(const t in this.original)t.toLowerCase()==="authorization"||t.toLowerCase()==="proxy-authorization"?w[t]="*****":w[t]=this.original[t];this.headers=w}return this.headers}}class g extends r.Disposable{constructor(w){super(),this.counter=0,this.logger=w.createLogger("network",{name:(0,O.localize)(0,null),when:h.CONTEXT_LOG_LEVEL.isEqualTo((0,h.LogLevelToString)(h.LogLevel.Trace)).serialize()})}async logAndRequest(w,t,a){const s=`${w} #${++this.counter}: ${t.url}`;this.logger.trace(`${s} - begin`,t.type,new m(t.headers??{}));try{const i=await a();return this.logger.trace(`${s} - end`,t.type,i.res.statusCode,i.res.headers),i}catch(i){throw this.logger.error(`${s} - error`,t.type,(0,L.getErrorMessage)(i)),i}}}e.AbstractRequestService=g;function v(I){return I.res.statusCode&&I.res.statusCode>=200&&I.res.statusCode<300||I.res.statusCode===1223}e.isSuccess=v;function d(I){return I.res.statusCode===204}async function y(I){return d(I)?null:(await(0,b.streamToBuffer)(I.stream)).toString()}e.asText=y;async function E(I){if(!v(I))throw new Error("Server returned "+I.res.statusCode);return y(I)}e.asTextOrError=E;async function l(I){if(!v(I))throw new Error("Server returned "+I.res.statusCode);if(d(I))return null;const t=(await(0,b.streamToBuffer)(I.stream)).toString();try{return JSON.parse(t)}catch(a){throw a.message+=`:
`+t,a}}e.asJson=l;function p(I){f(I)}e.updateProxyConfigurationsScope=p;let c;function f(I){const w=u.Registry.as(D.Extensions.Configuration),t=c;c={id:"http",order:15,title:(0,O.localize)(1,null),type:"object",scope:I,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,O.localize)(2,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,O.localize)(3,null),restricted:!0},"http.proxyKerberosServicePrincipal":{type:"string",markdownDescription:(0,O.localize)(4,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,O.localize)(5,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,O.localize)(6,null),(0,O.localize)(7,null),(0,O.localize)(8,null),(0,O.localize)(9,null)],default:"override",description:(0,O.localize)(10,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,O.localize)(11,null),restricted:!0}}},w.updateConfigurations({add:[c],remove:t?[t]:[]})}f(1)}),define(Z[246],te([0,1,17,23]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestChannelClient=e.RequestChannel=void 0;class r{constructor(P){this.service=P}listen(P,h){throw new Error("Invalid listen")}call(P,h,u,m=L.CancellationToken.None){switch(h){case"request":return this.service.request(u[0],m).then(async({res:g,stream:v})=>{const d=await(0,b.streamToBuffer)(v);return[{statusCode:g.statusCode,headers:g.headers},d]});case"resolveProxy":return this.service.resolveProxy(u[0])}throw new Error("Invalid call")}}e.RequestChannel=r;class O{constructor(P){this.channel=P}async request(P,h){const[u,m]=await this.channel.call("request",[P],h);return{res:u,stream:(0,b.bufferToStream)(m)}}async resolveProxy(P){return this.channel.call("resolveProxy",[P])}}e.RequestChannelClient=O}),define(Z[247],te([0,1,248,12]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProxyAgent=void 0;function r(D,P){return D.protocol==="http:"?P.HTTP_PROXY||P.http_proxy||null:D.protocol==="https:"&&(P.HTTPS_PROXY||P.https_proxy||P.HTTP_PROXY||P.http_proxy)||null}async function O(D,P,h={}){const u=(0,b.parse)(D),m=h.proxyUrl||r(u,P);if(!m)return null;const g=(0,b.parse)(m);if(!/^https?:$/.test(g.protocol||""))return null;const v={host:g.hostname||"",port:g.port||(g.protocol==="https"?"443":"80"),auth:g.auth,rejectUnauthorized:(0,L.isBoolean)(h.strictSSL)?h.strictSSL:!0};return u.protocol==="http:"?(await new Promise((d,y)=>{H(["http-proxy-agent"],d,y)}))(v):(await new Promise((d,y)=>{H(["https-proxy-agent"],d,y)}))(v)}e.getProxyAgent=O}),define(Z[249],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessRawConnection=e.SharedProcessChannelConnection=e.SharedProcessLifecycle=void 0,e.SharedProcessLifecycle={exit:"vscode:electron-main->shared-process=exit",ipcReady:"vscode:shared-process->electron-main=ipc-ready",initDone:"vscode:shared-process->electron-main=init-done"},e.SharedProcessChannelConnection={request:"vscode:createSharedProcessChannelConnection",response:"vscode:createSharedProcessChannelConnectionResult"},e.SharedProcessRawConnection={request:"vscode:createSharedProcessRawConnection",response:"vscode:createSharedProcessRawConnectionResult"}}),define(Z[96],te([0,1,47,10,185,23,50,13,4,31,111,63,8,140]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getResolvedShellEnv=void 0;let y;async function E(p,c,f,I){return f["force-disable-user-env"]?(c.trace("resolveShellEnv(): skipped (--force-disable-user-env)"),{}):h.isWindows?(c.trace("resolveShellEnv(): skipped (Windows)"),{}):(0,g.isLaunchedFromCli)(I)&&!f["force-user-env"]?(c.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"),{}):((0,g.isLaunchedFromCli)(I)?c.trace("resolveShellEnv(): running (--force-user-env)"):c.trace("resolveShellEnv(): running (macOS/Linux)"),y||(y=v.Promises.withAsyncBody(async(w,t)=>{const a=new O.CancellationTokenSource;let s=1e4;const i=p.getValue("application.shellEnvironmentResolutionTimeout");typeof i=="number"&&(s=(0,d.clamp)(i,1,120)*1e3);const n=setTimeout(()=>{a.dispose(!0),t(new Error((0,r.localize)(0,null)))},s);try{w(await l(c,a.token))}catch(o){!(0,P.isCancellationError)(o)&&!a.token.isCancellationRequested?t(new Error((0,r.localize)(1,null,(0,D.toErrorMessage)(o)))):w({})}finally{clearTimeout(n),a.dispose()}})),y)}e.getResolvedShellEnv=E;async function l(p,c){const f=process.env.ELECTRON_RUN_AS_NODE;p.trace("getUnixShellEnvironment#runAsNode",f);const I=process.env.ELECTRON_NO_ATTACH_CONSOLE;p.trace("getUnixShellEnvironment#noAttach",I);const w=(0,u.generateUuid)().replace(/-/g,"").substr(0,12),t=new RegExp(w+"({.*})"+w),a={...process.env,ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1",VSCODE_RESOLVING_ENVIRONMENT:"1"};p.trace("getUnixShellEnvironment#env",a);const s=await(0,m.getSystemShell)(h.OS,a);return p.trace("getUnixShellEnvironment#shell",s),new Promise((i,n)=>{if(c.isCancellationRequested)return n(new P.CancellationError);const o=(0,L.basename)(s);let S,k;const M="";/^pwsh(-preview)?$/.test(o)?(S=`& '${process.execPath}' ${M} -p '''${w}'' + JSON.stringify(process.env) + ''${w}'''`,k=["-Login","-Command"]):o==="nu"?(S=`^'${process.execPath}' ${M} -p '"${w}" + JSON.stringify(process.env) + "${w}"'`,k=["-i","-l","-c"]):(S=`'${process.execPath}' ${M} -p '"${w}" + JSON.stringify(process.env) + "${w}"'`,o==="tcsh"||o==="csh"?k=["-ic"]:k=["-i","-l","-c"]),p.trace("getUnixShellEnvironment#spawn",JSON.stringify(k),S);const C=(0,b.spawn)(s,[...k,S],{detached:!0,stdio:["ignore","pipe","pipe"],env:a});c.onCancellationRequested(()=>(C.kill(),n(new P.CancellationError))),C.on("error",F=>{p.error("getUnixShellEnvironment#errorChildProcess",(0,D.toErrorMessage)(F)),n(F)});const A=[];C.stdout.on("data",F=>A.push(F));const T=[];C.stderr.on("data",F=>T.push(F)),C.on("close",(F,z)=>{const oe=Buffer.concat(A).toString("utf8");p.trace("getUnixShellEnvironment#raw",oe);const ee=Buffer.concat(T).toString("utf8");if(ee.trim()&&p.trace("getUnixShellEnvironment#stderr",ee),F||z)return n(new Error((0,r.localize)(2,null,F,z)));const ue=t.exec(oe),ae=ue?ue[1]:"{}";try{const de=JSON.parse(ae);f?de.ELECTRON_RUN_AS_NODE=f:delete de.ELECTRON_RUN_AS_NODE,I?de.ELECTRON_NO_ATTACH_CONSOLE=I:delete de.ELECTRON_NO_ATTACH_CONSOLE,delete de.VSCODE_RESOLVING_ENVIRONMENT,delete de.XDG_RUNTIME_DIR,p.trace("getUnixShellEnvironment#result",de),i(de)}catch(de){p.error("getUnixShellEnvironment#errorCaught",(0,D.toErrorMessage)(de)),n(de)}})})}}),define(Z[250],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSignService=void 0;class b{constructor(){this.validators=new Map}static{this._nextId=1}async createNewMessage(r){try{const O=await this.getValidator();if(O){const D=String(b._nextId++);return this.validators.set(D,O),{id:D,data:O.createNewMessage(r)}}}catch{}return{id:"",data:r}}async validate(r,O){if(!r.id)return!0;const D=this.validators.get(r.id);if(!D)return!1;this.validators.delete(r.id);try{return D.validate(O)==="ok"}catch{return!1}finally{D.dispose?.()}}async sign(r){try{return await this.signValue(r)}catch{}return r}}e.AbstractSignService=b}),define(Z[97],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISignService=e.SIGN_SERVICE_ID=void 0,e.SIGN_SERVICE_ID="signService",e.ISignService=(0,b.createDecorator)(e.SIGN_SERVICE_ID)}),define(Z[251],te([0,1,250]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignService=void 0;class L extends b.AbstractSignService{getValidator(){return this.vsda().then(O=>new O.validator)}signValue(O){return this.vsda().then(D=>new D.signer().sign(O))}vsda(){return new Promise((O,D)=>H(["vsda"],O,D))}}e.SignService=L}),define(Z[34],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStateService=e.IStateReadService=void 0,e.IStateReadService=(0,b.createDecorator)("stateReadService"),e.IStateService=(0,b.createDecorator)("stateService")}),define(Z[124],te([0,1,8,17,12,33,16,5]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateService=e.StateReadonlyService=e.FileStorage=e.SaveStrategy=void 0;var h;(function(v){v[v.IMMEDIATE=0]="IMMEDIATE",v[v.DELAYED=1]="DELAYED"})(h||(e.SaveStrategy=h={}));class u{constructor(d,y,E,l){this.storagePath=d,this.logService=E,this.fileService=l,this.storage=Object.create(null),this.lastSavedStorageContents="",this.initializing=void 0,this.closing=void 0,this.flushDelayer=y===0?void 0:new b.ThrottledDelayer(100)}init(){return this.initializing||(this.initializing=this.doInit()),this.initializing}async doInit(){try{this.lastSavedStorageContents=(await this.fileService.readFile(this.storagePath)).value.toString(),this.storage=JSON.parse(this.lastSavedStorageContents)}catch(d){d.fileOperationResult!==1&&this.logService.error(d)}}getItem(d,y){const E=this.storage[d];return(0,r.isUndefinedOrNull)(E)?y:E}setItem(d,y){this.setItems([{key:d,data:y}])}setItems(d){let y=!1;for(const{key:E,data:l}of d)this.storage[E]!==l&&((0,r.isUndefinedOrNull)(l)?(0,r.isUndefined)(this.storage[E])||(this.storage[E]=void 0,y=!0):(this.storage[E]=l,y=!0));y&&this.save()}removeItem(d){(0,r.isUndefined)(this.storage[d])||(this.storage[d]=void 0,this.save())}async save(){if(!this.closing)return this.flushDelayer?this.flushDelayer.trigger(()=>this.doSave()):this.doSave()}async doSave(){if(!this.initializing)return;await this.initializing;const d=JSON.stringify(this.storage,null,4);if(d!==this.lastSavedStorageContents)try{await this.fileService.writeFile(this.storagePath,L.VSBuffer.fromString(d),{atomic:{postfix:".vsctmp"}}),this.lastSavedStorageContents=d}catch(y){this.logService.error(y)}}async close(){return this.closing||(this.closing=this.flushDelayer?this.flushDelayer.trigger(()=>this.doSave(),0):this.doSave()),this.closing}}e.FileStorage=u;let m=class{constructor(d,y,E,l){this.fileStorage=new u(y.stateResource,d,E,l)}async init(){await this.fileStorage.init()}getItem(d,y){return this.fileStorage.getItem(d,y)}};e.StateReadonlyService=m,e.StateReadonlyService=m=be([X(1,O.IEnvironmentService),X(2,P.ILogService),X(3,D.IFileService)],m);class g extends m{setItem(d,y){this.fileStorage.setItem(d,y)}setItems(d){this.fileStorage.setItems(d)}removeItem(d){this.fileStorage.removeItem(d)}close(){return this.fileStorage.close()}}e.StateService=g}),define(Z[125],te([0,1,4,36,31,67]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;const D=O.default;function P(m){if(b.platform===2&&/^penguin(\.|$)/i.test(m))return"chromebook"}function h(m,g,v,d,y,E,l,p){const c=Object.create(null);c["common.machineId"]=E,c.sessionID=(0,r.generateUuid)()+Date.now(),c.commitHash=d,c.version=y,c["common.platformVersion"]=(m||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),c["common.platform"]=(0,b.PlatformToString)(b.platform),c["common.nodePlatform"]=L.platform,c["common.nodeArch"]=v,c["common.product"]=D.nameShort||"desktop",c["common.application.name"]=D.nameLong,c.quality=D.quality||"dev",l&&(c["common.msftInternal"]=l);let f=0;const I=Date.now();Object.defineProperties(c,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-I,enumerable:!0},"common.sequence":{get:()=>f++,enumerable:!0}}),b.isLinuxSnap&&(c["common.snap"]="true");const w=P(g);return w&&(c["common.platformDetail"]=w),c}e.resolveCommonProperties=h;function u(m){const g=L.env.USERDNSDOMAIN;if(!g)return!1;const v=g.toLowerCase();return m.some(d=>v===d)}e.verifyMicrosoftInternalDomain=u}),define(Z[25],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_CRASH_REPORTER_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,b.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,b.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_CRASH_REPORTER_SETTING_ID="telemetry.enableCrashReporter",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var L;(function(O){O[O.NONE=0]="NONE",O[O.CRASH=1]="CRASH",O[O.ERROR=2]="ERROR",O[O.USAGE=3]="USAGE"})(L||(e.TelemetryLevel=L={}));var r;(function(O){O.OFF="off",O.CRASH="crash",O.ERROR="error",O.ON="all"})(r||(e.TelemetryConfiguration=r={}))}),define(Z[252],te([0,1,27,8,44,15,10,4,7,87,21,110,92,16,22,25]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsService=e.collectLaunchConfigs=e.getMachineInfo=e.collectWorkspaceStats=void 0;const l=new Map;async function p(t,a){const s=`${t}::${a.join(":")}`,i=l.get(s);if(i)return i;const n=[{tag:"grunt.js",filePattern:/^gruntfile\.js$/i},{tag:"gulp.js",filePattern:/^gulpfile\.js$/i},{tag:"tsconfig.json",filePattern:/^tsconfig\.json$/i},{tag:"package.json",filePattern:/^package\.json$/i},{tag:"jsconfig.json",filePattern:/^jsconfig\.json$/i},{tag:"tslint.json",filePattern:/^tslint\.json$/i},{tag:"eslint.json",filePattern:/^eslint\.json$/i},{tag:"tasks.json",filePattern:/^tasks\.json$/i},{tag:"launch.json",filePattern:/^launch\.json$/i},{tag:"settings.json",filePattern:/^settings\.json$/i},{tag:"webpack.config.js",filePattern:/^webpack\.config\.js$/i},{tag:"project.json",filePattern:/^project\.json$/i},{tag:"makefile",filePattern:/^makefile$/i},{tag:"sln",filePattern:/^.+\.sln$/i},{tag:"csproj",filePattern:/^.+\.csproj$/i},{tag:"cmake",filePattern:/^.+\.cmake$/i},{tag:"github-actions",filePattern:/^.+\.ya?ml$/i,relativePathPattern:/^\.github(?:\/|\\)workflows$/i},{tag:"devcontainer.json",filePattern:/^devcontainer\.json$/i},{tag:"dockerfile",filePattern:/^(dockerfile|docker\-compose\.ya?ml)$/i}],o=new Map,S=new Map,k=2e4;function M(A,T,F,z){const oe=T.substring(A.length+1);return L.Promises.withAsyncBody(async ee=>{let ue;try{ue=await m.Promises.readdir(T,{withFileTypes:!0})}catch{ee();return}if(z.count>=k){z.count+=ue.length,z.maxReached=!0,ee();return}let ae=ue.length;if(ae===0){ee();return}let de=ue;z.count+ue.length>k&&(z.maxReached=!0,ae=k-z.count,de=ue.slice(0,ae)),z.count+=ue.length;for(const j of de)if(j.isDirectory()){if(F.includes(j.name)||await M(A,(0,D.join)(T,j.name),F,z),--ae===0){ee();return}}else{const G=j.name.lastIndexOf(".");if(G>=0){const B=j.name.substring(G+1);B&&o.set(B,(o.get(B)??0)+1)}for(const B of n)B.relativePathPattern?.test(oe)!==!1&&B.filePattern.test(j.name)&&S.set(B.tag,(S.get(B.tag)??0)+1);if(--ae===0){ee();return}}})}const C=L.Promises.withAsyncBody(async A=>{const T={count:0,maxReached:!1};await M(t,t,a,T);const F=await I(t);A({configFiles:c(S),fileTypes:c(o),fileCount:T.count,maxFilesReached:T.maxReached,launchConfigFiles:F})});return l.set(s,C),C}e.collectWorkspaceStats=p;function c(t){return Array.from(t.entries(),([a,s])=>({name:a,count:s})).sort((a,s)=>s.count-a.count)}function f(){const t={os:`${b.type()} ${b.arch()} ${b.release()}`,memory:`${(b.totalmem()/d.ByteSize.GB).toFixed(2)}GB (${(b.freemem()/d.ByteSize.GB).toFixed(2)}GB free)`,vmHint:`${Math.round(u.virtualMachineHint.value()*100)}%`},a=b.cpus();return a&&a.length>0&&(t.cpus=`${a[0].model} (${a.length} x ${a[0].speed})`),t}e.getMachineInfo=f;async function I(t){try{const a=new Map,s=(0,D.join)(t,".vscode","launch.json"),i=await m.Promises.readFile(s),n=[],o=(0,r.parse)(i.toString(),n);if(n.length)return console.log(`Unable to parse ${s}`),[];if((0,r.getNodeType)(o)==="object"&&o.configurations)for(const S of o.configurations){const k=S.type;k&&(a.has(k)?a.set(k,a.get(k)+1):a.set(k,1))}return c(a)}catch{return[]}}e.collectLaunchConfigs=I;let w=class{constructor(a,s){this.telemetryService=a,this.productService=s}formatMachineInfo(a){const s=[];return s.push(`OS Version:       ${a.os}`),s.push(`CPUs:             ${a.cpus}`),s.push(`Memory (System):  ${a.memory}`),s.push(`VM:               ${a.vmHint}`),s.join(`
`)}formatEnvironment(a){const s=[];s.push(`Version:          ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit||"Commit unknown"}, ${this.productService.date||"Date unknown"})`),s.push(`OS Version:       ${b.type()} ${b.arch()} ${b.release()}`);const i=b.cpus();return i&&i.length>0&&s.push(`CPUs:             ${i[0].model} (${i.length} x ${i[0].speed})`),s.push(`Memory (System):  ${(b.totalmem()/d.ByteSize.GB).toFixed(2)}GB (${(b.freemem()/d.ByteSize.GB).toFixed(2)}GB free)`),P.isWindows||s.push(`Load (avg):       ${b.loadavg().map(n=>Math.round(n)).join(", ")}`),s.push(`VM:               ${Math.round(u.virtualMachineHint.value()*100)}%`),s.push(`Screen Reader:    ${a.screenReader?"yes":"no"}`),s.push(`Process Argv:     ${a.mainArguments.join(" ")}`),s.push(`GPU Status:       ${this.expandGPUFeatures(a.gpuFeatureStatus)}`),s.join(`
`)}async getPerformanceInfo(a,s){return Promise.all([(0,g.listProcesses)(a.mainPID),this.formatWorkspaceMetadata(a)]).then(async i=>{let[n,o]=i,S=this.formatProcessList(a,n);return s.forEach(k=>{if((0,v.isRemoteDiagnosticError)(k))S+=`
${k.errorMessage}`,o+=`
${k.errorMessage}`;else if(S+=`

Remote: ${k.hostName}`,k.processes&&(S+=`
${this.formatProcessList(a,k.processes)}`),k.workspaceMetadata){o+=`
|  Remote: ${k.hostName}`;for(const M of Object.keys(k.workspaceMetadata)){const C=k.workspaceMetadata[M];let A=`${C.fileCount} files`;C.maxFilesReached&&(A=`more than ${A}`),o+=`|    Folder (${M}): ${A}`,o+=this.formatWorkspaceStats(C)}}}),{processInfo:S,workspaceInfo:o}})}async getSystemInfo(a,s){const{memory:i,vmHint:n,os:o,cpus:S}=f(),k={os:o,memory:i,cpus:S,vmHint:n,processArgs:`${a.mainArguments.join(" ")}`,gpuStatus:a.gpuFeatureStatus,screenReader:`${a.screenReader?"yes":"no"}`,remoteData:s};return P.isWindows||(k.load=`${b.loadavg().map(M=>Math.round(M)).join(", ")}`),P.isLinux&&(k.linuxEnv={desktopSession:process.env.DESKTOP_SESSION,xdgSessionDesktop:process.env.XDG_SESSION_DESKTOP,xdgCurrentDesktop:process.env.XDG_CURRENT_DESKTOP,xdgSessionType:process.env.XDG_SESSION_TYPE}),Promise.resolve(k)}async getDiagnostics(a,s){const i=[];return(0,g.listProcesses)(a.mainPID).then(async n=>(i.push(""),i.push(this.formatEnvironment(a)),i.push(""),i.push(this.formatProcessList(a,n)),a.windows.some(o=>o.folderURIs&&o.folderURIs.length>0&&!o.remoteAuthority)&&(i.push(""),i.push("Workspace Stats: "),i.push(await this.formatWorkspaceMetadata(a))),s.forEach(o=>{if((0,v.isRemoteDiagnosticError)(o))i.push(`
${o.errorMessage}`);else if(i.push(`

`),i.push(`Remote:           ${o.hostName}`),i.push(this.formatMachineInfo(o.machineInfo)),o.processes&&i.push(this.formatProcessList(a,o.processes)),o.workspaceMetadata)for(const S of Object.keys(o.workspaceMetadata)){const k=o.workspaceMetadata[S];let M=`${k.fileCount} files`;k.maxFilesReached&&(M=`more than ${M}`),i.push(`Folder (${S}): ${M}`),i.push(this.formatWorkspaceStats(k))}}),i.push(""),i.push(""),i.join(`
`)))}formatWorkspaceStats(a){const s=[];let n=0;const o=(C,A)=>{const T=` ${C}(${A})`;n+T.length>60?(s.push(S),S="|                 ",n=S.length):n+=T.length,S+=T};let S="|      File types:";const k=10,M=a.fileTypes.length>k?k:a.fileTypes.length;for(let C=0;C<M;C++){const A=a.fileTypes[C];o(A.name,A.count)}if(s.push(S),a.configFiles.length>=0&&(S="|      Conf files:",n=0,a.configFiles.forEach(C=>{o(C.name,C.count)}),s.push(S)),a.launchConfigFiles.length>0){let C="|      Launch Configs:";a.launchConfigFiles.forEach(A=>{const T=A.count>1?` ${A.name}(${A.count})`:` ${A.name}`;C+=T}),s.push(C)}return s.join(`
`)}expandGPUFeatures(a){const s=Math.max(...Object.keys(a).map(i=>i.length));return Object.keys(a).map(i=>`${i}:  ${" ".repeat(s-i.length)}  ${a[i]}`).join(`
                  `)}formatWorkspaceMetadata(a){const s=[],i=[];return a.windows.forEach(n=>{n.folderURIs.length===0||n.remoteAuthority||(s.push(`|  Window (${n.title})`),n.folderURIs.forEach(o=>{const S=h.URI.revive(o);if(S.scheme===O.Schemas.file){const k=S.fsPath;i.push(p(k,["node_modules",".git"]).then(M=>{let C=`${M.fileCount} files`;M.maxFilesReached&&(C=`more than ${C}`),s.push(`|    Folder (${(0,D.basename)(k)}): ${C}`),s.push(this.formatWorkspaceStats(M))}).catch(M=>{s.push(`|      Error: Unable to collect workspace stats for folder ${k} (${M.toString()})`)}))}else s.push(`|    Folder (${S.toString()}): Workspace stats not available.`)}))}),Promise.all(i).then(n=>s.join(`
`)).catch(n=>`Unable to collect workspace stats: ${n}`)}formatProcessList(a,s){const i=new Map;a.windows.forEach(o=>i.set(o.pid,`window [${o.id}] (${o.title})`)),a.pidToNames.forEach(({pid:o,name:S})=>i.set(o,S));const n=[];return n.push("CPU %	Mem MB	   PID	Process"),s&&this.formatProcessItem(a.mainPID,i,n,s,0),n.join(`
`)}formatProcessItem(a,s,i,n,o){const S=o===0;let k;S?k=n.pid===a?`${this.productService.applicationName} main`:"remote agent":s.has(n.pid)?k=s.get(n.pid):k=`${"  ".repeat(o)} ${n.name}`;const M=process.platform==="win32"?n.mem:b.totalmem()*(n.mem/100);i.push(`${n.load.toFixed(0).padStart(5," ")}	${(M/d.ByteSize.MB).toFixed(0).padStart(6," ")}	${n.pid.toFixed(0).padStart(6," ")}	${k}`),Array.isArray(n.children)&&n.children.forEach(C=>this.formatProcessItem(a,s,i,C,o+1))}async getWorkspaceFileExtensions(a){const s=new Set;for(const{uri:i}of a.folders){const n=h.URI.revive(i);if(n.scheme!==O.Schemas.file)continue;const o=n.fsPath;try{(await p(o,["node_modules",".git"])).fileTypes.forEach(k=>s.add(k.name))}catch{}}return{extensions:[...s]}}async reportWorkspaceStats(a){for(const{uri:s}of a.folders){const i=h.URI.revive(s);if(i.scheme!==O.Schemas.file)continue;const n=i.fsPath;try{const o=await p(n,["node_modules",".git"]);this.telemetryService.publicLog2("workspace.stats",{"workspace.id":a.telemetryId,rendererSessionId:a.rendererSessionId}),o.fileTypes.forEach(S=>{this.telemetryService.publicLog2("workspace.stats.file",{rendererSessionId:a.rendererSessionId,type:S.name,count:S.count})}),o.launchConfigFiles.forEach(S=>{this.telemetryService.publicLog2("workspace.stats.launchConfigFile",{rendererSessionId:a.rendererSessionId,type:S.name,count:S.count})}),o.configFiles.forEach(S=>{this.telemetryService.publicLog2("workspace.stats.configFiles",{rendererSessionId:a.rendererSessionId,type:S.name,count:S.count})})}catch{}}}};e.DiagnosticsService=w,e.DiagnosticsService=w=be([X(0,E.ITelemetryService),X(1,y.IProductService)],w)}),define(Z[253],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAppenderClient=e.TelemetryAppenderChannel=void 0;class b{constructor(O){this.appenders=O}listen(O,D){throw new Error(`Event not found: ${D}`)}call(O,D,{eventName:P,data:h}){return this.appenders.forEach(u=>u.log(P,h)),Promise.resolve(null)}}e.TelemetryAppenderChannel=b;class L{constructor(O){this.channel=O}log(O,D){return this.channel.call("log",{eventName:O,data:D}).then(void 0,P=>`Failed to log telemetry: ${console.warn(P)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=L}),define(Z[52],te([0,1,37,12,3,18,60,125,25]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.isLoggingOnly=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.extensionTelemetryLogChannelId=e.telemetryLogId=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=e.TelemetryTrustedValue=void 0;class u{constructor(n){this.value=n,this.isTrustedTelemetryValue=!0}}e.TelemetryTrustedValue=u;class m{constructor(){this.telemetryLevel=0,this.sessionId="someValue.sessionId",this.machineId="someValue.machineId",this.firstSessionDate="someValue.firstSessionDate",this.sendErrorTelemetry=!1}publicLog(){}publicLog2(){}publicLogError(){}publicLogError2(){}setExperimentProperty(){}}e.NullTelemetryServiceShape=m,e.NullTelemetryService=new m;class g{async publicLog(n,o,S){}async publicLogError(n,o,S){}}e.NullEndpointTelemetryService=g,e.telemetryLogId="telemetry",e.extensionTelemetryLogChannelId="extensionTelemetryLog",e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function v(i,n){return r.Event.debounce(n.onDidChangeConfiguration,(S,k)=>{const M=S?new Set([...S.affectedKeys,...k.affectedKeys]):k.affectedKeys;return{...k,affectedKeys:M}},1e3,!0)(S=>{S.source!==7&&i.publicLog2("updateConfiguration",{configurationSource:(0,O.ConfigurationTargetToString)(S.source),configurationKeys:Array.from(S.affectedKeys)})})}e.configurationTelemetry=v;function d(i,n){return!n.isBuilt&&!n.disableTelemetry?!0:!(n.disableTelemetry||!i.enableTelemetry||n.extensionTestsLocationURI)}e.supportsTelemetry=d;function y(i,n){return!(n.isBuilt||n.disableTelemetry||i.enableTelemetry&&i.aiConfig?.ariaKey)}e.isLoggingOnly=y;function E(i){const n=i.getValue(h.TELEMETRY_SETTING_ID),o=i.getValue(h.TELEMETRY_CRASH_REPORTER_SETTING_ID);if(i.getValue(h.TELEMETRY_OLD_SETTING_ID)===!1||o===!1)return 0;switch(n??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=E;function l(i){const n={},o={},S={};f(i,S);for(let k in S){k=k.length>150?k.substr(k.length-149):k;const M=S[k];typeof M=="number"?o[k]=M:typeof M=="boolean"?o[k]=M?1:0:typeof M=="string"?(M.length>8192&&console.warn(`Telemetry property: ${k} has been trimmed to 8192, the original length is ${M.length}`),n[k]=M.substring(0,8191)):typeof M<"u"&&M!==null&&(n[k]=M)}return{properties:n,measurements:o}}e.validateTelemetryData=l;const p=new Set(["ssh-remote","dev-container","attached-container","wsl","tunnel","codespaces","amlext"]);function c(i){if(!i)return"none";const n=(0,D.getRemoteName)(i);return p.has(n)?n:"other"}e.cleanRemoteAuthority=c;function f(i,n,o=0,S){if(i)for(const k of Object.getOwnPropertyNames(i)){const M=i[k],C=S?S+k:k;Array.isArray(M)?n[C]=(0,b.safeStringify)(M):M instanceof Date?n[C]=M.toISOString():(0,L.isObject)(M)?o<2?f(M,n,o+1,C+"."):n[C]=(0,b.safeStringify)(M):n[C]=M}}function I(i,n){const o=i.msftInternalDomains||[],S=n.getValue("telemetry.internalTesting");return(0,P.verifyMicrosoftInternalDomain)(o)||S}e.isInternalTelemetry=I;function w(i){return[i.appRoot,i.extensionsPath,i.userHome.fsPath,i.tmpDir.fsPath,i.userDataPath]}e.getPiiPathsFromEnvironment=w;function t(i,n){if(!i||!i.includes("/")&&!i.includes("\\"))return i;let o=i;const S=[];for(const A of n)for(;;){const T=A.exec(i);if(!T)break;S.push([T.index,A.lastIndex])}const k=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,M=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let C=0;for(o="";;){const A=M.exec(i);if(!A)break;const T=S.some(([F,z])=>A.index<z&&F<M.lastIndex);!k.test(A[0])&&!T&&(o+=i.substring(C,A.index)+"<REDACTED: user-file-path>",C=M.lastIndex)}return C<i.length&&(o+=i.substr(C)),o}function a(i){if(!i)return i;const n=[{label:"Google API Key",regex:/AIza[A-Za-z0-9_\\\-]{35}/},{label:"Slack Token",regex:/xox[pbar]\-[A-Za-z0-9]/},{label:"Generic Secret",regex:/(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i},{label:"Email",regex:/@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/}];for(const o of n)if(o.regex.test(i))return`<REDACTED: ${o.label}>`;return i}function s(i,n){return(0,b.cloneAndChange)(i,o=>{if(o instanceof u||Object.hasOwnProperty.call(o,"isTrustedTelemetryValue"))return o.value;if(typeof o=="string"){let S=o.replaceAll("%20"," ");S=t(S,n);for(const k of n)S=S.replace(k,"");return S=a(S),S}})}e.cleanData=s}),define(Z[126],te([0,1,26,119,123,4,7,13,36,52]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function m(s,i){return s.id===i.id?!0:(0,b.compareIgnoreCase)(s.id,i.id)===0}e.areSameExtensions=m;const g=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class v{static create(i){const n=i.manifest?i.manifest.version:i.version,o=i.manifest?i.targetPlatform:i.properties.targetPlatform;return new v(i.identifier,n,o)}static parse(i){const n=g.exec(i);return n&&n[1]&&n[2]?new v({id:n[1]},n[2],n[4]||void 0):null}constructor(i,n,o="undefined"){this.version=n,this.targetPlatform=o,this.id=i.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(i){return i instanceof v?m(this,i)&&this.version===i.version&&this.targetPlatform===i.targetPlatform:!1}}e.ExtensionKey=v;const d=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function y(s){const i=d.exec(s);return i&&i[1]?[l(i[1]),i[2]]:[l(s),void 0]}e.getIdAndVersion=y;function E(s,i){return`${s}.${i}`}e.getExtensionId=E;function l(s){return s.toLowerCase()}e.adoptToGalleryExtensionId=l;function p(s,i){return l(E(s??r.UNDEFINED_PUBLISHER,i))}e.getGalleryExtensionId=p;function c(s,i){const n=[],o=S=>{for(const k of n)if(k.some(M=>m(i(M),i(S))))return k;return null};for(const S of s){const k=o(S);k?k.push(S):n.push([S])}return n}e.groupByExtension=c;function f(s){return{id:s.identifier.id,name:s.manifest.name,galleryId:null,publisherId:s.publisherId,publisherName:s.manifest.publisher,publisherDisplayName:s.publisherDisplayName,dependencies:s.manifest.extensionDependencies&&s.manifest.extensionDependencies.length>0,extensionVersion:s.manifest.version}}e.getLocalExtensionTelemetryData=f;function I(s){return{id:new u.TelemetryTrustedValue(s.identifier.id),name:new u.TelemetryTrustedValue(s.name),galleryId:s.identifier.uuid,publisherId:s.publisherId,publisherName:s.publisher,publisherDisplayName:s.publisherDisplayName,isPreReleaseVersion:s.properties.isPreReleaseVersion,dependencies:!!(s.properties.dependencies&&s.properties.dependencies.length>0),isSigned:s.isSigned,extensionVersion:s.version,...s.telemetryData}}e.getGalleryExtensionTelemetryData=I,e.BetterMergeId=new r.ExtensionIdentifier("pprice.better-merge");function w(s,i){const n=[],o=i.manifest.extensionDependencies?.slice(0)??[];for(;o.length;){const S=o.shift();if(S&&n.every(k=>!m(k.identifier,{id:S}))){const k=s.filter(M=>m(M.identifier,{id:S}));k.length===1&&(n.push(k[0]),o.push(...k[0].manifest.extensionDependencies?.slice(0)??[]))}}return n}e.getExtensionDependencies=w;async function t(s,i){if(!O.isLinux)return!1;let n;try{n=(await s.readFile(D.URI.file("/etc/os-release"))).value.toString()}catch{try{n=(await s.readFile(D.URI.file("/usr/lib/os-release"))).value.toString()}catch(S){i.debug("Error while getting the os-release file.",(0,P.getErrorMessage)(S))}}return!!n&&(n.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}async function a(s,i){const n=await t(s,i),o=(0,L.getTargetPlatform)(n?"alpine":O.platform,h.arch);return i.debug("ComputeTargetPlatform:",o),o}e.computeTargetPlatform=a}),define(Z[254],te([0,1,207,52]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function r(O,D,P,h,u,m,g){const v={"X-Market-Client-Id":`VSCode ${O}`,"User-Agent":`VSCode ${O} (${D.nameShort})`};if((0,L.supportsTelemetry)(D,P)&&(0,L.getTelemetryLevel)(h)===3){const d=await(0,b.getServiceMachineId)(P,u,m);v["X-Market-User-Id"]=d,v["VSCode-SessionId"]=g.machineId||d}return v}e.resolveMarketplaceHeaders=r}),define(Z[255],te([0,1,2,37,4,26,186,18,59,67,22,43,25,52]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let y=class{static{this.IDLE_START_EVENT_NAME="UserIdleStart"}static{this.IDLE_STOP_EVENT_NAME="UserIdleStop"}constructor(p,c,f){this._configurationService=c,this._productService=f,this._experimentProperties={},this._disposables=new b.DisposableStore,this._cleanupPatterns=[],this._appenders=p.appenders,this._commonProperties=p.commonProperties??Object.create(null),this.sessionId=this._commonProperties.sessionID,this.machineId=this._commonProperties["common.machineId"],this.firstSessionDate=this._commonProperties["common.firstSessionDate"],this.msftInternal=this._commonProperties["common.msftInternal"],this._piiPaths=p.piiPaths||[],this._telemetryLevel=3,this._sendErrorTelemetry=!!p.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const I of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,O.escapeRegExpCharacters)(I),"gi")),I.indexOf("\\")>=0&&this._cleanupPatterns.push(new RegExp((0,O.escapeRegExpCharacters)(I.replace(/\\/g,"/")),"gi"));this._updateTelemetryLevel(),this._disposables.add(this._configurationService.onDidChangeConfiguration(I=>{(I.affectsConfiguration(v.TELEMETRY_SETTING_ID)||I.affectsConfiguration(v.TELEMETRY_OLD_SETTING_ID)||I.affectsConfiguration(v.TELEMETRY_CRASH_REPORTER_SETTING_ID))&&this._updateTelemetryLevel()}))}setExperimentProperty(p,c){this._experimentProperties[p]=c}_updateTelemetryLevel(){let p=(0,d.getTelemetryLevel)(this._configurationService);const c=this._productService.enabledTelemetryLevels;if(c){this._sendErrorTelemetry=this.sendErrorTelemetry?c.error:!1;const f=c.usage?3:c.error?2:0;p=Math.min(p,f)}this._telemetryLevel=p}get sendErrorTelemetry(){return this._sendErrorTelemetry}get telemetryLevel(){return this._telemetryLevel}dispose(){this._disposables.dispose()}_log(p,c,f){this._telemetryLevel<c||(f=(0,L.mixin)(f,this._experimentProperties),f=(0,d.cleanData)(f,this._cleanupPatterns),f=(0,L.mixin)(f,this._commonProperties),this._appenders.forEach(I=>I.log(p,f)))}publicLog(p,c){this._log(p,3,c)}publicLog2(p,c){this.publicLog(p,c)}publicLogError(p,c){this._sendErrorTelemetry&&this._log(p,2,c)}publicLogError2(p,c){this.publicLogError(p,c)}};e.TelemetryService=y,e.TelemetryService=y=be([X(1,P.IConfigurationService),X(2,m.IProductService)],y);function E(){const l=(0,D.localize)(0,null,u.default.nameLong),p=u.default.privacyStatementUrl?(0,D.localize)(2,null,"https://aka.ms/vscode-telemetry",u.default.privacyStatementUrl):(0,D.localize)(1,null,"https://aka.ms/vscode-telemetry"),c=r.isWeb?"":(0,D.localize)(3,null),f=(0,D.localize)(4,null),I=(0,D.localize)(5,null),w=(0,D.localize)(6,null),t=(0,D.localize)(7,null),a=`
|       | ${f} | ${I} | ${w} |
|:------|:---------------------:|:---------------:|:--------------:|
| all   |            \u2713          |        \u2713        |        \u2713       |
| error |            \u2713          |        \u2713        |        -       |
| crash |            \u2713          |        -        |        -       |
| off   |            -          |        -        |        -       |
`,s=(0,D.localize)(8,null);return`
${l} ${p} ${c}

&nbsp;

${t}
${a}

&nbsp;

${s}
`}g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:v.TELEMETRY_SECTION_ID,order:1,type:"object",title:(0,D.localize)(9,null),properties:{[v.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,D.localize)(10,null),(0,D.localize)(11,null),(0,D.localize)(12,null),(0,D.localize)(13,null)],markdownDescription:E(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:v.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,D.localize)(14,null),properties:{[v.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:u.default.privacyStatementUrl?(0,D.localize)(16,null,u.default.nameLong,u.default.privacyStatementUrl):(0,D.localize)(15,null,u.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,D.localize)(17,null,`\`#${v.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(Z[256],te([0,1,4,87,25]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMachineId=void 0;async function O(D,P){let h=D.getItem(r.machineIdKey);return(typeof h!="string"||b.isMacintosh&&h==="6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead")&&(h=await(0,L.getMachineId)(P.error.bind(P))),h}e.resolveMachineId=O}),define(Z[257],te([0,1,25,256]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMachineId=void 0;async function r(O,D){const P=await(0,L.resolveMachineId)(O,D);return O.setItem(b.machineIdKey,P),P}e.resolveMachineId=r}),define(Z[127],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=void 0;var b;(function(L){L[L.Replace=1]="Replace",L[L.Append=2]="Append",L[L.Prepend=3]="Prepend"})(b||(e.EnvironmentVariableMutatorType=b={}))}),define(Z[258],te([0,1,4,127]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;const r=new Map([[L.EnvironmentVariableMutatorType.Append,"APPEND"],[L.EnvironmentVariableMutatorType.Prepend,"PREPEND"],[L.EnvironmentVariableMutatorType.Replace,"REPLACE"]]);class O{constructor(m){this.collections=m,this.map=new Map,this.descriptionMap=new Map,m.forEach((g,v)=>{this.populateDescriptionMap(g,v);const d=g.map.entries();let y=d.next();for(;!y.done;){const E=y.value[1],l=y.value[0];let p=this.map.get(l);if(p||(p=[],this.map.set(l,p)),p.length>0&&p[0].type===L.EnvironmentVariableMutatorType.Replace){y=d.next();continue}const c={extensionIdentifier:v,value:E.value,type:E.type,scope:E.scope,variable:E.variable,options:E.options};c.scope||delete c.scope,p.unshift(c),y=d.next()}})}async applyToProcessEnvironment(m,g,v){let d;b.isWindows&&(d={},Object.keys(m).forEach(y=>d[y.toLowerCase()]=y));for(const[y,E]of this.getVariableMap(g)){const l=b.isWindows&&d[y.toLowerCase()]||y;for(const p of E){const c=v?await v(p.value):p.value;if(p.options?.applyAtProcessCreation??!0)switch(p.type){case L.EnvironmentVariableMutatorType.Append:m[l]=(m[l]||"")+c;break;case L.EnvironmentVariableMutatorType.Prepend:m[l]=c+(m[l]||"");break;case L.EnvironmentVariableMutatorType.Replace:m[l]=c;break}if(p.options?.applyAtShellIntegration??!1){const f=`VSCODE_ENV_${r.get(p.type)}`;m[f]=(m[f]?m[f]+":":"")+y+"="+this._encodeColons(c)}}}}_encodeColons(m){return m.replaceAll(":","\\x3a")}diff(m,g){const v=new Map,d=new Map,y=new Map;if(m.getVariableMap(g).forEach((E,l)=>{const p=this.getVariableMap(g).get(l),c=P(E,p);c&&v.set(l,c)}),this.getVariableMap(g).forEach((E,l)=>{const p=m.getVariableMap(g).get(l),c=P(E,p);c&&y.set(l,c)}),this.getVariableMap(g).forEach((E,l)=>{const p=m.getVariableMap(g).get(l),c=h(E,p);c&&d.set(l,c)}),!(v.size===0&&d.size===0&&y.size===0))return{added:v,changed:d,removed:y}}getVariableMap(m){const g=new Map;for(const v of this.map.values()){const d=v.filter(y=>D(y,m));d.length>0&&g.set(d[0].variable,d)}return g}getDescriptionMap(m){const g=new Map;for(const v of this.descriptionMap.values()){const d=v.filter(y=>D(y,m,!0));for(const y of d)g.set(y.extensionIdentifier,y.description)}return g}populateDescriptionMap(m,g){if(!m.descriptionMap)return;const v=m.descriptionMap.entries();let d=v.next();for(;!d.done;){const y=d.value[1],E=d.value[0];let l=this.descriptionMap.get(E);l||(l=[],this.descriptionMap.set(E,l));const p={extensionIdentifier:g,scope:y.scope,description:y.description};p.scope||delete p.scope,l.push(p),d=v.next()}}}e.MergedEnvironmentVariableCollection=O;function D(u,m,g=!1){return u.scope?!!(u.scope.workspaceFolder&&m?.workspaceFolder&&u.scope.workspaceFolder.index===m.workspaceFolder.index):g?m===u.scope:!0}function P(u,m){if(!m)return u;const g=new Set;m.forEach(d=>g.add(d.extensionIdentifier));const v=[];return u.forEach(d=>{g.has(d.extensionIdentifier)||v.push(d)}),v.length===0?void 0:v}function h(u,m){if(!m)return;const g=new Map;m.forEach(d=>g.set(d.extensionIdentifier,d));const v=[];return u.forEach(d=>{const y=g.get(d.extensionIdentifier);y&&(d.type!==y.type||d.value!==y.value||d.scope?.workspaceFolder?.index!==y.scope?.workspaceFolder?.index)&&v.push(y)}),v.length===0?void 0:v}}),define(Z[259],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentDescriptionMap=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentDescriptionMap=e.serializeEnvironmentVariableCollection=void 0;function b(h){return[...h.entries()]}e.serializeEnvironmentVariableCollection=b;function L(h){return h?[...h.entries()]:[]}e.serializeEnvironmentDescriptionMap=L;function r(h){return new Map(h)}e.deserializeEnvironmentVariableCollection=r;function O(h){return new Map(h??[])}e.deserializeEnvironmentDescriptionMap=O;function D(h){return Array.from(h.entries()).map(u=>[u[0],b(u[1].map),L(u[1].descriptionMap)])}e.serializeEnvironmentVariableCollections=D;function P(h){return new Map(h.map(u=>[u[0],{map:r(u[1]),descriptionMap:O(u[2])}]))}e.deserializeEnvironmentVariableCollections=P}),define(Z[260],te([0,1,8,23,3,2,5]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStore=void 0;let P=class extends O.Disposable{constructor(u,m){super(),this._logService=m,this._lastRequestId=0,this._pendingRequests=new Map,this._pendingRequestDisposables=new Map,this._onCreateRequest=this._register(new r.Emitter),this.onCreateRequest=this._onCreateRequest.event,this._timeout=u===void 0?15e3:u}createRequest(u){return new Promise((m,g)=>{const v=++this._lastRequestId;this._pendingRequests.set(v,m),this._onCreateRequest.fire({requestId:v,...u});const d=new L.CancellationTokenSource;(0,b.timeout)(this._timeout,d.token).then(()=>g(`Request ${v} timed out (${this._timeout}ms)`)),this._pendingRequestDisposables.set(v,[(0,O.toDisposable)(()=>d.cancel())])})}acceptReply(u,m){const g=this._pendingRequests.get(u);g?(this._pendingRequests.delete(u),(0,O.dispose)(this._pendingRequestDisposables.get(u)||[]),this._pendingRequestDisposables.delete(u),g(m)):this._logService.warn(`RequestStore#acceptReply was called without receiving a matching request ${u}`)}};e.RequestStore=P,e.RequestStore=P=be([X(1,D.ILogService)],P)}),define(Z[128],te([0,1,6,117,43]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITerminalLogService=e.ILocalPtyService=e.TerminalExtensions=e.TerminalExitReason=e.ShellIntegrationStatus=e.ProfileSource=e.FlowControlConstants=e.LocalReconnectConstants=e.TerminalLocationString=e.TerminalLocation=e.HeartbeatConstants=e.IPtyService=e.ProcessPropertyType=e.TerminalIpcChannels=e.TitleEventSource=e.WindowsShellType=e.PosixShellType=e.TerminalSettingId=e.TerminalSettingPrefix=e.terminalTabFocusModeContextKey=void 0,e.terminalTabFocusModeContextKey=new L.RawContextKey("terminalTabFocusMode",!1,!0);var O;(function(w){w.DefaultProfile="terminal.integrated.defaultProfile.",w.Profiles="terminal.integrated.profiles."})(O||(e.TerminalSettingPrefix=O={}));var D;(function(w){w.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",w.AutomationProfileLinux="terminal.integrated.automationProfile.linux",w.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",w.AutomationProfileWindows="terminal.integrated.automationProfile.windows",w.ProfilesWindows="terminal.integrated.profiles.windows",w.ProfilesMacOs="terminal.integrated.profiles.osx",w.ProfilesLinux="terminal.integrated.profiles.linux",w.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",w.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",w.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",w.UseWslProfiles="terminal.integrated.useWslProfiles",w.TabsDefaultColor="terminal.integrated.tabs.defaultColor",w.TabsDefaultIcon="terminal.integrated.tabs.defaultIcon",w.TabsEnabled="terminal.integrated.tabs.enabled",w.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",w.TabsHideCondition="terminal.integrated.tabs.hideCondition",w.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",w.TabsShowActions="terminal.integrated.tabs.showActions",w.TabsLocation="terminal.integrated.tabs.location",w.TabsFocusMode="terminal.integrated.tabs.focusMode",w.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",w.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",w.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",w.CopyOnSelection="terminal.integrated.copyOnSelection",w.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",w.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",w.FontFamily="terminal.integrated.fontFamily",w.FontSize="terminal.integrated.fontSize",w.LetterSpacing="terminal.integrated.letterSpacing",w.LineHeight="terminal.integrated.lineHeight",w.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",w.TabStopWidth="terminal.integrated.tabStopWidth",w.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",w.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",w.BellDuration="terminal.integrated.bellDuration",w.FontWeight="terminal.integrated.fontWeight",w.FontWeightBold="terminal.integrated.fontWeightBold",w.CursorBlinking="terminal.integrated.cursorBlinking",w.CursorStyle="terminal.integrated.cursorStyle",w.CursorStyleInactive="terminal.integrated.cursorStyleInactive",w.CursorWidth="terminal.integrated.cursorWidth",w.Scrollback="terminal.integrated.scrollback",w.DetectLocale="terminal.integrated.detectLocale",w.DefaultLocation="terminal.integrated.defaultLocation",w.GpuAcceleration="terminal.integrated.gpuAcceleration",w.TerminalTitleSeparator="terminal.integrated.tabs.separator",w.TerminalTitle="terminal.integrated.tabs.title",w.TerminalDescription="terminal.integrated.tabs.description",w.RightClickBehavior="terminal.integrated.rightClickBehavior",w.Cwd="terminal.integrated.cwd",w.ConfirmOnExit="terminal.integrated.confirmOnExit",w.ConfirmOnKill="terminal.integrated.confirmOnKill",w.EnableBell="terminal.integrated.enableBell",w.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",w.AllowChords="terminal.integrated.allowChords",w.AllowMnemonics="terminal.integrated.allowMnemonics",w.TabFocusMode="terminal.integrated.tabFocusMode",w.EnvMacOs="terminal.integrated.env.osx",w.EnvLinux="terminal.integrated.env.linux",w.EnvWindows="terminal.integrated.env.windows",w.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",w.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",w.ShowExitAlert="terminal.integrated.showExitAlert",w.SplitCwd="terminal.integrated.splitCwd",w.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",w.WordSeparators="terminal.integrated.wordSeparators",w.EnableFileLinks="terminal.integrated.enableFileLinks",w.UnicodeVersion="terminal.integrated.unicodeVersion",w.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",w.LocalEchoEnabled="terminal.integrated.localEchoEnabled",w.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",w.LocalEchoStyle="terminal.integrated.localEchoStyle",w.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",w.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",w.HideOnStartup="terminal.integrated.hideOnStartup",w.CustomGlyphs="terminal.integrated.customGlyphs",w.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",w.InheritEnv="terminal.integrated.inheritEnv",w.ShowLinkHover="terminal.integrated.showLinkHover",w.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",w.AutoReplies="terminal.integrated.autoReplies",w.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",w.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",w.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",w.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history",w.ShellIntegrationSuggestEnabled="terminal.integrated.shellIntegration.suggestEnabled",w.EnableImages="terminal.integrated.enableImages",w.SmoothScrolling="terminal.integrated.smoothScrolling",w.IgnoreBracketedPasteMode="terminal.integrated.ignoreBracketedPasteMode",w.FocusAfterRun="terminal.integrated.focusAfterRun",w.DeveloperPtyHostLatency="terminal.integrated.developer.ptyHost.latency",w.DeveloperPtyHostStartupDelay="terminal.integrated.developer.ptyHost.startupDelay",w.DevMode="terminal.integrated.developer.devMode"})(D||(e.TerminalSettingId=D={}));var P;(function(w){w.PowerShell="pwsh",w.Bash="bash",w.Fish="fish",w.Sh="sh",w.Csh="csh",w.Ksh="ksh",w.Zsh="zsh"})(P||(e.PosixShellType=P={}));var h;(function(w){w.CommandPrompt="cmd",w.PowerShell="pwsh",w.Wsl="wsl",w.GitBash="gitbash"})(h||(e.WindowsShellType=h={}));var u;(function(w){w[w.Api=0]="Api",w[w.Process=1]="Process",w[w.Sequence=2]="Sequence",w[w.Config=3]="Config"})(u||(e.TitleEventSource=u={}));var m;(function(w){w.LocalPty="localPty",w.PtyHost="ptyHost",w.PtyHostWindow="ptyHostWindow",w.Logger="logger",w.Heartbeat="heartbeat"})(m||(e.TerminalIpcChannels=m={}));var g;(function(w){w.Cwd="cwd",w.InitialCwd="initialCwd",w.FixedDimensions="fixedDimensions",w.Title="title",w.ShellType="shellType",w.HasChildProcesses="hasChildProcesses",w.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",w.OverrideDimensions="overrideDimensions",w.FailedShellIntegrationActivation="failedShellIntegrationActivation",w.UsedShellIntegrationInjection="usedShellIntegrationInjection"})(g||(e.ProcessPropertyType=g={})),e.IPtyService=(0,b.createDecorator)("ptyService");var v;(function(w){w[w.BeatInterval=5e3]="BeatInterval",w[w.ConnectingBeatInterval=2e4]="ConnectingBeatInterval",w[w.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",w[w.SecondWaitMultiplier=1]="SecondWaitMultiplier",w[w.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(v||(e.HeartbeatConstants=v={}));var d;(function(w){w[w.Panel=1]="Panel",w[w.Editor=2]="Editor"})(d||(e.TerminalLocation=d={}));var y;(function(w){w.TerminalView="view",w.Editor="editor"})(y||(e.TerminalLocationString=y={}));var E;(function(w){w[w.GraceTime=6e4]="GraceTime",w[w.ShortGraceTime=6e3]="ShortGraceTime"})(E||(e.LocalReconnectConstants=E={}));var l;(function(w){w[w.HighWatermarkChars=1e5]="HighWatermarkChars",w[w.LowWatermarkChars=5e3]="LowWatermarkChars",w[w.CharCountAckSize=5e3]="CharCountAckSize"})(l||(e.FlowControlConstants=l={}));var p;(function(w){w.GitBash="Git Bash",w.Pwsh="PowerShell"})(p||(e.ProfileSource=p={}));var c;(function(w){w[w.Off=0]="Off",w[w.FinalTerm=1]="FinalTerm",w[w.VSCode=2]="VSCode"})(c||(e.ShellIntegrationStatus=c={}));var f;(function(w){w[w.Unknown=0]="Unknown",w[w.Shutdown=1]="Shutdown",w[w.Process=2]="Process",w[w.User=3]="User",w[w.Extension=4]="Extension"})(f||(e.TerminalExitReason=f={})),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class I{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(t){const a=this._sanitizeRemoteAuthority(t.remoteAuthority);if(this._backends.has(a))throw new Error(`A terminal backend with remote authority '${a}' was already registered.`);this._backends.set(a,t)}getTerminalBackend(t){return this._backends.get(this._sanitizeRemoteAuthority(t))}_sanitizeRemoteAuthority(t){return t?.toLowerCase()??""}}r.Registry.add(e.TerminalExtensions.Backend,new I),e.ILocalPtyService=(0,b.createDecorator)("localPtyService"),e.ITerminalLogService=(0,b.createDecorator)("terminalLogService")}),define(Z[261],te([0,1,72,7,188,105]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUriComponents=e.terminalIconsEqual=e.terminalProfileArgsMatch=e.createProfileSchemaEnums=void 0;function D(v,d){const y=[{name:null,description:(0,r.localize)(0,null)}];return y.push(...v.map(E=>({name:E.profileName,description:P(E)}))),d&&y.push(...d.map(E=>({name:E.title,description:h(E)}))),{values:y.map(E=>E.name),markdownDescriptions:y.map(E=>E.description)}}e.createProfileSchemaEnums=D;function P(v){let d=`$(${O.ThemeIcon.isThemeIcon(v.icon)?v.icon.id:v.icon?v.icon:b.Codicon.terminal.id}) ${v.profileName}
- path: ${v.path}`;return v.args&&(typeof v.args=="string"?d+=`
- args: "${v.args}"`:d+=`
- args: [${v.args.length===0?"":`'${v.args.join("','")}'`}]`),v.overrideName!==void 0&&(d+=`
- overrideName: ${v.overrideName}`),v.color&&(d+=`
- color: ${v.color}`),v.env&&(d+=`
- env: ${JSON.stringify(v.env)}`),d}function h(v){return`$(${O.ThemeIcon.isThemeIcon(v.icon)?v.icon.id:v.icon?v.icon:b.Codicon.terminal.id}) ${v.title}
- extensionIdentifier: ${v.extensionIdentifier}`}function u(v,d){if(!v&&!d)return!0;if(typeof v=="string"&&typeof d=="string")return v===d;if(Array.isArray(v)&&Array.isArray(d)){if(v.length!==d.length)return!1;for(let y=0;y<v.length;y++)if(v[y]!==d[y])return!1;return!0}return!1}e.terminalProfileArgsMatch=u;function m(v,d){if(!v&&!d)return!0;if(!v||!d)return!1;if(O.ThemeIcon.isThemeIcon(v)&&O.ThemeIcon.isThemeIcon(d))return v.id===d.id&&v.color===d.color;if(typeof v=="object"&&"light"in v&&"dark"in v&&typeof d=="object"&&"light"in d&&"dark"in d){const y=v,E=d;if((L.URI.isUri(y.light)||g(y.light))&&(L.URI.isUri(y.dark)||g(y.dark))&&(L.URI.isUri(E.light)||g(E.light))&&(L.URI.isUri(E.dark)||g(E.dark)))return y.light.path===E.light.path&&y.dark.path===E.dark.path}if(L.URI.isUri(v)&&L.URI.isUri(d)||g(v)||g(d)){const y=v,E=d;return y.path===E.path&&y.scheme===E.scheme}return!1}e.terminalIconsEqual=m;function g(v){return v?typeof v.path=="string"&&typeof v.scheme=="string":!1}e.isUriComponents=g}),define(Z[262],te([0,1,72,4,187,59,43,261,89]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalDefaultProfileConfiguration=e.registerTerminalPlatformConfiguration=e.terminalIconSchema=e.terminalColorSchema=void 0,e.terminalColorSchema={type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},e.terminalIconSchema={type:"string",enum:Array.from((0,b.getAllCodicons)(),p=>p.id),markdownEnumDescriptions:Array.from((0,b.getAllCodicons)(),p=>`$(${p.id})`)};const u={args:{description:(0,r.localize)(0,null),type:"array",items:{type:"string"}},overrideName:{description:(0,r.localize)(1,null),type:"boolean"},icon:{description:(0,r.localize)(2,null),...e.terminalIconSchema},color:{description:(0,r.localize)(3,null),...e.terminalColorSchema},env:{markdownDescription:(0,r.localize)(4,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},m={type:"object",required:["path"],properties:{path:{description:(0,r.localize)(5,null),type:["string","array"],items:{type:"string"}},...u}},g={type:"object",required:["path"],properties:{path:{description:(0,r.localize)(6,null),type:["string"],items:{type:"string"}},...u}};function v(p){const c=p===2?"linux":p===1?"osx":"windows";return(0,r.localize)(7,null,(0,L.PlatformToString)(p),'```json\n"terminal.integrated.profile.'+c+'": {\n  "bash": null\n}\n```',"[","](https://code.visualstudio.com/docs/terminal/profiles)")}const d={id:"terminal",order:100,title:(0,r.localize)(8,null),type:"object",properties:{["terminal.integrated.automationProfile.linux"]:{restricted:!0,markdownDescription:(0,r.localize)(9,null),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.osx"]:{restricted:!0,markdownDescription:(0,r.localize)(10,null),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.windows"]:{restricted:!0,markdownDescription:(0,r.localize)(11,null,"`terminal.integrated.automationShell.windows`"),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.profiles.windows"]:{restricted:!0,markdownDescription:v(3),type:"object",default:{PowerShell:{source:"PowerShell",icon:"terminal-powershell"},"Command Prompt":{path:["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],args:[],icon:"terminal-cmd"},"Git Bash":{source:"Git Bash"}},additionalProperties:{anyOf:[{type:"object",required:["source"],properties:{source:{description:(0,r.localize)(12,null),enum:["PowerShell","Git Bash"]},...u}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,r.localize)(13,null),type:"string"},id:{description:(0,r.localize)(14,null),type:"string"},title:{description:(0,r.localize)(15,null),type:"string"},...u}},{type:"null"},m]}},["terminal.integrated.profiles.osx"]:{restricted:!0,markdownDescription:v(1),type:"object",default:{bash:{path:"bash",args:["-l"],icon:"terminal-bash"},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,r.localize)(16,null),type:"string"},id:{description:(0,r.localize)(17,null),type:"string"},title:{description:(0,r.localize)(18,null),type:"string"},...u}},{type:"null"},m]}},["terminal.integrated.profiles.linux"]:{restricted:!0,markdownDescription:v(2),type:"object",default:{bash:{path:"bash",icon:"terminal-bash"},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,r.localize)(19,null),type:"string"},id:{description:(0,r.localize)(20,null),type:"string"},title:{description:(0,r.localize)(21,null),type:"string"},...u}},{type:"null"},m]}},["terminal.integrated.useWslProfiles"]:{description:(0,r.localize)(22,null),type:"boolean",default:!0},["terminal.integrated.inheritEnv"]:{scope:1,description:h.terminalIntegratedInheritEnvDescription,type:"boolean",default:!0},["terminal.integrated.persistentSessionScrollback"]:{scope:1,markdownDescription:(0,r.localize)(23,null),type:"number",default:100},["terminal.integrated.showLinkHover"]:{scope:1,description:(0,r.localize)(24,null),type:"boolean",default:!0},["terminal.integrated.ignoreProcessNames"]:{description:(0,r.localize)(25,null,"`terminal.integrated.confirmOnKill`"),type:"array",items:{type:"string",uniqueItems:!0},default:["starship","oh-my-posh","bash","zsh"]}}};function y(){D.Registry.as(O.Extensions.Configuration).registerConfiguration(d),l()}e.registerTerminalPlatformConfiguration=y;let E;function l(p,c){const f=D.Registry.as(O.Extensions.Configuration);let I;p&&(I=(0,P.createProfileSchemaEnums)(p?.profiles,c));const w=E;E={id:"terminal",order:100,title:(0,r.localize)(26,null),type:"object",properties:{["terminal.integrated.defaultProfile.linux"]:{restricted:!0,markdownDescription:(0,r.localize)(27,null),type:["string","null"],default:null,enum:p?.os===3?I?.values:void 0,markdownEnumDescriptions:p?.os===3?I?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.osx"]:{restricted:!0,markdownDescription:(0,r.localize)(28,null),type:["string","null"],default:null,enum:p?.os===2?I?.values:void 0,markdownEnumDescriptions:p?.os===2?I?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.windows"]:{restricted:!0,markdownDescription:(0,r.localize)(29,null),type:["string","null"],default:null,enum:p?.os===1?I?.values:void 0,markdownEnumDescriptions:p?.os===1?I?.markdownDescriptions:void 0}}},f.updateConfigurations({add:[E],remove:w?[w]:[]})}e.registerTerminalDefaultProfileConfiguration=l}),define(Z[263],te([0,1,27,15,37,10,4,36,26,12,21,127,259,258]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellIntegrationInjection=e.findExecutable=e.getWindowsBuildNumber=void 0;function y(){const i=/(\d+)\.(\d+)\.(\d+)/g.exec(b.release());let n=0;return i&&i.length===4&&(n=parseInt(i[3])),n}e.getWindowsBuildNumber=y;async function E(i,n,o,S=P.env,k=m.Promises.exists){if(O.isAbsolute(i))return await k(i)?i:void 0;if(n===void 0&&(n=P.cwd()),O.dirname(i)!=="."){const T=O.join(n,i);return await k(T)?T:void 0}const C=(0,r.getCaseInsensitive)(S,"PATH");if(o===void 0&&(0,u.isString)(C)&&(o=C.split(O.delimiter)),o===void 0||o.length===0){const T=O.join(n,i);return await k(T)?T:void 0}for(const T of o){let F;if(O.isAbsolute(T)?F=O.join(T,i):F=O.join(n,T,i),await k(F))return F;if(D.isWindows){let z=F+".com";if(await k(z)||(z=F+".exe",await k(z)))return z}}const A=O.join(n,i);return await k(A)?A:void 0}e.findExecutable=E;function l(i,n,o,S,k){const M=D.isWindows&&(!n.windowsEnableConpty||y()<18309);if(!n.shellIntegration.enabled||!i.executable||i.isFeatureTerminal||i.hideFromUser||i.ignoreShellIntegration||M)return;const C=i.args,A=P.platform==="win32"?O.basename(i.executable).toLowerCase():O.basename(i.executable),T=O.dirname(L.FileAccess.asFileUri("").fsPath);let F;const z={VSCODE_INJECTION:"1"};if(n.shellIntegration.nonce&&(z.VSCODE_NONCE=n.shellIntegration.nonce),D.isWindows){if(A==="pwsh.exe"||A==="powershell.exe")return!C||a(C)?F=f.get(c.WindowsPwsh):t(C)&&(F=f.get(c.WindowsPwshLogin)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T,""),{newArgs:F,envMixin:z}):void 0;S.warn(`Shell integration cannot be enabled for executable "${i.executable}" and args`,i.args);return}switch(A){case"bash":return!C||C.length===0?F=f.get(c.Bash):s(C)&&(z.VSCODE_SHELL_LOGIN="1",p(n,z),F=f.get(c.Bash)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T),{newArgs:F,envMixin:z}):void 0;case"fish":return;case"pwsh":return!C||a(C)?F=f.get(c.Pwsh):t(C)&&(F=f.get(c.PwshLogin)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T,""),{newArgs:F,envMixin:z}):void 0;case"zsh":{if(!C||C.length===0?F=f.get(c.Zsh):s(C)?(F=f.get(c.ZshLogin),p(n,z)):(C===f.get(c.Zsh)||C===f.get(c.ZshLogin))&&(F=C),!F)return;F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T);let oe;try{oe=b.userInfo().username}catch{oe="unknown"}const ee=O.join(b.tmpdir(),`${oe}-${k.applicationName}-zsh`);z.ZDOTDIR=ee;const ue=o?.ZDOTDIR??b.homedir()??"~";z.USER_ZDOTDIR=ue;const ae=[];return ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh"),dest:O.join(ee,".zshrc")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh"),dest:O.join(ee,".zprofile")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh"),dest:O.join(ee,".zshenv")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh"),dest:O.join(ee,".zlogin")}),{newArgs:F,envMixin:z,filesToCopy:ae}}}S.warn(`Shell integration cannot be enabled for executable "${i.executable}" and args`,i.args)}e.getShellIntegrationInjection=l;function p(i,n){if(D.isMacintosh&&i.environmentVariableCollections){const o=(0,v.deserializeEnvironmentVariableCollections)(i.environmentVariableCollections),k=new d.MergedEnvironmentVariableCollection(o).getVariableMap({workspaceFolder:i.workspaceFolder}).get("PATH"),M=[];if(k)for(const C of k)C.type===g.EnvironmentVariableMutatorType.Prepend&&M.push(C.value);M.length>0&&(n.VSCODE_PATH_PREFIX=M.join(""))}}var c;(function(i){i.WindowsPwsh="windows-pwsh",i.WindowsPwshLogin="windows-pwsh-login",i.Pwsh="pwsh",i.PwshLogin="pwsh-login",i.Zsh="zsh",i.ZshLogin="zsh-login",i.Bash="bash"})(c||(c={}));const f=new Map;f.set(c.WindowsPwsh,["-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),f.set(c.WindowsPwshLogin,["-l","-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),f.set(c.Pwsh,["-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"{1}']),f.set(c.PwshLogin,["-l","-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"']),f.set(c.Zsh,["-i"]),f.set(c.ZshLogin,["-il"]),f.set(c.Bash,["--init-file","{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"]);const I=["-login","-l"],w=["-nol","-nologo"];function t(i){return typeof i=="string"?I.includes(i.toLowerCase()):i.length===1&&I.includes(i[0].toLowerCase())||i.length===2&&(I.includes(i[0].toLowerCase())||I.includes(i[1].toLowerCase()))&&(w.includes(i[0].toLowerCase())||w.includes(i[1].toLowerCase()))}function a(i){return typeof i=="string"?w.includes(i.toLowerCase()):i.length===0||i?.length===1&&w.includes(i[0].toLowerCase())}function s(i){return i==="string"&&I.includes(i.toLowerCase())||typeof i!="string"&&i.length===1&&I.includes(i[0].toLowerCase())}}),define(Z[264],te([0,1,47,72,10,4,12,21,109,263,116]),function(H,e,b,L,r,O,D,P,h,u,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectAvailableProfiles=void 0;let g,v=!0;function d(n,o,S,k,M=process.env,C,A,T,F){return C=C||{existsFile:P.SymlinkSupport.existsFile,readFile:P.Promises.readFile},O.isWindows?y(S,C,M,A,k.getValue("terminal.integrated.useWslProfiles")!==!1,n&&typeof n=="object"?{...n}:k.getValue("terminal.integrated.profiles.windows"),typeof o=="string"?o:k.getValue("terminal.integrated.defaultProfile.windows"),F,T):a(C,A,S,n&&typeof n=="object"?{...n}:k.getValue(O.isLinux?"terminal.integrated.profiles.linux":"terminal.integrated.profiles.osx"),typeof o=="string"?o:k.getValue(O.isLinux?"terminal.integrated.defaultProfile.linux":"terminal.integrated.defaultProfile.osx"),F,T,M)}e.detectAvailableProfiles=d;async function y(n,o,S,k,M,C,A,T,F){const z=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),oe=`${process.env.windir}\\${z?"Sysnative":"System32"}`;let ee=!1;(0,u.getWindowsBuildNumber)()>=16299&&(ee=!0),await c(T);const ue=new Map;if(n){ue.set("PowerShell",{source:"PowerShell",icon:L.Codicon.terminalPowershell,isAutoDetected:!0}),ue.set("Windows PowerShell",{path:`${oe}\\WindowsPowerShell\\v1.0\\powershell.exe`,icon:L.Codicon.terminalPowershell,isAutoDetected:!0}),ue.set("Git Bash",{source:"Git Bash",isAutoDetected:!0}),ue.set("Command Prompt",{path:`${oe}\\cmd.exe`,icon:L.Codicon.terminalCmd,isAutoDetected:!0}),ue.set("Cygwin",{path:[{path:`${process.env.HOMEDRIVE}\\cygwin64\\bin\\bash.exe`,isUnsafe:!0},{path:`${process.env.HOMEDRIVE}\\cygwin\\bin\\bash.exe`,isUnsafe:!0}],args:["--login"],isAutoDetected:!0}),ue.set("bash (MSYS2)",{path:[{path:`${process.env.HOMEDRIVE}\\msys64\\usr\\bin\\bash.exe`,isUnsafe:!0}],args:["--login","-i"],icon:L.Codicon.terminalBash,isAutoDetected:!0});const de=`${process.env.CMDER_ROOT||`${process.env.HOMEDRIVE}\\cmder`}\\vendor\\bin\\vscode_init.cmd`;ue.set("Cmder",{path:`${oe}\\cmd.exe`,args:["/K",de],requiresPath:process.env.CMDER_ROOT?de:{path:de,isUnsafe:!0},isAutoDetected:!0})}s(C,ue);const ae=await E(ue.entries(),A,o,S,k,F);if(n&&M)try{const de=await w(`${oe}\\${ee?"wsl":"bash"}.exe`,A);for(const j of de)(!C||!(j.profileName in C))&&ae.push(j)}catch{v&&(k?.info("WSL is not installed, so could not detect WSL profiles"),v=!1)}return ae}async function E(n,o,S,k=process.env,M,C){const A=[];for(const[T,F]of n)A.push(l(T,F,o,S,k,M,C));return(await Promise.all(A)).filter(T=>!!T)}async function l(n,o,S,k,M=process.env,C,A){if(o===null)return;let T,F,z;if("source"in o&&!("path"in o)){const ae=g?.get(o.source);if(!ae)return;T=ae.paths,F=o.args||ae.args,o.icon?z=p(o.icon):ae.icon&&(z=ae.icon)}else T=Array.isArray(o.path)?o.path:[o.path],F=O.isWindows||Array.isArray(o.args)?o.args:void 0,z=p(o.icon);let oe;if(A){const ae=T.map(j=>typeof j=="string"?j:j.path),de=await A(ae);oe=new Array(T.length);for(let j=0;j<T.length;j++)typeof T[j]=="string"?oe[j]=de[j]:oe[j]={path:de[j],isUnsafe:!0}}else oe=T.slice();let ee;if(o.requiresPath){let ae;if((0,D.isString)(o.requiresPath)?ae=o.requiresPath:(ae=o.requiresPath.path,o.requiresPath.isUnsafe&&(ee=ae)),!await k.existsFile(ae))return}const ue=await i(n,S,oe,k,M,F,o.env,o.overrideName,o.isAutoDetected,ee);if(!ue){C?.debug("Terminal profile not validated",n,T);return}return ue.isAutoDetected=o.isAutoDetected,ue.icon=z,ue.color=o.color,ue}function p(n){return typeof n=="string"?{id:n}:n}async function c(n){if(g&&!n)return;const[o,S]=await Promise.all([f(),n||I()]);g=new Map,g.set("Git Bash",{profileName:"Git Bash",paths:o,args:["--login","-i"]}),g.set("PowerShell",{profileName:"PowerShell",paths:S,icon:L.Codicon.terminalPowershell})}async function f(){const n=new Set,o=await(0,u.findExecutable)("git.exe");if(o){const M=(0,m.dirname)(o);n.add((0,m.resolve)(M,"../.."))}function S(M,C){C&&M.add(C)}S(n,process.env.ProgramW6432),S(n,process.env.ProgramFiles),S(n,process.env["ProgramFiles(X86)"]),S(n,`${process.env.LocalAppData}\\Program`);const k=[];for(const M of n)k.push(`${M}\\Git\\bin\\bash.exe`,`${M}\\Git\\usr\\bin\\bash.exe`,`${M}\\usr\\bin\\bash.exe`);return k.push(`${process.env.UserProfile}\\scoop\\apps\\git-with-openssh\\current\\bin\\bash.exe`),k}async function I(){const n=[];for await(const o of(0,h.enumeratePowerShellInstallations)())n.push(o.exePath);return n}async function w(n,o){const S=[],k=await new Promise((A,T)=>{b.exec("wsl.exe -l -q",{encoding:"utf16le",timeout:1e3},(F,z)=>{if(F)return T("Problem occurred when getting wsl distros");A(z)})});if(!k)return[];const M=new RegExp(/[\r?\n]/),C=k.split(M).filter(A=>A.trim().length>0&&A!=="");for(const A of C){if(A===""||A.startsWith("docker-desktop"))continue;const T=`${A} (WSL)`,F={profileName:T,path:n,args:["-d",`${A}`],isDefault:T===o,icon:t(A),isAutoDetected:!1};S.push(F)}return S}function t(n){return n.includes("Ubuntu")?L.Codicon.terminalUbuntu:n.includes("Debian")?L.Codicon.terminalDebian:L.Codicon.terminalLinux}async function a(n,o,S,k,M,C,A,T){const F=new Map;if(S){const z=(await n.readFile("/etc/shells")).toString(),oe=(C||z.split(`
`)).map(ue=>{const ae=ue.indexOf("#");return ae===-1?ue:ue.substring(0,ae)}).filter(ue=>ue.trim().length>0),ee=new Map;for(const ue of oe){let ae=(0,r.basename)(ue),de=ee.get(ae)||0;de++,de>1&&(ae=`${ae} (${de})`),ee.set(ae,de),F.set(ae,{path:ue,isAutoDetected:!0})}}return s(k,F),await E(F.entries(),M,n,T,o,A)}function s(n,o){if(n)for(const[S,k]of Object.entries(n))k===null||typeof k!="object"||!("path"in k)&&!("source"in k)?o.delete(S):(k.icon=k.icon||o.get(S)?.icon,o.set(S,k))}async function i(n,o,S,k,M,C,A,T,F,z){if(S.length===0)return Promise.resolve(void 0);const oe=S.shift();if(oe==="")return i(n,o,S,k,M,C,A,T,F);const ee=typeof oe!="string"&&oe.isUnsafe,ue=typeof oe=="string"?oe:oe.path,ae={profileName:n,path:ue,args:C,env:A,overrideName:T,isAutoDetected:F,isDefault:n===o,isUnsafePath:ee,requiresUnsafePath:z};if((0,r.basename)(ue)===ue){const j=M.PATH?M.PATH.split(r.delimiter):void 0,G=await(0,u.findExecutable)(ue,void 0,j,void 0,k.existsFile);return G?(ae.path=G,ae.isFromPath=!0,ae):i(n,o,S,k,M,C)}return await k.existsFile((0,r.normalize)(ue))?ae:i(n,o,S,k,M,C,A,T,F)}}),define(Z[265],te([0,1,3,2,4,42,18,5,227,96,260,128,262,264,111,70]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PtyHostService=void 0;var l;(function(c){c[c.MaxRestarts=5]="MaxRestarts"})(l||(l={}));let p=class extends L.Disposable{get _connection(){return this._ensurePtyHost(),this.__connection}get _proxy(){return this._ensurePtyHost(),this.__proxy}get _optionalProxy(){return this.__proxy}_ensurePtyHost(){this.__connection||this._startPtyHost()}constructor(f,I,w,t){super(),this._ptyHostStarter=f,this._configurationService=I,this._logService=w,this._loggerService=t,this._wasQuitRequested=!1,this._restartCount=0,this._isResponsive=!0,this._isDisposed=!1,this._onPtyHostExit=this._register(new b.Emitter),this.onPtyHostExit=this._onPtyHostExit.event,this._onPtyHostStart=this._register(new b.Emitter),this.onPtyHostStart=this._onPtyHostStart.event,this._onPtyHostUnresponsive=this._register(new b.Emitter),this.onPtyHostUnresponsive=this._onPtyHostUnresponsive.event,this._onPtyHostResponsive=this._register(new b.Emitter),this.onPtyHostResponsive=this._onPtyHostResponsive.event,this._onPtyHostRequestResolveVariables=this._register(new b.Emitter),this.onPtyHostRequestResolveVariables=this._onPtyHostRequestResolveVariables.event,this._onProcessData=this._register(new b.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._onProcessReady.event,this._onProcessReplay=this._register(new b.Emitter),this.onProcessReplay=this._onProcessReplay.event,this._onProcessOrphanQuestion=this._register(new b.Emitter),this.onProcessOrphanQuestion=this._onProcessOrphanQuestion.event,this._onDidRequestDetach=this._register(new b.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new b.Emitter),this.onProcessExit=this._onProcessExit.event,(0,v.registerTerminalPlatformConfiguration)(),this._register(this._ptyHostStarter),this._register((0,L.toDisposable)(()=>this._disposePtyHost())),this._resolveVariablesRequestStore=this._register(new m.RequestStore(void 0,this._logService)),this._resolveVariablesRequestStore.onCreateRequest(this._onPtyHostRequestResolveVariables.fire,this._onPtyHostRequestResolveVariables),this._ptyHostStarter.onRequestConnection&&b.Event.once(this._ptyHostStarter.onRequestConnection)(()=>this._ensurePtyHost()),this._ptyHostStarter.onWillShutdown?.(()=>this._wasQuitRequested=!0)}get _ignoreProcessNames(){return this._configurationService.getValue("terminal.integrated.ignoreProcessNames")}async _refreshIgnoreProcessNames(){return this._optionalProxy?.refreshIgnoreProcessNames?.(this._ignoreProcessNames)}async _resolveShellEnv(){if(r.isWindows)return process.env;try{return await(0,u.getResolvedShellEnv)(this._configurationService,this._logService,{_:[]},process.env)}catch(f){return this._logService.error("ptyHost was unable to resolve shell environment",f),{}}}_startPtyHost(){const f=this._ptyHostStarter.start(),I=f.client;this._logService.getLevel()===P.LogLevel.Trace&&this._logService.trace("PtyHostService#_startPtyHost",new Error().stack?.replace(/^Error/,"")),O.ProxyChannel.toService(I.getChannel(g.TerminalIpcChannels.Heartbeat)).onBeat(()=>this._handleHeartbeat()),this._handleHeartbeat(!0),this._register(f.onDidProcessExit(a=>{this._onPtyHostExit.fire(a.code),!this._wasQuitRequested&&!this._isDisposed&&(this._restartCount<=l.MaxRestarts?(this._logService.error(`ptyHost terminated unexpectedly with code ${a.code}`),this._restartCount++,this.restartPtyHost()):this._logService.error(`ptyHost terminated unexpectedly with code ${a.code}, giving up`))}));const t=O.ProxyChannel.toService(I.getChannel(g.TerminalIpcChannels.PtyHost));return this._register(t.onProcessData(a=>this._onProcessData.fire(a))),this._register(t.onProcessReady(a=>this._onProcessReady.fire(a))),this._register(t.onProcessExit(a=>this._onProcessExit.fire(a))),this._register(t.onDidChangeProperty(a=>this._onDidChangeProperty.fire(a))),this._register(t.onProcessReplay(a=>this._onProcessReplay.fire(a))),this._register(t.onProcessOrphanQuestion(a=>this._onProcessOrphanQuestion.fire(a))),this._register(t.onDidRequestDetach(a=>this._onDidRequestDetach.fire(a))),this._register(new h.RemoteLoggerChannelClient(this._loggerService,I.getChannel(g.TerminalIpcChannels.Logger))),this.__connection=f,this.__proxy=t,this._onPtyHostStart.fire(),this._register(this._configurationService.onDidChangeConfiguration(async a=>{a.affectsConfiguration("terminal.integrated.ignoreProcessNames")&&await this._refreshIgnoreProcessNames()})),this._refreshIgnoreProcessNames(),[f,t]}dispose(){this._isDisposed=!0,super.dispose()}async createProcess(f,I,w,t,a,s,i,n,o,S,k){const M=setTimeout(()=>this._handleUnresponsiveCreateProcess(),g.HeartbeatConstants.CreateProcessTimeout),C=await this._proxy.createProcess(f,I,w,t,a,s,i,n,o,S,k);return clearTimeout(M),C}updateTitle(f,I,w){return this._proxy.updateTitle(f,I,w)}updateIcon(f,I,w,t){return this._proxy.updateIcon(f,I,w,t)}attachToProcess(f){return this._proxy.attachToProcess(f)}detachFromProcess(f,I){return this._proxy.detachFromProcess(f,I)}shutdownAll(){return this._proxy.shutdownAll()}listProcesses(){return this._proxy.listProcesses()}async getPerformanceMarks(){return this._optionalProxy?.getPerformanceMarks()??[]}async reduceConnectionGraceTime(){return this._optionalProxy?.reduceConnectionGraceTime()}start(f){return this._proxy.start(f)}shutdown(f,I){return this._proxy.shutdown(f,I)}input(f,I){return this._proxy.input(f,I)}processBinary(f,I){return this._proxy.processBinary(f,I)}resize(f,I,w){return this._proxy.resize(f,I,w)}clearBuffer(f){return this._proxy.clearBuffer(f)}acknowledgeDataEvent(f,I){return this._proxy.acknowledgeDataEvent(f,I)}setUnicodeVersion(f,I){return this._proxy.setUnicodeVersion(f,I)}getInitialCwd(f){return this._proxy.getInitialCwd(f)}getCwd(f){return this._proxy.getCwd(f)}async getLatency(){const f=new E.StopWatch,I=await this._proxy.getLatency();return f.stop(),[{label:"ptyhostservice<->ptyhost",latency:f.elapsed()},...I]}orphanQuestionReply(f){return this._proxy.orphanQuestionReply(f)}installAutoReply(f,I){return this._proxy.installAutoReply(f,I)}uninstallAllAutoReplies(){return this._proxy.uninstallAllAutoReplies()}uninstallAutoReply(f){return this._proxy.uninstallAutoReply(f)}getDefaultSystemShell(f){return this._optionalProxy?.getDefaultSystemShell(f)??(0,y.getSystemShell)(f??r.OS,process.env)}async getProfiles(f,I,w,t=!1){const a=await this._resolveShellEnv();return(0,d.detectAvailableProfiles)(I,w,t,this._configurationService,a,void 0,this._logService,this._resolveVariables.bind(this,f))}async getEnvironment(){return this.__proxy?this._proxy.getEnvironment():{...process.env}}getWslPath(f,I){return this._proxy.getWslPath(f,I)}getRevivedPtyNewId(f,I){return this._proxy.getRevivedPtyNewId(f,I)}setTerminalLayoutInfo(f){return this._proxy.setTerminalLayoutInfo(f)}async getTerminalLayoutInfo(f){return this._optionalProxy?.getTerminalLayoutInfo(f)}async requestDetachInstance(f,I){return this._proxy.requestDetachInstance(f,I)}async acceptDetachInstanceReply(f,I){return this._proxy.acceptDetachInstanceReply(f,I)}async freePortKillProcess(f){if(!this._proxy.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the pty proxy");return this._proxy.freePortKillProcess(f)}async serializeTerminalState(f){return this._proxy.serializeTerminalState(f)}async reviveTerminalProcesses(f,I,w){return this._proxy.reviveTerminalProcesses(f,I,w)}async refreshProperty(f,I){return this._proxy.refreshProperty(f,I)}async updateProperty(f,I,w){return this._proxy.updateProperty(f,I,w)}async restartPtyHost(){this._disposePtyHost(),this._isResponsive=!0,this._startPtyHost()}_disposePtyHost(){this._proxy.shutdownAll(),this._connection.store.dispose()}_handleHeartbeat(f){this._clearHeartbeatTimeouts(),this._heartbeatFirstTimeout=setTimeout(()=>this._handleHeartbeatFirstTimeout(),f?g.HeartbeatConstants.ConnectingBeatInterval:g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier),this._isResponsive||(this._isResponsive=!0,this._onPtyHostResponsive.fire())}_handleHeartbeatFirstTimeout(){this._logService.warn(`No ptyHost heartbeat after ${g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier/1e3} seconds`),this._heartbeatFirstTimeout=void 0,this._heartbeatSecondTimeout=setTimeout(()=>this._handleHeartbeatSecondTimeout(),g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.SecondWaitMultiplier)}_handleHeartbeatSecondTimeout(){this._logService.error(`No ptyHost heartbeat after ${(g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier+g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier)/1e3} seconds`),this._heartbeatSecondTimeout=void 0,this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_handleUnresponsiveCreateProcess(){this._clearHeartbeatTimeouts(),this._logService.error(`No ptyHost response to createProcess after ${g.HeartbeatConstants.CreateProcessTimeout/1e3} seconds`),this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_clearHeartbeatTimeouts(){this._heartbeatFirstTimeout&&(clearTimeout(this._heartbeatFirstTimeout),this._heartbeatFirstTimeout=void 0),this._heartbeatSecondTimeout&&(clearTimeout(this._heartbeatSecondTimeout),this._heartbeatSecondTimeout=void 0)}_resolveVariables(f,I){return this._resolveVariablesRequestStore.createRequest({workspaceId:f,originalText:I})}async acceptPtyHostResolvedVariables(f,I){this._resolveVariablesRequestStore.acceptReply(f,I)}};e.PtyHostService=p,e.PtyHostService=p=be([X(1,D.IConfigurationService),X(2,P.ILogService),X(3,P.ILoggerService)],p)}),define(Z[80],te([0,1,14,3,2,4,18,6,34]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeMainService=e.IThemeMainService=void 0;const u="#FFFFFF",m="#1E1E1E",g="#000000",v="#FFFFFF",d="theme",y="themeBackground",E="windowSplash";e.IThemeMainService=(0,P.createDecorator)("themeMainService");let l=class extends r.Disposable{constructor(c,f){super(),this.stateService=c,this.configurationService=f,this._onDidChangeColorScheme=this._register(new L.Emitter),this.onDidChangeColorScheme=this._onDidChangeColorScheme.event,b.nativeTheme.on("updated",()=>{this._onDidChangeColorScheme.fire(this.getColorScheme())})}getColorScheme(){if(O.isWindows){if(b.nativeTheme.shouldUseHighContrastColors)return{dark:b.nativeTheme.shouldUseInvertedColorScheme,highContrast:!0}}else if(O.isMacintosh){if(b.nativeTheme.shouldUseInvertedColorScheme||b.nativeTheme.shouldUseHighContrastColors)return{dark:b.nativeTheme.shouldUseDarkColors,highContrast:!0}}else if(O.isLinux&&b.nativeTheme.shouldUseHighContrastColors)return{dark:!0,highContrast:!0};return{dark:b.nativeTheme.shouldUseDarkColors,highContrast:!1}}getBackgroundColor(){const c=this.getColorScheme();if(c.highContrast&&this.configurationService.getValue("window.autoDetectHighContrast"))return c.dark?g:v;let f=this.stateService.getItem(y,null);if(!f)switch(this.stateService.getItem(d,"vs-dark").split(" ")[0]){case"vs":f=u;break;case"hc-black":f=g;break;case"hc-light":f=v;break;default:f=m}return O.isMacintosh&&f.toUpperCase()===m&&(f="#171717"),f}saveWindowSplash(c,f){this.stateService.setItems([{key:d,data:f.baseTheme},{key:y,data:f.colorInfo.background},{key:E,data:f}]),typeof c=="number"&&this.updateBackgroundColor(c,f)}updateBackgroundColor(c,f){for(const I of b.BrowserWindow.getAllWindows())if(I.id===c){I.setBackgroundColor(f.colorInfo.background);break}}getWindowSplash(){return this.stateService.getItem(E)}};e.ThemeMainService=l,e.ThemeMainService=l=be([X(0,h.IStateService),X(1,D.IConfigurationService)],l)}),define(Z[129],te([0,1,3,18,6,5]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.isTunnelProvider=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,r.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,r.createDecorator)("sharedTunnelsService");var D;(function(l){l.Http="http",l.Https="https"})(D||(e.TunnelProtocol=D={}));var P;(function(l){l.ConstantPrivate="constantPrivate",l.Private="private",l.Public="public"})(P||(e.TunnelPrivacyId=P={}));function h(l){return!!l.forwardPort}e.isTunnelProvider=h;var u;(function(l){l[l.Notify=1]="Notify",l[l.OpenBrowser=2]="OpenBrowser",l[l.OpenPreview=3]="OpenPreview",l[l.Silent=4]="Silent",l[l.Ignore=5]="Ignore",l[l.OpenBrowserOnce=6]="OpenBrowserOnce"})(u||(e.ProvidedOnAutoForward=u={}));function m(l){if(l.scheme!=="http"&&l.scheme!=="https")return;const p=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(l.authority);if(p)return{address:p[1],port:+p[2]}}e.extractLocalHostUriMetaDataForPortMapping=m,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function g(l){return e.LOCALHOST_ADDRESSES.indexOf(l)>=0}e.isLocalhost=g,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function v(l){return e.ALL_INTERFACES_ADDRESSES.indexOf(l)>=0}e.isAllInterfaces=v;function d(l,p,c,f){if(c===1)return!1;if(c===2&&v(p)){const I=/(\d+)\.(\d+)\.(\d+)/g.exec(f);if(I?.length===4&&parseInt(I[1])>=18)return!1}return l<1024}e.isPortPrivileged=d;class y{constructor(p,c,f){this.remoteAddress=p,this.localAddress=c,this._dispose=f,this._onDispose=new b.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=y;let E=class{constructor(p,c){this.logService=p,this.configurationService=c,this._onTunnelOpened=new b.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new b.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new b.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const p=this.configurationService.getValue("remote.localPortHost");return!p||p==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(p){return this._tunnelProvider=p,p?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(p){this._canElevate=p.elevation,this._privacyOptions=p.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const p=[],c=Array.from(this._tunnels.values());for(const f of c){const I=Array.from(f.values());for(const w of I){const t=await w.value;t&&typeof t!="string"&&p.push(t)}}return p}async dispose(){for(const p of this._tunnels.values()){for(const{value:c}of p.values())await c.then(f=>typeof f!="string"?f?.dispose():void 0);p.clear()}this._tunnels.clear()}setEnvironmentTunnel(p,c,f,I,w){this.addTunnelToMap(p,c,Promise.resolve({tunnelRemoteHost:p,tunnelRemotePort:c,localAddress:f,privacy:I,protocol:w,dispose:()=>Promise.resolve()}))}async getExistingTunnel(p,c){(v(p)||g(p))&&(p=e.LOCALHOST_ADDRESSES[0]);const f=this.getTunnelFromMap(p,c);if(f)return++f.refcount,f.value}openTunnel(p,c,f,I,w,t=!1,a,s){this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${c}:${f} on local port ${w}.`);const i=this._tunnelProvider??p;if(!i)return;if(c||(c="localhost"),I||(I=this.defaultTunnelHost),this._tunnelProvider&&this._factoryInProgress.has(f)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const n=this.retainOrCreateTunnel(i,c,f,I,w,t,a,s);return n?n.then(o=>{if(o){if(typeof o=="string")return this.logService.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."),this.removeEmptyOrErrorTunnelFromMap(c,f),o}else{this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyOrErrorTunnelFromMap(c,f);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const S=this.makeTunnel(o);return(o.tunnelRemoteHost!==c||o.tunnelRemotePort!==f)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),a&&o.privacy!==a&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."),this._onTunnelOpened.fire(S),S}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),n)}makeTunnel(p){return{tunnelRemotePort:p.tunnelRemotePort,tunnelRemoteHost:p.tunnelRemoteHost,tunnelLocalPort:p.tunnelLocalPort,localAddress:p.localAddress,privacy:p.privacy,protocol:p.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${p.tunnelRemoteHost}:${p.tunnelRemotePort} `);const c=this._tunnels.get(p.tunnelRemoteHost);if(c){const f=c.get(p.tunnelRemotePort);f&&(f.refcount--,await this.tryDisposeTunnel(p.tunnelRemoteHost,p.tunnelRemotePort,f))}}}}async tryDisposeTunnel(p,c,f){if(f.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${p}:${c}.`);const I=f.value.then(async w=>{w&&typeof w!="string"&&(await w.dispose(!0),this._onTunnelClosed.fire({host:w.tunnelRemoteHost,port:w.tunnelRemotePort}))});return this._tunnels.has(p)&&this._tunnels.get(p).delete(c),I}}async closeTunnel(p,c){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${p}:${c} `);const f=this._tunnels.get(p);if(f&&f.has(c)){const I=f.get(c);I.refcount=0,await this.tryDisposeTunnel(p,c,I)}}addTunnelToMap(p,c,f){this._tunnels.has(p)||this._tunnels.set(p,new Map),this._tunnels.get(p).set(c,{refcount:1,value:f})}async removeEmptyOrErrorTunnelFromMap(p,c){const f=this._tunnels.get(p);if(f){const I=f.get(c),w=I?await I.value:void 0;(!w||typeof w=="string")&&f.delete(c),f.size===0&&this._tunnels.delete(p)}}getTunnelFromMap(p,c){const f=[p];g(p)?(f.push(...e.LOCALHOST_ADDRESSES),f.push(...e.ALL_INTERFACES_ADDRESSES)):v(p)&&f.push(...e.ALL_INTERFACES_ADDRESSES);const I=f.map(w=>this._tunnels.get(w));for(const w of I){const t=w?.get(c);if(t)return t}}canTunnel(p){return!!m(p)}createWithProvider(p,c,f,I,w,t,a){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${c}:${f} on local port ${I}.`);const s=f;this._factoryInProgress.add(s);const i=I===void 0?f:I,n={elevationRequired:w?this.isPortPrivileged(i):!1},o={remoteAddress:{host:c,port:f},localAddressPort:I,privacy:t,public:t?t!==P.Private:void 0,protocol:a},S=p.forwardPort(o,n);return S?(this.addTunnelToMap(c,f,S),S.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(s)})):this._factoryInProgress.delete(s),S}};e.AbstractTunnelService=E,e.AbstractTunnelService=E=be([X(0,O.ILogService),X(1,L.IConfigurationService)],E)}),define(Z[48],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.DisablementReason=e.UpdateType=e.StateType=void 0;var L;(function(D){D.Uninitialized="uninitialized",D.Idle="idle",D.Disabled="disabled",D.CheckingForUpdates="checking for updates",D.AvailableForDownload="available for download",D.Downloading="downloading",D.Downloaded="downloaded",D.Updating="updating",D.Ready="ready"})(L||(e.StateType=L={}));var r;(function(D){D[D.Setup=0]="Setup",D[D.Archive=1]="Archive",D[D.Snap=2]="Snap"})(r||(e.UpdateType=r={}));var O;(function(D){D[D.NotBuilt=0]="NotBuilt",D[D.DisabledByEnvironment=1]="DisabledByEnvironment",D[D.ManuallyDisabled=2]="ManuallyDisabled",D[D.MissingConfiguration=3]="MissingConfiguration",D[D.InvalidConfiguration=4]="InvalidConfiguration",D[D.RunningAsAdmin=5]="RunningAsAdmin"})(O||(e.DisablementReason=O={})),e.State={Uninitialized:{type:"uninitialized"},Disabled:D=>({type:"disabled",reason:D}),Idle:(D,P)=>({type:"idle",updateType:D,error:P}),CheckingForUpdates:D=>({type:"checking for updates",explicit:D}),AvailableForDownload:D=>({type:"available for download",update:D}),Downloading:D=>({type:"downloading",update:D}),Downloaded:D=>({type:"downloaded",update:D}),Updating:D=>({type:"updating",update:D}),Ready:D=>({type:"ready",update:D})},e.IUpdateService=(0,b.createDecorator)("updateService")}),define(Z[266],te([0,1,4,189,59,43,89]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),O.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,L.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,L.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,L.localize)(2,null),(0,L.localize)(3,null),(0,L.localize)(4,null),D.updateConfigContributionDefault],policy:{name:"UpdateMode",minimumVersion:"1.67"}},"update.channel":{type:"string",default:"default",scope:1,description:(0,L.localize)(5,null),deprecationMessage:(0,L.localize)(6,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,L.localize)(7,null),description:D.updateConfigContributionEnableWindowsBackgroundUpdates,included:b.isWindows&&!b.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:D.updateConfigContributionShowReleaseNotes,tags:["usesOnlineServices"]}}})}),define(Z[267],te([0,1,3,48]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class r{constructor(P){this.service=P}listen(P,h){switch(h){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${h}`)}call(P,h,u){switch(h){case"checkForUpdates":return this.service.checkForUpdates(u);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion();case"_applySpecificUpdate":return this.service._applySpecificUpdate(u)}throw new Error(`Call not found: ${h}`)}}e.UpdateChannel=r;class O{get state(){return this._state}set state(P){this._state=P,this._onStateChange.fire(P)}constructor(P){this.channel=P,this._onStateChange=new b.Emitter,this.onStateChange=this._onStateChange.event,this._state=L.State.Uninitialized,this.channel.listen("onStateChange")(h=>this.state=h),this.channel.call("_getInitialState").then(h=>this.state=h)}checkForUpdates(P){return this.channel.call("checkForUpdates",P)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}_applySpecificUpdate(P){return this.channel.call("_applySpecificUpdate",P)}}e.UpdateChannelClient=O}),define(Z[98],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUpdateFromBuild=void 0;function b(L,r,O){if(!L||L.id===r.commit)return;const D=L.updates[O],P=L.assets.filter(u=>u.platform===O&&u.type===D)[0];return P?{url:P.url,version:L.id,productVersion:L.version,hash:P.hash}:void 0}e.getUpdateFromBuild=b}),define(Z[40],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,b.createDecorator)("IUriIdentityService")}),define(Z[268],te([0,1,40,208,16,19,141,3,2]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class u{static{this._clock=0}constructor(v){this.uri=v,this.time=u._clock++}touch(){return this.time=u._clock++,this}}let m=class{constructor(v){this._fileService=v,this._dispooables=new h.DisposableStore,this._limit=2**16;const d=new Map,y=E=>{let l=d.get(E.scheme);return l===void 0&&(l=v.hasProvider(E)&&!this._fileService.hasCapability(E,1024),d.set(E.scheme,l)),l};this._dispooables.add(P.Event.any(v.onDidChangeFileSystemProviderRegistrations,v.onDidChangeFileSystemProviderCapabilities)(E=>{d.delete(E.scheme)})),this.extUri=new O.ExtUri(y),this._canonicalUris=new D.SkipList((E,l)=>this.extUri.compare(E,l,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(v){this._fileService.hasProvider(v)&&(v=(0,O.normalizePath)(v));const d=this._canonicalUris.get(v);return d?d.touch().uri.with({fragment:v.fragment}):(this._canonicalUris.set(v,new u(v)),this._checkTrim(),v)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;const v=[...this._canonicalUris.entries()].sort((y,E)=>y[1].time<E[1].time?1:y[1].time>E[1].time?-1:0);u._clock=0,this._canonicalUris.clear();const d=this._limit*.5;for(let y=0;y<d;y++)this._canonicalUris.set(v[y][0],v[y][1].touch())}};e.UriIdentityService=m,e.UriIdentityService=m=be([X(0,r.IFileService)],m),(0,L.registerSingleton)(b.IUriIdentityService,m,1)}),define(Z[130],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IURLService=void 0,e.IURLService=(0,b.createDecorator)("urlService")}),define(Z[269],te([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLHandlerRouter=e.URLHandlerChannelClient=e.URLHandlerChannel=void 0;class L{constructor(P){this.handler=P}listen(P,h){throw new Error(`Event not found: ${h}`)}call(P,h,u){switch(h){case"handleURL":return this.handler.handleURL(b.URI.revive(u[0]),u[1])}throw new Error(`Call not found: ${h}`)}}e.URLHandlerChannel=L;class r{constructor(P){this.channel=P}handleURL(P,h){return this.channel.call("handleURL",[P.toJSON(),h])}}e.URLHandlerChannelClient=r;class O{constructor(P,h){this.next=P,this.logService=h}async routeCall(P,h,u,m){if(h!=="handleURL")throw new Error(`Call not found: ${h}`);if(Array.isArray(u)&&u.length>0){const g=b.URI.revive(u[0]);if(this.logService.trace("URLHandlerRouter#routeCall() with URI argument",g.toString(!0)),g.query){const v=/\bwindowId=(\d+)/.exec(g.query);if(v){const d=v[1];this.logService.trace(`URLHandlerRouter#routeCall(): found windowId query parameter with value "${d}"`,g.toString(!0));const y=new RegExp(`window:${d}`),E=P.connections.find(l=>(this.logService.trace("URLHandlerRouter#routeCall(): testing connection",l.ctx),y.test(l.ctx)));if(E)return this.logService.trace("URLHandlerRouter#routeCall(): found a connection to route",g.toString(!0)),E;this.logService.trace("URLHandlerRouter#routeCall(): did not find a connection to route",g.toString(!0))}else this.logService.trace("URLHandlerRouter#routeCall(): did not find windowId query parameter",g.toString(!0))}}else this.logService.trace("URLHandlerRouter#routeCall() without URI argument");return this.next.routeCall(P,h,u,m)}routeEvent(P,h){throw new Error(`Event not found: ${h}`)}}e.URLHandlerRouter=O}),define(Z[270],te([0,1,8,2,7,22]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class D extends L.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(u,m){const g=[...this.handlers.values()];return(0,b.first)(g.map(v=>()=>v.handleURL(u,m)),void 0,!1).then(v=>v||!1)}registerHandler(u){return this.handlers.add(u),(0,L.toDisposable)(()=>this.handlers.delete(u))}}e.AbstractURLService=D;let P=class extends D{constructor(u){super(),this.productService=u}create(u){let{authority:m,path:g,query:v,fragment:d}=u||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return m&&g&&g.indexOf("/")!==0&&(g=`/${g}`),r.URI.from({scheme:this.productService.urlProtocol,authority:m,path:g,query:v,fragment:d})}};e.NativeURLService=P,e.NativeURLService=P=be([X(0,O.IProductService)],P)}),define(Z[271],te([0,1,14,8,3,2,4,7]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronURLListener=void 0;class h{constructor(m,g,v,d,y,E){if(this.urlService=g,this.logService=E,this.uris=[],this.retryCount=0,this.flushDisposable=O.Disposable.None,this.disposables=new O.DisposableStore,m&&(E.trace("ElectronURLListener initialUrisToHandle:",m.map(c=>c.originalUrl)),this.uris=m),D.isWindows){const c=d.isBuilt?[]:[`"${d.appRoot}"`];c.push("--open-url","--"),b.app.setAsDefaultProtocolClient(y.urlProtocol,process.execPath,c)}const l=r.Event.map(r.Event.fromNodeEventEmitter(b.app,"open-url",(c,f)=>({event:c,url:f})),({event:c,url:f})=>(c.preventDefault(),f));this.disposables.add(l(c=>{const f=this.uriFromRawUrl(c);f&&this.urlService.open(f,{originalUrl:c})})),v.getWindows().filter(c=>c.isReady).length>0?(E.trace("ElectronURLListener: window is ready to handle URLs"),this.flush()):(E.trace("ElectronURLListener: waiting for window to be ready to handle URLs..."),r.Event.once(v.onDidSignalReadyWindow)(this.flush,this,this.disposables))}uriFromRawUrl(m){try{return P.URI.parse(m)}catch{return}}async flush(){if(this.retryCount++>10){this.logService.trace("ElectronURLListener#flush(): giving up after 10 retries");return}this.logService.trace("ElectronURLListener#flush(): flushing URLs");const m=[];for(const g of this.uris)await this.urlService.open(g.uri,{originalUrl:g.originalUrl})?this.logService.trace("ElectronURLListener#flush(): URL was handled",g.originalUrl):(this.logService.trace("ElectronURLListener#flush(): URL was not yet handled",g.originalUrl),m.push(g));m.length!==0&&(this.uris=m,this.flushDisposable=(0,L.disposableTimeout)(()=>this.flush(),500))}dispose(){this.disposables.dispose(),this.flushDisposable.dispose()}}e.ElectronURLListener=h}),define(Z[272],te([0,1,3,2,16,56,58,17]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUserDataProvider=void 0;class h extends L.Disposable{get capabilities(){return this.fileSystemProvider.capabilities&-5}constructor(m,g,v,d){super(),this.fileSystemScheme=m,this.fileSystemProvider=g,this.userDataScheme=v,this.logService=d,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new b.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=D.TernarySearchTree.forUris(()=>!(this.capabilities&1024)),this._register(this.fileSystemProvider.onDidChangeFile(y=>this.handleFileChanges(y)))}watch(m,g){this.watchResources.set(m,m);const v=this.fileSystemProvider.watch(this.toFileSystemResource(m),g);return(0,L.toDisposable)(()=>{this.watchResources.delete(m),v.dispose()})}stat(m){return this.fileSystemProvider.stat(this.toFileSystemResource(m))}mkdir(m){return this.fileSystemProvider.mkdir(this.toFileSystemResource(m))}rename(m,g,v){return this.fileSystemProvider.rename(this.toFileSystemResource(m),this.toFileSystemResource(g),v)}readFile(m){return this.fileSystemProvider.readFile(this.toFileSystemResource(m),{atomic:!0})}readFileStream(m,g,v){const d=(0,O.newWriteableStream)(y=>P.VSBuffer.concat(y.map(E=>P.VSBuffer.wrap(E))).buffer);return(async()=>{try{const y=await this.readFile(m);d.end(y)}catch(y){d.error(y),d.end()}})(),d}readdir(m){return this.fileSystemProvider.readdir(this.toFileSystemResource(m))}writeFile(m,g,v){return this.fileSystemProvider.writeFile(this.toFileSystemResource(m),g,v)}delete(m,g){return this.fileSystemProvider.delete(this.toFileSystemResource(m),g)}copy(m,g,v){if((0,r.hasFileFolderCopyCapability)(this.fileSystemProvider))return this.fileSystemProvider.copy(this.toFileSystemResource(m),this.toFileSystemResource(g),v);throw new Error("copy not supported")}handleFileChanges(m){const g=[];for(const v of m){if(v.resource.scheme!==this.fileSystemScheme)continue;const d=this.toUserDataResource(v.resource);this.watchResources.findSubstr(d)&&g.push({resource:d,type:v.type})}g.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(g))}toFileSystemResource(m){return m.with({scheme:this.fileSystemScheme})}toUserDataResource(m){return m.with({scheme:this.userDataScheme})}}e.FileUserDataProvider=h}),define(Z[273],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcUtilityProcessWorkerChannelName=void 0,e.ipcUtilityProcessWorkerChannelName="utilityProcessWorker"}),define(Z[274],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebviewManagerService=void 0,e.IWebviewManagerService=(0,b.createDecorator)("webviewManagerService")}),define(Z[275],te([0,1,14,2,15,7]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewProtocolProvider=void 0;class D extends L.Disposable{static{this.validWebviewFilePaths=new Map([["/index.html","index.html"],["/fake.html","fake.html"],["/service-worker.js","service-worker.js"]])}constructor(){super();const h=this.handleWebviewRequest.bind(this);b.protocol.registerFileProtocol(r.Schemas.vscodeWebview,h)}handleWebviewRequest(h,u){try{const m=O.URI.parse(h.url),g=D.validWebviewFilePaths.get(m.path);if(typeof g=="string"){const v=`vs/workbench/contrib/webview/browser/pre/${g}`,d=r.FileAccess.asFileUri(v);return u({path:d.fsPath,headers:{...r.COI.getHeadersFromQuery(h.url),"Cross-Origin-Resource-Policy":"cross-origin"}})}else return u({error:-10})}catch{}return u({error:-2})}}e.WebviewProtocolProvider=D}),define(Z[81],te([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.useWindowControlsOverlay=e.getTitleBarStyle=e.getMenuBarVisibility=e.isFileToOpen=e.isFolderToOpen=e.isWorkspaceToOpen=e.WindowMinimumSize=void 0,e.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};function L(m){return!!m.workspaceUri}e.isWorkspaceToOpen=L;function r(m){return!!m.folderUri}e.isFolderToOpen=r;function O(m){return!!m.fileUri}e.isFileToOpen=O;function D(m){const g=P(m),v=m.getValue("window.menuBarVisibility");return v==="default"||g==="native"&&v==="compact"||b.isMacintosh&&b.isNative?"classic":v}e.getMenuBarVisibility=D;function P(m){if(b.isWeb)return"custom";const g=m.getValue("window");if(g){if(b.isMacintosh&&g.nativeTabs===!0||b.isMacintosh&&g.nativeFullScreen===!1)return"native";const y=g.titleBarStyle;if(y==="native"||y==="custom")return y}return b.isLinux?"native":"custom"}e.getTitleBarStyle=P;function h(m){return!(!b.isWindows||b.isWeb||P(m)==="native")}e.useWindowControlsOverlay=h;function u(m=0){return Math.pow(1.2,m)}e.zoomLevelToZoomFactor=u}),define(Z[131],te([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowError=e.WindowMode=e.defaultWindowState=e.UnloadReason=e.LoadReason=void 0;var b;(function(P){P[P.INITIAL=1]="INITIAL",P[P.LOAD=2]="LOAD",P[P.RELOAD=3]="RELOAD"})(b||(e.LoadReason=b={}));var L;(function(P){P[P.CLOSE=1]="CLOSE",P[P.QUIT=2]="QUIT",P[P.RELOAD=3]="RELOAD",P[P.LOAD=4]="LOAD"})(L||(e.UnloadReason=L={}));const r=function(P=1){return{width:1024,height:768,mode:P}};e.defaultWindowState=r;var O;(function(P){P[P.Maximized=0]="Maximized",P[P.Normal=1]="Normal",P[P.Minimized=2]="Minimized",P[P.Fullscreen=3]="Fullscreen"})(O||(e.WindowMode=O={}));var D;(function(P){P[P.UNRESPONSIVE=1]="UNRESPONSIVE",P[P.PROCESS_GONE=2]="PROCESS_GONE",P[P.LOAD=3]="LOAD"})(D||(e.WindowError=D={}))}),define(Z[29],te([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenContext=e.IWindowsMainService=void 0,e.IWindowsMainService=(0,b.createDecorator)("windowsMainService");var L;(function(r){r[r.CLI=0]="CLI",r[r.DOCK=1]="DOCK",r[r.MENU=2]="MENU",r[r.DIALOG=3]="DIALOG",r[r.DESKTOP=4]="DESKTOP",r[r.API=5]="API"})(L||(e.OpenContext=L={}))}),define(Z[276],te([0,1,77,5,33,22,29,220]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CredentialsNativeMainService=void 0;let h=class extends P.BaseCredentialsMainService{constructor(m,g,v,d){super(m),this.environmentMainService=g,this.productService=v,this.windowsMainService=d,this.surfaceKeytarLoadError=y=>{this.windowsMainService.sendToFocused("vscode:showCredentialsError",y.message??y)}}async getSecretStoragePrefix(){return Promise.resolve(this.productService.urlProtocol)}async withKeytar(){if(this._keytarCache)return this._keytarCache;if(this.environmentMainService.disableKeytar)return this.logService.info("Keytar is disabled. Using in-memory credential store instead."),this._keytarCache=new b.InMemoryCredentialsProvider,this._keytarCache;const m=await new Promise((g,v)=>{H(["keytar"],g,v)});return await m.findCredentials("test-keytar-loads"),this._keytarCache=m,this._keytarCache}};e.CredentialsNativeMainService=h,e.CredentialsNativeMainService=h=be([X(0,L.ILogService),X(1,r.INativeEnvironmentService),X(2,O.IProductService),X(3,D.IWindowsMainService)],h)}),define(Z[277],te([0,1,14,24,4,7,21,18,63,6,5,130,29]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaunchMainService=e.ILaunchMainService=e.ID=void 0,e.ID="launchMainService",e.ILaunchMainService=(0,u.createDecorator)(e.ID);let d=class{constructor(E,l,p,c){this.logService=E,this.windowsMainService=l,this.urlService=p,this.configurationService=c}async start(E,l){this.logService.trace("Received data from other instance: ",E,l),r.isMacintosh&&b.app.focus({steal:!0});const p=this.parseOpenUrl(E);if(p.length){let c=Promise.resolve();if(this.windowsMainService.getWindowCount()===0){const f=(0,L.firstOrDefault)(await this.windowsMainService.openEmptyWindow({context:4}));f&&(c=f.ready())}c.then(()=>{for(const{uri:f,originalUrl:I}of p)this.urlService.open(f,{originalUrl:I})})}else return this.startOpenWindow(E,l)}parseOpenUrl(E){return E["open-url"]&&E._urls&&E._urls.length>0?(0,L.coalesce)(E._urls.map(l=>{try{return{uri:O.URI.parse(l),originalUrl:l}}catch{return null}})):[]}async startOpenWindow(E,l){const p=(0,h.isLaunchedFromCli)(l)?0:4;let c=[];const f=E.wait&&E.waitMarkerFilePath?O.URI.file(E.waitMarkerFilePath):void 0,I=E.remote||void 0,w={context:p,cli:E,userEnv:l,waitMarkerFileURI:f,remoteAuthority:I,forceProfile:E.profile,forceTempProfile:E["profile-temp"]};if(E.extensionDevelopmentPath)await this.windowsMainService.openExtensionDevelopmentHostWindow(E.extensionDevelopmentPath,w);else if(!E._.length&&!E["folder-uri"]&&!E["file-uri"]){let t=!1;if(E["new-window"]||E["unity-launch"]||w.forceProfile||w.forceTempProfile)t=!0;else if(E["reuse-window"])t=!1;else switch(this.configurationService.getValue("window")?.openWithoutArgumentsInNewWindow||"default"){case"on":t=!0;break;case"off":t=!1;break;default:t=!r.isMacintosh}if(t)c=await this.windowsMainService.open({...w,forceNewWindow:!0,forceEmpty:!0});else{const a=this.windowsMainService.getLastActiveWindow();a?(this.windowsMainService.openExistingWindow(a,w),c=[a]):c=await this.windowsMainService.open({...w,forceEmpty:!0})}}else c=await this.windowsMainService.open({...w,forceNewWindow:E["new-window"],preferNewWindow:!E["reuse-window"]&&!E.wait,forceReuseWindow:E["reuse-window"],diffMode:E.diff,mergeMode:E.merge,addMode:E.add,noRecentEntry:!!E["skip-add-to-recently-opened"],gotoLineMode:E.goto});if(E["reuse-window"]&&c.length>0&&c[0]){let t=c[0];c[0].ready().then(()=>t.send("ads:processCommandLine",E))}if(f&&c.length===1&&c[0])return Promise.race([c[0].whenClosedOrLoaded,(0,D.whenDeleted)(f.fsPath)]).then(()=>{},()=>{})}async getMainProcessId(){return this.logService.trace("Received request for process ID from other instance."),process.pid}};e.LaunchMainService=d,e.LaunchMainService=d=be([X(0,m.ILogService),X(1,v.IWindowsMainService),X(2,g.IURLService),X(3,P.IConfigurationService)],d)}),define(Z[278],te([0,1,14,3,2,275,29]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewMainService=void 0;let P=class extends r.Disposable{constructor(u){super(),this.windowsMainService=u,this._onFoundInFrame=this._register(new L.Emitter),this.onFoundInFrame=this._onFoundInFrame.event,this._register(new O.WebviewProtocolProvider)}async setIgnoreMenuShortcuts(u,m){let g;if(typeof u.windowId=="number"){const{windowId:v}=u,d=this.windowsMainService.getWindowById(v);if(!d?.win)throw new Error(`Invalid windowId: ${v}`);g=d.win.webContents}else{const{webContentsId:v}=u;if(g=b.webContents.fromId(v),!g)throw new Error(`Invalid webContentsId: ${v}`)}g.isDestroyed()||g.setIgnoreMenuShortcuts(m)}async findInFrame(u,m,g,v){const y=this.getFrameByName(u,m);if(typeof y.findInFrame=="function"){y.findInFrame(g,{findNext:v.findNext,forward:v.forward});const E=(l,p)=>{p.finalUpdate&&(this._onFoundInFrame.fire(p),y.removeListener("found-in-frame",E))};y.on("found-in-frame",E)}}async stopFindInFrame(u,m,g){const d=this.getFrameByName(u,m);typeof d.stopFindInFrame=="function"&&d.stopFindInFrame(g.keepSelection?"keepSelection":"clearSelection")}getFrameByName(u,m){const g=this.windowsMainService.getWindowById(u.windowId);if(!g?.win)throw new Error(`Invalid windowId: ${u}`);const v=g.win.webContents.mainFrame.framesInSubtree.find(d=>d.name===m);if(!v)throw new Error(`Unknown frame: ${m}`);return v}};e.WebviewMainService=P,e.WebviewMainService=P=be([X(0,D.IWindowsMainService)],P)}),define(Z[279],te([0,1,8,3,2]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveWindowManager=void 0;class O extends r.Disposable{constructor({onDidOpenWindow:P,onDidFocusWindow:h,getActiveWindowId:u}){super(),this.disposables=this._register(new r.DisposableStore),L.Event.latch(L.Event.any(P,h))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=(0,b.createCancelablePromise)(()=>u()),(async()=>{try{const g=await this.firstActiveWindowIdPromise;this.activeWindowId=typeof this.activeWindowId=="number"?this.activeWindowId:g}catch{}finally{this.firstActiveWindowIdPromise=void 0}})()}setActiveWindow(P){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise.cancel(),this.firstActiveWindowIdPromise=void 0),this.activeWindowId=P}async getActiveClientId(){return`window:${this.firstActiveWindowIdPromise?await this.firstActiveWindowIdPromise:this.activeWindowId}`}}e.ActiveWindowManager=O}),define(Z[30],te([0,1,193,10,58,19,7,6,15]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,P.createDecorator)("contextService");function u(i){const n=i;return typeof n?.id=="string"&&D.URI.isUri(n.uri)}e.isSingleFolderWorkspaceIdentifier=u;function m(i){return typeof i?.id=="string"&&!u(i)&&!v(i)}e.isEmptyWorkspaceIdentifier=m,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function g(i,n){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:(0,L.basename)(i)}:n?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const o=i;return o.configuration?{id:o.id,configPath:o.configuration}:o.folders.length===1?{id:o.id,uri:o.folders[0].uri}:{id:o.id}}e.toWorkspaceIdentifier=g;function v(i){const n=i;return typeof n?.id=="string"&&D.URI.isUri(n.configPath)}e.isWorkspaceIdentifier=v;function d(i){const n=i;if(n?.uri)return{id:n.id,uri:D.URI.revive(n.uri)};const o=i;if(o?.configPath)return{id:o.id,configPath:D.URI.revive(o.configPath)};if(i?.id)return{id:i.id}}e.reviveIdentifier=d;var y;(function(i){i[i.EMPTY=1]="EMPTY",i[i.FOLDER=2]="FOLDER",i[i.WORKSPACE=3]="WORKSPACE"})(y||(e.WorkbenchState=y={}));function E(i){const n=i;return!!(n&&typeof n=="object"&&typeof n.id=="string"&&Array.isArray(n.folders))}e.isWorkspace=E;function l(i){const n=i;return!!(n&&typeof n=="object"&&D.URI.isUri(n.uri)&&typeof n.name=="string"&&typeof n.toResource=="function")}e.isWorkspaceFolder=l;class p{constructor(n,o,S,k,M){this._id=n,this._transient=S,this._configuration=k,this._ignorePathCasing=M,this._foldersMap=r.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=o}update(n){this._id=n.id,this._configuration=n.configuration,this._transient=n.transient,this._ignorePathCasing=n._ignorePathCasing,this.folders=n.folders}get folders(){return this._folders}set folders(n){this._folders=n,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(n){this._configuration=n}getFolder(n){return n&&this._foldersMap.findSubstr(n)||null}updateFoldersMap(){this._foldersMap=r.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const n of this.folders)this._foldersMap.set(n.uri,n)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=p;class c{constructor(n,o){this.raw=o,this.uri=n.uri,this.index=n.index,this.name=n.name}toResource(n){return(0,O.joinPath)(this.uri,n)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=c;function f(i){return new c({uri:i,index:0,name:(0,O.basenameOrAuthority)(i)},{uri:i.toString()})}e.toWorkspaceFolder=f,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,b.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function I(i,n){return O.extUriBiasedIgnorePathCase.isEqualOrParent(i,n.untitledWorkspacesHome)}e.isUntitledWorkspace=I;function w(i){let n;return D.URI.isUri(i)?n=i:n=i.configuration,n?.scheme===h.Schemas.tmp}e.isTemporaryWorkspace=w,e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function t(i){return i.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=t;function a(i,n){return!I(i,n)&&!w(i)}e.isSavedWorkspace=a;function s(i){return(typeof i=="string"?(0,L.extname)(i):(0,O.extname)(i))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=s}),define(Z[61],te([0,1,14,8,57,46,2,86,4,21,168,93,6,5,22,30]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogMainService=e.IDialogMainService=void 0,e.IDialogMainService=(0,v.createDecorator)("dialogMainService");let l=class{constructor(c,f){this.logService=c,this.productService=f,this.windowFileDialogLocks=new Map,this.windowDialogQueues=new Map,this.noWindowDialogueQueue=new L.Queue}pickFileFolder(c,f){return this.doPick({...c,pickFolders:!0,pickFiles:!0,title:(0,m.localize)(0,null)},f)}pickFolder(c,f){return this.doPick({...c,pickFolders:!0,title:(0,m.localize)(1,null)},f)}pickFile(c,f){return this.doPick({...c,pickFiles:!0,title:(0,m.localize)(2,null)},f)}pickWorkspace(c,f){const I=(0,m.localize)(3,null),w=(0,O.mnemonicButtonLabel)((0,m.localize)(4,null)),t=E.WORKSPACE_FILTER;return this.doPick({...c,pickFiles:!0,title:I,filters:t,buttonLabel:w},f)}async doPick(c,f){const I={title:c.title,buttonLabel:c.buttonLabel,filters:c.filters,defaultPath:c.defaultPath};(typeof c.pickFiles=="boolean"||typeof c.pickFolders=="boolean")&&(I.properties=void 0,c.pickFiles&&c.pickFolders&&(I.properties=["multiSelections","openDirectory","openFile","createDirectory"])),I.properties||(I.properties=["multiSelections",c.pickFolders?"openDirectory":"openFile","createDirectory"]),h.isMacintosh&&I.properties.push("treatPackageAsDirectory");const w=await this.showOpenDialog(I,(f||b.BrowserWindow.getFocusedWindow())??void 0);if(w&&w.filePaths&&w.filePaths.length>0)return w.filePaths}getWindowDialogQueue(c){if(c){let f=this.windowDialogQueues.get(c.id);return f||(f=new L.Queue,this.windowDialogQueues.set(c.id,f)),f}else return this.noWindowDialogueQueue}showMessageBox(c,f){return this.getWindowDialogQueue(f).queue(async()=>{const{options:I,buttonIndeces:w}=(0,g.massageMessageBoxOptions)(c,this.productService);let t;return f?t=await b.dialog.showMessageBox(f,I):t=await b.dialog.showMessageBox(I),{response:w[t.response],checkboxChecked:t.checkboxChecked}})}async showSaveDialog(c,f){const I=this.acquireFileDialogLock(c,f);if(!I)return this.logService.error("[DialogMainService]: file save dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePath:""};try{return await this.getWindowDialogQueue(f).queue(async()=>{let w;return f?w=await b.dialog.showSaveDialog(f,c):w=await b.dialog.showSaveDialog(c),w.filePath=this.normalizePath(w.filePath),w})}finally{(0,D.dispose)(I)}}normalizePath(c){return c&&h.isMacintosh&&(c=(0,P.normalizeNFC)(c)),c}normalizePaths(c){return c.map(f=>this.normalizePath(f))}async showOpenDialog(c,f){c.defaultPath&&(await u.Promises.exists(c.defaultPath)||(c.defaultPath=void 0));const I=this.acquireFileDialogLock(c,f);if(!I)return this.logService.error("[DialogMainService]: file open dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePaths:[]};try{return await this.getWindowDialogQueue(f).queue(async()=>{let w;return f?w=await b.dialog.showOpenDialog(f,c):w=await b.dialog.showOpenDialog(c),w.filePaths=this.normalizePaths(w.filePaths),w})}finally{(0,D.dispose)(I)}}acquireFileDialogLock(c,f){if(!f)return D.Disposable.None;this.logService.trace("[DialogMainService]: request to acquire file dialog lock",c);let I=this.windowFileDialogLocks.get(f.id);I||(I=new Set,this.windowFileDialogLocks.set(f.id,I));const w=(0,r.hash)(c);if(!I.has(w))return this.logService.trace("[DialogMainService]: new file dialog lock created",c),I.add(w),(0,D.toDisposable)(()=>{this.logService.trace("[DialogMainService]: file dialog lock disposed",c),I?.delete(w),I?.size===0&&this.windowFileDialogLocks.delete(f.id)})}};e.DialogMainService=l,e.DialogMainService=l=be([X(0,d.ILogService),X(1,y.IProductService)],l)}),define(Z[280],te([0,1,3,2,75,30]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDatabaseChannel=void 0;class D extends L.Disposable{static{this.STORAGE_CHANGE_DEBOUNCE_TIME=100}constructor(h,u){super(),this.logService=h,this.storageMainService=u,this.onDidChangeApplicationStorageEmitter=this._register(new b.Emitter),this.mapProfileToOnDidChangeProfileStorageEmitter=new Map,this.registerStorageChangeListeners(u.applicationStorage,this.onDidChangeApplicationStorageEmitter)}registerStorageChangeListeners(h,u){this._register(b.Event.debounce(h.onDidChangeStorage,(m,g)=>(m?m.push(g):m=[g],m),D.STORAGE_CHANGE_DEBOUNCE_TIME)(m=>{m.length&&u.fire(this.serializeStorageChangeEvents(m,h))}))}serializeStorageChangeEvents(h,u){const m=new Map,g=new Set;return h.forEach(v=>{const d=u.get(v.key);typeof d=="string"?m.set(v.key,d):g.add(v.key)}),{changed:Array.from(m.entries()),deleted:Array.from(g.values())}}listen(h,u,m){switch(u){case"onDidChangeStorage":{const g=m.profile?(0,r.revive)(m.profile):void 0;if(!g)return this.onDidChangeApplicationStorageEmitter.event;let v=this.mapProfileToOnDidChangeProfileStorageEmitter.get(g.id);return v||(v=this._register(new b.Emitter),this.registerStorageChangeListeners(this.storageMainService.profileStorage(g),v),this.mapProfileToOnDidChangeProfileStorageEmitter.set(g.id,v)),v.event}}throw new Error(`Event not found: ${u}`)}async call(h,u,m){const g=m.profile?(0,r.revive)(m.profile):void 0,v=(0,O.reviveIdentifier)(m.workspace),d=await this.withStorageInitialized(g,v);switch(u){case"getItems":return Array.from(d.items.entries());case"updateItems":{const y=m;if(y.insert)for(const[E,l]of y.insert)d.set(E,l);y.delete?.forEach(E=>d.delete(E));break}case"isUsed":{const y=m.payload;if(typeof y=="string")return this.storageMainService.isUsed(y)}default:throw new Error(`Call not found: ${u}`)}}async withStorageInitialized(h,u){let m;u?m=this.storageMainService.workspaceStorage(u):h?m=this.storageMainService.profileStorage(h):m=this.storageMainService.applicationStorage;try{await m.init()}catch(g){this.logService.error(`StorageIPC#init: Unable to init ${u?"workspace":h?"profile":"application"} storage due to ${g}`)}return m}}e.StorageDatabaseChannel=D}),define(Z[41],te([0,1,57,3,2,19,7,190,33,16,6,5,30,35,40,8,31,26,12]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.reviveProfile=e.IUserDataProfilesService=e.isUserDataProfile=e.ProfileResourceType=void 0;var f;(function(i){i.Settings="settings",i.Keybindings="keybindings",i.Snippets="snippets",i.Tasks="tasks",i.Extensions="extensions",i.GlobalState="globalState"})(f||(e.ProfileResourceType=f={}));function I(i){const n=i;return!!(n&&typeof n=="object"&&typeof n.id=="string"&&typeof n.isDefault=="boolean"&&typeof n.name=="string"&&D.URI.isUri(n.location)&&D.URI.isUri(n.globalStorageHome)&&D.URI.isUri(n.settingsResource)&&D.URI.isUri(n.keybindingsResource)&&D.URI.isUri(n.tasksResource)&&D.URI.isUri(n.snippetsHome)&&D.URI.isUri(n.extensionsResource))}e.isUserDataProfile=I,e.IUserDataProfilesService=(0,m.createDecorator)("IUserDataProfilesService");function w(i,n){return{id:i.id,isDefault:i.isDefault,name:i.name,shortName:i.shortName,location:D.URI.revive(i.location).with({scheme:n}),globalStorageHome:D.URI.revive(i.globalStorageHome).with({scheme:n}),settingsResource:D.URI.revive(i.settingsResource).with({scheme:n}),keybindingsResource:D.URI.revive(i.keybindingsResource).with({scheme:n}),tasksResource:D.URI.revive(i.tasksResource).with({scheme:n}),snippetsHome:D.URI.revive(i.snippetsHome).with({scheme:n}),extensionsResource:D.URI.revive(i.extensionsResource).with({scheme:n}),cacheHome:D.URI.revive(i.cacheHome).with({scheme:n}),useDefaultFlags:i.useDefaultFlags,isTransient:i.isTransient}}e.reviveProfile=w;function t(i,n,o,S,k,M){return{id:i,name:n,location:o,isDefault:!1,shortName:k?.shortName,globalStorageHome:M&&k?.useDefaultFlags?.globalState?M.globalStorageHome:(0,O.joinPath)(o,"globalStorage"),settingsResource:M&&k?.useDefaultFlags?.settings?M.settingsResource:(0,O.joinPath)(o,"settings.json"),keybindingsResource:M&&k?.useDefaultFlags?.keybindings?M.keybindingsResource:(0,O.joinPath)(o,"keybindings.json"),tasksResource:M&&k?.useDefaultFlags?.tasks?M.tasksResource:(0,O.joinPath)(o,"tasks.json"),snippetsHome:M&&k?.useDefaultFlags?.snippets?M.snippetsHome:(0,O.joinPath)(o,"snippets"),extensionsResource:M&&k?.useDefaultFlags?.extensions?M.extensionsResource:(0,O.joinPath)(o,"extensions.json"),cacheHome:(0,O.joinPath)(S,i),useDefaultFlags:k?.useDefaultFlags,isTransient:k?.transient}}e.toUserDataProfile=t;let a=class extends r.Disposable{static{this.PROFILES_KEY="userDataProfiles"}static{this.PROFILE_ASSOCIATIONS_KEY="profileAssociations"}get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(n,o,S,k){super(),this.environmentService=n,this.fileService=o,this.uriIdentityService=S,this.logService=k,this.enabled=!0,this._onDidChangeProfiles=this._register(new L.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new L.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new L.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new L.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new d.ResourceMap,emptyWindows:new Map},this.profilesHome=(0,O.joinPath)(this.environmentService.userRoamingDataHome,"profiles"),this.profilesCacheHome=(0,O.joinPath)(this.environmentService.cacheHome,"CachedProfilesData")}init(){this._profilesObject=void 0}setEnablement(n){this.enabled!==n&&(this._profilesObject=void 0,this.enabled=n)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const n=this.createDefaultProfile(),o=[n];if(this.enabled)try{for(const M of this.getStoredProfiles()){if(!M.name||!(0,c.isString)(M.name)||!M.location){this.logService.warn("Skipping the invalid stored profile",M.location||M.name);continue}o.push(t((0,O.basename)(M.location),M.name,M.location,this.profilesCacheHome,{shortName:M.shortName,useDefaultFlags:M.useDefaultFlags},n))}}catch(M){this.logService.error(M)}const S=new d.ResourceMap,k=new Map;if(o.length)try{const M=this.getStoredProfileAssociations();if(M.workspaces)for(const[C,A]of Object.entries(M.workspaces)){const T=D.URI.parse(C),F=o.find(z=>z.id===A);F&&S.set(T,F)}if(M.emptyWindows)for(const[C,A]of Object.entries(M.emptyWindows)){const T=o.find(F=>F.id===A);T&&k.set(C,T)}}catch(M){this.logService.error(M)}this._profilesObject={profiles:o,workspaces:S,emptyWindows:k}}return this._profilesObject}createDefaultProfile(){const n=t("__default__profile__",(0,P.localize)(0,null),this.environmentService.userRoamingDataHome,this.profilesCacheHome);return{...n,extensionsResource:this.getDefaultProfileExtensionsLocation()??n.extensionsResource,isDefault:!0}}async createTransientProfile(n){const o="Temp",S=new RegExp(`${(0,p.escapeRegExpCharacters)(o)}\\s(\\d+)`);let k=0;for(const C of this.profiles){const A=S.exec(C.name),T=A?parseInt(A[1]):0;k=T>k?T:k}const M=`${o} ${k+1}`;return this.createProfile((0,b.hash)((0,l.generateUuid)()).toString(16),M,{transient:!0},n)}async createNamedProfile(n,o,S){return this.createProfile((0,b.hash)((0,l.generateUuid)()).toString(16),n,o,S)}async createProfile(n,o,S,k){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const M=await this.doCreateProfile(n,o,S);return k&&await this.setProfileForWorkspace(k,M),M}async doCreateProfile(n,o,S){if(!(0,c.isString)(o)||!o)throw new Error("Name of the profile is mandatory and must be of type `string`");let k=this.profileCreationPromises.get(o);return k||(k=(async()=>{try{const M=this.profiles.find(T=>T.name===o||T.id===n);if(M)return M;const C=t(n,o,(0,O.joinPath)(this.profilesHome,n),this.profilesCacheHome,S,this.defaultProfile);await this.fileService.createFolder(C.location);const A=[];return this._onWillCreateProfile.fire({profile:C,join(T){A.push(T)}}),await E.Promises.settled(A),this.updateProfiles([C],[],[]),C}finally{this.profileCreationPromises.delete(o)}})(),this.profileCreationPromises.set(o,k)),k}async updateProfile(n,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");let S=this.profiles.find(k=>k.id===n.id);if(!S)throw new Error(`Profile '${n.name}' does not exist`);return S=t(S.id,o.name??S.name,S.location,this.profilesCacheHome,{shortName:o.shortName??S.shortName,transient:o.transient??S.isTransient,useDefaultFlags:o.useDefaultFlags??S.useDefaultFlags},this.defaultProfile),this.updateProfiles([],[],[S]),S}async removeProfile(n){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");if(n.isDefault)throw new Error("Cannot remove default profile");const o=this.profiles.find(k=>k.id===n.id);if(!o)throw new Error(`Profile '${n.name}' does not exist`);const S=[];this._onWillRemoveProfile.fire({profile:o,join(k){S.push(k)}});try{await Promise.allSettled(S)}catch(k){this.logService.error(k)}for(const k of[...this.profilesObject.emptyWindows.keys()])o.id===this.profilesObject.emptyWindows.get(k)?.id&&this.profilesObject.emptyWindows.delete(k);for(const k of[...this.profilesObject.workspaces.keys()])o.id===this.profilesObject.workspaces.get(k)?.id&&this.profilesObject.workspaces.delete(k);this.updateStoredProfileAssociations(),this.updateProfiles([],[o],[]);try{await this.fileService.del(o.cacheHome,{recursive:!0})}catch(k){(0,u.toFileOperationResult)(k)!==1&&this.logService.error(k)}}async setProfileForWorkspace(n,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const S=this.profiles.find(k=>k.id===o.id);if(!S)throw new Error(`Profile '${o.name}' does not exist`);this.updateWorkspaceAssociation(n,S)}unsetWorkspace(n,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");this.updateWorkspaceAssociation(n,void 0,o)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindows.clear(),this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindows.clear(),this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(this.enabled&&await this.fileService.exists(this.profilesHome)){const n=await this.fileService.resolve(this.profilesHome);await Promise.all((n.children||[]).filter(o=>o.isDirectory&&this.profiles.every(S=>!this.uriIdentityService.extUri.isEqual(S.location,o.resource))).map(o=>this.fileService.del(o.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const n=this.transientProfilesObject.profiles.filter(o=>!this.isProfileAssociatedToWorkspace(o));await Promise.allSettled(n.map(o=>this.removeProfile(o)))}getProfileForWorkspace(n){const o=this.getWorkspace(n);return D.URI.isUri(o)?this.transientProfilesObject.workspaces.get(o)??this.profilesObject.workspaces.get(o):this.transientProfilesObject.emptyWindows.get(o)??this.profilesObject.emptyWindows.get(o)}getWorkspace(n){return(0,v.isSingleFolderWorkspaceIdentifier)(n)?n.uri:(0,v.isWorkspaceIdentifier)(n)?n.configPath:n.id}isProfileAssociatedToWorkspace(n){return!!([...this.transientProfilesObject.emptyWindows.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,n.location))||[...this.transientProfilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,n.location))||[...this.profilesObject.emptyWindows.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,n.location))||[...this.profilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,n.location)))}updateProfiles(n,o,S){const k=[...this.profiles,...n],M=[];this.transientProfilesObject.profiles=[];for(let C of k)C.isDefault||o.some(A=>C.id===A.id)||(C=S.find(A=>C.id===A.id)??C,C.isTransient?this.transientProfilesObject.profiles.push(C):M.push({location:C.location,name:C.name,shortName:C.shortName,useDefaultFlags:C.useDefaultFlags}));this.saveStoredProfiles(M),this._profilesObject=void 0,this.triggerProfilesChanges(n,o,S)}triggerProfilesChanges(n,o,S){this._onDidChangeProfiles.fire({added:n,removed:o,updated:S,all:this.profiles})}updateWorkspaceAssociation(n,o,S){S=o?.isTransient?!0:S,S||this.updateWorkspaceAssociation(n,void 0,!0);const k=this.getWorkspace(n),M=S?this.transientProfilesObject:this.profilesObject;D.URI.isUri(k)?(M.workspaces.delete(k),o&&M.workspaces.set(k,o)):(M.emptyWindows.delete(k),o&&M.emptyWindows.set(k,o)),S||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const n={};for(const[S,k]of this.profilesObject.workspaces.entries())n[S.toString()]=k.id;const o={};for(const[S,k]of this.profilesObject.emptyWindows.entries())o[S.toString()]=k.id;this.saveStoredProfileAssociations({workspaces:n,emptyWindows:o}),this._profilesObject=void 0}migrateStoredProfileAssociations(n){const o={},S=this.createDefaultProfile();if(n.workspaces)for(const[M,C]of Object.entries(n.workspaces)){const A=D.URI.parse(C);o[M]=this.uriIdentityService.extUri.isEqual(A,S.location)?S.id:this.uriIdentityService.extUri.basename(A)}const k={};if(n.emptyWindows)for(const[M,C]of Object.entries(n.emptyWindows)){const A=D.URI.parse(C);k[M]=this.uriIdentityService.extUri.isEqual(A,S.location)?S.id:this.uriIdentityService.extUri.basename(A)}return{workspaces:o,emptyWindows:k}}getStoredProfiles(){return[]}saveStoredProfiles(n){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(n){throw new Error("not implemented")}getDefaultProfileExtensionsLocation(){}};e.UserDataProfilesService=a,e.UserDataProfilesService=a=be([X(0,h.IEnvironmentService),X(1,u.IFileService),X(2,y.IUriIdentityService),X(3,g.ILogService)],a);class s extends a{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(n){this.storedProfiles=n}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(n){this.storedProfileAssociations=n}}e.InMemoryUserDataProfilesService=s}),define(Z[82],te([0,1,8,17,2,3,35,7,119,126,16,6,5,41,40,12,13,25]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsProfileScannerService=e.IExtensionsProfileScannerService=e.ExtensionsProfileScanningError=e.ExtensionsProfileScanningErrorCode=void 0;var c;(function(a){a.ERROR_PROFILE_NOT_FOUND="ERROR_PROFILE_NOT_FOUND",a.ERROR_INVALID_CONTENT="ERROR_INVALID_CONTENT"})(c||(e.ExtensionsProfileScanningErrorCode=c={}));class f extends Error{constructor(s,i){super(s),this.code=i}}e.ExtensionsProfileScanningError=f,e.IExtensionsProfileScannerService=(0,g.createDecorator)("IExtensionsProfileScannerService");let I=class extends r.Disposable{constructor(s,i,n,o,S,k){super(),this.extensionsLocation=s,this.fileService=i,this.userDataProfilesService=n,this.uriIdentityService=o,this.telemetryService=S,this.logService=k,this._onAddExtensions=this._register(new O.Emitter),this.onAddExtensions=this._onAddExtensions.event,this._onDidAddExtensions=this._register(new O.Emitter),this.onDidAddExtensions=this._onDidAddExtensions.event,this._onRemoveExtensions=this._register(new O.Emitter),this.onRemoveExtensions=this._onRemoveExtensions.event,this._onDidRemoveExtensions=this._register(new O.Emitter),this.onDidRemoveExtensions=this._onDidRemoveExtensions.event,this.resourcesAccessQueueMap=new D.ResourceMap}scanProfileExtensions(s,i){return this.withProfileExtensions(s,void 0,i)}async addExtensionsToProfile(s,i){const n=[],o=[];try{return await this.withProfileExtensions(i,S=>{const k=[];for(const M of S)s.some(([C])=>(0,u.areSameExtensions)(C.identifier,M.identifier)&&C.manifest.version!==M.version)?n.push(M):k.push(M);for(const[M,C]of s){const A=k.findIndex(F=>(0,u.areSameExtensions)(F.identifier,M.identifier)&&F.version===M.manifest.version),T={identifier:M.identifier,version:M.manifest.version,location:M.location,metadata:C};A===-1?(o.push(T),k.push(T)):k.splice(A,1,T)}return o.length&&this._onAddExtensions.fire({extensions:o,profileLocation:i}),n.length&&this._onRemoveExtensions.fire({extensions:n,profileLocation:i}),k}),o.length&&this._onDidAddExtensions.fire({extensions:o,profileLocation:i}),n.length&&this._onDidRemoveExtensions.fire({extensions:n,profileLocation:i}),o}catch(S){throw o.length&&this._onDidAddExtensions.fire({extensions:o,error:S,profileLocation:i}),n.length&&this._onDidRemoveExtensions.fire({extensions:n,error:S,profileLocation:i}),S}}async updateMetadata(s,i){const n=[];return await this.withProfileExtensions(i,o=>{const S=[];for(const k of o){const M=s.find(([C])=>(0,u.areSameExtensions)(C.identifier,k.identifier)&&C.manifest.version===k.version);M&&(k.metadata={...k.metadata,...M[1]},n.push(k)),S.push(k)}return S}),n}async removeExtensionFromProfile(s,i){const n=[];try{await this.withProfileExtensions(i,o=>{const S=[];for(const k of o)(0,u.areSameExtensions)(k.identifier,s.identifier)?n.push(k):S.push(k);return n.length&&this._onRemoveExtensions.fire({extensions:n,profileLocation:i}),S}),n.length&&this._onDidRemoveExtensions.fire({extensions:n,profileLocation:i})}catch(o){throw n.length&&this._onDidRemoveExtensions.fire({extensions:n,error:o,profileLocation:i}),o}}async withProfileExtensions(s,i,n){return this.getResourceAccessQueue(s).queue(async()=>{let o=[],S;try{const k=await this.fileService.readFile(s);S=JSON.parse(k.value.toString().trim()||"[]")}catch(k){if((0,m.toFileOperationResult)(k)!==1)throw k;if(this.uriIdentityService.extUri.isEqual(s,this.userDataProfilesService.defaultProfile.extensionsResource)&&(S=await this.migrateFromOldDefaultProfileExtensionsLocation()),!S&&n?.bailOutWhenFileNotFound)throw new f((0,l.getErrorMessage)(k),"ERROR_PROFILE_NOT_FOUND")}if(S){Array.isArray(S)||this.reportAndThrowInvalidConentError(s);let k=!1;for(const M of S){w(M)||this.reportAndThrowInvalidConentError(s);let C;if((0,E.isString)(M.relativeLocation)&&M.relativeLocation)C=this.resolveExtensionLocation(M.relativeLocation);else if((0,E.isString)(M.location))C=this.resolveExtensionLocation(M.location),k=!0,M.relativeLocation=M.location,M.location=C.toJSON();else{C=P.URI.revive(M.location);const A=this.toRelativePath(C);A&&(k=!0,M.relativeLocation=A)}o.push({identifier:M.identifier,location:C,version:M.version,metadata:M.metadata})}k&&await this.fileService.writeFile(s,L.VSBuffer.fromString(JSON.stringify(S)))}if(i){o=i(o);const k=o.map(M=>({identifier:M.identifier,version:M.version,location:M.location.toJSON(),relativeLocation:this.toRelativePath(M.location),metadata:M.metadata}));await this.fileService.writeFile(s,L.VSBuffer.fromString(JSON.stringify(k)))}return o})}reportAndThrowInvalidConentError(s){const i=new f(`Invalid extensions content in ${s.toString()}`,"ERROR_INVALID_CONTENT");throw this.telemetryService.publicLogError2("extensionsProfileScanningError",{code:i.code}),i}toRelativePath(s){return this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(s),this.extensionsLocation)?this.uriIdentityService.extUri.basename(s):void 0}resolveExtensionLocation(s){return this.uriIdentityService.extUri.joinPath(this.extensionsLocation,s)}async migrateFromOldDefaultProfileExtensionsLocation(){return this._migrationPromise||(this._migrationPromise=(async()=>{const s=this.uriIdentityService.extUri.joinPath(this.userDataProfilesService.defaultProfile.location,"extensions.json"),i=this.uriIdentityService.extUri.joinPath(this.extensionsLocation,".init-default-profile-extensions");let n;try{n=(await this.fileService.readFile(s)).value.toString()}catch(S){if((0,m.toFileOperationResult)(S)===1)return;throw S}this.logService.info("Migrating extensions from old default profile location",s.toString());let o;try{const S=JSON.parse(n);Array.isArray(S)&&S.every(k=>w(k))?o=S:this.logService.warn("Skipping migrating from old default profile locaiton: Found invalid data",S)}catch(S){this.logService.error(S)}if(o)try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,L.VSBuffer.fromString(JSON.stringify(o)),{overwrite:!1}),this.logService.info("Migrated extensions from old default profile location to new location",s.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString())}catch(S){if((0,m.toFileOperationResult)(S)===3)this.logService.info("Migration from old default profile location to new location is done by another window",s.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString());else throw S}try{await this.fileService.del(s)}catch(S){(0,m.toFileOperationResult)(S)!==1&&this.logService.error(S)}try{await this.fileService.del(i)}catch(S){(0,m.toFileOperationResult)(S)!==1&&this.logService.error(S)}return o})()),this._migrationPromise}getResourceAccessQueue(s){let i=this.resourcesAccessQueueMap.get(s);return i||(i=new b.Queue,this.resourcesAccessQueueMap.set(s,i)),i}};e.AbstractExtensionsProfileScannerService=I,e.AbstractExtensionsProfileScannerService=I=be([X(1,m.IFileService),X(2,d.IUserDataProfilesService),X(3,y.IUriIdentityService),X(4,p.ITelemetryService),X(5,v.ILogService)],I);function w(a){return(0,E.isObject)(a)&&(0,h.isIExtensionIdentifier)(a.identifier)&&(t(a.location)||(0,E.isString)(a.location)&&a.location)&&((0,E.isUndefined)(a.relativeLocation)||(0,E.isString)(a.relativeLocation))&&a.version&&(0,E.isString)(a.version)}function t(a){return a?(0,E.isString)(a.path)&&(0,E.isString)(a.scheme):!1}}),define(Z[132],te([0,1,24,8,37,17,13,44,154,2,15,10,4,19,206,71,12,7,173,33,126,123,205,16,6,5,22,3,75,82,41,40,204]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M,C,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.ExtensionScannerInput=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var T;(function(de){function j(G,B){if(G===B)return!0;const W=Object.keys(G),U=new Set;for(const $ of Object.keys(B))U.add($);if(W.length!==U.size)return!1;for(const $ of W){if(G[$]!==B[$])return!1;U.delete($)}return U.size===0}de.equals=j})(T||(e.Translations=T={})),e.IExtensionsScannerService=(0,s.createDecorator)("IExtensionsScannerService");let F=class extends u.Disposable{constructor(j,G,B,W,U,$,Y,se,ce,x,R,_){super(),this.systemExtensionsLocation=j,this.userExtensionsLocation=G,this.extensionsControlLocation=B,this.currentProfile=W,this.userDataProfilesService=U,this.extensionsProfileScannerService=$,this.fileService=Y,this.logService=se,this.environmentService=ce,this.productService=x,this.uriIdentityService=R,this.instantiationService=_,this._onDidChangeCache=this._register(new o.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,d.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(ee,this.currentProfile,this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(ee,this.currentProfile,this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(oe,this.obsoleteFile)),this.initializeDefaultProfileExtensionsPromise=void 0,this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,I.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(j,G,B){const[W,U]=await Promise.all([this.scanSystemExtensions(j),this.scanUserExtensions(G)]),$=B?await this.scanExtensionsUnderDevelopment(j,[...W,...U]):[];return this.dedupExtensions(W,U,$,await this.getTargetPlatform(),!0)}async scanSystemExtensions(j){const G=[];G.push(this.scanDefaultSystemExtensions(!!j.useCache,j.language)),G.push(this.scanDevSystemExtensions(j.language,!!j.checkControlFile));const[B,W]=await Promise.all(G);return this.applyScanOptions([...B,...W],0,j,!1)}async scanUserExtensions(j){const G=j.profileLocation??this.userExtensionsLocation;this.logService.trace("Started scanning user extensions",G);const B=this.uriIdentityService.extUri.isEqual(j.profileLocation,this.userDataProfilesService.defaultProfile.extensionsResource)?{bailOutWhenFileNotFound:!0}:void 0,W=await this.createExtensionScannerInput(G,!!j.profileLocation,1,!j.includeUninstalled,j.language,!0,B),U=j.useCache&&!W.devMode&&W.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner;let $;try{$=await U.scanExtensions(W)}catch(Y){if(Y instanceof k.ExtensionsProfileScanningError&&Y.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions(),$=await U.scanExtensions(W);else throw Y}return $=await this.applyScanOptions($,1,j,!0),this.logService.trace("Scanned user extensions:",$.length),$}async scanExtensionsUnderDevelopment(j,G){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const B=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(W=>W.scheme===m.Schemas.file).map(async W=>{const U=await this.createExtensionScannerInput(W,!1,1,!0,j.language,!1,void 0);return(await this.extensionsScanner.scanOneOrMultipleExtensions(U)).map(Y=>(Y.type=G.find(se=>(0,I.areSameExtensions)(se.identifier,Y.identifier))?.type??Y.type,this.extensionsScanner.validate(Y,U)))}))).flat();return this.applyScanOptions(B,"development",j,!0)}return[]}async scanExistingExtension(j,G,B){const W=await this.createExtensionScannerInput(j,!1,G,!0,B.language,!0,void 0),U=await this.extensionsScanner.scanExtension(W);return!U||!B.includeInvalid&&!U.isValid?null:U}async scanOneOrMultipleExtensions(j,G,B){const W=await this.createExtensionScannerInput(j,!1,G,!0,B.language,!0,void 0),U=await this.extensionsScanner.scanOneOrMultipleExtensions(W);return this.applyScanOptions(U,G,B,!0)}async scanMetadata(j){const G=(0,d.joinPath)(j,"package.json"),B=(await this.fileService.readFile(G)).value.toString();return JSON.parse(B).__metadata}async updateMetadata(j,G){const B=(0,d.joinPath)(j,"package.json"),W=(await this.fileService.readFile(B)).value.toString(),U=JSON.parse(W);G.isMachineScoped=G.isMachineScoped||void 0,G.isBuiltin=G.isBuiltin||void 0,U.__metadata={...U.__metadata,...G},await this.fileService.writeFile((0,d.joinPath)(j,"package.json"),O.VSBuffer.fromString(JSON.stringify(U,null,"	")))}async initializeDefaultProfileExtensions(){try{await this.extensionsProfileScannerService.scanProfileExtensions(this.userDataProfilesService.defaultProfile.extensionsResource,{bailOutWhenFileNotFound:!0})}catch(j){if(j instanceof k.ExtensionsProfileScanningError&&j.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions();else throw j}}async doInitializeDefaultProfileExtensions(){return this.initializeDefaultProfileExtensionsPromise||(this.initializeDefaultProfileExtensionsPromise=(async()=>{try{this.logService.info("Started initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString());const j=await this.scanUserExtensions({includeInvalid:!0});if(j.length)await this.extensionsProfileScannerService.addExtensionsToProfile(j.map(G=>[G,G.metadata]),this.userDataProfilesService.defaultProfile.extensionsResource);else try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,O.VSBuffer.fromString(JSON.stringify([])))}catch(G){(0,a.toFileOperationResult)(G)!==1&&this.logService.warn("Failed to create default profile extensions manifest in extensions installation folder.",this.userExtensionsLocation.toString(),(0,D.getErrorMessage)(G))}this.logService.info("Completed initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString())}catch(j){this.logService.error(j)}finally{this.initializeDefaultProfileExtensionsPromise=void 0}})()),this.initializeDefaultProfileExtensionsPromise}async applyScanOptions(j,G,B,W){return B.includeAllVersions||(j=this.dedupExtensions(G===0?j:void 0,G===1?j:void 0,G==="development"?j:void 0,await this.getTargetPlatform(),W)),B.includeInvalid||(j=j.filter(U=>U.isValid)),j.sort((U,$)=>{const Y=g.basename(U.location.fsPath),se=g.basename($.location.fsPath);return Y<se?-1:Y>se?1:0})}dedupExtensions(j,G,B,W,U){const $=(se,ce,x)=>{if(se.isValid&&!ce.isValid)return!1;if(se.isValid===ce.isValid){if(U&&y.gt(se.manifest.version,ce.manifest.version))return this.logService.debug(`Skipping extension ${ce.location.path} with lower version ${ce.manifest.version} in favour of ${se.location.path} with version ${se.manifest.version}`),!1;if(y.eq(se.manifest.version,ce.manifest.version)){if(se.type===0)return this.logService.debug(`Skipping extension ${ce.location.path} in favour of system extension ${se.location.path} with same version`),!1;if(se.targetPlatform===W)return this.logService.debug(`Skipping extension ${ce.location.path} from different target platform ${ce.targetPlatform}`),!1}}return x?this.logService.warn(`Overwriting user extension ${se.location.path} with ${ce.location.path}.`):this.logService.debug(`Overwriting user extension ${se.location.path} with ${ce.location.path}.`),!0},Y=new w.ExtensionIdentifierMap;return j?.forEach(se=>{const ce=Y.get(se.identifier.id);(!ce||$(ce,se,!1))&&Y.set(se.identifier.id,se)}),G?.forEach(se=>{const ce=Y.get(se.identifier.id);if(!ce&&j&&se.type===0){this.logService.debug(`Skipping obsolete system extension ${se.location.path}.`);return}(!ce||$(ce,se,!1))&&Y.set(se.identifier.id,se)}),B?.forEach(se=>{const ce=Y.get(se.identifier.id);(!ce||$(ce,se,!0))&&Y.set(se.identifier.id,se),Y.set(se.identifier.id,se)}),[...Y.values()]}async scanDefaultSystemExtensions(j,G){this.logService.trace("Started scanning system extensions");const B=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,G,!0,void 0),U=await(j&&!B.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(B);return this.logService.trace("Scanned system extensions:",U.length),U}async scanDevSystemExtensions(j,G){const B=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!B?.length)return[];this.logService.trace("Started scanning dev system extensions");const W=G?await this.getBuiltInExtensionControl():{},U=[],$=p.URI.file(g.normalize(g.join(m.FileAccess.asFileUri("").fsPath,"..",".build","builtInExtensions")));for(const se of B){const ce=W[se.name]||"marketplace";switch(ce){case"disabled":break;case"marketplace":U.push((0,d.joinPath)($,se.name));break;default:U.push(p.URI.file(ce));break}}const Y=await Promise.all(U.map(async se=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(se,!1,0,!0,j,!0,void 0))));return this.logService.trace("Scanned dev system extensions:",Y.length),(0,b.coalesce)(Y)}async getBuiltInExtensionControl(){try{const j=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(j.value.toString())}catch{return{}}}async createExtensionScannerInput(j,G,B,W,U,$,Y){const se=await this.getTranslations(U??v.language),ce=await this.getMtime(j),x=G&&!this.uriIdentityService.extUri.isEqual(j,this.userDataProfilesService.defaultProfile.extensionsResource)?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,R=x?await this.getMtime(x):void 0;return new z(j,ce,x,R,G,Y,B,W,$,this.productService.version,this.productService.vscodeVersion,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,U,se)}async getMtime(j){try{const G=await this.fileService.stat(j);if(typeof G.mtime=="number")return G.mtime}catch{}}};e.AbstractExtensionsScannerService=F,e.AbstractExtensionsScannerService=F=be([X(4,M.IUserDataProfilesService),X(5,k.IExtensionsProfileScannerService),X(6,a.IFileService),X(7,i.ILogService),X(8,f.IEnvironmentService),X(9,n.IProductService),X(10,C.IUriIdentityService),X(11,s.IInstantiationService)],F);class z{constructor(j,G,B,W,U,$,Y,se,ce,x,R,_,N,q,re,ne){this.location=j,this.mtime=G,this.applicationExtensionslocation=B,this.applicationExtensionslocationMtime=W,this.profile=U,this.profileScanOptions=$,this.type=Y,this.excludeObsolete=se,this.validate=ce,this.productVersion=x,this.vsCodeProductVersion=R,this.productDate=_,this.productCommit=N,this.devMode=q,this.language=re,this.translations=ne}static createNlsConfiguration(j){return{language:j.language,pseudo:j.language==="pseudo",devMode:j.devMode,translations:j.translations}}static equals(j,G){return(0,d.isEqual)(j.location,G.location)&&j.mtime===G.mtime&&(0,d.isEqual)(j.applicationExtensionslocation,G.applicationExtensionslocation)&&j.applicationExtensionslocationMtime===G.applicationExtensionslocationMtime&&j.profile===G.profile&&r.equals(j.profileScanOptions,G.profileScanOptions)&&j.type===G.type&&j.excludeObsolete===G.excludeObsolete&&j.validate===G.validate&&j.productVersion===G.productVersion&&j.productDate===G.productDate&&j.productCommit===G.productCommit&&j.devMode===G.devMode&&j.language===G.language&&T.equals(j.translations,G.translations)}}e.ExtensionScannerInput=z;let oe=class extends u.Disposable{constructor(j,G,B,W,U){super(),this.obsoleteFile=j,this.extensionsProfileScannerService=G,this.uriIdentityService=B,this.fileService=W,this.logService=U}async scanExtensions(j){const G=j.profile?await this.scanExtensionsFromProfile(j):await this.scanExtensionsFromLocation(j);let B={};if(j.excludeObsolete&&j.type===1)try{const W=(await this.fileService.readFile(this.obsoleteFile)).value.toString();B=JSON.parse(W)}catch{}return(0,l.isEmptyObject)(B)?G:G.filter(W=>!B[I.ExtensionKey.create(W).toString()])}async scanExtensionsFromLocation(j){const G=await this.fileService.resolve(j.location);if(!G.children?.length)return[];const B=await Promise.all(G.children.map(async W=>{if(!W.isDirectory||j.type===1&&(0,d.basename)(W.resource).indexOf(".")===0)return null;const U=new z(W.resource,j.mtime,j.applicationExtensionslocation,j.applicationExtensionslocationMtime,j.profile,j.profileScanOptions,j.type,j.excludeObsolete,j.validate,j.productVersion,j.vsCodeProductVersion,j.productDate,j.productCommit,j.devMode,j.language,j.translations);return this.scanExtension(U)}));return(0,b.coalesce)(B).sort((W,U)=>W.location.path<U.location.path?-1:1)}async scanExtensionsFromProfile(j){let G=await this.scanExtensionsFromProfileResource(j.location,()=>!0,j);if(j.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(j.location,j.applicationExtensionslocation)){G=G.filter(W=>!W.metadata?.isApplicationScoped);const B=await this.scanExtensionsFromProfileResource(j.applicationExtensionslocation,W=>!!W.metadata?.isBuiltin||!!W.metadata?.isApplicationScoped,j);G.push(...B)}return G}async scanExtensionsFromProfileResource(j,G,B){const W=await this.extensionsProfileScannerService.scanProfileExtensions(j,B.profileScanOptions);if(!W.length)return[];const U=await Promise.all(W.map(async $=>{if(G($)){const Y=new z($.location,B.mtime,B.applicationExtensionslocation,B.applicationExtensionslocationMtime,B.profile,B.profileScanOptions,B.type,B.excludeObsolete,B.validate,B.productVersion,B.vsCodeProductVersion,B.productDate,B.productCommit,B.devMode,B.language,B.translations);return this.scanExtension(Y,$.metadata)}return null}));return(0,b.coalesce)(U)}async scanOneOrMultipleExtensions(j){try{if(await this.fileService.exists((0,d.joinPath)(j.location,"package.json"))){const G=await this.scanExtension(j);return G?[G]:[]}else return await this.scanExtensions(j)}catch(G){return this.logService.error(`Error scanning extensions at ${j.location.path}:`,(0,D.getErrorMessage)(G)),[]}}async scanExtension(j,G){try{let B=await this.scanExtensionManifest(j.location);if(B){B.publisher||(B.publisher=w.UNDEFINED_PUBLISHER),G=G??B.__metadata,delete B.__metadata;const W=(0,I.getGalleryExtensionId)(B.publisher,B.name),U=G?.id?{id:W,uuid:G.id}:{id:W},$=G?.isSystem?0:j.type,Y=$===0||!!G?.isBuiltin;B=await this.translateManifest(j.location,B,z.createNlsConfiguration(j));const se={type:$,identifier:U,manifest:B,location:j.location,isBuiltin:Y,targetPlatform:G?.targetPlatform??"undefined",metadata:G,isValid:!0,validations:[]};return j.validate?this.validate(se,j):se}}catch(B){j.type!==0&&this.logService.error(B)}return null}validate(j,G){let B=!0;const W=(0,t.validateExtensionManifest)(G.productVersion,G.vsCodeProductVersion,G.productDate,G.location,j.manifest,j.isBuiltin);for(const[U,$]of W)U===E.default.Error&&(B=!1,this.logService.error(this.formatMessage(G.location,$)));return j.isValid=B,j.validations=W,j}async scanExtensionManifest(j){const G=(0,d.joinPath)(j,"package.json");let B;try{B=(await this.fileService.readFile(G)).value.toString()}catch(U){return(0,a.toFileOperationResult)(U)!==1&&this.logService.error(this.formatMessage(j,(0,c.localize)(0,null,G.path,U.message))),null}let W;try{W=JSON.parse(B)}catch{const $=[];(0,P.parse)(B,$);for(const Y of $)this.logService.error(this.formatMessage(j,(0,c.localize)(1,null,G.path,Y.offset,Y.length,(0,h.getParseErrorMessage)(Y.error))));return null}return(0,P.getNodeType)(W)!=="object"?(this.logService.error(this.formatMessage(j,(0,c.localize)(2,null,G.path))),null):W}async translateManifest(j,G,B){const W=await this.getLocalizedMessages(j,G,B);if(W)try{const U=[],$=await this.resolveOriginalMessageBundle(W.default,U);if(U.length>0)return U.forEach(se=>{this.logService.error(this.formatMessage(j,(0,c.localize)(3,null,W.default?.path,(0,h.getParseErrorMessage)(se.error))))}),G;if((0,P.getNodeType)(W)!=="object")return this.logService.error(this.formatMessage(j,(0,c.localize)(4,null,W.default?.path))),G;const Y=W.values||Object.create(null);return(0,A.localizeManifest)(G,Y,$)}catch{}return G}async getLocalizedMessages(j,G,B){const W=(0,d.joinPath)(j,"package.nls.json"),U=(ce,x)=>{x.forEach(R=>{this.logService.error(this.formatMessage(j,(0,c.localize)(5,null,ce?.path,(0,h.getParseErrorMessage)(R.error))))})},$=ce=>{this.logService.error(this.formatMessage(j,(0,c.localize)(6,null,ce?.path)))},Y=`${G.publisher}.${G.name}`,se=B.translations[Y];if(se)try{const ce=p.URI.file(se),x=(await this.fileService.readFile(ce)).value.toString(),R=[],_=(0,P.parse)(x,R);return R.length>0?(U(ce,R),{values:void 0,default:W}):(0,P.getNodeType)(_)!=="object"?($(ce),{values:void 0,default:W}):{values:_.contents?_.contents.package:void 0,default:W}}catch{return{values:void 0,default:W}}else{if(!await this.fileService.exists(W))return;let x;try{x=await this.findMessageBundles(j,B)}catch{return}if(!x.localized)return{values:void 0,default:x.original};try{const R=(await this.fileService.readFile(x.localized)).value.toString(),_=[],N=(0,P.parse)(R,_);return _.length>0?(U(x.localized,_),{values:void 0,default:x.original}):(0,P.getNodeType)(N)!=="object"?($(x.localized),{values:void 0,default:x.original}):{values:N,default:x.original}}catch{return{values:void 0,default:x.original}}}}async resolveOriginalMessageBundle(j,G){if(j)try{const B=(await this.fileService.readFile(j)).value.toString();return(0,P.parse)(B,G)}catch{}}findMessageBundles(j,G){return new Promise((B,W)=>{const U=$=>{const Y=(0,d.joinPath)(j,`package.nls.${$}.json`);this.fileService.exists(Y).then(se=>{se&&B({localized:Y,original:(0,d.joinPath)(j,"package.nls.json")});const ce=$.lastIndexOf("-");ce===-1?B({localized:(0,d.joinPath)(j,"package.nls.json"),original:null}):($=$.substring(0,ce),U($))})};if(G.devMode||G.pseudo||!G.language)return B({localized:(0,d.joinPath)(j,"package.nls.json"),original:null});U(G.language)})}formatMessage(j,G){return`[${j.path}]: ${G}`}};oe=be([X(1,k.IExtensionsProfileScannerService),X(2,C.IUriIdentityService),X(3,a.IFileService),X(4,i.ILogService)],oe);let ee=class extends oe{constructor(j,G,B,W,U,$,Y){super(G,W,U,$,Y),this.currentProfile=j,this.userDataProfilesService=B,this.cacheValidatorThrottler=this._register(new L.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new o.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(j){const G=this.getCacheFile(j),B=await this.readExtensionCache(G);if(this.input=j,B&&B.input&&z.equals(B.input,this.input))return this.logService.debug("Using cached extensions scan result",j.location.toString()),this.cacheValidatorThrottler.trigger(()=>this.validateCache()),B.result.map(U=>(U.location=p.URI.revive(U.location),U));const W=await super.scanExtensions(j);return await this.writeExtensionCache(G,{input:j,result:W}),W}async readExtensionCache(j){try{const G=await this.fileService.readFile(j),B=JSON.parse(G.value.toString());return{result:B.result,input:(0,S.revive)(B.input)}}catch(G){this.logService.debug("Error while reading the extension cache file:",j.path,(0,D.getErrorMessage)(G))}return null}async writeExtensionCache(j,G){try{await this.fileService.writeFile(j,O.VSBuffer.fromString(JSON.stringify(G)))}catch(B){this.logService.debug("Error while writing the extension cache file:",j.path,(0,D.getErrorMessage)(B))}}async validateCache(){if(!this.input)return;const j=this.getCacheFile(this.input),G=await this.readExtensionCache(j);if(!G)return;const B=G.result,W=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!r.equals(W,B))try{this.logService.info("Invalidating Cache",B,W),await this.fileService.del(j),this._onDidChangeCache.fire()}catch(U){this.logService.error(U)}}getCacheFile(j){const G=this.getProfile(j);return this.uriIdentityService.extUri.joinPath(G.cacheHome,j.type===0?w.BUILTIN_MANIFEST_CACHE_FILE:w.USER_MANIFEST_CACHE_FILE)}getProfile(j){return j.type===0?this.userDataProfilesService.defaultProfile:j.profile?this.uriIdentityService.extUri.isEqual(j.location,this.currentProfile.extensionsResource)?this.currentProfile:this.userDataProfilesService.profiles.find(G=>this.uriIdentityService.extUri.isEqual(j.location,G.extensionsResource))??this.currentProfile:this.userDataProfilesService.defaultProfile}};ee=be([X(2,M.IUserDataProfilesService),X(3,k.IExtensionsProfileScannerService),X(4,C.IUriIdentityService),X(5,a.IFileService),X(6,i.ILogService)],ee);function ue(de,j){const G=(0,I.getExtensionId)(de.manifest.publisher,de.manifest.name);return{id:G,identifier:new w.ExtensionIdentifier(G),isBuiltin:de.type===0,isUserBuiltin:de.type===1&&de.isBuiltin,isUnderDevelopment:j,extensionLocation:de.location,uuid:de.identifier.uuid,targetPlatform:de.targetPlatform,...de.manifest}}e.toExtensionDescription=ue;class ae extends F{constructor(j,G,B,W,U,$,Y,se,ce,x,R,_){super(j,G,(0,d.joinPath)(B,".vscode-oss-dev","extensions","control.json"),W,U,$,Y,se,ce,x,R,_),this.translationsPromise=(async()=>{if(v.translationsConfigFile)try{const N=await this.fileService.readFile(p.URI.file(v.translationsConfigFile));return JSON.parse(N.value.toString())}catch{}return Object.create(null)})()}getTranslations(j){return this.translationsPromise}}e.NativeExtensionsScannerService=ae}),define(Z[281],te([0,1,5,41,40,25,82,16,33,7]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=void 0;let m=class extends D.AbstractExtensionsProfileScannerService{constructor(v,d,y,E,l,p){super(u.URI.file(v.extensionsPath),d,y,E,l,p)}};e.ExtensionsProfileScannerService=m,e.ExtensionsProfileScannerService=m=be([X(0,h.INativeEnvironmentService),X(1,P.IFileService),X(2,L.IUserDataProfilesService),X(3,r.IUriIdentityService),X(4,O.ITelemetryService),X(5,b.ILogService)],m)}),define(Z[282],te([0,1,7,33,82,132,16,6,5,22,40,41]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsScannerService=void 0;let v=class extends O.NativeExtensionsScannerService{constructor(y,E,l,p,c,f,I,w){super(b.URI.file(c.builtinExtensionsPath),b.URI.file(c.extensionsPath),c.userHome,y.defaultProfile,y,E,l,p,c,f,I,w)}};e.ExtensionsScannerService=v,e.ExtensionsScannerService=v=be([X(0,g.IUserDataProfilesService),X(1,r.IExtensionsProfileScannerService),X(2,D.IFileService),X(3,h.ILogService),X(4,L.INativeEnvironmentService),X(5,u.IProductService),X(6,m.IUriIdentityService),X(7,P.IInstantiationService)],v)}),define(Z[283],te([0,1,14,2,15,10,4,58,7,31,38,33,5,41]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolMainService=void 0;let y=class extends L.Disposable{constructor(l,p,c){super(),this.environmentService=l,this.logService=c,this.validRoots=P.TernarySearchTree.forPaths(!D.isLinux),this.validExtensions=new Set([".svg",".png",".jpg",".jpeg",".gif",".bmp",".webp"]),this.addValidFileRoot(l.appRoot),this.addValidFileRoot(l.extensionsPath),this.addValidFileRoot(p.defaultProfile.globalStorageHome.fsPath),this.addValidFileRoot(l.workspaceStorageHome.fsPath),this.handleProtocols()}handleProtocols(){const{defaultSession:l}=b.session;l.protocol.registerFileProtocol(r.Schemas.vscodeFileResource,(p,c)=>this.handleResourceRequest(p,c)),l.protocol.interceptFileProtocol(r.Schemas.file,(p,c)=>this.handleFileRequest(p,c)),this._register((0,L.toDisposable)(()=>{l.protocol.unregisterProtocol(r.Schemas.vscodeFileResource),l.protocol.uninterceptProtocol(r.Schemas.file)}))}addValidFileRoot(l){const p=(0,O.normalize)(l);return this.validRoots.get(p)?L.Disposable.None:(this.validRoots.set(p,!0),(0,L.toDisposable)(()=>this.validRoots.delete(p)))}handleFileRequest(l,p){const c=h.URI.parse(l.url);return this.logService.error(`Refused to load resource ${c.fsPath} from ${r.Schemas.file}: protocol (original URL: ${l.url})`),p({error:-3})}handleResourceRequest(l,p){const c=this.requestToNormalizedFilePath(l);let f;return this.environmentService.crossOriginIsolated&&((0,O.basename)(c)==="workbench.html"||(0,O.basename)(c)==="workbench-dev.html"?f=r.COI.CoopAndCoep:f=r.COI.getHeadersFromQuery(l.url)),this.validRoots.findSubstr(c)?p({path:c,headers:f}):this.validExtensions.has((0,O.extname)(c).toLowerCase())?p({path:c}):(this.logService.error(`${r.Schemas.vscodeFileResource}: Refused to load resource ${c} from ${r.Schemas.vscodeFileResource}: protocol (original URL: ${l.url})`),p({error:-3}))}requestToNormalizedFilePath(l){const p=h.URI.parse(l.url),c=r.FileAccess.uriToFileUri(p);return(0,O.normalize)(c.fsPath)}createIPCObjectUrl(){let l;const p=h.URI.from({scheme:"vscode",path:(0,u.generateUuid)()}),c=p.toString(),f=async()=>l;return m.validatedIpcMain.handle(c,f),this.logService.trace(`IPC Object URL: Registered new channel ${c}.`),{resource:p,update:I=>l=I,dispose:()=>{this.logService.trace(`IPC Object URL: Removed channel ${c}.`),m.validatedIpcMain.removeHandler(c)}}}};e.ProtocolMainService=y,e.ProtocolMainService=y=be([X(0,g.INativeEnvironmentService),X(1,d.IUserDataProfilesService),X(2,v.ILogService)],y)}),define(Z[99],te([0,1,8,3,2,65,12,114,6,41]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,h.createDecorator)("storageService");var m;(function(c){c[c.NONE=0]="NONE",c[c.SHUTDOWN=1]="SHUTDOWN"})(m||(e.WillSaveStateReason=m={}));var g;(function(c){c[c.APPLICATION=-1]="APPLICATION",c[c.PROFILE=0]="PROFILE",c[c.WORKSPACE=1]="WORKSPACE"})(g||(e.StorageScope=g={}));var v;(function(c){c[c.USER=0]="USER",c[c.MACHINE=1]="MACHINE"})(v||(e.StorageTarget=v={}));function d(c){const f=c.get(e.TARGET_KEY);if(f)try{return JSON.parse(f)}catch{}return Object.create(null)}e.loadKeyTargets=d;class y extends r.Disposable{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(f={flushInterval:y.DEFAULT_FLUSH_INTERVAL}){super(),this.options=f,this._onDidChangeValue=this._register(new L.PauseableEmitter),this._onDidChangeTarget=this._register(new L.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new L.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new b.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new r.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(f,I,w){return L.Event.filter(this._onDidChangeValue.event,t=>t.scope===f&&(I===void 0||t.key===I),w)}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,b.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,r.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,O.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,O.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(f,I){const{key:w,external:t}=I;if(w===e.TARGET_KEY){switch(f){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:f})}else this._onDidChangeValue.fire({scope:f,key:w,target:this.getKeyTargets(f)[w],external:t})}emitWillSaveState(f){this._onWillSaveState.fire({reason:f})}get(f,I,w){return this.getStorage(I)?.get(f,w)}getBoolean(f,I,w){return this.getStorage(I)?.getBoolean(f,w)}getNumber(f,I,w){return this.getStorage(I)?.getNumber(f,w)}getObject(f,I,w){return this.getStorage(I)?.getObject(f,w)}storeAll(f,I){this.withPausedEmitters(()=>{for(const w of f)this.store(w.key,w.value,w.scope,w.target,I)})}store(f,I,w,t,a=!1){if((0,D.isUndefinedOrNull)(I)){this.remove(f,w,a);return}this.withPausedEmitters(()=>{this.updateKeyTarget(f,w,t),this.getStorage(w)?.set(f,I,a)})}remove(f,I,w=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(f,I,void 0),this.getStorage(I)?.delete(f,w)})}withPausedEmitters(f){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{f()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(f,I){const w=[],t=this.getKeyTargets(f);for(const a of Object.keys(t))t[a]===I&&w.push(a);return w}updateKeyTarget(f,I,w,t=!1){const a=this.getKeyTargets(I);typeof w=="number"?a[f]!==w&&(a[f]=w,this.getStorage(I)?.set(e.TARGET_KEY,JSON.stringify(a),t)):typeof a[f]=="number"&&(delete a[f],this.getStorage(I)?.set(e.TARGET_KEY,JSON.stringify(a),t))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(f){switch(f){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(f){const I=this.getStorage(f);return I?d(I):Object.create(null)}isNew(f){return this.getBoolean(e.IS_NEW_KEY,f)===!0}async flush(f=m.NONE){this._onWillSaveState.fire({reason:f});const I=this.getStorage(-1),w=this.getStorage(0),t=this.getStorage(1);switch(f){case m.NONE:await b.Promises.settled([I?.whenFlushed()??Promise.resolve(),w?.whenFlushed()??Promise.resolve(),t?.whenFlushed()??Promise.resolve()]);break;case m.SHUTDOWN:await b.Promises.settled([I?.flush(0)??Promise.resolve(),w?.flush(0)??Promise.resolve(),t?.flush(0)??Promise.resolve()]);break}}async log(){const f=this.getStorage(-1)?.items??new Map,I=this.getStorage(0)?.items??new Map,w=this.getStorage(1)?.items??new Map;return p(f,I,w,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(f,I){return this.emitWillSaveState(m.NONE),(0,u.isUserDataProfile)(f)?this.switchToProfile(f,I):this.switchToWorkspace(f,I)}canSwitchProfile(f,I){return!(f.id===I.id||E(I)&&E(f))}switchData(f,I,w){this.withPausedEmitters(()=>{const t=new Set;for(const[a,s]of f)t.add(a),I.get(a)!==s&&this.emitDidChangeValue(w,{key:a,external:!0});for(const[a]of I.items)t.has(a)||this.emitDidChangeValue(w,{key:a,external:!0})})}}e.AbstractStorageService=y;function E(c){return c.isDefault||!!c.useDefaultFlags?.globalState}e.isProfileUsingDefaultStorage=E;class l extends y{constructor(){super(),this.applicationStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(f=>this.emitDidChangeValue(1,f))),this._register(this.profileStorage.onDidChangeStorage(f=>this.emitDidChangeValue(0,f))),this._register(this.applicationStorage.onDidChangeStorage(f=>this.emitDidChangeValue(-1,f)))}getStorage(f){switch(f){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(f){switch(f){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(f){return!1}}e.InMemoryStorageService=l;async function p(c,f,I,w,t,a){const s=T=>{try{return JSON.parse(T)}catch{return T}},i=new Map,n=new Map;c.forEach((T,F)=>{i.set(F,T),n.set(F,s(T))});const o=new Map,S=new Map;f.forEach((T,F)=>{o.set(F,T),S.set(F,s(T))});const k=new Map,M=new Map;I.forEach((T,F)=>{k.set(F,T),M.set(F,s(T))}),console.group(w!==t?`Storage: Application (path: ${w})`:`Storage: Application & Profile (path: ${w}, default profile)`);const C=[];if(i.forEach((T,F)=>{C.push({key:F,value:T})}),console.table(C),console.groupEnd(),console.log(n),w!==t){console.group(`Storage: Profile (path: ${t}, profile specific)`);const T=[];o.forEach((F,z)=>{T.push({key:z,value:F})}),console.table(T),console.groupEnd(),console.log(S)}console.group(`Storage: Workspace (path: ${a})`);const A=[];k.forEach((T,F)=>{A.push({key:F,value:T})}),console.table(A),console.groupEnd(),console.log(M)}e.logStorage=p}),define(Z[284],te([0,1,24,8,3,2,10,70,7,21,114,162,5,99,25,30]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageMain=e.WorkspaceStorageMain=e.ApplicationStorageMain=e.ProfileStorageMain=void 0;class l extends O.Disposable{static{this.LOG_SLOW_CLOSE_THRESHOLD=2e3}get storage(){return this._storage}constructor(a,s){super(),this.logService=a,this.fileService=s,this._onDidChangeStorage=this._register(new r.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this._onDidCloseStorage=this._register(new r.Emitter),this.onDidCloseStorage=this._onDidCloseStorage.event,this._storage=new m.Storage(new m.InMemoryStorageDatabase,{hint:m.StorageHint.STORAGE_IN_MEMORY}),this.initializePromise=void 0,this.whenInitPromise=new L.DeferredPromise,this.whenInit=this.whenInitPromise.p,this.state=m.StorageState.None}isInMemory(){return this._storage.isInMemory()}init(){return this.initializePromise||(this.initializePromise=(async()=>{if(this.state===m.StorageState.None)try{const a=await this.doCreate();this._storage.dispose(),this._storage=a,this._register(a.onDidChangeStorage(i=>this._onDidChangeStorage.fire(i))),await this.doInit(a);const s=a.getBoolean(d.IS_NEW_KEY);s===void 0?a.set(d.IS_NEW_KEY,!0):s&&a.set(d.IS_NEW_KEY,!1)}catch(a){this.logService.error(`[storage main] initialize(): Unable to init storage due to ${a}`)}finally{this.state=m.StorageState.Initialized,this.whenInitPromise.complete()}})()),this.initializePromise}createLoggingOptions(){return{logTrace:this.logService.getLevel()===v.LogLevel.Trace?a=>this.logService.trace(a):void 0,logError:a=>this.logService.error(a)}}doInit(a){return a.init()}get items(){return this._storage.items}get(a,s){return this._storage.get(a,s)}set(a,s){return this._storage.set(a,s)}delete(a){return this._storage.delete(a)}async close(){const a=new P.StopWatch(!1);await this.doClose(),a.stop(),a.elapsed()>l.LOG_SLOW_CLOSE_THRESHOLD&&await this.logSlowClose(a),this._onDidCloseStorage.fire()}async logSlowClose(a){if(this.path)try{const s=(0,b.top)(Array.from(this._storage.items.entries()).map(([n,o])=>({key:n,length:o.length})),(n,o)=>o.length-n.length,5).map(n=>`${n.key}:${n.length}`).join(", "),i=(await this.fileService.stat(h.URI.file(this.path))).size;this.logService.warn(`[storage main] detected slow close() operation: Time: ${a.elapsed()}ms, DB size: ${i}b, Large Keys: ${s}`)}catch(s){this.logService.error("[storage main] figuring out stats for slow DB on close() resulted in an error",s)}}async doClose(){this.initializePromise&&await this.initializePromise,this.state=m.StorageState.Closed,await this._storage.close()}}class p extends l{static{this.STORAGE_NAME="state.vscdb"}get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.profile.globalStorageHome.fsPath,p.STORAGE_NAME)}constructor(a,s,i,n){super(i,n),this.profile=a,this.options=s}async doCreate(){return new m.Storage(new g.SQLiteStorageDatabase(this.path??g.SQLiteStorageDatabase.IN_MEMORY_PATH,{logging:this.createLoggingOptions()}),this.path?void 0:{hint:m.StorageHint.STORAGE_IN_MEMORY})}}class c extends p{constructor(a,s,i,n){super(a,s,i,n)}}e.ProfileStorageMain=c;class f extends p{constructor(a,s,i,n){super(s.defaultProfile,a,i,n)}async doInit(a){await super.doInit(a),this.updateTelemetryState(a)}updateTelemetryState(a){a.get(y.firstSessionDateStorageKey,void 0)===void 0&&a.set(y.firstSessionDateStorageKey,new Date().toUTCString());const i=a.get(y.currentSessionDateStorageKey,void 0),n=new Date().toUTCString();a.set(y.lastSessionDateStorageKey,typeof i>"u"?null:i),a.set(y.currentSessionDateStorageKey,n)}}e.ApplicationStorageMain=f;class I extends l{static{this.WORKSPACE_STORAGE_NAME="state.vscdb"}static{this.WORKSPACE_META_NAME="workspace.json"}get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id,I.WORKSPACE_STORAGE_NAME)}constructor(a,s,i,n,o){super(i,o),this.workspace=a,this.options=s,this.environmentService=n}async doCreate(){const{storageFilePath:a,wasCreated:s}=await this.prepareWorkspaceStorageFolder();return new m.Storage(new g.SQLiteStorageDatabase(a,{logging:this.createLoggingOptions()}),{hint:this.options.useInMemoryStorage?m.StorageHint.STORAGE_IN_MEMORY:s?m.StorageHint.STORAGE_DOES_NOT_EXIST:void 0})}async prepareWorkspaceStorageFolder(){if(this.options.useInMemoryStorage)return{storageFilePath:g.SQLiteStorageDatabase.IN_MEMORY_PATH,wasCreated:!0};const a=(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id),s=(0,D.join)(a,I.WORKSPACE_STORAGE_NAME);return await u.Promises.exists(a)?{storageFilePath:s,wasCreated:!1}:(await u.Promises.mkdir(a,{recursive:!0}),this.ensureWorkspaceStorageFolderMeta(a),{storageFilePath:s,wasCreated:!0})}async ensureWorkspaceStorageFolderMeta(a){let s;if((0,E.isSingleFolderWorkspaceIdentifier)(this.workspace)?s={folder:this.workspace.uri.toString()}:(0,E.isWorkspaceIdentifier)(this.workspace)&&(s={workspace:this.workspace.configPath.toString()}),s)try{const i=(0,D.join)(a,I.WORKSPACE_META_NAME);await u.Promises.exists(i)||await u.Promises.writeFile(i,JSON.stringify(s,void 0,2))}catch(i){this.logService.error(`[storage main] ensureWorkspaceStorageFolderMeta(): Unable to create workspace storage metadata due to ${i}`)}}}e.WorkspaceStorageMain=I;class w extends l{get path(){}async doCreate(){return new m.Storage(new m.InMemoryStorageDatabase,{hint:m.StorageHint.STORAGE_IN_MEMORY})}}e.InMemoryStorageMain=w}),define(Z[285],te([0,1,3,2,99]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfileStorageChangesListenerChannel=void 0;class O extends L.Disposable{constructor(P,h,u){super(),this.storageMainService=P,this.userDataProfilesService=h,this.logService=u;const m=this._register(new L.MutableDisposable);this._onDidChange=this._register(new b.Emitter({onWillAddFirstListener:()=>m.value=this.registerStorageChangeListeners(),onDidRemoveLastListener:()=>m.value=void 0}))}registerStorageChangeListeners(){this.logService.debug("ProfileStorageChangesListenerChannel#registerStorageChangeListeners");const P=new L.DisposableStore;return P.add(b.Event.debounce(this.storageMainService.applicationStorage.onDidChangeStorage,(h,u)=>(h?h.push(u.key):h=[u.key],h),100)(h=>this.onDidChangeApplicationStorage(h))),P.add(b.Event.debounce(this.storageMainService.onDidChangeProfileStorage,(h,u)=>{h||(h=new Map);let m=h.get(u.profile.id);return m||h.set(u.profile.id,m={profile:u.profile,keys:[],storage:u.storage}),m.keys.push(u.key),h},100)(h=>this.onDidChangeProfileStorage(h))),P}onDidChangeApplicationStorage(P){const h=P.includes(r.TARGET_KEY)?[this.userDataProfilesService.defaultProfile]:[],u=[];if(P=P.filter(m=>m!==r.TARGET_KEY),P.length){const m=(0,r.loadKeyTargets)(this.storageMainService.applicationStorage.storage);u.push({profile:this.userDataProfilesService.defaultProfile,changes:P.map(g=>({key:g,scope:0,target:m[g]}))})}this.triggerEvents(h,u)}onDidChangeProfileStorage(P){const h=[],u=new Map;for(const[m,g]of P.entries()){g.keys.includes(r.TARGET_KEY)&&h.push(g.profile);const v=g.keys.filter(d=>d!==r.TARGET_KEY);if(v.length){const d=(0,r.loadKeyTargets)(g.storage.storage);u.set(m,{profile:g.profile,changes:v.map(y=>({key:y,scope:0,target:d[y]}))})}}this.triggerEvents(h,[...u.values()])}triggerEvents(P,h){(P.length||h.length)&&this._onDidChange.fire({valueChanges:h,targetChanges:P})}listen(P,h,u){switch(h){case"onDidChange":return this._onDidChange.event}throw new Error(`Event not found: ${h}`)}async call(P,h){throw new Error(`Call not found: ${h}`)}}e.ProfileStorageChangesListenerChannel=O}),define(Z[286],te([0,1,7,33,16,5,34,40,41,12,124]),function(H,e,b,L,r,O,D,P,h,u,m){"use strict";var g,v;Object.defineProperty(e,"__esModule",{value:!0}),e.ServerUserDataProfilesService=e.UserDataProfilesService=e.UserDataProfilesReadonlyService=void 0;let d=class extends h.UserDataProfilesService{static{g=this}static{this.PROFILE_ASSOCIATIONS_MIGRATION_KEY="profileAssociationsMigration"}constructor(p,c,f,I,w){super(f,I,c,w),this.stateReadonlyService=p,this.nativeEnvironmentService=f}getStoredProfiles(){return this.stateReadonlyService.getItem(g.PROFILES_KEY,[]).map(c=>({...c,location:(0,u.isString)(c.location)?this.uriIdentityService.extUri.joinPath(this.profilesHome,c.location):b.URI.revive(c.location)}))}getStoredProfileAssociations(){const p=this.stateReadonlyService.getItem(g.PROFILE_ASSOCIATIONS_KEY,{});return this.stateReadonlyService.getItem(g.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!1)?p:this.migrateStoredProfileAssociations(p)}getDefaultProfileExtensionsLocation(){return this.uriIdentityService.extUri.joinPath(b.URI.file(this.nativeEnvironmentService.extensionsPath).with({scheme:this.profilesHome.scheme}),"extensions.json")}};e.UserDataProfilesReadonlyService=d,e.UserDataProfilesReadonlyService=d=g=be([X(0,D.IStateReadService),X(1,P.IUriIdentityService),X(2,L.INativeEnvironmentService),X(3,r.IFileService),X(4,O.ILogService)],d);let y=v=class extends d{constructor(p,c,f,I,w){super(p,c,f,I,w),this.stateService=p}saveStoredProfiles(p){p.length?this.stateService.setItem(v.PROFILES_KEY,p.map(c=>({...c,location:this.uriIdentityService.extUri.basename(c.location)}))):this.stateService.removeItem(v.PROFILES_KEY)}getStoredProfiles(){const p=super.getStoredProfiles();return this.stateService.getItem("userDataProfilesMigration",!1)||(this.saveStoredProfiles(p),this.stateService.setItem("userDataProfilesMigration",!0)),p}saveStoredProfileAssociations(p){p.emptyWindows||p.workspaces?this.stateService.setItem(v.PROFILE_ASSOCIATIONS_KEY,p):this.stateService.removeItem(v.PROFILE_ASSOCIATIONS_KEY)}getStoredProfileAssociations(){const p="workspaceAndProfileInfo",c=this.stateService.getItem(p,void 0);if(c){this.stateService.removeItem(p);const I=c.reduce((w,{workspace:t,profile:a})=>(w[b.URI.revive(t).toString()]=b.URI.revive(a).toString(),w),{});this.stateService.setItem(v.PROFILE_ASSOCIATIONS_KEY,{workspaces:I})}const f=super.getStoredProfileAssociations();return this.stateService.getItem(v.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!1)||(this.saveStoredProfileAssociations(f),this.stateService.setItem(v.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!0)),f}};e.UserDataProfilesService=y,e.UserDataProfilesService=y=v=be([X(0,D.IStateService),X(1,P.IUriIdentityService),X(2,L.INativeEnvironmentService),X(3,r.IFileService),X(4,O.ILogService)],y);let E=class extends y{constructor(p,c,f,I){super(new m.StateService(0,c,I,f),p,c,f,I)}async init(){return await this.stateService.init(),super.init()}};e.ServerUserDataProfilesService=E,e.ServerUserDataProfilesService=E=be([X(0,P.IUriIdentityService),X(1,L.INativeEnvironmentService),X(2,r.IFileService),X(3,O.ILogService)],E)}),define(Z[53],te([0,1,33,16,6,5,40,41,286,34]),function(H,e,b,L,r,O,D,P,h,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesMainService=e.IUserDataProfilesMainService=void 0,e.IUserDataProfilesMainService=(0,r.refineServiceDecorator)(P.IUserDataProfilesService);let m=class extends h.UserDataProfilesService{constructor(v,d,y,E,l){super(v,d,y,E,l)}getAssociatedEmptyWindows(){const v=[];for(const d of this.profilesObject.emptyWindows.keys())v.push({id:d});return v}};e.UserDataProfilesMainService=m,e.UserDataProfilesMainService=m=be([X(0,u.IStateService),X(1,D.IUriIdentityService),X(2,b.INativeEnvironmentService),X(3,L.IFileService),X(4,O.ILogService)],m)}),define(Z[133],te([0,1,19,7,30]),function(H,e,b,L,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findWindowOnExtensionDevelopmentPath=e.findWindowOnWorkspaceOrFolder=e.findWindowOnFile=void 0;async function O(h,u,m){for(const v of h){const d=v.openedWorkspace;if((0,r.isWorkspaceIdentifier)(d)){const y=await m(d);if(y){if(y.folders.some(E=>b.extUriBiasedIgnorePathCase.isEqualOrParent(u,E.uri)))return v}else if(b.extUriBiasedIgnorePathCase.isEqualOrParent(u,d.configPath))return v}}const g=h.filter(v=>(0,r.isSingleFolderWorkspaceIdentifier)(v.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqualOrParent(u,v.openedWorkspace.uri));if(g.length)return g.sort((v,d)=>-(v.openedWorkspace.uri.path.length-d.openedWorkspace.uri.path.length))[0]}e.findWindowOnFile=O;function D(h,u){for(const m of h)if((0,r.isWorkspaceIdentifier)(m.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqual(m.openedWorkspace.configPath,u)||(0,r.isSingleFolderWorkspaceIdentifier)(m.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqual(m.openedWorkspace.uri,u))return m}e.findWindowOnWorkspaceOrFolder=D;function P(h,u){const m=g=>u.some(v=>b.extUriBiasedIgnorePathCase.isEqual(L.URI.file(v),L.URI.file(g)));for(const g of h)if(g.config?.extensionDevelopmentPath?.some(v=>m(v)))return g}e.findWindowOnExtensionDevelopmentPath=P}),define(Z[100],te([0,1,32,44,139,46,15,10,4,19,7,6,60,30]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=e.rewriteWorkspaceFileForNewLocation=e.toWorkspaceFolders=e.getStoredWorkspaceFolder=e.isStoredWorkspaceFolder=e.isRecentFile=e.isRecentFolder=e.isRecentWorkspace=e.IWorkspacesService=void 0,e.IWorkspacesService=(0,g.createDecorator)("workspacesService");function y(M){return M.hasOwnProperty("workspace")}e.isRecentWorkspace=y;function E(M){return M.hasOwnProperty("folderUri")}e.isRecentFolder=E;function l(M){return M.hasOwnProperty("fileUri")}e.isRecentFile=l;function p(M){return c(M)||f(M)}e.isStoredWorkspaceFolder=p;function c(M){const C=M;return typeof C?.path=="string"&&(!C.name||typeof C.name=="string")}function f(M){const C=M;return typeof C?.uri=="string"&&(!C.name||typeof C.name=="string")}function I(M,C,A,T,F){if(M.scheme!==T.scheme)return{name:A,uri:M.toString(!0)};let z=C?void 0:F.relativePath(T,M);if(z!==void 0)z.length===0?z=".":h.isWindows&&(z=w(z));else if(M.scheme===D.Schemas.file)z=M.fsPath,h.isWindows&&(z=w(z));else if(F.isEqualAuthority(M.authority,T.authority))z=M.path;else return{name:A,uri:M.toString(!0)};return{name:A,path:z}}e.getStoredWorkspaceFolder=I;function w(M){return M=(0,O.normalizeDriveLetter)(M),(0,b.isUNC)(M)||(M=(0,b.toSlashes)(M)),M}function t(M,C,A){const T=[],F=new Set,z=A.dirname(C);for(const oe of M){let ee;if(c(oe))oe.path&&(ee=A.resolvePath(z,oe.path));else if(f(oe))try{ee=m.URI.parse(oe.uri),ee.path[0]!==P.posix.sep&&(ee=ee.with({path:P.posix.sep+ee.path}))}catch(ue){console.warn(ue)}if(ee){const ue=A.getComparisonKey(ee);if(!F.has(ue)){F.add(ue);const ae=oe.name||A.basenameOrAuthority(ee);T.push(new d.WorkspaceFolder({uri:ee,name:ae,index:T.length},oe))}}}return T}e.toWorkspaceFolders=t;function a(M,C,A,T,F){const z=s(C,M),oe=F.dirname(C),ee=F.dirname(T),ue=[];for(const G of z.folders){const B=c(G)?F.resolvePath(oe,G.path):m.URI.parse(G.uri);let W;A?W=!1:W=!c(G)||(0,P.isAbsolute)(G.path),ue.push(I(B,W,G.name,ee,F))}const ae={insertSpaces:!1,tabSize:4,eol:h.isLinux||h.isMacintosh?`
`:`\r
`},de=r.setProperty(M,["folders"],ue,ae);let j=r.applyEdits(M,de);return(0,u.isEqualAuthority)(z.remoteAuthority,(0,v.getRemoteAuthority)(T))&&(j=r.applyEdits(j,r.removeProperty(j,["remoteAuthority"],ae))),j}e.rewriteWorkspaceFileForNewLocation=a;function s(M,C){const A=L.parse(C);if(A&&Array.isArray(A.folders))A.folders=A.folders.filter(T=>p(T));else throw new Error(`${M} looks like an invalid workspace file.`);return A}function i(M){return M.workspace&&typeof M.workspace=="object"&&typeof M.workspace.id=="string"&&typeof M.workspace.configPath=="string"}function n(M){return typeof M.folderUri=="string"}function o(M){return typeof M.fileUri=="string"}function S(M,C){const A={workspaces:[],files:[]};if(M){const T=function(z,oe){for(let ee=0;ee<z.length;ee++)try{oe(z[ee],ee)}catch(ue){C.warn(`Error restoring recent entry ${JSON.stringify(z[ee])}: ${ue.toString()}. Skip entry.`)}},F=M;Array.isArray(F.entries)&&T(F.entries,z=>{const oe=z.label,ee=z.remoteAuthority;i(z)?A.workspaces.push({label:oe,remoteAuthority:ee,workspace:{id:z.workspace.id,configPath:m.URI.parse(z.workspace.configPath)}}):n(z)?A.workspaces.push({label:oe,remoteAuthority:ee,folderUri:m.URI.parse(z.folderUri)}):o(z)&&A.files.push({label:oe,remoteAuthority:ee,fileUri:m.URI.parse(z.fileUri)})})}return A}e.restoreRecentlyOpened=S;function k(M){const C={entries:[]};for(const A of M.workspaces)E(A)?C.entries.push({folderUri:A.folderUri.toString(),label:A.label,remoteAuthority:A.remoteAuthority}):C.entries.push({workspace:{id:A.workspace.id,configPath:A.workspace.configPath.toString()},label:A.label,remoteAuthority:A.remoteAuthority});for(const A of M.files)C.entries.push({fileUri:A.fileUri.toString(),label:A.label,remoteAuthority:A.remoteAuthority});return C}e.toStoreData=k}),define(Z[101],te([0,1,73,15,4,19]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEmptyWorkspaceIdentifier=e.getSingleFolderWorkspaceIdentifier=e.getWorkspaceIdentifier=e.NON_EMPTY_WORKSPACE_ID_LENGTH=void 0,e.NON_EMPTY_WORKSPACE_ID_LENGTH=128/4;function D(u){function m(){let g=u.scheme===L.Schemas.file?(0,O.originalFSPath)(u):u.toString();return r.isLinux||(g=g.toLowerCase()),(0,b.createHash)("md5").update(g).digest("hex")}return{id:m(),configPath:u}}e.getWorkspaceIdentifier=D;function P(u,m){function g(){if(u.scheme!==L.Schemas.file)return(0,b.createHash)("md5").update(u.toString()).digest("hex");if(!m)return;let d;return r.isLinux?d=m.ino:r.isMacintosh?d=m.birthtime.getTime():r.isWindows&&(typeof m.birthtimeMs=="number"?d=Math.floor(m.birthtimeMs):d=m.birthtime.getTime()),(0,b.createHash)("md5").update(u.fsPath).update(d?String(d):"").digest("hex")}const v=g();if(typeof v=="string")return{id:v,uri:u}}e.getSingleFolderWorkspaceIdentifier=P;function h(){return{id:(Date.now()+Math.round(Math.random()*1e3)).toString()}}e.createEmptyWorkspaceIdentifier=h}),define(Z[102],te([0,1,73,88,27,287,17,13,3,2,10,4,31,42,112]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.serve=e.Server=e.createStaticIPCHandle=e.createRandomIPCHandle=e.XDG_RUNTIME_DIR=e.WebSocketNodeSocket=e.NodeSocket=void 0;class E{traceSocketEvent(C,A){y.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,C,A)}constructor(C,A=""){this._canWrite=!0,this.debugLabel=A,this.socket=C,this.traceSocketEvent("created",{type:"NodeSocket"}),this._errorListener=T=>{if(this.traceSocketEvent("error",{code:T?.code,message:T?.message}),T){if(T.code==="EPIPE")return;(0,P.onUnexpectedError)(T)}},this.socket.on("error",this._errorListener),this._closeListener=T=>{this.traceSocketEvent("close",{hadError:T}),this._canWrite=!1},this.socket.on("close",this._closeListener),this._endListener=()=>{this.traceSocketEvent("nodeEndReceived"),this._canWrite=!1},this.socket.on("end",this._endListener)}dispose(){this.socket.off("error",this._errorListener),this.socket.off("close",this._closeListener),this.socket.off("end",this._endListener),this.socket.destroy()}onData(C){const A=T=>{this.traceSocketEvent("read",T),C(D.VSBuffer.wrap(T))};return this.socket.on("data",A),{dispose:()=>this.socket.off("data",A)}}onClose(C){const A=T=>{C({type:0,hadError:T,error:void 0})};return this.socket.on("close",A),{dispose:()=>this.socket.off("close",A)}}onEnd(C){const A=()=>{C()};return this.socket.on("end",A),{dispose:()=>this.socket.off("end",A)}}write(C){if(!(this.socket.destroyed||!this._canWrite))try{this.traceSocketEvent("write",C),this.socket.write(C.buffer,A=>{if(A){if(A.code==="EPIPE")return;(0,P.onUnexpectedError)(A)}})}catch(A){if(A.code==="EPIPE")return;(0,P.onUnexpectedError)(A)}}end(){this.traceSocketEvent("nodeEndSent"),this.socket.end()}drain(){return this.traceSocketEvent("nodeDrainBegin"),new Promise((C,A)=>{if(this.socket.bufferSize===0){this.traceSocketEvent("nodeDrainEnd"),C();return}const T=()=>{this.socket.off("close",T),this.socket.off("end",T),this.socket.off("error",T),this.socket.off("timeout",T),this.socket.off("drain",T),this.traceSocketEvent("nodeDrainEnd"),C()};this.socket.on("close",T),this.socket.on("end",T),this.socket.on("error",T),this.socket.on("timeout",T),this.socket.on("drain",T)})}}e.NodeSocket=E;var l;(function(M){M[M.MinHeaderByteSize=2]="MinHeaderByteSize",M[M.MaxWebSocketMessageLength=262144]="MaxWebSocketMessageLength"})(l||(l={}));var p;(function(M){M[M.PeekHeader=1]="PeekHeader",M[M.ReadHeader=2]="ReadHeader",M[M.ReadBody=3]="ReadBody",M[M.Fin=4]="Fin"})(p||(p={}));class c extends u.Disposable{get permessageDeflate(){return this._flowManager.permessageDeflate}get recordedInflateBytes(){return this._flowManager.recordedInflateBytes}traceSocketEvent(C,A){this.socket.traceSocketEvent(C,A)}constructor(C,A,T,F){super(),this._onData=this._register(new h.Emitter),this._onClose=this._register(new h.Emitter),this._isEnded=!1,this._state={state:1,readLen:2,fin:0,compressed:!1,firstFrameOfMessage:!0,mask:0},this.socket=C,this.traceSocketEvent("created",{type:"WebSocketNodeSocket",permessageDeflate:A,inflateBytesLength:T?.byteLength||0,recordInflateBytes:F}),this._flowManager=this._register(new f(this,A,T,F,this._onData,(z,oe)=>this._write(z,oe))),this._register(this._flowManager.onError(z=>{console.error(z),(0,P.onUnexpectedError)(z),this._onClose.fire({type:0,hadError:!0,error:z})})),this._incomingData=new y.ChunkStream,this._register(this.socket.onData(z=>this._acceptChunk(z))),this._register(this.socket.onClose(async z=>{this._flowManager.isProcessingReadQueue()&&await h.Event.toPromise(this._flowManager.onDidFinishProcessingReadQueue),this._onClose.fire(z)}))}dispose(){this._flowManager.isProcessingWriteQueue()?this._register(this._flowManager.onDidFinishProcessingWriteQueue(()=>{this.dispose()})):(this.socket.dispose(),super.dispose())}onData(C){return this._onData.event(C)}onClose(C){return this._onClose.event(C)}onEnd(C){return this.socket.onEnd(C)}write(C){let A=0;for(;A<C.byteLength;)this._flowManager.writeMessage(C.slice(A,Math.min(A+262144,C.byteLength))),A+=262144}_write(C,A){if(this._isEnded)return;this.traceSocketEvent("webSocketNodeSocketWrite",C);let T=2;C.byteLength<126?T+=0:C.byteLength<2**16?T+=2:T+=8;const F=D.VSBuffer.alloc(T);if(A?F.writeUInt8(194,0):F.writeUInt8(130,0),C.byteLength<126)F.writeUInt8(C.byteLength,1);else if(C.byteLength<2**16){F.writeUInt8(126,1);let z=1;F.writeUInt8(C.byteLength>>>8&255,++z),F.writeUInt8(C.byteLength>>>0&255,++z)}else{F.writeUInt8(127,1);let z=1;F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(C.byteLength>>>24&255,++z),F.writeUInt8(C.byteLength>>>16&255,++z),F.writeUInt8(C.byteLength>>>8&255,++z),F.writeUInt8(C.byteLength>>>0&255,++z)}this.socket.write(D.VSBuffer.concat([F,C]))}end(){this._isEnded=!0,this.socket.end()}_acceptChunk(C){if(C.byteLength!==0){for(this._incomingData.acceptChunk(C);this._incomingData.byteLength>=this._state.readLen;)if(this._state.state===1){const A=this._incomingData.peek(this._state.readLen),T=A.readUInt8(0),F=(T&128)>>>7,z=(T&64)>>>6,oe=A.readUInt8(1),ee=(oe&128)>>>7,ue=oe&127;this._state.state=2,this._state.readLen=2+(ee?4:0)+(ue===126?2:0)+(ue===127?8:0),this._state.fin=F,this._state.firstFrameOfMessage&&(this._state.compressed=!!z),this._state.firstFrameOfMessage=!!F,this._state.mask=0,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{headerSize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin})}else if(this._state.state===2){const A=this._incomingData.read(this._state.readLen),T=A.readUInt8(1),F=(T&128)>>>7;let z=T&127,oe=1;z===126?z=A.readUInt8(++oe)*2**8+A.readUInt8(++oe):z===127&&(z=A.readUInt8(++oe)*0+A.readUInt8(++oe)*0+A.readUInt8(++oe)*0+A.readUInt8(++oe)*0+A.readUInt8(++oe)*2**24+A.readUInt8(++oe)*2**16+A.readUInt8(++oe)*2**8+A.readUInt8(++oe));let ee=0;F&&(ee=A.readUInt8(++oe)*2**24+A.readUInt8(++oe)*2**16+A.readUInt8(++oe)*2**8+A.readUInt8(++oe)),this._state.state=3,this._state.readLen=z,this._state.mask=ee,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{bodySize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,mask:this._state.mask})}else if(this._state.state===3){const A=this._incomingData.read(this._state.readLen);this.traceSocketEvent("webSocketNodeSocketReadData",A),t(A,this._state.mask),this.traceSocketEvent("webSocketNodeSocketUnmaskedData",A),this._state.state=1,this._state.readLen=2,this._state.mask=0,this._flowManager.acceptFrame(A,this._state.compressed,!!this._state.fin)}}}async drain(){this.traceSocketEvent("webSocketNodeSocketDrainBegin"),this._flowManager.isProcessingWriteQueue()&&await h.Event.toPromise(this._flowManager.onDidFinishProcessingWriteQueue),await this.socket.drain(),this.traceSocketEvent("webSocketNodeSocketDrainEnd")}}e.WebSocketNodeSocket=c;class f extends u.Disposable{get permessageDeflate(){return!!(this._zlibInflateStream&&this._zlibDeflateStream)}get recordedInflateBytes(){return this._zlibInflateStream?this._zlibInflateStream.recordedInflateBytes:D.VSBuffer.alloc(0)}constructor(C,A,T,F,z,oe){super(),this._tracer=C,this._onData=z,this._writeFn=oe,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._writeQueue=[],this._readQueue=[],this._onDidFinishProcessingReadQueue=this._register(new h.Emitter),this.onDidFinishProcessingReadQueue=this._onDidFinishProcessingReadQueue.event,this._onDidFinishProcessingWriteQueue=this._register(new h.Emitter),this.onDidFinishProcessingWriteQueue=this._onDidFinishProcessingWriteQueue.event,this._isProcessingWriteQueue=!1,this._isProcessingReadQueue=!1,A?(this._zlibInflateStream=this._register(new I(this._tracer,F,T,{windowBits:15})),this._zlibDeflateStream=this._register(new w(this._tracer,{windowBits:15})),this._register(this._zlibInflateStream.onError(ee=>this._onError.fire(ee))),this._register(this._zlibDeflateStream.onError(ee=>this._onError.fire(ee)))):(this._zlibInflateStream=null,this._zlibDeflateStream=null)}writeMessage(C){this._writeQueue.push(C),this._processWriteQueue()}async _processWriteQueue(){if(!this._isProcessingWriteQueue){for(this._isProcessingWriteQueue=!0;this._writeQueue.length>0;){const C=this._writeQueue.shift();if(this._zlibDeflateStream){const A=await this._deflateMessage(this._zlibDeflateStream,C);this._writeFn(A,!0)}else this._writeFn(C,!1)}this._isProcessingWriteQueue=!1,this._onDidFinishProcessingWriteQueue.fire()}}isProcessingWriteQueue(){return this._isProcessingWriteQueue}_deflateMessage(C,A){return new Promise((T,F)=>{C.write(A),C.flush(z=>T(z))})}acceptFrame(C,A,T){this._readQueue.push({data:C,isCompressed:A,isLastFrameOfMessage:T}),this._processReadQueue()}async _processReadQueue(){if(!this._isProcessingReadQueue){for(this._isProcessingReadQueue=!0;this._readQueue.length>0;){const C=this._readQueue.shift();if(this._zlibInflateStream&&C.isCompressed){const A=await this._inflateFrame(this._zlibInflateStream,C.data,C.isLastFrameOfMessage);this._onData.fire(A)}else this._onData.fire(C.data)}this._isProcessingReadQueue=!1,this._onDidFinishProcessingReadQueue.fire()}}isProcessingReadQueue(){return this._isProcessingReadQueue}_inflateFrame(C,A,T){return new Promise((F,z)=>{C.write(A),T&&C.write(D.VSBuffer.fromByteArray([0,0,255,255])),C.flush(oe=>F(oe))})}}class I extends u.Disposable{get recordedInflateBytes(){return this._recordInflateBytes?D.VSBuffer.concat(this._recordedInflateBytes):D.VSBuffer.alloc(0)}constructor(C,A,T,F){super(),this._tracer=C,this._recordInflateBytes=A,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._recordedInflateBytes=[],this._pendingInflateData=[],this._zlibInflate=(0,O.createInflateRaw)(F),this._zlibInflate.on("error",z=>{this._tracer.traceSocketEvent("zlibInflateError",{message:z?.message,code:z?.code}),this._onError.fire(z)}),this._zlibInflate.on("data",z=>{this._tracer.traceSocketEvent("zlibInflateData",z),this._pendingInflateData.push(D.VSBuffer.wrap(z))}),T&&(this._tracer.traceSocketEvent("zlibInflateInitialWrite",T.buffer),this._zlibInflate.write(T.buffer),this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateInitialFlushFired"),this._pendingInflateData.length=0}))}write(C){this._recordInflateBytes&&this._recordedInflateBytes.push(C.clone()),this._tracer.traceSocketEvent("zlibInflateWrite",C),this._zlibInflate.write(C.buffer)}flush(C){this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateFlushFired");const A=D.VSBuffer.concat(this._pendingInflateData);this._pendingInflateData.length=0,C(A)})}}class w extends u.Disposable{constructor(C,A){super(),this._tracer=C,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._pendingDeflateData=[],this._zlibDeflate=(0,O.createDeflateRaw)({windowBits:15}),this._zlibDeflate.on("error",T=>{this._tracer.traceSocketEvent("zlibDeflateError",{message:T?.message,code:T?.code}),this._onError.fire(T)}),this._zlibDeflate.on("data",T=>{this._tracer.traceSocketEvent("zlibDeflateData",T),this._pendingDeflateData.push(D.VSBuffer.wrap(T))})}write(C){this._tracer.traceSocketEvent("zlibDeflateWrite",C.buffer),this._zlibDeflate.write(C.buffer)}flush(C){this._zlibDeflate.flush(2,()=>{this._tracer.traceSocketEvent("zlibDeflateFlushFired");let A=D.VSBuffer.concat(this._pendingDeflateData);this._pendingDeflateData.length=0,A=A.slice(0,A.byteLength-4),C(A)})}}function t(M,C){if(C===0)return;const A=M.byteLength>>>2;for(let ue=0;ue<A;ue++){const ae=M.readUInt32BE(ue*4);M.writeUInt32BE(ae^C,ue*4)}const T=A*4,F=M.byteLength-T,z=C>>>24&255,oe=C>>>16&255,ee=C>>>8&255;F>=1&&M.writeUInt8(M.readUInt8(T)^z,T),F>=2&&M.writeUInt8(M.readUInt8(T+1)^oe,T+1),F>=3&&M.writeUInt8(M.readUInt8(T+2)^ee,T+2)}e.XDG_RUNTIME_DIR=process.env.XDG_RUNTIME_DIR;const a={[2]:107,[1]:103};function s(){const M=(0,v.generateUuid)();if(process.platform==="win32")return`\\\\.\\pipe\\vscode-ipc-${M}-sock`;const C=process.platform!=="darwin"&&e.XDG_RUNTIME_DIR?e.XDG_RUNTIME_DIR:(0,r.tmpdir)(),A=(0,m.join)(C,`vscode-ipc-${M}.sock`);return n(A),A}e.createRandomIPCHandle=s;function i(M,C,A){const T=(0,b.createHash)("md5").update(M).digest("hex");if(process.platform==="win32")return`\\\\.\\pipe\\${T}-${A}-${C}-sock`;const F=A.substr(0,4),z=C.substr(0,6),oe=T.substr(0,8);let ee;return process.platform!=="darwin"&&e.XDG_RUNTIME_DIR&&!process.env.VSCODE_PORTABLE?ee=(0,m.join)(e.XDG_RUNTIME_DIR,`vscode-${oe}-${F}-${z}.sock`):ee=(0,m.join)(M,`${F}-${z}.sock`),n(ee),ee}e.createStaticIPCHandle=i;function n(M){const C=a[g.platform];typeof C=="number"&&M.length>=C&&console.warn(`WARNING: IPC handle "${M}" is longer than ${C} chars, try a shorter --user-data-dir`)}class o extends d.IPCServer{static toClientConnectionEvent(C){const A=h.Event.fromNodeEventEmitter(C,"connection");return h.Event.map(A,T=>({protocol:new y.Protocol(new E(T,"ipc-server-connection")),onDidClientDisconnect:h.Event.once(h.Event.fromNodeEventEmitter(T,"close"))}))}constructor(C){super(o.toClientConnectionEvent(C)),this.server=C}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}e.Server=o;function S(M){return new Promise((C,A)=>{const T=(0,L.createServer)();T.on("error",A),T.listen(M,()=>{T.removeListener("error",A),C(new o(T))})})}e.serve=S;function k(M,C){return new Promise((A,T)=>{const F=(0,L.createConnection)(M,()=>{F.removeListener("error",T),A(y.Client.fromSocket(new E(F,`ipc-client${C}`),C))});F.once("error",T)})}e.connect=k}),define(Z[28],te([0,1,55,10,4,102,33,91,6]),function(H,e,b,L,r,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentMainService=e.IEnvironmentMainService=void 0,e.IEnvironmentMainService=(0,h.refineServiceDecorator)(D.IEnvironmentService);class u extends P.NativeEnvironmentService{constructor(){super(...arguments),this._snapEnv={}}get cachedLanguagesPath(){return(0,L.join)(this.userDataPath,"clp")}get backupHome(){return(0,L.join)(this.userDataPath,"Backups")}get mainIPCHandle(){return(0,O.createStaticIPCHandle)(this.userDataPath,"main",this.productService.version)}get mainLockfile(){return(0,L.join)(this.userDataPath,"code.lock")}get disableUpdates(){return!!this.args["disable-updates"]}get crossOriginIsolated(){return!!this.args["enable-coi"]}get codeCachePath(){return process.env.VSCODE_CODE_CACHE_PATH||void 0}get useCodeCache(){return!!this.codeCachePath}get userRoamingDataHome(){return this.appSettingsHome}unsetSnapExportedVariables(){if(r.isLinux){for(const g in process.env)if(g.endsWith("_VSCODE_SNAP_ORIG")){const v=g.slice(0,-17);if(this._snapEnv[v])continue;process.env[v]&&(this._snapEnv[v]=process.env[v]),process.env[g]?process.env[v]=process.env[g]:delete process.env[v]}}}restoreSnapExportedVariables(){if(r.isLinux)for(const g in this._snapEnv)process.env[g]=this._snapEnv[g],delete this._snapEnv[g]}}e.EnvironmentMainService=u,be([b.memoize],u.prototype,"cachedLanguagesPath",null),be([b.memoize],u.prototype,"backupHome",null),be([b.memoize],u.prototype,"mainIPCHandle",null),be([b.memoize],u.prototype,"mainLockfile",null),be([b.memoize],u.prototype,"disableUpdates",null),be([b.memoize],u.prototype,"crossOriginIsolated",null),be([b.memoize],u.prototype,"codeCachePath",null),be([b.memoize],u.prototype,"useCodeCache",null),be([b.memoize],u.prototype,"userRoamingDataHome",null)}),define(Z[288],te([0,1,73,32,15,10,4,19,21,197,18,28,34,16,5,196,30,101]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.BackupMainService=void 0;let f=class{static{c=this}static{this.backupWorkspacesMetadataStorageKey="backupWorkspaces"}constructor(w,t,a,s){this.environmentMainService=w,this.configurationService=t,this.logService=a,this.stateService=s,this.backupHome=this.environmentMainService.backupHome,this.workspaces=[],this.folders=[],this.emptyWindows=[],this.backupUriComparer=P.extUriBiasedIgnorePathCase,this.backupPathComparer={isEqual:(i,n)=>(0,L.isEqual)(i,n,!D.isLinux)}}async initialize(){const w=this.stateService.getItem(c.backupWorkspacesMetadataStorageKey)??{workspaces:[],folders:[],emptyWindows:[]};this.emptyWindows=await this.validateEmptyWorkspaces(w.emptyWindows),this.workspaces=await this.validateWorkspaces((0,u.deserializeWorkspaceInfos)(w)),this.folders=await this.validateFolders((0,u.deserializeFolderInfos)(w)),this.storeWorkspacesMetadata()}getWorkspaceBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.workspaces.slice(0)}getFolderBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.folders.slice(0)}isHotExitEnabled(){return this.getHotExitConfig()!==d.HotExitConfiguration.OFF}isHotExitOnExitAndWindowClose(){return this.getHotExitConfig()===d.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE}getHotExitConfig(){return this.configurationService.getValue()?.files?.hotExit||d.HotExitConfiguration.ON_EXIT}getEmptyWindowBackups(){return this.emptyWindows.slice(0)}registerWorkspaceBackup(w,t){this.workspaces.some(s=>w.workspace.id===s.workspace.id)||(this.workspaces.push(w),this.storeWorkspacesMetadata());const a=(0,O.join)(this.backupHome,w.workspace.id);return t?this.moveBackupFolder(a,t).then(()=>a):a}async moveBackupFolder(w,t){if(await h.Promises.exists(w)&&await this.convertToEmptyWindowBackup(w),await h.Promises.exists(t))try{await h.Promises.rename(t,w,!1)}catch(a){this.logService.error(`Backup: Could not move backup folder to new location: ${a.toString()}`)}}registerFolderBackup(w){return this.folders.some(t=>this.backupUriComparer.isEqual(w.folderUri,t.folderUri))||(this.folders.push(w),this.storeWorkspacesMetadata()),(0,O.join)(this.backupHome,this.getFolderHash(w))}registerEmptyWindowBackup(w){return this.emptyWindows.some(t=>!!t.backupFolder&&this.backupPathComparer.isEqual(t.backupFolder,w.backupFolder))||(this.emptyWindows.push(w),this.storeWorkspacesMetadata()),(0,O.join)(this.backupHome,w.backupFolder)}async validateWorkspaces(w){if(!Array.isArray(w))return[];const t=new Set,a=[];for(const s of w){const i=s.workspace;if(!(0,l.isWorkspaceIdentifier)(i))return[];if(!t.has(i.id)){t.add(i.id);const n=(0,O.join)(this.backupHome,i.id);await this.doHasBackups(n)?i.configPath.scheme!==r.Schemas.file||await h.Promises.exists(i.configPath.fsPath)?a.push(s):await this.convertToEmptyWindowBackup(n):await this.deleteStaleBackup(n)}}return a}async validateFolders(w){if(!Array.isArray(w))return[];const t=[],a=new Set;for(const s of w){const i=s.folderUri,n=this.backupUriComparer.getComparisonKey(i);if(!a.has(n)){a.add(n);const o=(0,O.join)(this.backupHome,this.getFolderHash(s));await this.doHasBackups(o)?i.scheme!==r.Schemas.file||await h.Promises.exists(i.fsPath)?t.push(s):await this.convertToEmptyWindowBackup(o):await this.deleteStaleBackup(o)}}return t}async validateEmptyWorkspaces(w){if(!Array.isArray(w))return[];const t=[],a=new Set;for(const s of w){const i=s.backupFolder;if(typeof i!="string")return[];if(!a.has(i)){a.add(i);const n=(0,O.join)(this.backupHome,i);await this.doHasBackups(n)?t.push(s):await this.deleteStaleBackup(n)}}return t}async deleteStaleBackup(w){try{await h.Promises.rm(w,h.RimRafMode.MOVE)}catch(t){this.logService.error(`Backup: Could not delete stale backup: ${t.toString()}`)}}prepareNewEmptyWindowBackup(){let w=(0,p.createEmptyWorkspaceIdentifier)();for(;this.emptyWindows.some(t=>!!t.backupFolder&&this.backupPathComparer.isEqual(t.backupFolder,w.id));)w=(0,p.createEmptyWorkspaceIdentifier)();return{backupFolder:w.id}}async convertToEmptyWindowBackup(w){const t=this.prepareNewEmptyWindowBackup(),a=(0,O.join)(this.backupHome,t.backupFolder);try{await h.Promises.rename(w,a,!1)}catch(s){return this.logService.error(`Backup: Could not rename backup folder: ${s.toString()}`),!1}return this.emptyWindows.push(t),!0}async getDirtyWorkspaces(){const w=[];for(const t of this.workspaces)await this.hasBackups(t)&&w.push(t);for(const t of this.folders)await this.hasBackups(t)&&w.push(t);return w}hasBackups(w){let t;return(0,u.isEmptyWindowBackupInfo)(w)?t=(0,O.join)(this.backupHome,w.backupFolder):(0,E.isFolderBackupInfo)(w)?t=(0,O.join)(this.backupHome,this.getFolderHash(w)):t=(0,O.join)(this.backupHome,w.workspace.id),this.doHasBackups(t)}async doHasBackups(w){try{const t=await h.Promises.readdir(w);for(const a of t)try{if((await h.Promises.readdir((0,O.join)(w,a))).length>0)return!0}catch{}}catch{}return!1}storeWorkspacesMetadata(){const w={workspaces:this.workspaces.map(({workspace:t,remoteAuthority:a})=>{const s={id:t.id,configURIPath:t.configPath.toString()};return a&&(s.remoteAuthority=a),s}),folders:this.folders.map(({folderUri:t,remoteAuthority:a})=>{const s={folderUri:t.toString()};return a&&(s.remoteAuthority=a),s}),emptyWindows:this.emptyWindows.map(({backupFolder:t,remoteAuthority:a})=>{const s={backupFolder:t};return a&&(s.remoteAuthority=a),s})};this.stateService.setItem(c.backupWorkspacesMetadataStorageKey,w)}getFolderHash(w){const t=w.folderUri;let a;return t.scheme===r.Schemas.file?a=D.isLinux?t.fsPath:t.fsPath.toLowerCase():a=t.toString().toLowerCase(),(0,b.createHash)("md5").update(a).digest("hex")}};e.BackupMainService=f,e.BackupMainService=f=c=be([X(0,g.IEnvironmentMainService),X(1,m.IConfigurationService),X(2,y.ILogService),X(3,v.IStateService)],f)}),define(Z[20],te([0,1,14,38,8,3,2,4,36,12,6,5,34,28]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleMainService=e.LifecycleMainPhase=e.ShutdownReason=e.ILifecycleMainService=void 0,e.ILifecycleMainService=(0,m.createDecorator)("lifecycleMainService");var E;(function(c){c[c.QUIT=1]="QUIT",c[c.KILL=2]="KILL"})(E||(e.ShutdownReason=E={}));var l;(function(c){c[c.Starting=1]="Starting",c[c.Ready=2]="Ready",c[c.AfterWindowOpen=3]="AfterWindowOpen",c[c.Eventually=4]="Eventually"})(l||(e.LifecycleMainPhase=l={}));let p=class extends D.Disposable{static{y=this}static{this.QUIT_AND_RESTART_KEY="lifecycle.quitAndRestart"}get quitRequested(){return this._quitRequested}get wasRestarted(){return this._wasRestarted}get phase(){return this._phase}constructor(f,I,w){super(),this.logService=f,this.stateService=I,this.environmentMainService=w,this._onBeforeShutdown=this._register(new O.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new O.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onWillLoadWindow=this._register(new O.Emitter),this.onWillLoadWindow=this._onWillLoadWindow.event,this._onBeforeCloseWindow=this._register(new O.Emitter),this.onBeforeCloseWindow=this._onBeforeCloseWindow.event,this._quitRequested=!1,this._wasRestarted=!1,this._phase=1,this.windowToCloseRequest=new Set,this.oneTimeListenerTokenGenerator=0,this.windowCounter=0,this.pendingQuitPromise=void 0,this.pendingQuitPromiseResolve=void 0,this.pendingWillShutdownPromise=void 0,this.mapWindowIdToPendingUnload=new Map,this.phaseWhen=new Map,this.relaunchHandler=void 0,this.resolveRestarted(),this.when(2).then(()=>this.registerListeners())}resolveRestarted(){this._wasRestarted=!!this.stateService.getItem(y.QUIT_AND_RESTART_KEY),this._wasRestarted&&this.stateService.removeItem(y.QUIT_AND_RESTART_KEY)}registerListeners(){const f=()=>{this._quitRequested||(this.trace("Lifecycle#app.on(before-quit)"),this._quitRequested=!0,this.trace("Lifecycle#onBeforeShutdown.fire()"),this._onBeforeShutdown.fire(),P.isMacintosh&&this.windowCounter===0&&this.fireOnWillShutdown(1))};b.app.addListener("before-quit",f);const I=()=>{this.trace("Lifecycle#app.on(window-all-closed)"),(this._quitRequested||!P.isMacintosh)&&b.app.quit()};b.app.addListener("window-all-closed",I),b.app.once("will-quit",w=>{this.trace("Lifecycle#app.on(will-quit) - begin"),w.preventDefault(),this.fireOnWillShutdown(1).finally(()=>{this.trace("Lifecycle#app.on(will-quit) - after fireOnWillShutdown"),this.resolvePendingQuitPromise(!1),b.app.removeListener("before-quit",f),b.app.removeListener("window-all-closed",I),this.trace("Lifecycle#app.on(will-quit) - calling app.quit()"),b.app.quit()})})}fireOnWillShutdown(f){if(this.pendingWillShutdownPromise)return this.pendingWillShutdownPromise;const I=this.logService;this.trace("Lifecycle#onWillShutdown.fire()");const w=[];return this._onWillShutdown.fire({reason:f,join(t,a){I.trace(`Lifecycle#onWillShutdown - begin '${t}'`),w.push(a.finally(()=>{I.trace(`Lifecycle#onWillShutdown - end '${t}'`)}))}}),this.pendingWillShutdownPromise=(async()=>{try{await r.Promises.settled(w)}catch(t){this.logService.error(t)}try{await this.stateService.close()}catch(t){this.logService.error(t)}})(),this.pendingWillShutdownPromise}set phase(f){if(f<this.phase)throw new Error("Lifecycle cannot go backwards");if(this._phase===f)return;this.trace(`lifecycle (main): phase changed (value: ${f})`),this._phase=f;const I=this.phaseWhen.get(this._phase);I&&(I.open(),this.phaseWhen.delete(this._phase))}async when(f){if(f<=this._phase)return;let I=this.phaseWhen.get(f);I||(I=new r.Barrier,this.phaseWhen.set(f,I)),await I.wait()}registerWindow(f){const I=new D.DisposableStore;this.windowCounter++,I.add(f.onWillLoad(t=>this._onWillLoadWindow.fire({window:f,workspace:t.workspace,reason:t.reason})));const w=(0,u.assertIsDefined)(f.win);w.on("close",t=>{const a=f.id;if(this.windowToCloseRequest.has(a)){this.windowToCloseRequest.delete(a);return}this.trace(`Lifecycle#window.on('close') - window ID ${f.id}`),t.preventDefault(),this.unload(f,1).then(s=>{if(s){this.windowToCloseRequest.delete(a);return}this.windowToCloseRequest.add(a),this.trace(`Lifecycle#onBeforeCloseWindow.fire() - window ID ${a}`),this._onBeforeCloseWindow.fire(f),f.close()})}),w.on("closed",()=>{this.trace(`Lifecycle#window.on('closed') - window ID ${f.id}`),this.windowCounter--,I.dispose(),this.windowCounter===0&&(!P.isMacintosh||this._quitRequested)&&this.fireOnWillShutdown(1)})}async reload(f,I){await this.unload(f,3)||f.reload(I)}unload(f,I){const w=this.mapWindowIdToPendingUnload.get(f.id);if(w)return w;const t=this.doUnload(f,I).finally(()=>{this.mapWindowIdToPendingUnload.delete(f.id)});return this.mapWindowIdToPendingUnload.set(f.id,t),t}async doUnload(f,I){if(!f.isReady)return!1;this.trace(`Lifecycle#unload() - window ID ${f.id}`);const w=this._quitRequested?2:I,t=await this.onBeforeUnloadWindowInRenderer(f,w);return t?(this.trace(`Lifecycle#unload() - veto in renderer (window ID ${f.id})`),this.handleWindowUnloadVeto(t)):(await this.onWillUnloadWindowInRenderer(f,w),!1)}handleWindowUnloadVeto(f){return f?(this.resolvePendingQuitPromise(!0),this._quitRequested=!1,!0):!1}resolvePendingQuitPromise(f){this.pendingQuitPromiseResolve&&(this.pendingQuitPromiseResolve(f),this.pendingQuitPromiseResolve=void 0,this.pendingQuitPromise=void 0)}onBeforeUnloadWindowInRenderer(f,I){return new Promise(w=>{const t=this.oneTimeListenerTokenGenerator++,a=`vscode:ok${t}`,s=`vscode:cancel${t}`;L.validatedIpcMain.once(a,()=>{w(!1)}),L.validatedIpcMain.once(s,()=>{w(!0)}),f.send("vscode:onBeforeUnload",{okChannel:a,cancelChannel:s,reason:I})})}onWillUnloadWindowInRenderer(f,I){return new Promise(w=>{const a=`vscode:reply${this.oneTimeListenerTokenGenerator++}`;L.validatedIpcMain.once(a,()=>w()),f.send("vscode:onWillUnload",{replyChannel:a,reason:I})})}quit(f){return this.doQuit(f).then(I=>{if(!I&&f)try{if(P.isWindows){const w=(0,h.cwd)();w!==process.cwd()&&process.chdir(w)}}catch(w){this.logService.error(w)}return I})}doQuit(f){return this.trace(`Lifecycle#quit() - begin (willRestart: ${f})`),this.pendingQuitPromise?(this.trace("Lifecycle#quit() - returning pending quit promise"),this.pendingQuitPromise):(f&&this.stateService.setItem(y.QUIT_AND_RESTART_KEY,!0),this.pendingQuitPromise=new Promise(I=>{this.pendingQuitPromiseResolve=I,this.trace("Lifecycle#quit() - calling app.quit()"),b.app.quit()}),this.pendingQuitPromise)}trace(f){this.environmentMainService.args["enable-smoke-test-driver"]?this.logService.info(f):this.logService.trace(f)}setRelaunchHandler(f){this.relaunchHandler=f}async relaunch(f){this.trace("Lifecycle#relaunch()");const I=process.argv.slice(1);if(f?.addArgs&&I.push(...f.addArgs),f?.removeArgs)for(const a of f.removeArgs){const s=I.indexOf(a);s>=0&&I.splice(s,1)}const w=()=>{this.relaunchHandler?.handleRelaunch(f)||(this.trace("Lifecycle#relaunch() - calling app.relaunch()"),b.app.relaunch({args:I}))};b.app.once("quit",w),await this.quit(!0)&&b.app.removeListener("quit",w)}async kill(f){this.trace("Lifecycle#kill()"),await this.fireOnWillShutdown(2),await Promise.race([(0,r.timeout)(1e3),(async()=>{for(const I of b.BrowserWindow.getAllWindows())if(I&&!I.isDestroyed()){let w;I.webContents&&!I.webContents.isDestroyed()?w=new Promise(t=>I.once("closed",t)):w=Promise.resolve(),I.destroy(),await w}})()]),b.app.exit(f)}};e.LifecycleMainService=p,e.LifecycleMainService=p=y=be([X(0,g.ILogService),X(1,v.IStateService),X(2,d.IEnvironmentMainService)],p)}),define(Z[289],te([0,1,4,3,2,6,20]),function(H,e,b,L,r,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutMainService=e.IKeyboardLayoutMainService=void 0,e.IKeyboardLayoutMainService=(0,O.createDecorator)("keyboardLayoutMainService");let P=class extends r.Disposable{constructor(m){super(),this._onDidChangeKeyboardLayout=this._register(new L.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._initPromise=null,this._keyboardLayoutData=null,m.when(3).then(()=>this._initialize())}_initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){const m=await new Promise((g,v)=>{H(["native-keymap"],g,v)});this._keyboardLayoutData=h(m),b.isCI||m.onDidChangeKeyboardLayout(()=>{this._keyboardLayoutData=h(m),this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData)})}async getKeyboardLayoutData(){return await this._initialize(),this._keyboardLayoutData}};e.KeyboardLayoutMainService=P,e.KeyboardLayoutMainService=P=be([X(0,D.ILifecycleMainService)],P);function h(u){const m=u.getKeyMap(),g=u.getCurrentKeyboardLayout();return{keyboardMapping:m,keyboardLayoutInfo:g}}}),define(Z[290],te([0,1,248,8,17,13,12,18,33,96,5,51,247,287]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nodeRequest=e.RequestService=void 0;let y=class extends g.AbstractRequestService{constructor(c,f,I,w){super(w),this.configurationService=c,this.environmentService=f,this.logService=I,this.configure(),this._register(c.onDidChangeConfiguration(t=>{t.affectsConfiguration("http")&&this.configure()}))}configure(){const c=this.configurationService.getValue("http");this.proxyUrl=c?.proxy,this.strictSSL=!!c?.proxyStrictSSL,this.authorization=c?.proxyAuthorization}async request(c,f){const{proxyUrl:I,strictSSL:w}=this;let t;try{t=await(0,u.getResolvedShellEnv)(this.configurationService,this.logService,this.environmentService.args,process.env)}catch(i){this.shellEnvErrorLogged||(this.shellEnvErrorLogged=!0,this.logService.error("resolving shell environment failed",(0,O.getErrorMessage)(i)))}const a={...process.env,...t},s=c.agent?c.agent:await(0,v.getProxyAgent)(c.url||"",a,{proxyUrl:I,strictSSL:w});return c.agent=s,c.strictSSL=w,this.authorization&&(c.headers={...c.headers||{},"Proxy-Authorization":this.authorization}),this.logAndRequest(c.isChromiumNetwork?"electron":"node",c,()=>l(c,f))}async resolveProxy(c){}};e.RequestService=y,e.RequestService=y=be([X(0,P.IConfigurationService),X(1,h.INativeEnvironmentService),X(2,m.ILogService),X(3,m.ILoggerService)],y);async function E(p){return((0,b.parse)(p.url).protocol==="https:"?await new Promise((I,w)=>{H(["https"],I,w)}):await new Promise((I,w)=>{H(["http"],I,w)})).request}async function l(p,c){return L.Promises.withAsyncBody(async(f,I)=>{const w=(0,b.parse)(p.url),t=p.getRawRequest?p.getRawRequest(p):await E(p),a={hostname:w.hostname,port:w.port?parseInt(w.port):w.protocol==="https:"?443:80,protocol:w.protocol,path:w.path,method:p.type||"GET",headers:p.headers,agent:p.agent,rejectUnauthorized:(0,D.isBoolean)(p.strictSSL)?p.strictSSL:!0};p.user&&p.password&&(a.auth=p.user+":"+p.password);const s=t(a,i=>{const n=(0,D.isNumber)(p.followRedirects)?p.followRedirects:3;if(i.statusCode&&i.statusCode>=300&&i.statusCode<400&&n>0&&i.headers.location)l({...p,url:i.headers.location,followRedirects:n-1},c).then(f,I);else{let o=i;!p.isChromiumNetwork&&i.headers["content-encoding"]==="gzip"&&(o=i.pipe((0,d.createGunzip)())),f({res:i,stream:(0,r.streamToBufferReadableStream)(o)})}});s.on("error",I),p.timeout&&s.setTimeout(p.timeout),p.isChromiumNetwork&&s.removeHeader("Content-Length"),p.data&&typeof p.data=="string"&&s.write(p.data),s.end(),c.onCancellationRequested(()=>{s.abort(),I(new O.CancellationError)})})}e.nodeRequest=l}),define(Z[291],te([0,1,14,290]),function(H,e,b,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestMainService=void 0;function r(D){return b.net.request}class O extends L.RequestService{request(P,h){return super.request({...P||{},getRawRequest:r,isChromiumNetwork:!0},h)}}e.RequestMainService=O}),define(Z[83],te([0,1,7,49,3,2,33,16,6,20,5,99,284,41,53,40]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationStorageMainService=e.IApplicationStorageMainService=e.StorageMainService=e.IStorageMainService=void 0,e.IStorageMainService=(0,h.createDecorator)("storageMainService");let l=class extends O.Disposable{constructor(f,I,w,t,a,s){super(),this.logService=f,this.environmentService=I,this.userDataProfilesService=w,this.lifecycleMainService=t,this.fileService=a,this.uriIdentityService=s,this.shutdownReason=void 0,this._onDidChangeProfileStorage=this._register(new r.Emitter),this.onDidChangeProfileStorage=this._onDidChangeProfileStorage.event,this.applicationStorage=this.createApplicationStorage(),this.mapProfileToStorage=new Map,this.mapWorkspaceToStorage=new Map,this.registerListeners()}getStorageOptions(){return{useInMemoryStorage:!!this.environmentService.extensionTestsLocationURI}}registerListeners(){(async()=>(await this.lifecycleMainService.when(3),this.applicationStorage.init()))(),this._register(this.lifecycleMainService.onWillLoadWindow(f=>{f.window.profile&&this.profileStorage(f.window.profile).init(),f.workspace&&this.workspaceStorage(f.workspace).init()})),this._register(this.lifecycleMainService.onWillShutdown(f=>{this.logService.trace("storageMainService#onWillShutdown()"),this.shutdownReason=f.reason,f.join("applicationStorage",this.applicationStorage.close());for(const[,I]of this.mapProfileToStorage)f.join("profileStorage",I.close());for(const[,I]of this.mapWorkspaceToStorage)f.join("workspaceStorage",I.close())})),this._register(this.userDataProfilesService.onWillCreateProfile(f=>{f.join((async()=>{await this.fileService.exists(f.profile.globalStorageHome)||await this.fileService.createFolder(f.profile.globalStorageHome)})())})),this._register(this.userDataProfilesService.onWillRemoveProfile(f=>{const I=this.mapProfileToStorage.get(f.profile.id);I&&f.join(I.close())}))}createApplicationStorage(){this.logService.trace("StorageMainService: creating application storage");const f=new v.ApplicationStorageMain(this.getStorageOptions(),this.userDataProfilesService,this.logService,this.fileService);return(0,L.once)(f.onDidCloseStorage)(()=>{this.logService.trace("StorageMainService: closed application storage")}),f}profileStorage(f){if((0,g.isProfileUsingDefaultStorage)(f))return this.applicationStorage;let I=this.mapProfileToStorage.get(f.id);if(!I){this.logService.trace(`StorageMainService: creating profile storage (${f.name})`),I=this.createProfileStorage(f),this.mapProfileToStorage.set(f.id,I);const w=this._register(I.onDidChangeStorage(t=>this._onDidChangeProfileStorage.fire({...t,storage:I,profile:f})));(0,L.once)(I.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed profile storage (${f.name})`),this.mapProfileToStorage.delete(f.id),w.dispose()})}return I}createProfileStorage(f){return this.shutdownReason===2?new v.InMemoryStorageMain(this.logService,this.fileService):new v.ProfileStorageMain(f,this.getStorageOptions(),this.logService,this.fileService)}workspaceStorage(f){let I=this.mapWorkspaceToStorage.get(f.id);return I||(this.logService.trace(`StorageMainService: creating workspace storage (${f.id})`),I=this.createWorkspaceStorage(f),this.mapWorkspaceToStorage.set(f.id,I),(0,L.once)(I.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed workspace storage (${f.id})`),this.mapWorkspaceToStorage.delete(f.id)})),I}createWorkspaceStorage(f){return this.shutdownReason===2?new v.InMemoryStorageMain(this.logService,this.fileService):new v.WorkspaceStorageMain(f,this.getStorageOptions(),this.logService,this.environmentService,this.fileService)}isUsed(f){const I=b.URI.file(f);for(const w of[this.applicationStorage,...this.mapProfileToStorage.values(),...this.mapWorkspaceToStorage.values()])if(w.path&&this.uriIdentityService.extUri.isEqualOrParent(b.URI.file(w.path),I))return!0;return!1}};e.StorageMainService=l,e.StorageMainService=l=be([X(0,m.ILogService),X(1,D.IEnvironmentService),X(2,y.IUserDataProfilesMainService),X(3,u.ILifecycleMainService),X(4,P.IFileService),X(5,E.IUriIdentityService)],l),e.IApplicationStorageMainService=(0,h.createDecorator)("applicationStorageMainService");let p=class extends g.AbstractStorageService{constructor(f,I){super(),this.userDataProfilesService=f,this.storageMainService=I,this.whenReady=this.storageMainService.applicationStorage.whenInit}doInitialize(){return this.storageMainService.applicationStorage.whenInit}getStorage(f){if(f===-1)return this.storageMainService.applicationStorage.storage}getLogDetails(f){if(f===-1)return this.userDataProfilesService.defaultProfile.globalStorageHome.fsPath}shouldFlushWhenIdle(){return!1}switch(){throw new Error("Migrating storage is unsupported from main process")}switchToProfile(){throw new Error("Switching storage profile is unsupported from main process")}switchToWorkspace(){throw new Error("Switching storage workspace is unsupported from main process")}hasScope(){throw new Error("Main process is never profile or workspace scoped")}};e.ApplicationStorageMainService=p,e.ApplicationStorageMainService=p=be([X(0,d.IUserDataProfilesService),X(1,e.IStorageMainService)],p)}),define(Z[292],te([0,1,14,23,3,57,2,31,77,118,5,22,83,29]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyAuthHandler=void 0;var y;(function(l){l[l.Initial=1]="Initial",l[l.StoredCredentialsUsed=2]="StoredCredentialsUsed",l[l.LoginDialogShown=3]="LoginDialogShown"})(y||(y={}));let E=class extends D.Disposable{constructor(p,c,f,I,w,t){super(),this.logService=p,this.windowsMainService=c,this.credentialsService=f,this.encryptionMainService=I,this.applicationStorageMainService=w,this.productService=t,this.OLD_PROXY_CREDENTIALS_SERVICE_KEY=`${this.productService.urlProtocol}.proxy-credentials`,this.PROXY_CREDENTIALS_SERVICE_KEY="proxy-credentials://",this.pendingProxyResolve=void 0,this.state=y.Initial,this.sessionCredentials=void 0,this.registerListeners()}registerListeners(){const p=r.Event.fromNodeEventEmitter(b.app,"login",(c,f,I,w,t)=>({event:c,webContents:f,req:I,authInfo:w,callback:t}));this._register(p(this.onLogin,this))}async onLogin({event:p,authInfo:c,req:f,callback:I}){if(!c.isProxy)return;if(!this.pendingProxyResolve&&this.state===y.LoginDialogShown&&f.firstAuthAttempt){this.logService.trace("auth#onLogin (proxy) - exit - proxy dialog already shown");return}p.preventDefault();let w;if(this.pendingProxyResolve)this.logService.trace("auth#onLogin (proxy) - pending proxy handling found"),w=await this.pendingProxyResolve;else{this.logService.trace("auth#onLogin (proxy) - no pending proxy handling found, starting new"),this.pendingProxyResolve=this.resolveProxyCredentials(c);try{w=await this.pendingProxyResolve}finally{this.pendingProxyResolve=void 0}}I(w?.username,w?.password)}async resolveProxyCredentials(p){this.logService.trace("auth#resolveProxyCredentials (proxy) - enter");try{const c=await this.doResolveProxyCredentials(p);if(c)return this.logService.trace("auth#resolveProxyCredentials (proxy) - got credentials"),c;this.logService.trace("auth#resolveProxyCredentials (proxy) - did not get credentials")}finally{this.logService.trace("auth#resolveProxyCredentials (proxy) - exit")}}async getAndMigrateProxyCredentials(p){try{let c=this.applicationStorageMainService.get(this.PROXY_CREDENTIALS_SERVICE_KEY+p,-1),f;if(c||(c=await this.credentialsService.getPassword(this.OLD_PROXY_CREDENTIALS_SERVICE_KEY,p)??void 0,c&&(f=await this.encryptionMainService.decrypt(c),c=await this.encryptionMainService.encrypt(f),this.applicationStorageMainService.store(this.PROXY_CREDENTIALS_SERVICE_KEY+p,c,-1,1),await this.credentialsService.deletePassword(this.OLD_PROXY_CREDENTIALS_SERVICE_KEY,p))),c){const I=JSON.parse(f??await this.encryptionMainService.decrypt(c));return{storedUsername:I.username,storedPassword:I.password}}}catch(c){this.logService.error(c)}return{storedUsername:void 0,storedPassword:void 0}}async doResolveProxyCredentials(p){this.logService.trace("auth#doResolveProxyCredentials - enter",p);const c=String((0,O.hash)({scheme:p.scheme,host:p.host,port:p.port})),{storedUsername:f,storedPassword:I}=await this.getAndMigrateProxyCredentials(c);if(this.state!==y.StoredCredentialsUsed&&typeof f=="string"&&typeof I=="string")return this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found stored credentials to use"),this.state=y.StoredCredentialsUsed,{username:f,password:I};const w=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(!w){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - no opened window found to show dialog in");return}this.logService.trace(`auth#doResolveProxyCredentials (proxy) - asking window ${w.id} to handle proxy login`);const t={authInfo:p,username:this.sessionCredentials?.username??f,password:this.sessionCredentials?.password??I,replyChannel:`vscode:proxyAuthResponse:${(0,P.generateUuid)()}`};w.sendWhenReady("vscode:openProxyAuthenticationDialog",L.CancellationToken.None,t),this.state=y.LoginDialogShown;const a=await new Promise(s=>{const i=async(n,o,S)=>{if(o===t.replyChannel)if(this.logService.trace(`auth#doResolveProxyCredentials - exit - received credentials from window ${w.id}`),w.win?.webContents.off("ipc-message",i),S){const k={username:S.username,password:S.password};try{if(S.remember){const M=await this.encryptionMainService.encrypt(JSON.stringify(k));this.applicationStorageMainService.store(this.PROXY_CREDENTIALS_SERVICE_KEY+c,M,-1,1)}else this.applicationStorageMainService.remove(this.PROXY_CREDENTIALS_SERVICE_KEY+c,-1)}catch(M){this.logService.error(M)}s({username:k.username,password:k.password})}else s(void 0)};w.win?.webContents.on("ipc-message",i)});return this.sessionCredentials=a,a}};e.ProxyAuthHandler=E,e.ProxyAuthHandler=E=be([X(0,m.ILogService),X(1,d.IWindowsMainService),X(2,h.ICredentialsMainService),X(3,u.IEncryptionMainService),X(4,v.IApplicationStorageMainService),X(5,g.IProductService)],E)}),define(Z[293],te([0,1,88,27,106,102,8,2,4,18,5,22,243,244,97,129,17]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedTunnelsService=e.TunnelService=e.BaseTunnelService=e.NodeRemoteTunnel=void 0;async function p(t,a,s,i,n){let o;for(let S=3;S&&(o?.dispose(),o=await new c(t,a,s,i,n).waitForReady(),!(n&&r.BROWSER_RESTRICTED_PORTS[n]||!r.BROWSER_RESTRICTED_PORTS[o.tunnelLocalPort]));S--);return o}class c extends P.Disposable{constructor(a,s,i,n,o){super(),this.defaultTunnelHost=s,this.suggestedLocalPort=o,this.privacy=E.TunnelPrivacyId.Private,this._socketsDispose=new Map,this._options=a,this._server=b.createServer(),this._barrier=new D.Barrier,this._listeningListener=()=>this._barrier.open(),this._server.on("listening",this._listeningListener),this._connectionListener=S=>this._onConnection(S),this._server.on("connection",this._connectionListener),this._errorListener=()=>{},this._server.on("error",this._errorListener),this.tunnelRemotePort=n,this.tunnelRemoteHost=i}async dispose(){super.dispose(),this._server.removeListener("listening",this._listeningListener),this._server.removeListener("connection",this._connectionListener),this._server.removeListener("error",this._errorListener),this._server.close(),Array.from(this._socketsDispose.values()).forEach(s=>{s()})}async waitForReady(){const a=this.suggestedLocalPort??this.tunnelRemotePort,s=(0,E.isAllInterfaces)(this.defaultTunnelHost)?"0.0.0.0":"127.0.0.1";let i=await(0,r.findFreePortFaster)(a,2,1e3,s),n=null;return this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),n=this._server.address(),n||(i=0,this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),n=this._server.address()),this.tunnelLocalPort=n.port,this.localAddress=`${this.tunnelRemoteHost==="127.0.0.1"?"127.0.0.1":"localhost"}:${n.port}`,this}async _onConnection(a){a.pause();const s=(0,E.isLocalhost)(this.tunnelRemoteHost)||(0,E.isAllInterfaces)(this.tunnelRemoteHost)?"localhost":this.tunnelRemoteHost,i=await(0,v.connectRemoteAgentTunnel)(this._options,s,this.tunnelRemotePort),n=i.getSocket(),o=i.readEntireBuffer();i.dispose(),o.byteLength>0&&a.write(o.buffer),a.on("end",()=>{a.localAddress&&this._socketsDispose.delete(a.localAddress),n.end()}),a.on("close",()=>n.end()),a.on("error",()=>{a.localAddress&&this._socketsDispose.delete(a.localAddress),n instanceof O.NodeSocket?n.socket.destroy():n.end()}),n instanceof O.NodeSocket?this._mirrorNodeSocket(a,n):this._mirrorGenericSocket(a,n),a.localAddress&&this._socketsDispose.set(a.localAddress,()=>{a.end(),n.end()})}_mirrorGenericSocket(a,s){s.onClose(()=>a.destroy()),s.onEnd(()=>a.end()),s.onData(i=>a.write(i.buffer)),a.on("data",i=>s.write(l.VSBuffer.wrap(i))),a.resume()}_mirrorNodeSocket(a,s){const i=s.socket;i.on("end",()=>a.end()),i.on("close",()=>a.end()),i.on("error",()=>{a.destroy()}),i.pipe(a),a.pipe(i)}}e.NodeRemoteTunnel=c;let f=class extends E.AbstractTunnelService{constructor(a,s,i,n,o){super(s,o),this.remoteSocketFactoryService=a,this.signService=i,this.productService=n}isPortPrivileged(a){return(0,E.isPortPrivileged)(a,this.defaultTunnelHost,h.OS,L.release())}retainOrCreateTunnel(a,s,i,n,o,S,k,M){const C=this.getTunnelFromMap(s,i);if(C)return++C.refcount,C.value;if((0,E.isTunnelProvider)(a))return this.createWithProvider(a,s,i,o,S,k,M);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${s}:${i} on local port ${o}.`);const A={commit:this.productService.commit,quality:this.productService.quality,addressProvider:a,remoteSocketFactoryService:this.remoteSocketFactoryService,signService:this.signService,logService:this.logService,ipcLogger:null},T=p(A,n,s,i,o);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(s,i,T),T}}};e.BaseTunnelService=f,e.BaseTunnelService=f=be([X(0,d.IRemoteSocketFactoryService),X(1,m.ILogService),X(2,y.ISignService),X(3,g.IProductService),X(4,u.IConfigurationService)],f);let I=class extends f{constructor(a,s,i,n,o){super(a,s,i,n,o)}};e.TunnelService=I,e.TunnelService=I=be([X(0,d.IRemoteSocketFactoryService),X(1,m.ILogService),X(2,y.ISignService),X(3,g.IProductService),X(4,u.IConfigurationService)],I);let w=class extends P.Disposable{constructor(a,s,i,n,o){super(),this.remoteSocketFactoryService=a,this.logService=s,this.productService=i,this.signService=n,this.configurationService=o,this._tunnelServices=new Map}async openTunnel(a,s,i,n,o,S,k,M,C){if(this.logService.trace(`ForwardedPorts: (SharedTunnelService) openTunnel request for ${i}:${n} on local port ${S}.`),!this._tunnelServices.has(a)){const A=new I(this.remoteSocketFactoryService,this.logService,this.signService,this.productService,this.configurationService);this._register(A),this._tunnelServices.set(a,A),A.onTunnelClosed(async()=>{(await A.tunnels).length===0&&(A.dispose(),this._tunnelServices.delete(a))})}return this._tunnelServices.get(a).openTunnel(s,i,n,o,S,k,M,C)}};e.SharedTunnelsService=w,e.SharedTunnelsService=w=be([X(0,d.IRemoteSocketFactoryService),X(1,m.ILogService),X(2,g.IProductService),X(3,y.ISignService),X(4,u.IConfigurationService)],w)}),define(Z[103],te([0,1,8,23,3,18,28,20,5,22,51,48,98]),function(H,e,b,L,r,O,D,P,h,u,m,g,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractUpdateService=e.createUpdateURL=void 0;function d(E,l,p){return`${p.updateUrl}/api/update/${E}/${l}/${p.commit}`}e.createUpdateURL=d;let y=class{get state(){return this._state}setState(l){this.logService.info("update#setState",l.type),this._state=l,this._onStateChange.fire(l)}constructor(l,p,c,f,I,w){this.lifecycleMainService=l,this.configurationService=p,this.environmentMainService=c,this.requestService=f,this.logService=I,this.productService=w,this._state=g.State.Uninitialized,this._onStateChange=new r.Emitter,this.onStateChange=this._onStateChange.event,l.when(3).finally(()=>this.initialize())}async initialize(){if(!this.environmentMainService.isBuilt){this.setState(g.State.Disabled(0));return}if(this.environmentMainService.disableUpdates){this.setState(g.State.Disabled(1)),this.logService.info("update#ctor - updates are disabled by the environment");return}if(!this.productService.updateUrl||!this.productService.commit){this.setState(g.State.Disabled(3)),this.logService.info("update#ctor - updates are disabled as there is no update URL");return}const l=this.configurationService.getValue("update.mode"),p=this.getProductQuality(l);if(!p){this.setState(g.State.Disabled(2)),this.logService.info("update#ctor - updates are disabled by user preference");return}if(this.platform=this.buildPlatform(),this.url=this.buildUpdateFeedUrl(p),!this.url){this.setState(g.State.Disabled(4)),this.logService.info("update#ctor - updates are disabled as the update URL is badly formed");return}if(this.setState(g.State.Idle(this.getUpdateType())),l==="manual"){this.logService.info("update#ctor - manual checks only; automatic updates are disabled by user preference");return}l==="start"?(this.logService.info("update#ctor - startup checks only; automatic updates are disabled by user preference"),setTimeout(()=>this.checkForUpdates(!1),30*1e3)):this.scheduleCheckForUpdates(30*1e3).then(void 0,c=>this.logService.error(c))}getProductQuality(l){return l==="none"?void 0:this.productService.quality}scheduleCheckForUpdates(l=60*60*1e3){return(0,b.timeout)(l).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(l){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(l)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}async doDownloadUpdate(l){}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}async doApplyUpdate(){}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(l=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${l}`),!l&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}async isLatestVersion(){if(!this.url)return;if(this.configurationService.getValue("update.mode")==="none")return!1;try{const p=await(0,m.asJson)(await this.requestService.request({url:this.productService.updateMetadataUrl},L.CancellationToken.None));return(0,v.getUpdateFromBuild)(p,this.productService,this.platform)===void 0}catch(p){this.logService.error("update#isLatestVersion(): failed to check for updates"),this.logService.error(p);return}}async _applySpecificUpdate(l){}getUpdateType(){return 1}doQuitAndInstall(){}};e.AbstractUpdateService=y,e.AbstractUpdateService=y=be([X(0,P.ILifecycleMainService),X(1,O.IConfigurationService),X(2,D.IEnvironmentMainService),X(3,m.IRequestService),X(4,h.ILogService),X(5,u.IProductService)],y)}),define(Z[294],te([0,1,14,55,3,2,18,28,20,5,22,51,25,48,103]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DarwinUpdateService=void 0;let E=class extends y.AbstractUpdateService{get onRawError(){return r.Event.fromNodeEventEmitter(b.autoUpdater,"error",(p,c)=>c)}get onRawUpdateNotAvailable(){return r.Event.fromNodeEventEmitter(b.autoUpdater,"update-not-available")}get onRawUpdateAvailable(){return r.Event.fromNodeEventEmitter(b.autoUpdater,"update-available",(p,c,f)=>({url:c,version:f,productVersion:f}))}get onRawUpdateDownloaded(){return r.Event.fromNodeEventEmitter(b.autoUpdater,"update-downloaded",(p,c,f,I)=>({releaseNotes:c,version:f,productVersion:f,date:I}))}constructor(p,c,f,I,w,t,a){super(p,c,I,w,t,a),this.telemetryService=f,this.disposables=new O.DisposableStore,p.setRelaunchHandler(this)}handleRelaunch(p){return p?.addArgs||p?.removeArgs||this.state.type!=="ready"?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){await super.initialize(),this.onRawError(this.onError,this,this.disposables),this.onRawUpdateAvailable(this.onUpdateAvailable,this,this.disposables),this.onRawUpdateDownloaded(this.onUpdateDownloaded,this,this.disposables),this.onRawUpdateNotAvailable(this.onUpdateNotAvailable,this,this.disposables)}onError(p){this.logService.error("UpdateService error:",p);const c=this.state.type==="checking for updates"&&this.state.explicit?p:void 0;this.setState(d.State.Idle(1,c))}buildPlatform(){return this.productService.darwinUniversalAssetId?"darwin-universal":process.arch==="x64"?"darwin":"darwin-arm64"}buildUpdateFeedUrl(p){let c;this.productService.darwinUniversalAssetId?c=this.productService.updateMetadataMacUniversalUrl:c=process.arch==="x64"?this.productService.updateMetadataMacUrl:this.productService.updateMetadataMacArmUrl;try{b.autoUpdater.setFeedURL({url:c,serverType:"json"})}catch(f){this.logService.error("Failed to set update feed URL",f);return}return c}doCheckForUpdates(p){this.setState(d.State.CheckingForUpdates(p)),b.autoUpdater.checkForUpdates()}onUpdateAvailable(p){this.state.type==="checking for updates"&&this.setState(d.State.Downloading(p))}onUpdateDownloaded(p){this.state.type==="downloading"&&(this.telemetryService.publicLog2("update:downloaded",{version:p.version}),this.setState(d.State.Ready(p)))}onUpdateNotAvailable(){this.state.type==="checking for updates"&&(this.telemetryService.publicLog2("update:notAvailable",{explicit:this.state.explicit}),this.setState(d.State.Idle(1)))}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),b.autoUpdater.quitAndInstall()}dispose(){this.disposables.dispose()}};e.DarwinUpdateService=E,be([L.memoize],E.prototype,"onRawError",null),be([L.memoize],E.prototype,"onRawUpdateNotAvailable",null),be([L.memoize],E.prototype,"onRawUpdateAvailable",null),be([L.memoize],E.prototype,"onRawUpdateDownloaded",null),e.DarwinUpdateService=E=be([X(0,h.ILifecycleMainService),X(1,D.IConfigurationService),X(2,v.ITelemetryService),X(3,P.IEnvironmentMainService),X(4,g.IRequestService),X(5,u.ILogService),X(6,m.IProductService)],E)}),define(Z[295],te([0,1,47,45,8,3,10,28,20,5,25,48]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnapUpdateService=void 0;let v=class{get state(){return this._state}setState(E){this.logService.info("update#setState",E.type),this._state=E,this._onStateChange.fire(E)}constructor(E,l,p){if(this.lifecycleMainService=E,this.logService=p,this._state=g.State.Uninitialized,this._onStateChange=new O.Emitter,this.onStateChange=this._onStateChange.event,l.disableUpdates){this.logService.info("update#ctor - updates are disabled");return}this.setState(g.State.Idle(this.getUpdateType())),this.scheduleCheckForUpdates(30*1e3).then(void 0,c=>this.logService.error(c))}scheduleCheckForUpdates(E=60*60*1e3){return(0,r.timeout)(E).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(E){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(E)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}doDownloadUpdate(E){return Promise.resolve(void 0)}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}doApplyUpdate(){return Promise.resolve(void 0)}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(E=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${E}`),!E&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}getUpdateType(){return 2}doQuitAndInstall(){}async _applySpecificUpdate(E){}};v=be([X(0,h.ILifecycleMainService),X(1,P.IEnvironmentMainService),X(2,u.ILogService)],v);let d=class extends v{constructor(E,l,p,c,f,I){super(p,c,f),this.snap=E,this.snapRevision=l,this.telemetryService=I;const w=(0,L.watch)(D.dirname(this.snap)),t=O.Event.fromNodeEventEmitter(w,"change",(n,o)=>o),a=O.Event.filter(t,n=>n==="current"),i=O.Event.debounce(a,(n,o)=>o,2e3)(()=>this.checkForUpdates(!1));p.onWillShutdown(()=>{i.dispose(),w.close()})}doCheckForUpdates(){this.setState(g.State.CheckingForUpdates(!1)),this.isUpdateAvailable().then(E=>{E?this.setState(g.State.Ready({version:"something",productVersion:"something"})):(this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(g.State.Idle(2)))},E=>{this.logService.error(E),this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(g.State.Idle(2,E.message||E))})}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),(0,b.spawn)("sleep 3 && "+D.basename(process.argv[0]),{shell:!0,detached:!0,stdio:"ignore"})}async isUpdateAvailable(){const E=await new Promise((p,c)=>(0,L.realpath)(`${D.dirname(this.snap)}/current`,(f,I)=>f?c(f):p(I))),l=D.basename(E);return this.snapRevision!==l}isLatestVersion(){return this.isUpdateAvailable().then(void 0,E=>{this.logService.error("update#checkForSnapUpdate(): Could not get realpath of application.")})}};e.SnapUpdateService=d,e.SnapUpdateService=d=be([X(2,h.ILifecycleMainService),X(3,P.IEnvironmentMainService),X(4,u.ILogService),X(5,m.ITelemetryService)],d)}),define(Z[296],te([0,1,2,20,53,30,8,29]),function(H,e,b,L,r,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesHandler=void 0;let h=class extends b.Disposable{constructor(m,g,v){super(),this.userDataProfilesService=g,this.windowsMainService=v,this._register(m.onWillLoadWindow(d=>{d.reason===2&&this.unsetProfileForWorkspace(d.window)})),this._register(m.onBeforeCloseWindow(d=>this.unsetProfileForWorkspace(d))),this._register(new D.RunOnceScheduler(()=>this.cleanUpEmptyWindowAssociations(),30*1e3)).schedule()}async unsetProfileForWorkspace(m){const g=this.getWorkspace(m),v=this.userDataProfilesService.getProfileForWorkspace(g);v?.isTransient&&(this.userDataProfilesService.unsetWorkspace(g,v.isTransient),v.isTransient&&await this.userDataProfilesService.cleanUpTransientProfiles())}getWorkspace(m){return m.openedWorkspace??(0,O.toWorkspaceIdentifier)(m.backupPath,m.isExtensionDevelopmentHost)}cleanUpEmptyWindowAssociations(){const m=this.userDataProfilesService.getAssociatedEmptyWindows();if(m.length===0)return;const g=this.windowsMainService.getWindows().map(v=>this.getWorkspace(v));for(const v of m)g.some(d=>d.id===v.id)||this.userDataProfilesService.unsetWorkspace(v,!1)}};e.UserDataProfilesHandler=h,e.UserDataProfilesHandler=h=be([X(0,L.ILifecycleMainService),X(1,r.IUserDataProfilesMainService),X(2,P.IWindowsMainService)],h)}),define(Z[62],te([0,1,14,2,3,5,315,8,15,29,71,25,20,74,37,4,134]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.WindowUtilityProcess=e.UtilityProcess=void 0;function c(w){return typeof w.responseWindowId=="number"}let f=class extends L.Disposable{static{p=this}static{this.ID_COUNTER=0}static{this.all=new Map}static getAll(){return Array.from(p.all.values())}constructor(t,a,s){super(),this.logService=t,this.telemetryService=a,this.lifecycleMainService=s,this.id=String(++p.ID_COUNTER),this._onStdout=this._register(new r.Emitter),this.onStdout=this._onStdout.event,this._onStderr=this._register(new r.Emitter),this.onStderr=this._onStderr.event,this._onMessage=this._register(new r.Emitter),this.onMessage=this._onMessage.event,this._onExit=this._register(new r.Emitter),this.onExit=this._onExit.event,this._onCrash=this._register(new r.Emitter),this.onCrash=this._onCrash.event,this.process=void 0,this.processPid=void 0,this.configuration=void 0}log(t,a){let s;switch(this.configuration?.correlationId?s=`[UtilityProcess id: ${this.configuration?.correlationId}, type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${t}`:s=`[UtilityProcess type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${t}`,a){case m.default.Error:this.logService.error(s);break;case m.default.Warning:this.logService.warn(s);break;case m.default.Info:this.logService.trace(s);break}}validateCanStart(){return this.process?(this.log("Cannot start utility process because it is already running...",m.default.Error),!1):!0}start(t){const a=this.doStart(t);return a&&t.payload&&this.postMessage(t.payload),a}doStart(t){if(!this.validateCanStart())return!1;this.configuration=t;const a=`${this.configuration.type}-${this.id}`,s=h.FileAccess.asFileUri("bootstrap-fork.js").fsPath,i=this.configuration.args??[],n=this.configuration.execArgv??[],o=this.configuration.allowLoadingUnsignedLibraries,S=this.configuration.forceAllocationsToV8Sandbox,k="pipe",M=this.createEnv(t);return this.log("creating new...",m.default.Info),this.process=b.utilityProcess.fork(s,i,{serviceName:a,env:M,execArgv:n,allowLoadingUnsignedLibraries:o,forceAllocationsToV8Sandbox:S,stdio:k}),this.registerListeners(this.process,this.configuration,a),!0}createEnv(t){const a=t.env?{...t.env}:{...(0,y.deepClone)(process.env)};a.VSCODE_AMD_ENTRYPOINT=t.entryPoint,typeof t.parentLifecycleBound=="number"&&(a.VSCODE_PARENT_PID=String(t.parentLifecycleBound)),a.VSCODE_CRASH_REPORTER_PROCESS_TYPE=t.type,E.isWindows&&((0,l.isUNCAccessRestrictionsDisabled)()?a.NODE_DISABLE_UNC_ACCESS_CHECKS="1":a.NODE_UNC_HOST_ALLOWLIST=(0,l.getUNCHostAllowlist)().join("\\")),(0,d.removeDangerousEnvVariables)(a);for(const s of Object.keys(a))a[s]=String(a[s]);return a}registerListeners(t,a,s){if(t.stdout){const i=new D.StringDecoder("utf-8");this._register(r.Event.fromNodeEventEmitter(t.stdout,"data")(n=>this._onStdout.fire(typeof n=="string"?n:i.write(n))))}if(t.stderr){const i=new D.StringDecoder("utf-8");this._register(r.Event.fromNodeEventEmitter(t.stderr,"data")(n=>this._onStderr.fire(typeof n=="string"?n:i.write(n))))}this._register(r.Event.fromNodeEventEmitter(t,"message")(i=>this._onMessage.fire(i))),this._register(r.Event.fromNodeEventEmitter(t,"spawn")(()=>{this.processPid=t.pid,typeof t.pid=="number"&&p.all.set(t.pid,{pid:t.pid,name:c(a)?`${a.type} [${a.responseWindowId}]`:a.type}),this.log("successfully created",m.default.Info)})),this._register(r.Event.fromNodeEventEmitter(t,"exit")(i=>{this.log(`received exit event with code ${i}`,m.default.Info),this._onExit.fire({pid:this.processPid,code:i,signal:"unknown"}),this.onDidExitOrCrashOrKill()})),this._register(r.Event.fromNodeEventEmitter(t,"error",(i,n,o)=>({type:i,location:n,report:o}))(({type:i,location:n,report:o})=>{this.log(`crashed due to ${i} from V8 at ${n}`,m.default.Info);let S=[];try{S=JSON.parse(o).sharedObjects.filter(M=>M.endsWith(".node")).map(M=>{const C=M.indexOf("extensions")===-1?M.indexOf("node_modules"):M.indexOf("extensions");return M.substring(C)})}catch{}this.telemetryService.publicLog2("utilityprocessv8error",{processtype:a.type,error:i,location:n,addons:S})})),this._register(r.Event.fromNodeEventEmitter(b.app,"child-process-gone",(i,n)=>({event:i,details:n}))(({details:i})=>{i.type==="Utility"&&i.name===s&&(this.log(`crashed with code ${i.exitCode} and reason '${i.reason}'`,m.default.Error),this.telemetryService.publicLog2("utilityprocesscrash",{type:a.type,reason:i.reason,code:i.exitCode}),this._onCrash.fire({pid:this.processPid,code:i.exitCode,reason:i.reason}),this.onDidExitOrCrashOrKill())}))}once(t,a){const s=this._register(this._onMessage.event(i=>{i===t&&(s.dispose(),a())}))}postMessage(t,a){this.process&&this.process.postMessage(t,a)}connect(t){const{port1:a,port2:s}=new b.MessageChannelMain;return this.postMessage(t,[s]),a}enableInspectPort(){if(!this.process||typeof this.processPid!="number")return!1;this.log("enabling inspect port",m.default.Info);const t=process;return typeof t._debugProcess=="function"?(t._debugProcess(this.processPid),!0):!1}kill(){if(!this.process)return;this.log("attempting to kill the process...",m.default.Info),this.process.kill()?(this.log("successfully killed the process",m.default.Info),this.onDidExitOrCrashOrKill()):this.log("unable to kill the process",m.default.Warning)}onDidExitOrCrashOrKill(){typeof this.processPid=="number"&&p.all.delete(this.processPid),this.process=void 0}async waitForExit(t){this.process&&(this.log("waiting to exit...",m.default.Info),await Promise.race([r.Event.toPromise(this.onExit),(0,P.timeout)(t)]),this.process&&(this.log(`did not exit within ${t}ms, will kill it now...`,m.default.Info),this.kill()))}};e.UtilityProcess=f,e.UtilityProcess=f=p=be([X(0,O.ILogService),X(1,g.ITelemetryService),X(2,v.ILifecycleMainService)],f);let I=class extends f{constructor(t,a,s,i){super(t,s,i),this.windowsMainService=a}start(t){const a=this.windowsMainService.getWindowById(t.responseWindowId);if(!a?.win||a.win.isDestroyed()||a.win.webContents.isDestroyed())return this.log("Refusing to start utility process because requesting window cannot be found or is destroyed...",m.default.Error),!0;if(!super.doStart(t))return!1;this.registerWindowListeners(a.win,t);const i=this.connect(t.payload);return a.win.webContents.postMessage(t.responseChannel,t.responseNonce,[i]),!0}registerWindowListeners(t,a){a.windowLifecycleBound&&(this._register(r.Event.filter(this.lifecycleMainService.onWillLoadWindow,s=>s.window.win===t)(()=>this.kill())),this._register(r.Event.fromNodeEventEmitter(t,"closed")(()=>this.kill())))}};e.WindowUtilityProcess=I,e.WindowUtilityProcess=I=be([X(0,O.ILogService),X(1,u.IWindowsMainService),X(2,g.ITelemetryService),X(3,v.ILifecycleMainService)],I)}),define(Z[297],te([0,1,13,5,20,8,62,29,25]),function(H,e,b,L,r,O,D,P,h){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostStarter=void 0;let m=class{static{u=this}static{this._lastId=0}constructor(v,d,y,E){this._logService=v,this._lifecycleMainService=d,this._windowsMainService=y,this._telemetryService=E,this._extHosts=new Map,this._shutdown=!1,this._lifecycleMainService.onWillShutdown(l=>{this._shutdown=!0,l.join("extHostStarter",this._waitForAllExit(6e3))})}dispose(){}_getExtHost(v){const d=this._extHosts.get(v);if(!d)throw new Error("Unknown extension host!");return d}onDynamicStdout(v){return this._getExtHost(v).onStdout}onDynamicStderr(v){return this._getExtHost(v).onStderr}onDynamicMessage(v){return this._getExtHost(v).onMessage}onDynamicExit(v){return this._getExtHost(v).onExit}async createExtensionHost(){if(this._shutdown)throw(0,b.canceled)();const v=String(++u._lastId),d=new D.WindowUtilityProcess(this._logService,this._windowsMainService,this._telemetryService,this._lifecycleMainService);return this._extHosts.set(v,d),d.onExit(({pid:y,code:E,signal:l})=>{this._logService.info(`Extension host with pid ${y} exited with code: ${E}, signal: ${l}.`),setTimeout(()=>{d.dispose(),this._extHosts.delete(v)})}),{id:v}}async start(v,d){if(this._shutdown)throw(0,b.canceled)();this._getExtHost(v).start({...d,type:"extensionHost",entryPoint:"vs/workbench/api/node/extensionHostProcess",args:["--skipWorkspaceStorageLock"],execArgv:d.execArgv,allowLoadingUnsignedLibraries:!0,forceAllocationsToV8Sandbox:!0,correlationId:v})}async enableInspectPort(v){if(this._shutdown)throw(0,b.canceled)();const d=this._extHosts.get(v);return d?d.enableInspectPort():!1}async kill(v){if(this._shutdown)throw(0,b.canceled)();const d=this._extHosts.get(v);d&&d.kill()}async _killAllNow(){for(const[,v]of this._extHosts)v.kill()}async _waitForAllExit(v){const d=[];for(const[,y]of this._extHosts)d.push(y.waitForExit(v));return O.Promises.settled(d).then(()=>{})}};e.ExtensionHostStarter=m,e.ExtensionHostStarter=m=u=be([X(0,L.ILogService),X(1,r.ILifecycleMainService),X(2,P.IWindowsMainService),X(3,h.ITelemetryService)],m)}),define(Z[298],te([0,1,38,8,2,28,20,5,41,39,66,62,52,91,12,249,22]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcess=void 0;let p=class extends r.Disposable{constructor(f,I,w,t,a,s,i,n){super(),this.machineId=f,this.environmentMainService=I,this.userDataProfilesService=w,this.lifecycleMainService=t,this.logService=a,this.loggerMainService=s,this.policyService=i,this.productService=n,this.firstWindowConnectionBarrier=new L.Barrier,this.utilityProcess=void 0,this._whenReady=void 0,this._whenIpcReady=void 0,this.registerListeners()}registerListeners(){b.validatedIpcMain.on(E.SharedProcessChannelConnection.request,(f,I)=>this.onWindowConnection(f,I,E.SharedProcessChannelConnection.response)),b.validatedIpcMain.on(E.SharedProcessRawConnection.request,(f,I)=>this.onWindowConnection(f,I,E.SharedProcessRawConnection.response)),this._register(this.lifecycleMainService.onWillShutdown(()=>this.onWillShutdown()))}async onWindowConnection(f,I,w){this.logService.trace(`[SharedProcess] onWindowConnection for: ${w}`),this.firstWindowConnectionBarrier.isOpen()||this.firstWindowConnectionBarrier.open(),await this.whenReady();const t=await this.connect(w);if(f.sender.isDestroyed())return t.close();f.sender.postMessage(w,I,[t])}onWillShutdown(){this.logService.trace("[SharedProcess] onWillShutdown"),this.utilityProcess?.postMessage(E.SharedProcessLifecycle.exit),this.utilityProcess=void 0}whenReady(){return this._whenReady||(this._whenReady=(async()=>{await this.whenIpcReady;const f=new L.DeferredPromise;this.utilityProcess?this.utilityProcess.once(E.SharedProcessLifecycle.initDone,()=>f.complete()):b.validatedIpcMain.once(E.SharedProcessLifecycle.initDone,()=>f.complete()),await f.p,this.logService.trace("[SharedProcess] Overall ready")})()),this._whenReady}get whenIpcReady(){return this._whenIpcReady||(this._whenIpcReady=(async()=>{await this.firstWindowConnectionBarrier.wait(),this.createUtilityProcess();const f=new L.DeferredPromise;this.utilityProcess?this.utilityProcess.once(E.SharedProcessLifecycle.ipcReady,()=>f.complete()):b.validatedIpcMain.once(E.SharedProcessLifecycle.ipcReady,()=>f.complete()),await f.p,this.logService.trace("[SharedProcess] IPC ready")})()),this._whenIpcReady}createUtilityProcess(){this.utilityProcess=this._register(new g.UtilityProcess(this.logService,v.NullTelemetryService,this.lifecycleMainService));const f=(0,d.parseSharedProcessDebugPort)(this.environmentMainService.args,this.environmentMainService.isBuilt);let I;f.port&&(I=["--nolazy"],f.break?I.push(`--inspect-brk=${f.port}`):I.push(`--inspect=${f.port}`)),this.utilityProcess.start({type:"shared-process",entryPoint:"vs/code/node/sharedProcess/sharedProcessMain",payload:this.createSharedProcessConfiguration(),execArgv:I,allowLoadingUnsignedLibraries:!!process.env.VSCODE_VOICE_MODULE_PATH&&this.productService.quality!=="stable"})}createSharedProcessConfiguration(){return{machineId:this.machineId,codeCachePath:this.environmentMainService.codeCachePath,profiles:{home:this.userDataProfilesService.profilesHome,all:this.userDataProfilesService.profiles},args:this.environmentMainService.args,logLevel:this.loggerMainService.getLogLevel(),loggers:this.loggerMainService.getRegisteredLoggers(),policiesData:this.policyService.serialize()}}async connect(f){return await this.whenIpcReady,(0,y.assertIsDefined)(this.utilityProcess).connect(f)}};e.SharedProcess=p,e.SharedProcess=p=be([X(1,O.IEnvironmentMainService),X(2,h.IUserDataProfilesService),X(3,D.ILifecycleMainService),X(4,P.ILogService),X(5,m.ILoggerMainService),X(6,u.IPolicyService),X(7,l.IProductService)],p)}),define(Z[299],te([0,1,28,91,20,5,52,62,113,38,2,3,37,18]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronPtyHostStarter=void 0;let y=class extends m.Disposable{constructor(l,p,c,f,I){super(),this._reconnectConstants=l,this._configurationService=p,this._environmentMainService=c,this._lifecycleMainService=f,this._logService=I,this.utilityProcess=void 0,this._onRequestConnection=new g.Emitter,this.onRequestConnection=this._onRequestConnection.event,this._onWillShutdown=new g.Emitter,this.onWillShutdown=this._onWillShutdown.event,this._lifecycleMainService.onWillShutdown(()=>this._onWillShutdown.fire()),u.validatedIpcMain.on("vscode:createPtyHostMessageChannel",(w,t)=>this._onWindowConnection(w,t)),this._register((0,m.toDisposable)(()=>{u.validatedIpcMain.removeHandler("vscode:createPtyHostMessageChannel")}))}start(){this.utilityProcess=new P.UtilityProcess(this._logService,D.NullTelemetryService,this._lifecycleMainService);const l=(0,L.parsePtyHostDebugPort)(this._environmentMainService.args,this._environmentMainService.isBuilt),p=l.port?["--nolazy",`--inspect${l.break?"-brk":""}=${l.port}`]:void 0;this.utilityProcess.start({type:"ptyHost",entryPoint:"vs/platform/terminal/node/ptyHostMain",execArgv:p,args:["--logsPath",this._environmentMainService.logsHome.fsPath],env:this._createPtyHostConfiguration()});const c=this.utilityProcess.connect(),f=new h.Client(c,"ptyHost"),I=new m.DisposableStore;return I.add(f),I.add((0,m.toDisposable)(()=>{this.utilityProcess?.kill(),this.utilityProcess?.dispose(),this.utilityProcess=void 0})),{client:f,store:I,onDidProcessExit:this.utilityProcess.onExit}}_createPtyHostConfiguration(){this._environmentMainService.unsetSnapExportedVariables();const l={...(0,v.deepClone)(process.env),VSCODE_AMD_ENTRYPOINT:"vs/platform/terminal/node/ptyHostMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true",VSCODE_RECONNECT_GRACE_TIME:String(this._reconnectConstants.graceTime),VSCODE_RECONNECT_SHORT_GRACE_TIME:String(this._reconnectConstants.shortGraceTime),VSCODE_RECONNECT_SCROLLBACK:String(this._reconnectConstants.scrollback)},p=this._configurationService.getValue("terminal.integrated.developer.ptyHost.latency");p&&typeof p=="number"&&(l.VSCODE_LATENCY=String(p));const c=this._configurationService.getValue("terminal.integrated.developer.ptyHost.startupDelay");return c&&typeof c=="number"&&(l.VSCODE_STARTUP_DELAY=String(c)),this._environmentMainService.restoreSnapExportedVariables(),l}_onWindowConnection(l,p){this._onRequestConnection.fire();const c=this.utilityProcess.connect();if(l.sender.isDestroyed()){c.close();return}l.sender.postMessage("vscode:createPtyHostMessageChannelResult",p,[c])}};e.ElectronPtyHostStarter=y,e.ElectronPtyHostStarter=y=be([X(1,d.IConfigurationService),X(2,b.IEnvironmentMainService),X(3,r.ILifecycleMainService),X(4,O.ILogService)],y)}),define(Z[300],te([0,1,2,6,5,29,62,25,57,3,8,20]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UtilityProcessWorkerMainService=e.IUtilityProcessWorkerMainService=void 0,e.IUtilityProcessWorkerMainService=(0,L.createDecorator)("utilityProcessWorker");let v=class extends b.Disposable{constructor(E,l,p,c){super(),this.logService=E,this.windowsMainService=l,this.telemetryService=p,this.lifecycleMainService=c,this.workers=new Map}async createWorker(E){const l=`window: ${E.reply.windowId}, moduleId: ${E.process.moduleId}`;this.logService.trace(`[UtilityProcessWorker]: createWorker(${l})`);const p=this.hash(E);this.workers.has(p)&&(this.logService.warn(`[UtilityProcessWorker]: createWorker() found an existing worker that will be terminated (${l})`),this.disposeWorker(E));const c=new d(this.logService,this.windowsMainService,this.telemetryService,this.lifecycleMainService,E);if(!c.spawn())return{reason:{code:1,signal:"EINVALID"}};this.workers.set(p,c);const f=new m.DeferredPromise;return u.Event.once(c.onDidTerminate)(I=>{I.code===0?this.logService.trace(`[UtilityProcessWorker]: terminated normally with code ${I.code}, signal: ${I.signal}`):this.logService.error(`[UtilityProcessWorker]: terminated unexpectedly with code ${I.code}, signal: ${I.signal}`),this.workers.delete(p),f.complete({reason:I})}),f.p}hash(E){return(0,h.hash)({moduleId:E.process.moduleId,windowId:E.reply.windowId})}async disposeWorker(E){const l=this.hash(E),p=this.workers.get(l);p&&(this.logService.trace(`[UtilityProcessWorker]: disposeWorker(window: ${E.reply.windowId}, moduleId: ${E.process.moduleId})`),p.kill(),this.workers.delete(l))}};e.UtilityProcessWorkerMainService=v,e.UtilityProcessWorkerMainService=v=be([X(0,r.ILogService),X(1,O.IWindowsMainService),X(2,P.ITelemetryService),X(3,g.ILifecycleMainService)],v);let d=class extends b.Disposable{constructor(E,l,p,c,f){super(),this.logService=E,this.windowsMainService=l,this.telemetryService=p,this.lifecycleMainService=c,this.configuration=f,this._onDidTerminate=this._register(new u.Emitter),this.onDidTerminate=this._onDidTerminate.event,this.utilityProcess=new D.WindowUtilityProcess(this.logService,this.windowsMainService,this.telemetryService,this.lifecycleMainService),this.registerListeners()}registerListeners(){this._register(this.utilityProcess.onExit(E=>this._onDidTerminate.fire({code:E.code,signal:E.signal}))),this._register(this.utilityProcess.onCrash(E=>this._onDidTerminate.fire({code:E.code,signal:"ECRASH"})))}spawn(){const l=this.windowsMainService.getWindowById(this.configuration.reply.windowId)?.win?.webContents.getOSProcessId();return this.utilityProcess.start({type:this.configuration.process.type,entryPoint:this.configuration.process.moduleId,parentLifecycleBound:l,windowLifecycleBound:!0,correlationId:`${this.configuration.reply.windowId}`,responseWindowId:this.configuration.reply.windowId,responseChannel:this.configuration.reply.channel,responseNonce:this.configuration.reply.nonce})}kill(){this.utilityProcess.kill()}};d=be([X(0,r.ILogService),X(1,O.IWindowsMainService),X(2,P.ITelemetryService),X(3,g.ILifecycleMainService)],d)}),define(Z[301],te([0,1,14,2,4,19,7,18,20,5,34,29,131,30]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowsStateStoreData=e.restoreWindowsState=e.WindowsStateHandler=void 0;let E=class extends L.Disposable{static{y=this}static{this.windowsStateStorageKey="windowsState"}get state(){return this._state}constructor(w,t,a,s,i){super(),this.windowsMainService=w,this.stateService=t,this.lifecycleMainService=a,this.logService=s,this.configurationService=i,this._state=l(this.stateService.getItem(y.windowsStateStorageKey)),this.lastClosedState=void 0,this.shuttingDown=!1,this.registerListeners()}registerListeners(){b.app.on("browser-window-blur",()=>{this.shuttingDown||this.saveWindowsState()}),this.lifecycleMainService.onBeforeCloseWindow(w=>this.onBeforeCloseWindow(w)),this.lifecycleMainService.onBeforeShutdown(()=>this.onBeforeShutdown()),this.windowsMainService.onDidChangeWindowsCount(w=>{w.newCount-w.oldCount>0&&(this.lastClosedState=void 0)}),this.windowsMainService.onDidDestroyWindow(w=>this.onBeforeCloseWindow(w))}onBeforeShutdown(){this.shuttingDown=!0,this.saveWindowsState()}saveWindowsState(){const w=new Set,t={openedWindows:[],lastPluginDevelopmentHostWindow:this._state.lastPluginDevelopmentHostWindow,lastActiveWindow:this.lastClosedState};if(!t.lastActiveWindow){let i=this.windowsMainService.getLastActiveWindow();(!i||i.isExtensionDevelopmentHost)&&(i=this.windowsMainService.getWindows().find(n=>!n.isExtensionDevelopmentHost)),i&&(t.lastActiveWindow=this.toWindowState(i),t.lastActiveWindow.uiState.mode===3&&w.add(t.lastActiveWindow.uiState.display))}const a=this.windowsMainService.getWindows().find(i=>i.isExtensionDevelopmentHost&&!i.isExtensionTestHost);a&&(t.lastPluginDevelopmentHostWindow=this.toWindowState(a),t.lastPluginDevelopmentHostWindow.uiState.mode===3&&(w.has(t.lastPluginDevelopmentHostWindow.uiState.display)?r.isMacintosh&&!a.win?.isSimpleFullScreen()&&(t.lastPluginDevelopmentHostWindow.uiState.mode=1):w.add(t.lastPluginDevelopmentHostWindow.uiState.display))),this.windowsMainService.getWindowCount()>1&&(t.openedWindows=this.windowsMainService.getWindows().filter(i=>!i.isExtensionDevelopmentHost).map(i=>{const n=this.toWindowState(i);return n.uiState.mode===3&&(w.has(n.uiState.display)?r.isMacintosh&&n.windowId!==t.lastActiveWindow?.windowId&&!i.win?.isSimpleFullScreen()&&(n.uiState.mode=1):w.add(n.uiState.display)),n}));const s=c(t);this.stateService.setItem(y.windowsStateStorageKey,s),this.shuttingDown&&this.logService.trace("[WindowsStateHandler] onBeforeShutdown",s)}onBeforeCloseWindow(w){if(this.lifecycleMainService.quitRequested)return;const t=this.toWindowState(w);w.isExtensionDevelopmentHost&&!w.isExtensionTestHost?this._state.lastPluginDevelopmentHostWindow=t:!w.isExtensionDevelopmentHost&&w.openedWorkspace&&this._state.openedWindows.forEach(a=>{const s=(0,d.isWorkspaceIdentifier)(w.openedWorkspace)&&a.workspace?.id===w.openedWorkspace.id,i=(0,d.isSingleFolderWorkspaceIdentifier)(w.openedWorkspace)&&a.folderUri&&O.extUriBiasedIgnorePathCase.isEqual(a.folderUri,w.openedWorkspace.uri);(s||i)&&(a.uiState=t.uiState)}),this.windowsMainService.getWindowCount()===1&&(this.lastClosedState=t)}toWindowState(w){return{windowId:w.id,workspace:(0,d.isWorkspaceIdentifier)(w.openedWorkspace)?w.openedWorkspace:void 0,folderUri:(0,d.isSingleFolderWorkspaceIdentifier)(w.openedWorkspace)?w.openedWorkspace.uri:void 0,backupPath:w.backupPath,remoteAuthority:w.remoteAuthority,uiState:w.serializeWindowState()}}getNewWindowState(w){const t=this.doGetNewWindowState(w),a=this.configurationService.getValue("window");if(t.mode===3){let s;t.hasDefaultState?s=!!(a?.newWindowDimensions&&["fullscreen","inherit","offset"].indexOf(a.newWindowDimensions)>=0):s=!!(this.lifecycleMainService.wasRestarted||a?.restoreFullscreen),s||(t.mode=1)}return t}doGetNewWindowState(w){const t=this.windowsMainService.getLastActiveWindow();if(!w.extensionTestsPath){if(w.extensionDevelopmentPath&&this.state.lastPluginDevelopmentHostWindow)return this.state.lastPluginDevelopmentHostWindow.uiState;const S=w.workspace;if((0,d.isWorkspaceIdentifier)(S)){const M=this.state.openedWindows.filter(C=>C.workspace&&C.workspace.id===S.id).map(C=>C.uiState);if(M.length)return M[0]}if((0,d.isSingleFolderWorkspaceIdentifier)(S)){const M=this.state.openedWindows.filter(C=>C.folderUri&&O.extUriBiasedIgnorePathCase.isEqual(C.folderUri,S.uri)).map(C=>C.uiState);if(M.length)return M[0]}else if(w.backupPath){const M=this.state.openedWindows.filter(C=>C.backupPath===w.backupPath).map(C=>C.uiState);if(M.length)return M[0]}const k=this.lastClosedState||this.state.lastActiveWindow;if(!t&&k)return k.uiState}let a;const s=b.screen.getAllDisplays();if(s.length===1)a=s[0];else{if(r.isMacintosh){const S=b.screen.getCursorScreenPoint();a=b.screen.getDisplayNearestPoint(S)}!a&&t&&(a=b.screen.getDisplayMatching(t.getBounds())),a||(a=b.screen.getPrimaryDisplay()||s[0])}let i=(0,v.defaultWindowState)();i.x=Math.round(a.bounds.x+a.bounds.width/2-i.width/2),i.y=Math.round(a.bounds.y+a.bounds.height/2-i.height/2);const n=this.configurationService.getValue("window");let o=!0;if(r.isMacintosh&&n?.nativeFullScreen!==!1&&t?.isFullScreen)i.mode=3;else if(n?.newWindowDimensions){if(n.newWindowDimensions==="maximized")i.mode=0,o=!1;else if(n.newWindowDimensions==="fullscreen")i.mode=3,o=!1;else if((n.newWindowDimensions==="inherit"||n.newWindowDimensions==="offset")&&t){const S=t.serializeWindowState();S.mode===3?i.mode=3:i=S,o=i.mode!==3&&n.newWindowDimensions==="offset"}}return o&&(i=this.ensureNoOverlap(i)),i.hasDefaultState=!0,i}ensureNoOverlap(w){if(this.windowsMainService.getWindows().length===0)return w;w.x=typeof w.x=="number"?w.x:0,w.y=typeof w.y=="number"?w.y:0;const t=this.windowsMainService.getWindows().map(a=>a.getBounds());for(;t.some(a=>a.x===w.x||a.y===w.y);)w.x+=30,w.y+=30;return w}};e.WindowsStateHandler=E,e.WindowsStateHandler=E=y=be([X(0,g.IWindowsMainService),X(1,m.IStateService),X(2,h.ILifecycleMainService),X(3,u.ILogService),X(4,P.IConfigurationService)],E);function l(I){const w={openedWindows:[]},t=I||{openedWindows:[]};return t.lastActiveWindow&&(w.lastActiveWindow=p(t.lastActiveWindow)),t.lastPluginDevelopmentHostWindow&&(w.lastPluginDevelopmentHostWindow=p(t.lastPluginDevelopmentHostWindow)),Array.isArray(t.openedWindows)&&(w.openedWindows=t.openedWindows.map(a=>p(a))),w}e.restoreWindowsState=l;function p(I){const w={uiState:I.uiState};return I.backupPath&&(w.backupPath=I.backupPath),I.remoteAuthority&&(w.remoteAuthority=I.remoteAuthority),I.folder&&(w.folderUri=D.URI.parse(I.folder)),I.workspaceIdentifier&&(w.workspace={id:I.workspaceIdentifier.id,configPath:D.URI.parse(I.workspaceIdentifier.configURIPath)}),w}function c(I){return{lastActiveWindow:I.lastActiveWindow&&f(I.lastActiveWindow),lastPluginDevelopmentHostWindow:I.lastPluginDevelopmentHostWindow&&f(I.lastPluginDevelopmentHostWindow),openedWindows:I.openedWindows.map(w=>f(w))}}e.getWindowsStateStoreData=c;function f(I){return{workspaceIdentifier:I.workspace&&{id:I.workspace.id,configURIPath:I.workspace.configPath.toString()},folder:I.folderUri&&I.folderUri.toString(),backupPath:I.backupPath,remoteAuthority:I.remoteAuthority,uiState:I.uiState}}}),define(Z[54],te([0,1,14,3,44,2,15,10,19,21,195,64,61,28,6,5,53,133,30,100,101]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesManagementMainService=e.IWorkspacesManagementMainService=void 0,e.IWorkspacesManagementMainService=(0,y.createDecorator)("workspacesManagementMainService");let w=class extends O.Disposable{constructor(a,s,i,n,o){super(),this.environmentMainService=a,this.logService=s,this.userDataProfilesMainService=i,this.backupMainService=n,this.dialogMainService=o,this._onDidDeleteUntitledWorkspace=this._register(new L.Emitter),this.onDidDeleteUntitledWorkspace=this._onDidDeleteUntitledWorkspace.event,this._onDidEnterWorkspace=this._register(new L.Emitter),this.onDidEnterWorkspace=this._onDidEnterWorkspace.event,this.untitledWorkspacesHome=this.environmentMainService.untitledWorkspacesHome,this.untitledWorkspaces=[]}async initialize(){this.untitledWorkspaces=[];try{const a=(await u.Promises.readdir(this.untitledWorkspacesHome.fsPath)).map(s=>(0,h.joinPath)(this.untitledWorkspacesHome,s,c.UNTITLED_WORKSPACE_NAME));for(const s of a){const i=(0,I.getWorkspaceIdentifier)(s),n=await this.resolveLocalWorkspace(s);n?this.untitledWorkspaces.push({workspace:i,remoteAuthority:n.remoteAuthority}):await this.deleteUntitledWorkspace(i)}}catch(a){a.code!=="ENOENT"&&this.logService.warn(`Unable to read folders in ${this.untitledWorkspacesHome} (${a}).`)}}resolveLocalWorkspace(a){return this.doResolveLocalWorkspace(a,s=>u.Promises.readFile(s,"utf8"))}doResolveLocalWorkspace(a,s){if(this.isWorkspacePath(a)&&a.scheme===D.Schemas.file)try{const i=s(a.fsPath);return i instanceof Promise?i.then(n=>this.doResolveWorkspace(a,n),n=>{}):this.doResolveWorkspace(a,i)}catch{return}}isWorkspacePath(a){return(0,c.isUntitledWorkspace)(a,this.environmentMainService)||(0,c.hasWorkspaceFileExtension)(a)}doResolveWorkspace(a,s){try{const i=this.doParseStoredWorkspace(a,s),n=(0,I.getWorkspaceIdentifier)(a);return{id:n.id,configPath:n.configPath,folders:(0,f.toWorkspaceFolders)(i.folders,n.configPath,h.extUriBiasedIgnorePathCase),remoteAuthority:i.remoteAuthority,transient:i.transient}}catch(i){this.logService.warn(i.toString())}}doParseStoredWorkspace(a,s){const i=(0,r.parse)(s);if(i&&Array.isArray(i.folders))i.folders=i.folders.filter(n=>(0,f.isStoredWorkspaceFolder)(n));else throw new Error(`${a.toString(!0)} looks like an invalid workspace file.`);return i}async createUntitledWorkspace(a,s){const{workspace:i,storedWorkspace:n}=this.newUntitledWorkspace(a,s),o=i.configPath.fsPath;return await u.Promises.mkdir((0,P.dirname)(o),{recursive:!0}),await u.Promises.writeFile(o,JSON.stringify(n,null,"	")),this.untitledWorkspaces.push({workspace:i,remoteAuthority:s}),i}newUntitledWorkspace(a=[],s){const i=(Date.now()+Math.round(Math.random()*1e3)).toString(),n=(0,h.joinPath)(this.untitledWorkspacesHome,i),o=(0,h.joinPath)(n,c.UNTITLED_WORKSPACE_NAME),S=[];for(const k of a)S.push((0,f.getStoredWorkspaceFolder)(k.uri,!0,k.name,n,h.extUriBiasedIgnorePathCase));return{workspace:(0,I.getWorkspaceIdentifier)(o),storedWorkspace:{folders:S,remoteAuthority:s}}}async getWorkspaceIdentifier(a){return(0,I.getWorkspaceIdentifier)(a)}isUntitledWorkspace(a){return(0,c.isUntitledWorkspace)(a.configPath,this.environmentMainService)}async deleteUntitledWorkspace(a){this.isUntitledWorkspace(a)&&(await this.doDeleteUntitledWorkspace(a),this.userDataProfilesMainService.isEnabled()&&this.userDataProfilesMainService.unsetWorkspace(a),this._onDidDeleteUntitledWorkspace.fire(a))}async doDeleteUntitledWorkspace(a){const s=(0,h.originalFSPath)(a.configPath);try{await u.Promises.rm((0,P.dirname)(s));const i=(0,P.join)(this.environmentMainService.workspaceStorageHome.fsPath,a.id);await u.Promises.exists(i)&&await u.Promises.writeFile((0,P.join)(i,"obsolete"),""),this.untitledWorkspaces=this.untitledWorkspaces.filter(n=>n.workspace.id!==a.id)}catch(i){this.logService.warn(`Unable to delete untitled workspace ${s} (${i}).`)}}getUntitledWorkspaces(){return this.untitledWorkspaces}async enterWorkspace(a,s,i){if(!a||!a.win||!a.isReady||!await this.isValidTargetWorkspacePath(a,s,i))return;const o=await this.doEnterWorkspace(a,(0,I.getWorkspaceIdentifier)(i));if(o)return this._onDidEnterWorkspace.fire({window:a,workspace:o.workspace}),o}async isValidTargetWorkspacePath(a,s,i){return i?(0,c.isWorkspaceIdentifier)(a.openedWorkspace)&&h.extUriBiasedIgnorePathCase.isEqual(a.openedWorkspace.configPath,i)?!1:(0,p.findWindowOnWorkspaceOrFolder)(s,i)?(await this.dialogMainService.showMessageBox({type:"info",buttons:[(0,m.localize)(0,null)],message:(0,m.localize)(1,null,(0,h.basename)(i)),detail:(0,m.localize)(2,null)},b.BrowserWindow.getFocusedWindow()??void 0),!1):!0:!0}async doEnterWorkspace(a,s){if(!a.config)return;a.focus();let i;return a.config.extensionDevelopmentPath||(a.config.backupPath?i=await this.backupMainService.registerWorkspaceBackup({workspace:s,remoteAuthority:a.remoteAuthority},a.config.backupPath):i=this.backupMainService.registerWorkspaceBackup({workspace:s,remoteAuthority:a.remoteAuthority})),(0,c.isWorkspaceIdentifier)(a.openedWorkspace)&&this.isUntitledWorkspace(a.openedWorkspace)&&await this.deleteUntitledWorkspace(a.openedWorkspace),a.config.workspace=s,a.config.backupPath=i,{workspace:s,backupPath:i}}};e.WorkspacesManagementMainService=w,e.WorkspacesManagementMainService=w=be([X(0,d.IEnvironmentMainService),X(1,E.ILogService),X(2,l.IUserDataProfilesMainService),X(3,g.IBackupMainService),X(4,v.IDialogMainService)],w)}),define(Z[135],te([0,1,14,38,23,6,29,30,54,12,5,62]),function(H,e,b,L,r,O,D,P,h,u,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsMainService=e.IDiagnosticsMainService=e.ID=void 0,e.ID="diagnosticsMainService",e.IDiagnosticsMainService=(0,O.createDecorator)(e.ID);let v=class{constructor(y,E,l){this.windowsMainService=y,this.workspacesManagementMainService=E,this.logService=l}async getRemoteDiagnostics(y){const E=this.windowsMainService.getWindows();return(await Promise.all(E.map(async p=>{const c=p.remoteAuthority;if(!c)return;const f=`vscode:getDiagnosticInfoResponse${p.id}`,I={includeProcesses:y.includeProcesses,folders:y.includeWorkspaceMetadata?await this.getFolderURIs(p):void 0};return new Promise(w=>{p.sendWhenReady("vscode:getDiagnosticInfo",r.CancellationToken.None,{replyChannel:f,args:I}),L.validatedIpcMain.once(f,(t,a)=>{a||w({hostName:c,errorMessage:`Unable to resolve connection to '${c}'.`}),w(a)}),setTimeout(()=>{w({hostName:c,errorMessage:`Connection to '${c}' could not be established`})},5e3)})}))).filter(p=>!!p)}async getMainDiagnostics(){this.logService.trace("Received request for main process info from other instance.");const y=[];for(const l of b.BrowserWindow.getAllWindows()){const p=this.windowsMainService.getWindowById(l.id);p?y.push(await this.codeWindowToInfo(p)):y.push(this.browserWindowToInfo(l))}const E=[];for(const{pid:l,name:p}of g.UtilityProcess.getAll())E.push({pid:l,name:p});return{mainPID:process.pid,mainArguments:process.argv.slice(1),windows:y,pidToNames:E,screenReader:!!b.app.accessibilitySupportEnabled,gpuFeatureStatus:b.app.getGPUFeatureStatus()}}async codeWindowToInfo(y){const E=await this.getFolderURIs(y),l=(0,u.assertIsDefined)(y.win);return this.browserWindowToInfo(l,E,y.remoteAuthority)}browserWindowToInfo(y,E=[],l){return{id:y.id,pid:y.webContents.getOSProcessId(),title:y.getTitle(),folderURIs:E,remoteAuthority:l}}async getFolderURIs(y){const E=[],l=y.openedWorkspace;if((0,P.isSingleFolderWorkspaceIdentifier)(l))E.push(l.uri);else if((0,P.isWorkspaceIdentifier)(l)){const p=await this.workspacesManagementMainService.resolveLocalWorkspace(l.configPath);p&&p.folders.forEach(f=>{E.push(f.uri)})}return E}};e.DiagnosticsMainService=v,e.DiagnosticsMainService=v=be([X(0,D.IWindowsMainService),X(1,h.IWorkspacesManagementMainService),X(2,m.ILogService)],v)}),define(Z[68],te([0,1,47,14,27,158,55,3,2,15,10,4,7,108,87,21,106,183,61,28,6,20,5,22,80,29,30,54,17,245,237]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostMainService=e.INativeHostMainService=void 0,e.INativeHostMainService=(0,I.createDecorator)("nativeHostMainService");let C=class extends h.Disposable{constructor(T,F,z,oe,ee,ue,ae,de){super(),this.windowsMainService=T,this.dialogMainService=F,this.lifecycleMainService=z,this.environmentMainService=oe,this.logService=ee,this.productService=ue,this.themeMainService=ae,this.workspacesManagementMainService=de,this.onDidOpenWindow=P.Event.map(this.windowsMainService.onDidOpenWindow,j=>j.id),this.onDidTriggerSystemContextMenu=P.Event.filter(P.Event.map(this.windowsMainService.onDidTriggerSystemContextMenu,({window:j,x:G,y:B})=>({windowId:j.id,x:G,y:B})),({windowId:j})=>!!this.windowsMainService.getWindowById(j)),this.onDidMaximizeWindow=P.Event.filter(P.Event.fromNodeEventEmitter(L.app,"browser-window-maximize",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidUnmaximizeWindow=P.Event.filter(P.Event.fromNodeEventEmitter(L.app,"browser-window-unmaximize",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidBlurWindow=P.Event.filter(P.Event.fromNodeEventEmitter(L.app,"browser-window-blur",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidFocusWindow=P.Event.any(P.Event.map(P.Event.filter(P.Event.map(this.windowsMainService.onDidChangeWindowsCount,()=>this.windowsMainService.getLastActiveWindow()),j=>!!j),j=>j.id),P.Event.filter(P.Event.fromNodeEventEmitter(L.app,"browser-window-focus",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j))),this.onDidResumeOS=P.Event.fromNodeEventEmitter(L.powerMonitor,"resume"),this.onDidChangeColorScheme=this.themeMainService.onDidChangeColorScheme,this._onDidChangePassword=this._register(new P.Emitter),this.onDidChangePassword=this._onDidChangePassword.event,this.onDidChangeDisplay=P.Event.debounce(P.Event.any(P.Event.filter(P.Event.fromNodeEventEmitter(L.screen,"display-metrics-changed",(j,G,B)=>B),j=>!(Array.isArray(j)&&j.length===1&&j[0]==="workArea")),P.Event.fromNodeEventEmitter(L.screen,"display-added"),P.Event.fromNodeEventEmitter(L.screen,"display-removed")),()=>{},100)}get windowId(){throw new Error("Not implemented in electron-main")}async getWindows(){return this.windowsMainService.getWindows().map(F=>({id:F.id,workspace:F.openedWorkspace??(0,n.toWorkspaceIdentifier)(F.backupPath,F.isExtensionDevelopmentHost),title:F.win?.getTitle()??"",filename:F.getRepresentedFilename(),dirty:F.isDocumentEdited()}))}async getWindowCount(T){return this.windowsMainService.getWindowCount()}async getActiveWindowId(T){const F=L.BrowserWindow.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(F)return F.id}openWindow(T,F,z){return Array.isArray(F)?this.doOpenWindow(T,F,z):this.doOpenEmptyWindow(T,F)}async doOpenWindow(T,F,z=Object.create(null)){F.length>0&&await this.windowsMainService.open({context:5,contextWindowId:T,urisToOpen:F,cli:this.environmentMainService.args,forceNewWindow:z.forceNewWindow,forceReuseWindow:z.forceReuseWindow,preferNewWindow:z.preferNewWindow,diffMode:z.diffMode,mergeMode:z.mergeMode,addMode:z.addMode,gotoLineMode:z.gotoLineMode,noRecentEntry:z.noRecentEntry,waitMarkerFileURI:z.waitMarkerFileURI,remoteAuthority:z.remoteAuthority||void 0,forceProfile:z.forceProfile,forceTempProfile:z.forceTempProfile})}async doOpenEmptyWindow(T,F){await this.windowsMainService.openEmptyWindow({context:5,contextWindowId:T},F)}async toggleFullScreen(T){this.windowById(T)?.toggleFullScreen()}async handleTitleDoubleClick(T){this.windowById(T)?.handleTitleDoubleClick()}async isMaximized(T){const F=this.windowById(T);return F?.win?F.win.isMaximized():!1}async maximizeWindow(T){const F=this.windowById(T);F?.win&&F.win.maximize()}async unmaximizeWindow(T){const F=this.windowById(T);F?.win&&F.win.unmaximize()}async minimizeWindow(T){const F=this.windowById(T);F?.win&&F.win.minimize()}async updateWindowControls(T,F){const z=this.windowById(T);z&&z.updateWindowControls(F)}async focusWindow(T,F){F&&typeof F.windowId=="number"&&(T=F.windowId),this.windowById(T)?.focus({force:F?.force??!1})}async setMinimumSize(T,F,z){const oe=this.windowById(T);if(oe?.win){const[ee,ue]=oe.win.getSize(),[ae,de]=oe.win.getMinimumSize(),[j,G]=[F??ae,z??de],[B,W]=[Math.max(ee,j),Math.max(ue,G)];(ae!==j||de!==G)&&oe.win.setMinimumSize(j,G),(ee!==B||ue!==W)&&oe.win.setSize(B,W)}}async saveWindowSplash(T,F){this.themeMainService.saveWindowSplash(T,F)}async installShellCommand(T){const{source:F,target:z}=await this.getShellCommandLink();try{const{symbolicLink:oe}=await E.SymlinkSupport.stat(F);if(oe&&!oe.dangling){const ee=await(0,d.realpath)(F);if(z===ee)return}await E.Promises.unlink(F)}catch(oe){if(oe.code!=="ENOENT")throw oe}try{await E.Promises.symlink(z,F)}catch(oe){if(oe.code!=="EACCES"&&oe.code!=="ENOENT")throw oe;const{response:ee}=await this.showMessageBox(T,{type:"info",message:(0,p.localize)(0,null,this.productService.nameShort),buttons:[(0,p.localize)(1,null),(0,p.localize)(2,null)]});if(ee===0)try{const ue=`osascript -e "do shell script \\"mkdir -p /usr/local/bin && ln -sf '${z}' '${F}'\\" with administrator privileges"`;await(0,O.promisify)(b.exec)(ue)}catch{throw new Error((0,p.localize)(3,null,F))}}}async uninstallShellCommand(T){const{source:F}=await this.getShellCommandLink();try{await E.Promises.unlink(F)}catch(z){switch(z.code){case"EACCES":{const{response:oe}=await this.showMessageBox(T,{type:"info",message:(0,p.localize)(4,null,this.productService.nameShort),buttons:[(0,p.localize)(5,null),(0,p.localize)(6,null)]});if(oe===0)try{const ee=`osascript -e "do shell script \\"rm '${F}'\\" with administrator privileges"`;await(0,O.promisify)(b.exec)(ee)}catch{throw new Error((0,p.localize)(7,null,F))}break}case"ENOENT":break;default:throw z}}}async getShellCommandLink(){const T=(0,m.resolve)(this.environmentMainService.appRoot,"bin","code"),F=`/usr/local/bin/${this.productService.applicationName}`;if(!await E.Promises.exists(T))throw new Error((0,p.localize)(8,null,T));return{source:F,target:T}}async showMessageBox(T,F){return this.dialogMainService.showMessageBox(F,this.toBrowserWindow(T))}async showSaveDialog(T,F){return this.dialogMainService.showSaveDialog(F,this.toBrowserWindow(T))}async showOpenDialog(T,F){return this.dialogMainService.showOpenDialog(F,this.toBrowserWindow(T))}toBrowserWindow(T){const F=this.windowById(T);if(F?.win)return F.win}async pickFileFolderAndOpen(T,F){const z=await this.dialogMainService.pickFileFolder(F);z&&await this.doOpenPicked(await Promise.all(z.map(async oe=>await E.SymlinkSupport.existsDirectory(oe)?{folderUri:v.URI.file(oe)}:{fileUri:v.URI.file(oe)})),F,T)}async pickFolderAndOpen(T,F){const z=await this.dialogMainService.pickFolder(F);z&&await this.doOpenPicked(z.map(oe=>({folderUri:v.URI.file(oe)})),F,T)}async pickFileAndOpen(T,F){const z=await this.dialogMainService.pickFile(F);z&&await this.doOpenPicked(z.map(oe=>({fileUri:v.URI.file(oe)})),F,T)}async pickWorkspaceAndOpen(T,F){const z=await this.dialogMainService.pickWorkspace(F);z&&await this.doOpenPicked(z.map(oe=>({workspaceUri:v.URI.file(oe)})),F,T)}async doOpenPicked(T,F,z){await this.windowsMainService.open({context:3,contextWindowId:z,cli:this.environmentMainService.args,urisToOpen:T,forceNewWindow:F.forceNewWindow})}async showItemInFolder(T,F){L.shell.showItemInFolder(F)}async setRepresentedFilename(T,F){this.windowById(T)?.setRepresentedFilename(F)}async setDocumentEdited(T,F){this.windowById(T)?.setDocumentEdited(F)}async openExternal(T,F){return this.environmentMainService.unsetSnapExportedVariables(),L.shell.openExternal(F),this.environmentMainService.restoreSnapExportedVariables(),!0}moveItemToTrash(T,F){return L.shell.trashItem(F)}async isAdmin(){let T;return g.isWindows?T=(await new Promise((F,z)=>{H(["native-is-elevated"],F,z)}))():T=process.getuid?.()===0,T}async writeElevated(T,F,z,oe){const ee=await new Promise((ue,ae)=>{H(["@vscode/sudo-prompt"],ue,ae)});return new Promise((ue,ae)=>{const de=[`"${this.cliPath}"`];oe?.unlock&&de.push("--file-chmod"),de.push("--file-write",`"${F.fsPath}"`,`"${z.fsPath}"`);const j={name:this.productService.nameLong.replace("-",""),icns:g.isMacintosh&&this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(this.environmentMainService.appRoot),`${this.productService.nameShort}.icns`):void 0};ee.exec(de.join(" "),j,(G,B,W)=>{B&&this.logService.trace(`[sudo-prompt] received stdout: ${B}`),W&&this.logService.trace(`[sudo-prompt] received stderr: ${W}`),G?ae(G):ue(void 0)})})}async isRunningUnderARM64Translation(){return g.isLinux||g.isWindows?!1:L.app.runningUnderARM64Translation}get cliPath(){return g.isWindows?this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(process.execPath),"bin",`${this.productService.applicationName}.cmd`):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.bat"):g.isLinux?this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(process.execPath),"bin",`${this.productService.applicationName}`):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh"):this.environmentMainService.isBuilt?(0,m.join)(this.environmentMainService.appRoot,"bin","code"):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh")}async getOSStatistics(){return{totalmem:(0,r.totalmem)(),freemem:(0,r.freemem)(),loadavg:(0,r.loadavg)()}}async getOSProperties(){return{arch:(0,r.arch)(),platform:(0,r.platform)(),release:(0,r.release)(),type:(0,r.type)(),cpus:(0,r.cpus)()}}async getOSVirtualMachineHint(){return y.virtualMachineHint.value()}async getOSColorScheme(){return this.themeMainService.getColorScheme()}async hasWSLFeatureInstalled(){return g.isWindows&&(0,k.hasWSLFeatureInstalled)()}async killProcess(T,F,z){process.kill(F,z)}async readClipboardText(T,F){return L.clipboard.readText(F)}async writeClipboardText(T,F,z){return L.clipboard.writeText(F,z)}async writeClipboardData(T,F,z){return L.clipboard.write(F,z)}async readClipboardFindText(T){return L.clipboard.readFindText()}async writeClipboardFindText(T,F){return L.clipboard.writeFindText(F)}async writeClipboardBuffer(T,F,z,oe){return L.clipboard.writeBuffer(F,Buffer.from(z.buffer),oe)}async readClipboardBuffer(T,F){return S.VSBuffer.wrap(L.clipboard.readBuffer(F))}async hasClipboard(T,F,z){return L.clipboard.has(F,z)}async newWindowTab(){await this.windowsMainService.open({context:5,cli:this.environmentMainService.args,forceNewTabbedWindow:!0,forceEmpty:!0,remoteAuthority:this.environmentMainService.args.remote||void 0})}async showPreviousWindowTab(){L.Menu.sendActionToFirstResponder("selectPreviousTab:")}async showNextWindowTab(){L.Menu.sendActionToFirstResponder("selectNextTab:")}async moveWindowTabToNewWindow(){L.Menu.sendActionToFirstResponder("moveTabToNewWindow:")}async mergeAllWindowTabs(){L.Menu.sendActionToFirstResponder("mergeAllWindows:")}async toggleWindowTabsBar(){L.Menu.sendActionToFirstResponder("toggleTabBar:")}async updateTouchBar(T,F){this.windowById(T)?.updateTouchBar(F)}async notifyReady(T){this.windowById(T)?.setReady()}async relaunch(T,F){return this.lifecycleMainService.relaunch(F)}async reload(T,F){const z=this.windowById(T);if(z){if((0,n.isWorkspaceIdentifier)(z.openedWorkspace)){const oe=z.openedWorkspace.configPath;if(oe.scheme===u.Schemas.file&&(await this.workspacesManagementMainService.resolveLocalWorkspace(oe))?.transient)return this.openWindow(z.id,{forceReuseWindow:!0})}return this.lifecycleMainService.reload(z,F?.disableExtensions!==void 0?{_:[],"disable-extensions":F.disableExtensions}:void 0)}}async closeWindow(T){this.closeWindowById(T,T)}async closeWindowById(T,F){const z=this.windowById(F);if(z?.win)return z.win.close()}async quit(T){const F=this.windowsMainService.getLastActiveWindow();F?.isExtensionDevelopmentHost&&this.windowsMainService.getWindowCount()>1&&F.win?F.win.close():this.lifecycleMainService.quit()}async exit(T,F){await this.lifecycleMainService.kill(F)}async resolveProxy(T,F){return this.windowById(T)?.win?.webContents?.session?.resolveProxy(F)}findFreePort(T,F,z,oe,ee=1){return(0,l.findFreePort)(F,z,oe,ee)}async openDevTools(T,F){const z=this.windowById(T);z?.win&&z.win.webContents.openDevTools(F)}async toggleDevTools(T){const F=this.windowById(T);F?.win&&F.win.webContents.toggleDevTools()}async sendInputEvent(T,F){const z=this.windowById(T);z?.win&&(F.type==="mouseDown"||F.type==="mouseUp")&&z.win.webContents.sendInputEvent(F)}async profileRenderer(T,F,z){const oe=this.windowById(T);if(!oe||!oe.win)throw new Error;return await new M.WindowProfiler(oe.win,F,this.logService).inspect(z)}async windowsGetStringRegKey(T,F,z,oe){if(!g.isWindows)return;const ee=await new Promise((ue,ae)=>{H(["@vscode/windows-registry"],ue,ae)});try{return ee.GetStringRegKey(F,z,oe)}catch{return}}windowById(T){if(typeof T=="number")return this.windowsMainService.getWindowById(T)}};e.NativeHostMainService=C,be([D.memoize],C.prototype,"cliPath",null),e.NativeHostMainService=C=be([X(0,i.IWindowsMainService),X(1,c.IDialogMainService),X(2,w.ILifecycleMainService),X(3,f.IEnvironmentMainService),X(4,t.ILogService),X(5,a.IProductService),X(6,s.IThemeMainService),X(7,o.IWorkspacesManagementMainService)],C)}),define(Z[302],te([0,1,14,38,27,2,15,4,110,181,92,135,61,28,5,68,67,22,79,81,32,34,62,23,7,29,8]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.IssueMainService=void 0;const S="issue.processExplorerWindowState";let k=class{static{o=this}static{this.DEFAULT_BACKGROUND_COLOR="#1E1E1E"}constructor(A,T,F,z,oe,ee,ue,ae,de,j,G){this.userEnv=A,this.environmentMainService=T,this.logService=F,this.diagnosticsService=z,this.diagnosticsMainService=oe,this.dialogMainService=ee,this.nativeHostMainService=ue,this.protocolMainService=ae,this.productService=de,this.stateService=j,this.windowsMainService=G,this.issueReporterWindow=null,this.issueReporterParentWindow=null,this.processExplorerWindow=null,this.processExplorerParentWindow=null,this.registerListeners()}registerListeners(){L.validatedIpcMain.on("vscode:listProcesses",async A=>{const T=[];try{T.push({name:(0,u.localize)(0,null),rootProcess:await(0,h.listProcesses)(process.pid)}),(await this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0})).forEach(z=>{(0,m.isRemoteDiagnosticError)(z)?T.push({name:z.hostName,rootProcess:z}):z.processes&&T.push({name:z.hostName,rootProcess:z.processes})})}catch(F){this.logService.error(`Listing processes failed: ${F}`)}this.safeSend(A,"vscode:listProcessesResponse",T)}),L.validatedIpcMain.on("vscode:workbenchCommand",(A,T)=>{const{id:F,from:z,args:oe}=T;let ee;switch(z){case"processExplorer":ee=this.processExplorerParentWindow;break;default:throw new Error(`Unexpected command source: ${z}`)}ee?.webContents.send("vscode:runAction",{id:F,from:z,args:oe})}),L.validatedIpcMain.on("vscode:closeProcessExplorer",A=>{this.processExplorerWindow?.close()}),L.validatedIpcMain.on("vscode:pidToNameRequest",async A=>{const T=await this.diagnosticsMainService.getMainDiagnostics(),F=[];for(const z of T.windows)F.push([z.pid,`window [${z.id}] (${z.title})`]);for(const{pid:z,name:oe}of t.UtilityProcess.getAll())F.push([z,oe]);this.safeSend(A,"vscode:pidToNameResponse",F)})}async openReporter(A){if(!this.issueReporterWindow&&(this.issueReporterParentWindow=b.BrowserWindow.getFocusedWindow(),this.issueReporterParentWindow)){const T=new O.DisposableStore,F=T.add(this.protocolMainService.createIPCObjectUrl()),z=this.getWindowPosition(this.issueReporterParentWindow,700,800);this.issueReporterWindow=this.createBrowserWindow(z,F,{backgroundColor:A.styles.backgroundColor,title:(0,u.localize)(1,null),zoomLevel:A.zoomLevel,alwaysOnTop:!1},"issue-reporter"),F.update({appRoot:this.environmentMainService.appRoot,windowId:this.issueReporterWindow.id,userEnv:this.userEnv,data:A,disableExtensions:!!this.environmentMainService.disableExtensions,os:{type:(0,r.type)(),arch:(0,r.arch)(),release:(0,r.release)()},product:l.default}),this.issueReporterWindow.loadURL(D.FileAccess.asBrowserUri(`vs/code/electron-sandbox/issue/issueReporter${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0)),this.issueReporterWindow.on("close",()=>{this.issueReporterWindow=null,T.dispose()}),this.issueReporterParentWindow.on("closed",()=>{this.issueReporterWindow&&(this.issueReporterWindow.close(),this.issueReporterWindow=null,T.dispose())})}this.issueReporterWindow&&this.focusWindow(this.issueReporterWindow)}async openProcessExplorer(A){if(!this.processExplorerWindow&&(this.processExplorerParentWindow=b.BrowserWindow.getFocusedWindow(),this.processExplorerParentWindow)){const T=new O.DisposableStore,F=T.add(this.protocolMainService.createIPCObjectUrl()),z=this.stateService.getItem(S,void 0),oe=M(z)?z:this.getWindowPosition(this.processExplorerParentWindow,800,500);this.processExplorerWindow=this.createBrowserWindow(oe,F,{backgroundColor:A.styles.backgroundColor,title:(0,u.localize)(2,null),zoomLevel:A.zoomLevel,alwaysOnTop:!0},"process-explorer"),F.update({appRoot:this.environmentMainService.appRoot,windowId:this.processExplorerWindow.id,userEnv:this.userEnv,data:A,product:l.default}),this.processExplorerWindow.loadURL(D.FileAccess.asBrowserUri(`vs/code/electron-sandbox/processExplorer/processExplorer${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0)),this.processExplorerWindow.on("close",()=>{this.processExplorerWindow=null,T.dispose()}),this.processExplorerParentWindow.on("close",()=>{this.processExplorerWindow&&(this.processExplorerWindow.close(),this.processExplorerWindow=null,T.dispose())});const ee=()=>{if(!this.processExplorerWindow)return;const ue=this.processExplorerWindow.getSize(),ae=this.processExplorerWindow.getPosition();if(!ue||!ae)return;const de={width:ue[0],height:ue[1],x:ae[0],y:ae[1]};this.stateService.setItem(S,de)};this.processExplorerWindow.on("moved",ee),this.processExplorerWindow.on("resized",ee)}this.processExplorerWindow&&this.focusWindow(this.processExplorerWindow)}async stopTracing(){if(!this.environmentMainService.args.trace)return;const A=await b.contentTracing.stopRecording(`${(0,I.randomPath)(this.environmentMainService.userHome.fsPath,this.productService.applicationName)}.trace.txt`);await this.dialogMainService.showMessageBox({type:"info",message:(0,u.localize)(3,null),detail:(0,u.localize)(4,null,A),buttons:[(0,u.localize)(5,null)]},b.BrowserWindow.getFocusedWindow()??void 0),this.nativeHostMainService.showItemInFolder(void 0,A)}async getSystemStatus(){const[A,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return this.diagnosticsService.getDiagnostics(A,T)}async $getSystemInfo(){const[A,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return await this.diagnosticsService.getSystemInfo(A,T)}async $getPerformanceInfo(){try{const[A,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0})]);return await this.diagnosticsService.getPerformanceInfo(A,T)}catch(A){throw this.logService.warn("issueService#getPerformanceInfo ",A.message),A}}async $reloadWithExtensionsDisabled(){if(this.issueReporterParentWindow)try{await this.nativeHostMainService.reload(this.issueReporterParentWindow.id,{disableExtensions:!0})}catch(A){this.logService.error(A)}}async $showConfirmCloseDialog(){if(this.issueReporterWindow){const{response:A}=await this.dialogMainService.showMessageBox({type:"warning",message:(0,u.localize)(6,null),buttons:[(0,u.localize)(7,null),(0,u.localize)(8,null)]},this.issueReporterWindow);A===0&&this.issueReporterWindow&&(this.issueReporterWindow.destroy(),this.issueReporterWindow=null)}}async $showClipboardDialog(){if(this.issueReporterWindow){const{response:A}=await this.dialogMainService.showMessageBox({type:"warning",message:(0,u.localize)(9,null),buttons:[(0,u.localize)(10,null),(0,u.localize)(11,null)]},this.issueReporterWindow);return A===0}return!1}async $getIssueReporterUri(A){if(!this.issueReporterParentWindow)throw new Error("Issue reporter window not available");const T=this.windowsMainService.getWindowById(this.issueReporterParentWindow.id);if(!T)throw new Error("Window not found");const F=`vscode:triggerIssueUriRequestHandlerResponse${T.id}`;return n.Promises.withAsyncBody(async(z,oe)=>{const ee=new a.CancellationTokenSource;T.sendWhenReady("vscode:triggerIssueUriRequestHandler",ee.token,{replyChannel:F,extensionId:A}),L.validatedIpcMain.once(F,(ue,ae)=>{z(s.URI.parse(ae))});try{await(0,n.timeout)(5e3),ee.cancel(),oe(new Error("Timed out waiting for issue reporter URI"))}finally{L.validatedIpcMain.removeHandler(F)}})}async $closeReporter(){this.issueReporterWindow?.close()}async closeProcessExplorer(){this.processExplorerWindow?.close()}focusWindow(A){A.isMinimized()&&A.restore(),A.focus()}safeSend(A,T,...F){A.sender.isDestroyed()||A.sender.send(T,...F)}createBrowserWindow(A,T,F,z){const oe=new b.BrowserWindow({fullscreen:!1,skipTaskbar:!1,resizable:!0,width:A.width,height:A.height,minWidth:300,minHeight:200,x:A.x,y:A.y,title:F.title,backgroundColor:F.backgroundColor||o.DEFAULT_BACKGROUND_COLOR,webPreferences:{preload:D.FileAccess.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath,additionalArguments:[`--vscode-window-config=${T.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,f.zoomLevelToZoomFactor)(F.zoomLevel),sandbox:!0},alwaysOnTop:F.alwaysOnTop,experimentalDarkMode:!0});return oe.setMenuBarVisibility(!1),oe}getWindowPosition(A,T,F){let z;const oe=b.screen.getAllDisplays();if(oe.length===1)z=oe[0];else{if(P.isMacintosh){const ae=b.screen.getCursorScreenPoint();z=b.screen.getDisplayNearestPoint(ae)}!z&&A&&(z=b.screen.getDisplayMatching(A.getBounds())),z||(z=b.screen.getPrimaryDisplay()||oe[0])}const ee=z.bounds,ue={width:T,height:F,x:ee.x+ee.width/2-T/2,y:ee.y+ee.height/2-F/2};return ee.width>0&&ee.height>0&&(ue.x<ee.x&&(ue.x=ee.x),ue.y<ee.y&&(ue.y=ee.y),ue.x>ee.x+ee.width&&(ue.x=ee.x),ue.y>ee.y+ee.height&&(ue.y=ee.y),ue.width>ee.width&&(ue.width=ee.width),ue.height>ee.height&&(ue.height=ee.height)),ue}};e.IssueMainService=k,e.IssueMainService=k=o=be([X(1,d.IEnvironmentMainService),X(2,y.ILogService),X(3,m.IDiagnosticsService),X(4,g.IDiagnosticsMainService),X(5,v.IDialogMainService),X(6,E.INativeHostMainService),X(7,c.IProtocolMainService),X(8,p.IProductService),X(9,w.IStateService),X(10,i.IWindowsMainService)],k);function M(C){return typeof C!="object"||C===null?!1:"x"in C&&"y"in C&&"width"in C&&"height"in C}}),define(Z[303],te([0,1,23,18,28,20,5,68,22,51,25,48,103,98]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxUpdateService=void 0;let y=class extends v.AbstractUpdateService{constructor(l,p,c,f,I,w,t,a){super(l,p,f,I,w,a),this.telemetryService=c,this.nativeHostMainService=t}buildPlatform(){return`linux-${process.arch}`}buildUpdateFeedUrl(l){return(0,v.createUpdateURL)(`linux-${process.arch}`,l,this.productService)}doCheckForUpdates(l){this.url&&(this.setState(g.State.CheckingForUpdates(l)),this.requestService.request({url:this.productService.updateMetadataUrl},b.CancellationToken.None).then(u.asJson).then(p=>{const c=(0,d.getUpdateFromBuild)(p,this.productService,`linux-${process.arch}`);!c||!c.url||!c.version||!c.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!l}),this.setState(g.State.Idle(1))):this.setState(g.State.AvailableForDownload(c))}).then(void 0,p=>{this.logService.error(p),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!l});const c=l?p.message||p:void 0;this.setState(g.State.Idle(1,c))}))}async doDownloadUpdate(l){this.productService.downloadUrl&&this.productService.downloadUrl.length>0?this.nativeHostMainService.openExternal(void 0,this.productService.downloadUrl):l.update.url&&this.nativeHostMainService.openExternal(void 0,l.update.url),this.setState(g.State.Idle(1))}};e.LinuxUpdateService=y,e.LinuxUpdateService=y=be([X(0,O.ILifecycleMainService),X(1,L.IConfigurationService),X(2,m.ITelemetryService),X(3,r.IEnvironmentMainService),X(4,u.IRequestService),X(5,D.ILogService),X(6,P.INativeHostMainService),X(7,h.IProductService)],y)}),define(Z[304],te([0,1,47,45,27,8,23,55,10,7,144,21,18,28,16,20,5,68,22,51,25,48,103,98]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Win32UpdateService=void 0;async function s(S,k=1e3){for(;!S();)await(0,O.timeout)(k)}let i;function n(){return typeof i>"u"&&(i=L.existsSync(h.join(h.dirname(process.execPath),"unins000.exe"))?0:1),i}let o=class extends t.AbstractUpdateService{get cachePath(){const k=h.join((0,r.tmpdir)(),`azuredatastudio-update-${this.productService.quality}-${this.productService.target}-${process.arch}`);return g.Promises.mkdir(k,{recursive:!0}).then(()=>k)}constructor(k,M,C,A,T,F,z,oe,ee){super(k,M,A,T,F,ee),this.telemetryService=C,this.fileService=z,this.nativeHostMainService=oe,k.setRelaunchHandler(this)}handleRelaunch(k){return k?.addArgs||k?.removeArgs||this.state.type!=="ready"||!this.availableUpdate?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){if(this.productService.target==="user"&&await this.nativeHostMainService.isAdmin(void 0)){this.setState(w.State.Disabled(5)),this.logService.info("update#ctor - updates are disabled due to running as Admin in user setup");return}await super.initialize()}buildPlatform(){let k="win32";return process.arch!=="ia32"&&(k+=`-${process.arch}`),n()===1?k+="-archive":this.productService.target==="user"&&(k+="-user"),k}buildUpdateFeedUrl(k){return(0,t.createUpdateURL)(this.platform,k,this.productService)}doCheckForUpdates(k){this.url&&(this.setState(w.State.CheckingForUpdates(k)),this.requestService.request({url:this.productService.updateMetadataUrl},D.CancellationToken.None).then(f.asJson).then(M=>{const C=(0,a.getUpdateFromBuild)(M,this.productService,this.platform),A=n();return!C||!C.url||!C.version||!C.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!k}),this.setState(w.State.Idle(A)),Promise.resolve(null)):A===1?(this.setState(w.State.AvailableForDownload(C)),Promise.resolve(null)):(this.setState(w.State.Downloading(C)),this.cleanup(C.version).then(()=>this.getUpdatePackagePath(C.version).then(T=>g.Promises.exists(T).then(F=>{if(F)return Promise.resolve(T);const z=C.url,oe=C.hash,ee=`${T}.tmp`;return this.requestService.request({url:z},D.CancellationToken.None).then(ue=>this.fileService.writeFile(u.URI.file(ee),ue.stream)).then(oe?()=>(0,m.checksum)(ee,C.hash):()=>{}).then(()=>g.Promises.rename(ee,T,!1)).then(()=>T)})).then(T=>{const F=this.configurationService.getValue("update.enableWindowsBackgroundUpdates");this.availableUpdate={packagePath:T},F?this.productService.target==="user"?this.doApplyUpdate():this.setState(w.State.Downloaded(C)):this.setState(w.State.Ready(C))})))}).then(void 0,M=>{this.logService.error(M),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!k});const C=k?M.message||M:void 0;this.setState(w.State.Idle(n(),C))}))}async doDownloadUpdate(k){k.update.url&&this.nativeHostMainService.openExternal(void 0,k.update.url),this.setState(w.State.Idle(n()))}async getUpdatePackagePath(k){const M=await this.cachePath;return h.join(M,`AzureDataStudioSetup-${this.productService.quality}-${k}.exe`)}async cleanup(k=null){const M=k?F=>!new RegExp(`${this.productService.quality}-${k}\\.exe$`).test(F):()=>!0,C=await this.cachePath,T=(await g.Promises.readdir(C)).filter(M).map(async F=>{try{await g.Promises.unlink(h.join(C,F))}catch{}});await Promise.all(T)}async doApplyUpdate(){if(this.state.type!=="downloaded"&&this.state.type!=="downloading"||!this.availableUpdate)return Promise.resolve(void 0);const k=this.state.update;this.setState(w.State.Updating(k));const M=await this.cachePath;this.availableUpdate.updateFilePath=h.join(M,`CodeSetup-${this.productService.quality}-${k.version}.flag`),await g.Promises.writeFile(this.availableUpdate.updateFilePath,"flag"),(0,b.spawn)(this.availableUpdate.packagePath,["/verysilent","/log",`/update="${this.availableUpdate.updateFilePath}"`,"/nocloseapplications","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],windowsVerbatimArguments:!0}).once("exit",()=>{this.availableUpdate=void 0,this.setState(w.State.Idle(n()))});const A=`${this.productService.win32MutexName}-ready`,T=await new Promise((F,z)=>{H(["@vscode/windows-mutex"],F,z)});s(()=>T.isActive(A)).then(()=>this.setState(w.State.Ready(k)))}doQuitAndInstall(){this.state.type!=="ready"||!this.availableUpdate||(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.availableUpdate.updateFilePath?L.unlinkSync(this.availableUpdate.updateFilePath):(0,b.spawn)(this.availableUpdate.packagePath,["/silent","/log","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"]}))}getUpdateType(){return n()}async _applySpecificUpdate(k){if(this.state.type!=="idle")return;const M=this.configurationService.getValue("update.enableWindowsBackgroundUpdates"),C={version:"unknown",productVersion:"unknown"};this.setState(w.State.Downloading(C)),this.availableUpdate={packagePath:k},M?this.productService.target==="user"?this.doApplyUpdate():this.setState(w.State.Downloaded(C)):this.setState(w.State.Ready(C))}};e.Win32UpdateService=o,be([P.memoize],o.prototype,"cachePath",null),e.Win32UpdateService=o=be([X(0,E.ILifecycleMainService),X(1,v.IConfigurationService),X(2,I.ITelemetryService),X(3,d.IEnvironmentMainService),X(4,f.IRequestService),X(5,l.ILogService),X(6,y.IFileService),X(7,p.INativeHostMainService),X(8,c.IProductService)],o)}),define(Z[305],te([0,1,14,8,23,50,3,2,15,10,65,4,7,191,64,18,61,28,63,16,20,5,22,79,254,83,25,105,80,81,29,30,54,131,136,39,34,53,66,24]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M,C,A,T,F,z,oe,ee,ue,ae){"use strict";var de;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeWindow=void 0;var j;(function(B){B[B.NONE=0]="NONE",B[B.NAVIGATING=1]="NAVIGATING",B[B.READY=2]="READY"})(j||(j={}));let G=class extends P.Disposable{static{de=this}static{this.windowControlHeightStateStorageKey="windowControlHeight"}get id(){return this._id}get win(){return this._win}get lastFocusTime(){return this._lastFocusTime}get backupPath(){return this._config?.backupPath}get openedWorkspace(){return this._config?.workspace}get profile(){if(!this.config)return;const W=this.userDataProfilesService.profiles.find(U=>U.id===this.config?.profiles.profile.id);return this.isExtensionDevelopmentHost&&W?W:this.userDataProfilesService.getProfileForWorkspace(this.config.workspace??(0,C.toWorkspaceIdentifier)(this.backupPath,this.isExtensionDevelopmentHost))??this.userDataProfilesService.defaultProfile}get remoteAuthority(){return this._config?.remoteAuthority}get config(){return this._config}get isExtensionDevelopmentHost(){return!!this._config?.extensionDevelopmentPath}get isExtensionTestHost(){return!!this._config?.extensionTestsPath}get isExtensionDevelopmentTestFromCli(){return this.isExtensionDevelopmentHost&&this.isExtensionTestHost&&!this._config?.debugId}constructor(W,U,$,Y,se,ce,x,R,_,N,q,re,ne,le,V,ie,Q,fe,pe,Pe){super(),this.logService=U,this.loggerMainService=$,this.environmentMainService=Y,this.policyService=se,this.userDataProfilesService=ce,this.fileService=x,this.applicationStorageMainService=R,this.storageMainService=_,this.configurationService=N,this.themeMainService=q,this.workspacesManagementMainService=re,this.backupMainService=ne,this.telemetryService=le,this.dialogMainService=V,this.lifecycleMainService=ie,this.productService=Q,this.protocolMainService=fe,this.windowsMainService=pe,this.stateService=Pe,this._onWillLoad=this._register(new D.Emitter),this.onWillLoad=this._onWillLoad.event,this._onDidSignalReady=this._register(new D.Emitter),this.onDidSignalReady=this._onDidSignalReady.event,this._onDidTriggerSystemContextMenu=this._register(new D.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this._onDidClose=this._register(new D.Emitter),this.onDidClose=this._onDidClose.event,this._onDidDestroy=this._register(new D.Emitter),this.onDidDestroy=this._onDidDestroy.event,this._lastFocusTime=-1,this.transientIsNativeFullScreen=void 0,this.joinNativeFullScreenTransition=void 0,this.hasWindowControlOverlay=!1,this.whenReadyCallbacks=[],this.touchBarGroups=[],this.currentHttpProxy=void 0,this.currentNoProxy=void 0,this.configObjectUrl=this._register(this.protocolMainService.createIPCObjectUrl()),this.wasLoaded=!1,this.readyState=0;{const[De,We]=this.restoreWindowState(W.state);this.windowState=De,this.logService.trace("window#ctor: using window state",De);const ye=this.windowState.mode===0||this.windowState.mode===3,we=this.configurationService.getValue("window"),K={width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y,backgroundColor:this.themeMainService.getBackgroundColor(),minWidth:k.WindowMinimumSize.WIDTH,minHeight:k.WindowMinimumSize.HEIGHT,show:!ye,title:this.productService.nameLong,webPreferences:{preload:h.FileAccess.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath,additionalArguments:[`--vscode-window-config=${this.configObjectUrl.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,k.zoomLevelToZoomFactor)(we?.zoomLevel),autoplayPolicy:"user-gesture-required",enableBlinkFeatures:"HighlightAPI",nodeIntegration:!0,contextIsolation:!1},experimentalDarkMode:!0};g.isLinux?K.icon=(0,u.join)(this.environmentMainService.appRoot,"resources/linux/code.png"):g.isWindows&&!this.environmentMainService.isBuilt&&(K.icon=(0,u.join)(this.environmentMainService.appRoot,"resources/win32/code_150x150.png")),g.isMacintosh&&!this.useNativeFullScreen()&&(K.fullscreenable=!1),g.isMacintosh&&(K.acceptFirstMouse=!0,we?.clickThroughInactive===!1&&(K.acceptFirstMouse=!1));const he=g.isMacintosh&&we?.nativeTabs===!0;he&&(K.tabbingIdentifier=this.productService.nameShort);const me=(0,k.getTitleBarStyle)(this.configurationService)==="custom";if(me&&(K.titleBarStyle="hidden",g.isMacintosh||(K.frame=!1),(0,k.useWindowControlsOverlay)(this.configurationService))){const Ie=this.themeMainService.getWindowSplash()?.colorInfo.titleBarBackground??this.themeMainService.getBackgroundColor(),Le=F.Color.fromHex(Ie).isDarker()?"#FFFFFF":"#000000";K.titleBarOverlay={height:29,color:Ie,symbolColor:Le},this.hasWindowControlOverlay=!0}if((0,m.mark)("code/willCreateCodeBrowserWindow"),this._win=new b.BrowserWindow(K),(0,m.mark)("code/didCreateCodeBrowserWindow"),this._id=this._win.id,g.isMacintosh&&me&&this._win.setSheetOffset(22),me&&(g.isWindows&&(0,k.useWindowControlsOverlay)(this.configurationService)||g.isMacintosh)){const Ie=this.stateService.getItem(de.windowControlHeightStateStorageKey);Ie&&this.updateWindowControls({height:Ie})}g.isWindows&&me&&this._win.hookWindowMessage(278,()=>{const[Le,Fe]=this._win.getPosition(),Oe=b.screen.getCursorScreenPoint(),qe=Oe.x-Le,Ne=Oe.y-Fe;return(()=>!(qe>30&&Ne>=0&&Ne<=Math.max(this._win.getBounds().height*.15,35)))()||(this._win.setEnabled(!1),this._win.setEnabled(!0),this._onDidTriggerSystemContextMenu.fire({x:qe,y:Ne})),0}),(g.isMacintosh||g.isWindows)&&We&&(!he||b.BrowserWindow.getAllWindows().length===1)&&[this.windowState.width,this.windowState.height,this.windowState.x,this.windowState.y].every(Ie=>typeof Ie=="number")&&this._win.setBounds({width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y}),ye&&((0,m.mark)("code/willMaximizeCodeWindow"),this._win.maximize(),this.windowState.mode===3&&this.setFullScreen(!0),this._win.show(),(0,m.mark)("code/didMaximizeCodeWindow")),this._lastFocusTime=Date.now()}this.environmentMainService.args["open-devtools"]===!0&&this._win.webContents.openDevTools(),this.onConfigurationUpdated(),this.createTouchBar(),this.registerListeners()}setRepresentedFilename(W){g.isMacintosh?this._win.setRepresentedFilename(W):this.representedFilename=W}getRepresentedFilename(){return g.isMacintosh?this._win.getRepresentedFilename():this.representedFilename}setDocumentEdited(W){g.isMacintosh&&this._win.setDocumentEdited(W),this.documentEdited=W}isDocumentEdited(){return g.isMacintosh?this._win.isDocumentEdited():!!this.documentEdited}focus(W){g.isMacintosh&&W?.force&&b.app.focus({steal:!0}),this._win&&(this._win.isMinimized()&&this._win.restore(),this._win.focus())}setReady(){for(this.logService.trace(`window#load: window reported ready (id: ${this._id})`),this.readyState=2;this.whenReadyCallbacks.length;)this.whenReadyCallbacks.pop()(this);this._onDidSignalReady.fire()}ready(){return new Promise(W=>{if(this.isReady)return W(this);this.whenReadyCallbacks.push(W)})}get isReady(){return this.readyState===2}get whenClosedOrLoaded(){return new Promise(W=>{function U(){$.dispose(),Y.dispose(),W()}const $=this.onDidClose(()=>U()),Y=this.onWillLoad(()=>U())})}registerListeners(){this._win.on("unresponsive",()=>this.onWindowError(1)),this._win.webContents.on("render-process-gone",(U,$)=>this.onWindowError(2,{...$})),this._win.webContents.on("did-fail-load",(U,$,Y)=>this.onWindowError(3,{reason:Y,exitCode:$})),this._win.webContents.on("will-prevent-unload",U=>{U.preventDefault()}),this._win.on("closed",()=>{this._onDidClose.fire(),this.dispose()}),this._win.webContents.on("did-finish-load",()=>{this.pendingLoadConfig&&(this._config=this.pendingLoadConfig,this.pendingLoadConfig=void 0)}),this._win.on("focus",()=>{this._lastFocusTime=Date.now()}),this._win.on("maximize",U=>{this._config&&(this._config.maximized=!0),b.app.emit("browser-window-maximize",U,this._win)}),this._win.on("unmaximize",U=>{this._config&&(this._config.maximized=!1),b.app.emit("browser-window-unmaximize",U,this._win)}),this._win.on("enter-full-screen",()=>{this.sendWhenReady("vscode:enterFullScreen",r.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._win.on("leave-full-screen",()=>{this.sendWhenReady("vscode:leaveFullScreen",r.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._register(this.configurationService.onDidChangeConfiguration(U=>this.onConfigurationUpdated(U))),this._register(this.workspacesManagementMainService.onDidDeleteUntitledWorkspace(U=>this.onDidDeleteUntitledWorkspace(U)));const W=["https://marketplace.visualstudio.com/*","https://*.vsassets.io/*"];this._win.webContents.session.webRequest.onBeforeSendHeaders({urls:W},async(U,$)=>{const Y=await this.getMarketplaceHeaders();$({cancel:!1,requestHeaders:Object.assign(U.requestHeaders,Y)})})}getMarketplaceHeaders(){return this.marketplaceHeadersPromise||(this.marketplaceHeadersPromise=(0,s.resolveMarketplaceHeaders)(this.productService.version,this.productService,this.environmentMainService,this.configurationService,this.fileService,this.applicationStorageMainService,this.telemetryService)),this.marketplaceHeadersPromise}async onWindowError(W,U){switch(W){case 2:this.logService.error(`CodeWindow: renderer process gone (reason: ${U?.reason||"<unknown>"}, code: ${U?.exitCode||"<unknown>"})`);break;case 1:this.logService.error("CodeWindow: detected unresponsive");break;case 3:this.logService.error(`CodeWindow: failed to load (reason: ${U?.reason||"<unknown>"}, code: ${U?.exitCode||"<unknown>"})`);break}switch(this.telemetryService.publicLog2("windowerror",{type:W,reason:U?.reason,code:U?.exitCode}),W){case 1:case 2:if(this.isExtensionDevelopmentTestFromCli){this.lifecycleMainService.kill(1);return}if(this.environmentMainService.args["enable-smoke-test-driver"]){await this.destroyWindow(!1,!1),this.lifecycleMainService.quit();return}if(W===1){if(this.isExtensionDevelopmentHost||this.isExtensionTestHost||this._win&&this._win.webContents&&this._win.webContents.isDevToolsOpened())return;const{response:$,checkboxChecked:Y}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[(0,d.localize)(0,null),(0,d.localize)(1,null),(0,d.localize)(2,null)],message:(0,d.localize)(3,null),detail:(0,d.localize)(4,null),checkboxLabel:this._config?.workspace?(0,d.localize)(5,null):void 0},this._win);if($!==2){const se=$===0;await this.destroyWindow(se,Y)}}else if(W===2){let $;U?$=(0,d.localize)(7,null,U.reason,U.exitCode??"<unknown>"):$=(0,d.localize)(6,null);const{response:Y,checkboxChecked:se}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[this._config?.workspace?(0,d.localize)(8,null):(0,d.localize)(9,null),(0,d.localize)(10,null)],message:$,detail:this._config?.workspace?(0,d.localize)(11,null):(0,d.localize)(12,null),checkboxLabel:this._config?.workspace?(0,d.localize)(13,null):void 0},this._win),ce=Y===0;await this.destroyWindow(ce,se)}break}}async destroyWindow(W,U){const $=this._config?.workspace;if(U&&$)try{const Y=this.storageMainService.workspaceStorage($);await Y.init(),Y.delete("memento/workbench.parts.editor"),await Y.close()}catch(Y){this.logService.error(Y)}if(this._onDidDestroy.fire(),this._win?.destroy(),W&&this._config){let Y,se;(0,C.isSingleFolderWorkspaceIdentifier)($)?Y={folderUri:$.uri}:(0,C.isWorkspaceIdentifier)($)?Y={workspaceUri:$.configPath}:se=!0,(0,ae.firstOrDefault)(await this.windowsMainService.open({context:5,userEnv:this._config.userEnv,cli:{...this.environmentMainService.args,_:[]},urisToOpen:Y?[Y]:void 0,forceEmpty:se,forceNewWindow:!0,remoteAuthority:this.remoteAuthority}))?.focus()}}onDidDeleteUntitledWorkspace(W){this._config?.workspace?.id===W.id&&(this._config.workspace=void 0)}onConfigurationUpdated(W){if(!W||W.affectsConfiguration("window.menuBarVisibility")){const U=this.getMenuBarVisibility();U!==this.currentMenuBarVisibility&&(this.currentMenuBarVisibility=U,this.setMenuBarVisibility(U))}if(!W||W.affectsConfiguration("http.proxy")){let U=(this.configurationService.getValue("http.proxy")||"").trim()||(process.env.https_proxy||process.env.HTTPS_PROXY||process.env.http_proxy||process.env.HTTP_PROXY||"").trim()||void 0;U?.endsWith("/")&&(U=U.substr(0,U.length-1));const $=(process.env.no_proxy||process.env.NO_PROXY||"").trim()||void 0;if((U||"").indexOf("@")===-1&&(U!==this.currentHttpProxy||$!==this.currentNoProxy)){this.currentHttpProxy=U,this.currentNoProxy=$;const Y=U||"",se=$?`${$},<local>`:"<local>";this.logService.trace(`Setting proxy to '${Y}', bypassing '${se}'`),this._win.webContents.session.setProxy({proxyRules:Y,proxyBypassRules:se,pacScript:""}),typeof b.app.setProxy=="function"&&b.app.setProxy({proxyRules:Y,proxyBypassRules:se,pacScript:""})}}}addTabbedWindow(W){g.isMacintosh&&W.win&&this._win.addTabbedWindow(W.win)}load(W,U=Object.create(null)){this.logService.trace(`window#load: attempt to load window (id: ${this._id})`),this.isDocumentEdited()&&(!U.isReload||!this.backupMainService.isHotExitEnabled())&&this.setDocumentEdited(!1),U.isReload||(this.getRepresentedFilename()&&this.setRepresentedFilename(""),this._win.setTitle(this.productService.nameLong)),this.updateConfiguration(W,U),this.readyState===0?this._config=W:this.pendingLoadConfig=W,this.readyState=1,this._win.loadURL(h.FileAccess.asBrowserUri(`vs/code/electron-sandbox/workbench/workbench${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0));const $=this.wasLoaded;this.wasLoaded=!0,!this.environmentMainService.isBuilt&&!this.environmentMainService.extensionTestsLocationURI&&this._register(new L.RunOnceScheduler(()=>{this._win&&!this._win.isVisible()&&!this._win.isMinimized()&&(this._win.show(),this.focus({force:!0}),this._win.webContents.openDevTools())},1e4)).schedule(),this._onWillLoad.fire({workspace:W.workspace,reason:U.isReload?3:$?2:1})}updateConfiguration(W,U){const $=(this._config??this.pendingLoadConfig)?.userEnv;if($){const Y=(0,c.isLaunchedFromCli)($)&&!(0,c.isLaunchedFromCli)(W.userEnv),se=this.isExtensionDevelopmentHost;(Y||se)&&(W.userEnv={...$,...W.userEnv})}process.env.CHROME_CRASHPAD_PIPE_NAME&&Object.assign(W.userEnv,{CHROME_CRASHPAD_PIPE_NAME:process.env.CHROME_CRASHPAD_PIPE_NAME}),U.disableExtensions!==void 0&&(W["disable-extensions"]=U.disableExtensions),W.fullscreen=this.isFullScreen,W.maximized=this._win.isMaximized(),W.partsSplash=this.themeMainService.getWindowSplash(),(0,m.mark)("code/willOpenNewWindow"),W.perfMarks=(0,m.getMarks)(),this.configObjectUrl.update(W)}async reload(W){const U=Object.assign({},this._config);U.workspace=await this.validateWorkspaceBeforeReload(U),delete U.filesToOpenOrCreate,delete U.filesToDiff,delete U.filesToMerge,delete U.filesToWait,this.isExtensionDevelopmentHost&&W&&(U.verbose=W.verbose,U.debugId=W.debugId,U.extensionEnvironment=W.extensionEnvironment,U["inspect-extensions"]=W["inspect-extensions"],U["inspect-brk-extensions"]=W["inspect-brk-extensions"],U["extensions-dir"]=W["extensions-dir"]),U.accessibilitySupport=b.app.isAccessibilitySupportEnabled(),U.isInitialStartup=!1,U.policiesData=this.policyService.serialize(),U.continueOn=this.environmentMainService.continueOn,U.profiles={all:this.userDataProfilesService.profiles,profile:this.profile||this.userDataProfilesService.defaultProfile,home:this.userDataProfilesService.profilesHome},U.logLevel=this.loggerMainService.getLogLevel(),U.loggers={window:this.loggerMainService.getRegisteredLoggers(this.id),global:this.loggerMainService.getRegisteredLoggers()},this.load(U,{isReload:!0,disableExtensions:W?.["disable-extensions"]})}async validateWorkspaceBeforeReload(W){if((0,C.isWorkspaceIdentifier)(W.workspace)){const U=W.workspace.configPath;if(U.scheme===h.Schemas.file&&!await this.fileService.exists(U))return}else if((0,C.isSingleFolderWorkspaceIdentifier)(W.workspace)){const U=W.workspace.uri;if(U.scheme===h.Schemas.file&&!await this.fileService.exists(U))return}return W.workspace}serializeWindowState(){if(!this._win)return(0,T.defaultWindowState)();if(this.isFullScreen){let $;try{$=b.screen.getDisplayMatching(this.getBounds())}catch{}const Y=(0,T.defaultWindowState)();return{mode:3,display:$?$.id:void 0,width:this.windowState.width||Y.width,height:this.windowState.height||Y.height,x:this.windowState.x||0,y:this.windowState.y||0}}const W=Object.create(null);let U;if(!g.isMacintosh&&this._win.isMaximized()?U=0:U=1,U===0?W.mode=0:W.mode=1,U===1||U===0){let $;U===1?$=this.getBounds():$=this._win.getNormalBounds(),W.x=$.x,W.y=$.y,W.width=$.width,W.height=$.height}return W}updateWindowControls(W){if(W.height&&this.stateService.setItem(de.windowControlHeightStateStorageKey,W.height),g.isWindows&&this.hasWindowControlOverlay)this._win.setTitleBarOverlay({color:W.backgroundColor?.trim()===""?void 0:W.backgroundColor,symbolColor:W.foregroundColor?.trim()===""?void 0:W.foregroundColor,height:W.height?W.height-1:void 0});else if(g.isMacintosh&&W.height!==void 0){const U=(W.height-15)/2;U?this._win.setWindowButtonPosition({x:U,y:U}):this._win.setWindowButtonPosition(null)}}restoreWindowState(W){(0,m.mark)("code/willRestoreCodeWindowState");let U=!1;if(W)try{const $=b.screen.getAllDisplays();U=$.length>1,W=this.validateWindowState(W,$)}catch($){this.logService.warn(`Unexpected error validating window state: ${$}
${$.stack}`)}return(0,m.mark)("code/didRestoreCodeWindowState"),[W||(0,T.defaultWindowState)(),U]}validateWindowState(W,U){if(this.logService.trace(`window#validateWindowState: validating window state on ${U.length} display(s)`,W),typeof W.x!="number"||typeof W.y!="number"||typeof W.width!="number"||typeof W.height!="number"){this.logService.trace("window#validateWindowState: unexpected type of state values");return}if(W.width<=0||W.height<=0){this.logService.trace("window#validateWindowState: unexpected negative values");return}if(U.length===1){const se=this.getWorkingArea(U[0]);if(se){let ce=function(){!W||typeof W.x!="number"||typeof W.y!="number"||!se||(W.x<se.x&&(W.x=se.x),W.y<se.y&&(W.y=se.y))};this.logService.trace("window#validateWindowState: 1 monitor working area",se),ce(),W.width>se.width&&(W.width=se.width),W.height>se.height&&(W.height=se.height),W.x>se.x+se.width-128&&(W.x=se.x+se.width-W.width),W.y>se.y+se.height-128&&(W.y=se.y+se.height-W.height),ce()}return W}if(W.display&&W.mode===3){const se=U.find(ce=>ce.id===W.display);if(se&&typeof se.bounds?.x=="number"&&typeof se.bounds?.y=="number"){this.logService.trace("window#validateWindowState: restoring fullscreen to previous display");const ce=(0,T.defaultWindowState)(3);return ce.x=se.bounds.x,ce.y=se.bounds.y,ce}}let $,Y;try{$=b.screen.getDisplayMatching({x:W.x,y:W.y,width:W.width,height:W.height}),Y=this.getWorkingArea($)}catch{}if($&&Y&&W.x+W.width>Y.x&&W.y+W.height>Y.y&&W.x<Y.x+Y.width&&W.y<Y.y+Y.height)return this.logService.trace("window#validateWindowState: multi-monitor working area",Y),W}getWorkingArea(W){if(W.workArea.width>0&&W.workArea.height>0)return W.workArea;if(W.bounds.width>0&&W.bounds.height>0)return W.bounds}getBounds(){const[W,U]=this._win.getPosition(),[$,Y]=this._win.getSize();return{x:W,y:U,width:$,height:Y}}toggleFullScreen(){this.setFullScreen(!this.isFullScreen)}setFullScreen(W){this.useNativeFullScreen()?this.setNativeFullScreen(W):this.setSimpleFullScreen(W),this.sendWhenReady(W?"vscode:enterFullScreen":"vscode:leaveFullScreen",r.CancellationToken.None),this.currentMenuBarVisibility&&this.setMenuBarVisibility(this.currentMenuBarVisibility,!1)}get isFullScreen(){return g.isMacintosh&&typeof this.transientIsNativeFullScreen=="boolean"?this.transientIsNativeFullScreen:this._win.isFullScreen()||this._win.isSimpleFullScreen()}setNativeFullScreen(W){this._win.isSimpleFullScreen()&&this._win.setSimpleFullScreen(!1),this.doSetNativeFullScreen(W)}doSetNativeFullScreen(W){g.isMacintosh&&(this.transientIsNativeFullScreen=W,this.joinNativeFullScreenTransition=new L.DeferredPromise,Promise.race([this.joinNativeFullScreenTransition.p,(0,L.timeout)(1e3)]).finally(()=>this.transientIsNativeFullScreen=void 0)),this._win.setFullScreen(W)}setSimpleFullScreen(W){this._win.isFullScreen()&&this.doSetNativeFullScreen(!1),this._win.setSimpleFullScreen(W),this._win.webContents.focus()}useNativeFullScreen(){const W=this.configurationService.getValue("window");return!W||typeof W.nativeFullScreen!="boolean"||W.nativeTabs?!0:W.nativeFullScreen!==!1}isMinimized(){return this._win.isMinimized()}getMenuBarVisibility(){let W=(0,k.getMenuBarVisibility)(this.configurationService);return["visible","toggle","hidden"].indexOf(W)<0&&(W="classic"),W}setMenuBarVisibility(W,U=!0){g.isMacintosh||(W==="toggle"&&U&&this.send("vscode:showInfoMessage",(0,d.localize)(14,null)),W==="hidden"?setTimeout(()=>{this.doSetMenuBarVisibility(W)}):this.doSetMenuBarVisibility(W))}doSetMenuBarVisibility(W){const U=this.isFullScreen;switch(W){case"classic":this._win.setMenuBarVisibility(!U),this._win.autoHideMenuBar=U;break;case"visible":this._win.setMenuBarVisibility(!0),this._win.autoHideMenuBar=!1;break;case"toggle":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!0;break;case"hidden":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!1;break}}handleTitleDoubleClick(){if(g.isMacintosh)switch(b.systemPreferences.getUserDefault("AppleActionOnDoubleClick","string")){case"Minimize":this._win.minimize();break;case"None":break;case"Maximize":default:this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}else this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}close(){this._win?.close()}sendWhenReady(W,U,...$){this.isReady?this.send(W,...$):this.ready().then(()=>{U.isCancellationRequested||this.send(W,...$)})}send(W,...U){if(this._win){if(this._win.isDestroyed()||this._win.webContents.isDestroyed()){this.logService.warn(`Sending IPC message to channel '${W}' for window that is destroyed`);return}try{this._win.webContents.send(W,...U)}catch($){this.logService.warn(`Error sending IPC message to channel '${W}' of window ${this._id}: ${(0,O.toErrorMessage)($)}`)}}}updateTouchBar(W){g.isMacintosh&&this.touchBarGroups.forEach((U,$)=>{const Y=W[$];U.segments=this.createTouchBarGroupSegments(Y)})}createTouchBar(){if(g.isMacintosh){for(let W=0;W<10;W++){const U=this.createTouchBarGroup();this.touchBarGroups.push(U)}this._win.setTouchBar(new b.TouchBar({items:this.touchBarGroups}))}}createTouchBarGroup(W=[]){const U=this.createTouchBarGroupSegments(W),$=new b.TouchBar.TouchBarSegmentedControl({segments:U,mode:"buttons",segmentStyle:"automatic",change:Y=>{this.sendWhenReady("vscode:runAction",r.CancellationToken.None,{id:$.segments[Y].id,from:"touchbar"})}});return $}createTouchBarGroupSegments(W=[]){return W.map($=>{let Y;$.icon&&!o.ThemeIcon.isThemeIcon($.icon)&&$.icon?.dark?.scheme===h.Schemas.file&&(Y=b.nativeImage.createFromPath(v.URI.revive($.icon.dark).fsPath),Y.isEmpty()&&(Y=void 0));let se;return typeof $.title=="string"?se=$.title:se=$.title.value,{id:$.id,label:Y?void 0:se,icon:Y}})}dispose(){super.dispose(),this.loggerMainService.deregisterLoggers(this.id),this._win=null}};e.CodeWindow=G,e.CodeWindow=G=de=be([X(1,w.ILogService),X(2,ue.ILoggerMainService),X(3,p.IEnvironmentMainService),X(4,z.IPolicyService),X(5,ee.IUserDataProfilesMainService),X(6,f.IFileService),X(7,i.IApplicationStorageMainService),X(8,i.IStorageMainService),X(9,E.IConfigurationService),X(10,S.IThemeMainService),X(11,A.IWorkspacesManagementMainService),X(12,y.IBackupMainService),X(13,n.ITelemetryService),X(14,l.IDialogMainService),X(15,I.ILifecycleMainService),X(16,t.IProductService),X(17,a.IProtocolMainService),X(18,M.IWindowsMainService),X(19,oe.IStateService)],G)}),define(Z[84],te([0,1,14,24,8,3,46,2,15,4,19,7,21,194,6,20,5,83,100,30,54,35]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesHistoryMainService=e.IWorkspacesHistoryMainService=void 0,e.IWorkspacesHistoryMainService=(0,y.createDecorator)("workspacesHistoryMainService");let a=class extends P.Disposable{static{t=this}static{this.MAX_TOTAL_RECENT_ENTRIES=500}static{this.RECENTLY_OPENED_STORAGE_KEY="history.recentlyOpenedPathsList"}constructor(i,n,o,S){super(),this.logService=i,this.workspacesManagementMainService=n,this.lifecycleMainService=o,this.applicationStorageMainService=S,this._onDidChangeRecentlyOpened=this._register(new O.Emitter),this.onDidChangeRecentlyOpened=this._onDidChangeRecentlyOpened.event,this.macOSRecentDocumentsUpdater=this._register(new r.ThrottledDelayer(800)),this.registerListeners()}registerListeners(){this.lifecycleMainService.when(4).then(()=>this.handleWindowsJumpList()),this._register(this.workspacesManagementMainService.onDidEnterWorkspace(i=>this.addRecentlyOpened([{workspace:i.workspace,remoteAuthority:i.window.remoteAuthority}])))}async addRecentlyOpened(i){let n=[],o=[];for(const k of i)if((0,c.isRecentWorkspace)(k))!this.workspacesManagementMainService.isUntitledWorkspace(k.workspace)&&!this.containsWorkspace(n,k.workspace)&&n.push(k);else if((0,c.isRecentFolder)(k))this.containsFolder(n,k.folderUri)||n.push(k);else{const M=this.containsFile(o,k.fileUri),C=k.fileUri.scheme===h.Schemas.file&&t.COMMON_FILES_FILTER.indexOf((0,m.basename)(k.fileUri))>=0;!M&&!C&&(o.push(k),u.isWindows&&k.fileUri.scheme===h.Schemas.file&&b.app.addRecentDocument(k.fileUri.fsPath))}const S=await this.mergeEntriesFromStorage({workspaces:n,files:o});n=S.workspaces,o=S.files,n.length>t.MAX_TOTAL_RECENT_ENTRIES&&(n.length=t.MAX_TOTAL_RECENT_ENTRIES),o.length>t.MAX_TOTAL_RECENT_ENTRIES&&(o.length=t.MAX_TOTAL_RECENT_ENTRIES),await this.saveRecentlyOpened({workspaces:n,files:o}),this._onDidChangeRecentlyOpened.fire(),u.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments())}async removeRecentlyOpened(i){const n=M=>{const C=this.location(M);for(const A of i)if(m.extUriBiasedIgnorePathCase.isEqual(A,C))return!1;return!0},o=await this.getRecentlyOpened(),S=o.workspaces.filter(n),k=o.files.filter(n);(S.length!==o.workspaces.length||k.length!==o.files.length)&&(await this.saveRecentlyOpened({files:k,workspaces:S}),this._onDidChangeRecentlyOpened.fire(),u.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments()))}async clearRecentlyOpened(){await this.saveRecentlyOpened({workspaces:[],files:[]}),b.app.clearRecentDocuments(),this._onDidChangeRecentlyOpened.fire()}async getRecentlyOpened(){return this.mergeEntriesFromStorage()}async mergeEntriesFromStorage(i){const n=new w.ResourceMap(k=>m.extUriBiasedIgnorePathCase.getComparisonKey(k));if(i?.workspaces)for(const k of i.workspaces)n.set(this.location(k),k);const o=new w.ResourceMap(k=>m.extUriBiasedIgnorePathCase.getComparisonKey(k));if(i?.files)for(const k of i.files)o.set(this.location(k),k);const S=await this.getRecentlyOpenedFromStorage();for(const k of S.workspaces){const M=n.get(this.location(k));M?M.label=M.label??k.label:n.set(this.location(k),k)}for(const k of S.files){const M=o.get(this.location(k));M?M.label=M.label??k.label:o.set(this.location(k),k)}return{workspaces:[...n.values()],files:[...o.values()]}}async getRecentlyOpenedFromStorage(){await this.applicationStorageMainService.whenReady;let i;const n=this.applicationStorageMainService.get(t.RECENTLY_OPENED_STORAGE_KEY,-1);if(typeof n=="string")try{i=JSON.parse(n)}catch(o){this.logService.error("Unexpected error parsing opened paths list",o)}return(0,c.restoreRecentlyOpened)(i,this.logService)}async saveRecentlyOpened(i){await this.applicationStorageMainService.whenReady,this.applicationStorageMainService.store(t.RECENTLY_OPENED_STORAGE_KEY,JSON.stringify((0,c.toStoreData)(i)),-1,1)}location(i){return(0,c.isRecentFolder)(i)?i.folderUri:(0,c.isRecentFile)(i)?i.fileUri:i.workspace.configPath}containsWorkspace(i,n){return!!i.find(o=>(0,c.isRecentWorkspace)(o)&&o.workspace.id===n.id)}containsFolder(i,n){return!!i.find(o=>(0,c.isRecentFolder)(o)&&m.extUriBiasedIgnorePathCase.isEqual(o.folderUri,n))}containsFile(i,n){return!!i.find(o=>m.extUriBiasedIgnorePathCase.isEqual(o.fileUri,n))}static{this.MAX_MACOS_DOCK_RECENT_WORKSPACES=7}static{this.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL=10}static{this.MAX_WINDOWS_JUMP_LIST_ENTRIES=7}static{this.COMMON_FILES_FILTER=["COMMIT_EDITMSG","MERGE_MSG"]}async handleWindowsJumpList(){u.isWindows&&(await this.updateWindowsJumpList(),this._register(this.onDidChangeRecentlyOpened(()=>this.updateWindowsJumpList())))}async updateWindowsJumpList(){if(!u.isWindows)return;const i=[];if(i.push({type:"tasks",items:[{type:"task",title:(0,d.localize)(0,null),description:(0,d.localize)(1,null),program:process.execPath,args:"-n",iconPath:process.execPath,iconIndex:0}]}),(await this.getRecentlyOpened()).workspaces.length>0){const n=[];for(const k of b.app.getJumpListSettings().removedItems){const M=k.args;if(M){const C=/^--(folder|file)-uri\s+"([^"]+)"$/.exec(M);C&&n.push(g.URI.parse(C[2]))}}await this.removeRecentlyOpened(n);let o=!1;const S=(0,L.coalesce)((await this.getRecentlyOpened()).workspaces.slice(0,t.MAX_WINDOWS_JUMP_LIST_ENTRIES).map(k=>{const M=(0,c.isRecentWorkspace)(k)?k.workspace:k.folderUri,{title:C,description:A}=this.getWindowsJumpListLabel(M,k.label);let T;return g.URI.isUri(M)?T=`--folder-uri "${M.toString()}"`:(o=!0,T=`--file-uri "${M.configPath.toString()}"`),{type:"task",title:C.substr(0,255),description:A.substr(0,255),program:process.execPath,args:T,iconPath:"explorer.exe",iconIndex:0}}));S.length>0&&i.push({type:"custom",name:o?(0,d.localize)(2,null):(0,d.localize)(3,null),items:S})}i.push({type:"recent"});try{const n=b.app.setJumpList(i);n&&n!=="ok"&&this.logService.warn(`updateWindowsJumpList#setJumpList unexpected result: ${n}`)}catch(n){this.logService.warn("updateWindowsJumpList#setJumpList",n)}}getWindowsJumpListLabel(i,n){if(n)return{title:(0,D.splitRecentLabel)(n).name,description:n};if(g.URI.isUri(i))return{title:(0,m.basename)(i),description:this.renderJumpListPathDescription(i)};if(this.workspacesManagementMainService.isUntitledWorkspace(i))return{title:(0,d.localize)(4,null),description:""};let o=(0,m.basename)(i.configPath);return o.endsWith(f.WORKSPACE_EXTENSION)&&(o=o.substr(0,o.length-f.WORKSPACE_EXTENSION.length-1)),{title:(0,d.localize)(5,null,o),description:this.renderJumpListPathDescription(i.configPath)}}renderJumpListPathDescription(i){return i.scheme==="file"?(0,D.normalizeDriveLetter)(i.fsPath):i.toString()}async updateMacOSRecentDocuments(){if(!u.isMacintosh)return;b.app.clearRecentDocuments();const i=await this.getRecentlyOpened(),n=[];let o=0;for(let k=0;k<i.workspaces.length&&o<t.MAX_MACOS_DOCK_RECENT_WORKSPACES;k++){const M=this.location(i.workspaces[k]);if(M.scheme===h.Schemas.file){const C=(0,m.originalFSPath)(M);await v.Promises.exists(C)&&(n.push(C),o++)}}const S=[];for(let k=0;k<i.files.length&&o<t.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL;k++){const M=this.location(i.files[k]);if(M.scheme===h.Schemas.file){const C=(0,m.originalFSPath)(M);if(t.COMMON_FILES_FILTER.includes((0,m.basename)(M))||n.includes(C))continue;await v.Promises.exists(C)&&(S.push(C),o++)}}S.reverse().forEach(k=>b.app.addRecentDocument(k)),n.reverse().forEach(k=>b.app.addRecentDocument(k))}};e.WorkspacesHistoryMainService=a,e.WorkspacesHistoryMainService=a=t=be([X(0,l.ILogService),X(1,I.IWorkspacesManagementMainService),X(2,E.ILifecycleMainService),X(3,p.IApplicationStorageMainService)],a)}),define(Z[306],te([0,1,14,8,23,46,4,7,182,18,28,20,5,232,68,22,34,25,48,81,29,84]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Menubar=void 0;const a="menu";let s=class{static{t=this}static{this.lastKnownMenubarStorageKey="lastKnownMenubarData"}constructor(o,S,k,M,C,A,T,F,z,oe,ee){this.updateService=o,this.configurationService=S,this.windowsMainService=k,this.environmentMainService=M,this.telemetryService=C,this.workspacesHistoryMainService=A,this.stateService=T,this.lifecycleMainService=F,this.logService=z,this.nativeHostMainService=oe,this.productService=ee,this.fallbackMenuHandlers=Object.create(null),this.menuUpdater=new L.RunOnceScheduler(()=>this.doUpdateMenu(),0),this.menuGC=new L.RunOnceScheduler(()=>{this.oldMenus=[]},1e4),this.menubarMenus=Object.create(null),this.keybindings=Object.create(null),(D.isMacintosh||(0,f.getTitleBarStyle)(this.configurationService)==="native")&&this.restoreCachedMenubarData(),this.addFallbackHandlers(),this.closedLastWindow=!1,this.noActiveWindow=!1,this.oldMenus=[],this.install(),this.registerListeners()}restoreCachedMenubarData(){const o=this.stateService.getItem(t.lastKnownMenubarStorageKey);o&&(o.menus&&(this.menubarMenus=o.menus),o.keybindings&&(this.keybindings=o.keybindings))}addFallbackHandlers(){this.fallbackMenuHandlers["workbench.action.files.newUntitledFile"]=(A,T,F)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:T?.id}),this.fallbackMenuHandlers["workbench.action.newWindow"]=(A,T,F)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:T?.id}),this.fallbackMenuHandlers["workbench.action.files.openFileFolder"]=(A,T,F)=>this.nativeHostMainService.pickFileFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.files.openFolder"]=(A,T,F)=>this.nativeHostMainService.pickFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.openWorkspace"]=(A,T,F)=>this.nativeHostMainService.pickWorkspaceAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.clearRecentFiles"]=()=>this.workspacesHistoryMainService.clearRecentlyOpened();const o=this.productService.youTubeUrl;o&&(this.fallbackMenuHandlers["workbench.action.openYouTubeUrl"]=()=>this.openUrl(o,"openYouTubeUrl"));const S=this.productService.requestFeatureUrl;S&&(this.fallbackMenuHandlers["workbench.action.openRequestFeatureUrl"]=()=>this.openUrl(S,"openUserVoiceUrl"));const k=this.productService.reportIssueUrl;k&&(this.fallbackMenuHandlers["workbench.action.openIssueReporter"]=()=>this.openUrl(k,"openReportIssues"));const M=this.productService.licenseUrl;M&&(this.fallbackMenuHandlers["workbench.action.openLicenseUrl"]=()=>{if(D.language){const A=M.indexOf("?")>0?"&":"?";this.openUrl(`${M}${A}lang=${D.language}`,"openLicenseUrl")}else this.openUrl(M,"openLicenseUrl")});const C=this.productService.privacyStatementUrl;C&&M&&(this.fallbackMenuHandlers["workbench.action.openPrivacyStatementUrl"]=()=>{this.openUrl(C,"openPrivacyStatement")})}registerListeners(){this.lifecycleMainService.onWillShutdown(()=>this.willShutdown=!0),this.windowsMainService.onDidChangeWindowsCount(o=>this.onDidChangeWindowsCount(o)),this.nativeHostMainService.onDidBlurWindow(()=>this.onDidChangeWindowFocus()),this.nativeHostMainService.onDidFocusWindow(()=>this.onDidChangeWindowFocus())}get currentEnableMenuBarMnemonics(){const o=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof o!="boolean"?!0:o}get currentEnableNativeTabs(){if(!D.isMacintosh)return!1;const o=this.configurationService.getValue("window.nativeTabs");return typeof o!="boolean"?!1:o}updateMenu(o,S){this.menubarMenus=o.menus,this.keybindings=o.keybindings,this.stateService.setItem(t.lastKnownMenubarStorageKey,o),this.scheduleUpdateMenu()}scheduleUpdateMenu(){this.menuUpdater.schedule()}doUpdateMenu(){this.willShutdown||setTimeout(()=>{this.willShutdown||this.install()},10)}onDidChangeWindowsCount(o){D.isMacintosh&&(o.oldCount===0&&o.newCount>0||o.oldCount>0&&o.newCount===0)&&(this.closedLastWindow=o.newCount===0,this.scheduleUpdateMenu())}onDidChangeWindowFocus(){D.isMacintosh&&(this.noActiveWindow=!b.BrowserWindow.getFocusedWindow(),this.scheduleUpdateMenu())}install(){const o=b.Menu.getApplicationMenu();if(o&&this.oldMenus.push(o),Object.keys(this.menubarMenus).length===0){b.Menu.setApplicationMenu(D.isMacintosh?new b.Menu:null);return}const S=new b.Menu;let k;if(D.isMacintosh){const C=new b.Menu;k=new b.MenuItem({label:this.productService.nameLong,submenu:C}),this.setMacApplicationMenu(C),S.append(k)}if(D.isMacintosh&&!this.appMenuInstalled){this.appMenuInstalled=!0;const C=new b.Menu;C.append(new b.MenuItem({label:this.mnemonicLabel(h.localize(0,null)),click:()=>this.windowsMainService.openEmptyWindow({context:1})})),b.app.dock.setMenu(C)}if(this.shouldDrawMenu("File")){const C=new b.Menu,A=new b.MenuItem({label:this.mnemonicLabel(h.localize(1,null)),submenu:C});this.setMenuById(C,"File"),S.append(A)}if(this.shouldDrawMenu("Edit")){const C=new b.Menu,A=new b.MenuItem({label:this.mnemonicLabel(h.localize(2,null)),submenu:C});this.setMenuById(C,"Edit"),S.append(A)}if(this.shouldDrawMenu("View")){const C=new b.Menu,A=new b.MenuItem({label:this.mnemonicLabel(h.localize(3,null)),submenu:C});this.setMenuById(C,"View"),S.append(A)}let M;if(this.shouldDrawMenu("Window")){const C=new b.Menu;M=new b.MenuItem({label:this.mnemonicLabel(h.localize(4,null)),submenu:C,role:"window"}),this.setMacWindowMenu(C)}if(M&&S.append(M),this.shouldDrawMenu("Help")){const C=new b.Menu,A=new b.MenuItem({label:this.mnemonicLabel(h.localize(5,null)),submenu:C,role:"help"});this.setMenuById(C,"Help"),S.append(A)}S.items&&S.items.length>0?b.Menu.setApplicationMenu(S):b.Menu.setApplicationMenu(null),this.menuGC.schedule()}setMacApplicationMenu(o){const S=this.createMenuItem(h.localize(6,null,this.productService.nameLong),"workbench.action.showAboutDialog"),k=this.getUpdateMenuItems();let M;if(this.shouldDrawMenu("Preferences")){const ue=new b.Menu;this.setMenuById(ue,"Preferences"),M=new b.MenuItem({label:this.mnemonicLabel(h.localize(7,null)),submenu:ue})}const C=new b.Menu,A=new b.MenuItem({label:h.localize(8,null),role:"services",submenu:C}),T=new b.MenuItem({label:h.localize(9,null,this.productService.nameLong),role:"hide",accelerator:"Command+H"}),F=new b.MenuItem({label:h.localize(10,null),role:"hideOthers",accelerator:"Command+Alt+H"}),z=new b.MenuItem({label:h.localize(11,null),role:"unhide"}),oe=new b.MenuItem(this.likeAction("workbench.action.quit",{label:h.localize(12,null,this.productService.nameLong),click:async(ue,ae,de)=>{const j=this.windowsMainService.getLastActiveWindow();(this.windowsMainService.getWindowCount()===0||b.BrowserWindow.getFocusedWindow()||j?.isMinimized())&&await this.confirmBeforeQuit(de)&&this.nativeHostMainService.quit(void 0)}})),ee=[S];ee.push(...k),M&&ee.push(i(),M),ee.push(i(),A,i(),T,F,z,i(),oe),ee.forEach(ue=>o.append(ue))}async confirmBeforeQuit(o){if(this.windowsMainService.getWindowCount()===0)return!0;const S=this.configurationService.getValue("window.confirmBeforeClose");if(S==="always"||S==="keyboardOnly"&&this.isKeyboardEvent(o)){const{response:k}=await this.nativeHostMainService.showMessageBox(this.windowsMainService.getFocusedWindow()?.id,{type:"question",buttons:[h.localize(13,null),h.localize(14,null)],message:h.localize(15,null)});return k===0}return!0}shouldDrawMenu(o){if(!D.isMacintosh&&(0,f.getTitleBarStyle)(this.configurationService)==="custom")return!1;switch(o){case"File":case"Help":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus&&!!this.menubarMenus[o];case"Window":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus;default:return this.windowsMainService.getWindowCount()>0&&!!this.menubarMenus&&!!this.menubarMenus[o]}}setMenu(o,S){S.forEach(k=>{if((0,d.isMenubarMenuItemSeparator)(k))o.append(i());else if((0,d.isMenubarMenuItemSubmenu)(k)){const M=new b.Menu,C=new b.MenuItem({label:this.mnemonicLabel(k.label),submenu:M});this.setMenu(M,k.submenu.items),o.append(C)}else(0,d.isMenubarMenuItemRecentAction)(k)?o.append(this.createOpenRecentMenuItem(k)):(0,d.isMenubarMenuItemAction)(k)&&(k.id==="workbench.action.showAboutDialog"&&this.insertCheckForUpdatesItems(o),D.isMacintosh?this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow?this.fallbackMenuHandlers[k.id]?o.append(new b.MenuItem(this.likeAction(k.id,{label:this.mnemonicLabel(k.label),click:this.fallbackMenuHandlers[k.id]}))):o.append(this.createMenuItem(k.label,k.id,!1,k.checked)):o.append(this.createMenuItem(k.label,k.id,k.enabled!==!1,!!k.checked)):o.append(this.createMenuItem(k.label,k.id,k.enabled!==!1,!!k.checked)))})}setMenuById(o,S){this.menubarMenus&&this.menubarMenus[S]&&this.setMenu(o,this.menubarMenus[S].items)}insertCheckForUpdatesItems(o){const S=this.getUpdateMenuItems();S.length&&(S.forEach(k=>o.append(k)),o.append(i()))}createOpenRecentMenuItem(o){const S=P.URI.revive(o.uri),k=o.id,M=k==="openRecentFile"?{fileUri:S}:k==="openRecentWorkspace"?{workspaceUri:S}:{folderUri:S};return new b.MenuItem(this.likeAction(k,{label:o.label,click:async(C,A,T)=>{const F=this.isOptionClick(T);(await this.windowsMainService.open({context:2,cli:this.environmentMainService.args,urisToOpen:[M],forceNewWindow:F,gotoLineMode:!1,remoteAuthority:o.remoteAuthority})).length>0||await this.workspacesHistoryMainService.removeRecentlyOpened([S])}},!1))}isOptionClick(o){return!!(o&&(!D.isMacintosh&&(o.ctrlKey||o.shiftKey)||D.isMacintosh&&(o.metaKey||o.altKey)))}isKeyboardEvent(o){return!!(o.triggeredByAccelerator||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)}createRoleMenuItem(o,S,k){const M={label:this.mnemonicLabel(o),role:k,enabled:!0};return new b.MenuItem(this.withKeybinding(S,M))}setMacWindowMenu(o){const S=new b.MenuItem({label:h.localize(16,null),role:"minimize",accelerator:"Command+M",enabled:this.windowsMainService.getWindowCount()>0}),k=new b.MenuItem({label:h.localize(17,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),M=new b.MenuItem({label:h.localize(18,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),C=this.createMenuItem(h.localize(19,null),"workbench.action.switchWindow"),A=[];this.currentEnableNativeTabs&&(A.push(i()),A.push(this.createMenuItem(h.localize(20,null),"workbench.action.newWindowTab")),A.push(this.createRoleMenuItem(h.localize(21,null),"workbench.action.showPreviousWindowTab","selectPreviousTab")),A.push(this.createRoleMenuItem(h.localize(22,null),"workbench.action.showNextWindowTab","selectNextTab")),A.push(this.createRoleMenuItem(h.localize(23,null),"workbench.action.moveWindowTabToNewWindow","moveTabToNewWindow")),A.push(this.createRoleMenuItem(h.localize(24,null),"workbench.action.mergeAllWindowTabs","mergeAllWindows"))),[S,k,i(),C,...A,i(),M].forEach(T=>o.append(T))}getUpdateMenuItems(){switch(this.updateService.state.type){case"idle":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(25,null)),click:()=>setTimeout(()=>{this.reportMenuActionTelemetry("CheckForUpdate"),this.updateService.checkForUpdates(!0)},0)})];case"checking for updates":return[new b.MenuItem({label:h.localize(26,null),enabled:!1})];case"available for download":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(27,null)),click:()=>{this.updateService.downloadUpdate()}})];case"downloading":return[new b.MenuItem({label:h.localize(28,null),enabled:!1})];case"downloaded":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(29,null)),click:()=>{this.reportMenuActionTelemetry("InstallUpdate"),this.updateService.applyUpdate()}})];case"updating":return[new b.MenuItem({label:h.localize(30,null),enabled:!1})];case"ready":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(31,null)),click:()=>{this.reportMenuActionTelemetry("RestartToUpdate"),this.updateService.quitAndInstall()}})];default:return[]}}createMenuItem(o,S,k,M){const C=this.mnemonicLabel(o),A=typeof S=="function"?S:(ee,ue,ae)=>{const de=ee?ee.userSettingsLabel:null;let j=S;Array.isArray(S)&&(j=this.isOptionClick(ae)?S[1]:S[0]),de&&ae.triggeredByAccelerator?this.runActionInRenderer({type:"keybinding",userSettingsLabel:de}):this.runActionInRenderer({type:"commandId",commandId:j})},T=typeof k=="boolean"?k:this.windowsMainService.getWindowCount()>0,F=typeof M=="boolean"?M:!1,z={label:C,click:A,enabled:T};F&&(z.type="checkbox",z.checked=F);let oe;return typeof S=="string"?oe=S:Array.isArray(S)&&(oe=S[0]),D.isMacintosh&&(oe==="editor.action.clipboardCutAction"?z.role="cut":oe==="editor.action.clipboardCopyAction"?z.role="copy":oe==="editor.action.clipboardPasteAction"&&(z.role="paste"),oe==="undo"?z.click=this.makeContextAwareClickHandler(A,{inDevTools:ee=>ee.undo(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("undo:")}):oe==="redo"?z.click=this.makeContextAwareClickHandler(A,{inDevTools:ee=>ee.redo(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("redo:")}):oe==="editor.action.selectAll"&&(z.click=this.makeContextAwareClickHandler(A,{inDevTools:ee=>ee.selectAll(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("selectAll:")}))),new b.MenuItem(this.withKeybinding(oe,z))}makeContextAwareClickHandler(o,S){return(k,M,C)=>{const A=b.BrowserWindow.getFocusedWindow();if(!A)return S.inNoWindow();if(A.webContents.isDevToolsFocused()&&A.webContents.devToolsWebContents)return S.inDevTools(A.webContents.devToolsWebContents);o(k,M||A,C)}}runActionInRenderer(o){let S=b.BrowserWindow.getFocusedWindow();if(!S){const M=this.windowsMainService.getLastActiveWindow();M?.isMinimized()&&(S=M.win)}const k=S?this.windowsMainService.getWindowById(S.id):void 0;if(k){if(this.logService.trace("menubar#runActionInRenderer",o),D.isMacintosh&&!this.environmentMainService.isBuilt&&!k.isReady&&(o.type==="commandId"&&o.commandId==="workbench.action.toggleDevTools"||o.type!=="commandId"&&o.userSettingsLabel==="alt+cmd+i"))return;if(o.type==="commandId"){const M={id:o.commandId,from:"menu"};k.sendWhenReady("vscode:runAction",r.CancellationToken.None,M)}else{const M={userSettingsLabel:o.userSettingsLabel};k.sendWhenReady("vscode:runKeybinding",r.CancellationToken.None,M)}}else this.logService.trace("menubar#runActionInRenderer: no active window found",o)}withKeybinding(o,S){const k=typeof o=="string"?this.keybindings[o]:void 0;if(k?.label){if(k.isNative!==!1)S.accelerator=k.label,S.userSettingsLabel=k.userSettingsLabel;else if(typeof S.label=="string"){const M=S.label.indexOf("[");M>=0?S.label=`${S.label.substr(0,M)} [${k.label}]`:S.label=`${S.label} [${k.label}]`}}else S.accelerator=void 0;return S}likeAction(o,S,k=!S.accelerator){k&&(S=this.withKeybinding(o,S));const M=S.click;return S.click=(C,A,T)=>{this.reportMenuActionTelemetry(o),M?.(C,A,T)},S}openUrl(o,S){this.nativeHostMainService.openExternal(void 0,o),this.reportMenuActionTelemetry(S)}reportMenuActionTelemetry(o){this.telemetryService.publicLog2("workbenchActionExecuted",{id:o,from:a})}mnemonicLabel(o){return(0,O.mnemonicMenuLabel)(o,!this.currentEnableMenuBarMnemonics)}};e.Menubar=s,e.Menubar=s=t=be([X(0,c.IUpdateService),X(1,u.IConfigurationService),X(2,I.IWindowsMainService),X(3,m.IEnvironmentMainService),X(4,p.ITelemetryService),X(5,w.IWorkspacesHistoryMainService),X(6,l.IStateService),X(7,g.ILifecycleMainService),X(8,v.ILogService),X(9,y.INativeHostMainService),X(10,E.IProductService)],s);function i(){return new b.MenuItem({type:"separator"})}}),define(Z[307],te([0,1,6,20,5,306]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenubarMainService=e.IMenubarMainService=void 0,e.IMenubarMainService=(0,b.createDecorator)("menubarMainService");let D=class{constructor(h,u,m){this.instantiationService=h,this.lifecycleMainService=u,this.logService=m,this.menubar=this.installMenuBarAfterWindowOpen()}async installMenuBarAfterWindowOpen(){return await this.lifecycleMainService.when(3),this.instantiationService.createInstance(O.Menubar)}async updateMenubar(h,u){this.logService.trace("menubarService#updateMenubar",h),(await this.menubar).updateMenu(u,h)}};e.MenubarMainService=D,e.MenubarMainService=D=be([X(0,b.IInstantiationService),X(1,L.ILifecycleMainService),X(2,r.ILogService)],D)}),define(Z[308],te([0,1,14,21,134,27,24,23,3,32,49,46,2,15,10,65,4,36,19,12,7,192,64,18,61,28,16,6,20,5,67,79,60,34,81,305,133,301,30,101,84,54,80,39,53,66]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M,C,A,T,F,z,oe,ee,ue,ae,de,j,G,B,W,U){"use strict";var $;Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsMainService=void 0;function Y(x){return(0,ue.isWorkspaceIdentifier)(x?.workspace)}function se(x){return(0,ue.isSingleFolderWorkspaceIdentifier)(x?.workspace)}let ce=class extends v.Disposable{static{$=this}static{this.WINDOWS=[]}constructor(R,_,N,q,re,ne,le,V,ie,Q,fe,pe,Pe,De,We,ye,we,K){super(),this.machineId=R,this.initialUserEnv=_,this.logService=N,this.loggerService=q,this.stateService=re,this.policyService=ne,this.environmentMainService=le,this.userDataProfilesMainService=V,this.lifecycleMainService=ie,this.backupMainService=Q,this.configurationService=fe,this.workspacesHistoryMainService=pe,this.workspacesManagementMainService=Pe,this.instantiationService=De,this.dialogMainService=We,this.fileService=ye,this.protocolMainService=we,this.themeMainService=K,this._onDidOpenWindow=this._register(new h.Emitter),this.onDidOpenWindow=this._onDidOpenWindow.event,this._onDidSignalReadyWindow=this._register(new h.Emitter),this.onDidSignalReadyWindow=this._onDidSignalReadyWindow.event,this._onDidDestroyWindow=this._register(new h.Emitter),this.onDidDestroyWindow=this._onDidDestroyWindow.event,this._onDidChangeWindowsCount=this._register(new h.Emitter),this.onDidChangeWindowsCount=this._onDidChangeWindowsCount.event,this._onDidTriggerSystemContextMenu=this._register(new h.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this.windowsStateHandler=this._register(new ee.WindowsStateHandler(this,this.stateService,this.lifecycleMainService,this.logService,this.configurationService)),this.registerListeners()}registerListeners(){this._register(this.workspacesManagementMainService.onDidEnterWorkspace(R=>this._onDidSignalReadyWindow.fire(R.window))),this._register(this.onDidSignalReadyWindow(R=>{if(R.config?.extensionDevelopmentPath||R.config?.extensionTestsPath){const _=new v.DisposableStore;if(_.add(h.Event.any(R.onDidClose,R.onDidDestroy)(()=>_.dispose())),R.config.extensionDevelopmentPath)for(const N of R.config.extensionDevelopmentPath)_.add(this.protocolMainService.addValidFileRoot(N));R.config.extensionTestsPath&&_.add(this.protocolMainService.addValidFileRoot(R.config.extensionTestsPath))}}))}openEmptyWindow(R,_){const N=this.environmentMainService.args,q=_?.remoteAuthority||void 0,re=!0,ne=_?.forceReuseWindow,le=!ne;return this.open({...R,cli:N,forceEmpty:re,forceNewWindow:le,forceReuseWindow:ne,remoteAuthority:q})}openExistingWindow(R,_){R.focus(),this.handleWaitMarkerFile(_,[R])}async open(R){this.logService.trace("windowsManager#open"),R.addMode&&(R.initialStartup||!this.getLastActiveWindow())&&(R.addMode=!1);const _=[],N=[],q=[],re=[],ne=[];let le,V=0;const ie=await this.getPathsToOpen(R);this.logService.trace("windowsManager#open pathsToOpen",ie);for(const De of ie)se(De)?R.addMode?_.push(De):N.push(De):Y(De)?q.push(De):De.fileUri?(le||(le={filesToOpenOrCreate:[],filesToDiff:[],filesToMerge:[],remoteAuthority:De.remoteAuthority}),le.filesToOpenOrCreate.push(De)):De.backupPath?ne.push({backupFolder:(0,y.basename)(De.backupPath),remoteAuthority:De.remoteAuthority}):V++;R.diffMode&&le&&le.filesToOpenOrCreate.length>=2&&(le.filesToDiff=le.filesToOpenOrCreate.slice(0,2),le.filesToOpenOrCreate=[]),R.mergeMode&&le&&le.filesToOpenOrCreate.length===4&&(le.filesToMerge=le.filesToOpenOrCreate.slice(0,4),le.filesToOpenOrCreate=[],le.filesToDiff=[]),le&&R.waitMarkerFileURI&&(le.filesToWait={paths:(0,D.coalesce)([...le.filesToDiff,le.filesToMerge[3],...le.filesToOpenOrCreate]),waitMarkerFileUri:R.waitMarkerFileURI}),R.initialStartup?(re.push(...this.workspacesManagementMainService.getUntitledWorkspaces()),q.push(...re),ne.push(...this.backupMainService.getEmptyWindowBackups())):ne.length=0;const{windows:Q,filesOpenedInWindow:fe}=await this.doOpen(R,q,N,ne,V,le,_);if(this.logService.trace(`windowsManager#open used window count ${Q.length} (workspacesToOpen: ${q.length}, foldersToOpen: ${N.length}, emptyToRestore: ${ne.length}, emptyToOpen: ${V})`),Q.length>1)if(fe)fe.focus();else{const De=this.windowsStateHandler.state.lastActiveWindow&&!R.forceEmpty&&!R.cli._.length&&!R.cli["file-uri"]&&!R.cli["folder-uri"]&&!(R.urisToOpen&&R.urisToOpen.length);let We=!0,ye=!0;if(De){const we=Q.filter(K=>this.windowsStateHandler.state.lastActiveWindow&&K.backupPath===this.windowsStateHandler.state.lastActiveWindow.backupPath);we.length&&(we[0].focus(),We=!1,ye=!1)}if(We)for(let we=Q.length-1;we>=0;we--){const K=Q[we];if(!(K.openedWorkspace&&re.some(he=>K.openedWorkspace&&he.workspace.id===K.openedWorkspace.id)||K.backupPath&&ne.some(he=>K.backupPath&&he.backupFolder===(0,y.basename)(K.backupPath)))){K.focus(),ye=!1;break}}ye&&Q[Q.length-1].focus()}const pe=le&&le.filesToDiff.length>0,Pe=le&&le.filesToMerge.length>0;if(!Q.some(De=>De.isExtensionDevelopmentHost)&&!pe&&!Pe&&!R.noRecentEntry){const De=[];for(const We of ie)Y(We)&&!We.transient?De.push({label:We.label,workspace:We.workspace,remoteAuthority:We.remoteAuthority}):se(We)?De.push({label:We.label,folderUri:We.workspace.uri,remoteAuthority:We.remoteAuthority}):We.fileUri&&De.push({label:We.label,fileUri:We.fileUri,remoteAuthority:We.remoteAuthority});this.workspacesHistoryMainService.addRecentlyOpened(De)}return this.handleWaitMarkerFile(R,Q),Q}handleWaitMarkerFile(R,_){const N=R.waitMarkerFileURI;R.context===0&&N&&_.length===1&&_[0]&&(async()=>{await _[0].whenClosedOrLoaded;try{await this.fileService.del(N)}catch{}})()}async doOpen(R,_,N,q,re,ne,le){const V=[];let ie;function Q(we,K){V.push(we),K&&(ie=we,ne=void 0)}let{openFolderInNewWindow:fe,openFilesInNewWindow:pe}=this.shouldOpenNewWindow(R);if(!R.initialStartup&&le.length>0){const we=le[0].remoteAuthority,K=this.getLastActiveWindowForAuthority(we);K&&Q(this.doAddFoldersToExistingWindow(K,le.map(he=>he.workspace.uri)))}const Pe=N.length+_.length+q.length;if(ne&&Pe===0){const we=ne.filesToOpenOrCreate[0]||ne.filesToDiff[0]||ne.filesToMerge[3],K=this.getWindows().filter(me=>ne&&(0,c.isEqualAuthority)(me.remoteAuthority,ne.remoteAuthority));let he;we?.fileUri&&!pe&&((R.context===4||R.context===0||R.context===1)&&(he=await(0,oe.findWindowOnFile)(K,we.fileUri,async me=>me.configPath.scheme===d.Schemas.file?this.workspacesManagementMainService.resolveLocalWorkspace(me.configPath):void 0)),he||(he=this.doGetLastActiveWindow(K))),he?(0,ue.isWorkspaceIdentifier)(he.openedWorkspace)?_.push({workspace:he.openedWorkspace,remoteAuthority:he.remoteAuthority}):(0,ue.isSingleFolderWorkspaceIdentifier)(he.openedWorkspace)?N.push({workspace:he.openedWorkspace,remoteAuthority:he.remoteAuthority}):Q(this.doOpenFilesInExistingWindow(R,he,ne),!0):Q(await this.openInBrowserWindow({userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,filesToOpen:ne,forceNewWindow:!0,remoteAuthority:ne.remoteAuthority,forceNewTabbedWindow:R.forceNewTabbedWindow,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile}),!0)}const De=(0,D.distinct)(_,we=>we.workspace.id);if(De.length>0){const we=(0,D.coalesce)(De.map(K=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),K.workspace.configPath)));if(we.length>0){const K=we[0],he=(0,c.isEqualAuthority)(ne?.remoteAuthority,K.remoteAuthority)?ne:void 0;Q(this.doOpenFilesInExistingWindow(R,K,he),!!he),fe=!0}for(const K of De){if(we.some(Ie=>Ie.openedWorkspace&&Ie.openedWorkspace.id===K.workspace.id))continue;const he=K.remoteAuthority,me=(0,c.isEqualAuthority)(ne?.remoteAuthority,he)?ne:void 0;Q(await this.doOpenFolderOrWorkspace(R,K,fe,me),!!me),fe=!0}}const We=(0,D.distinct)(N,we=>c.extUriBiasedIgnorePathCase.getComparisonKey(we.workspace.uri));if(We.length>0){const we=(0,D.coalesce)(We.map(K=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),K.workspace.uri)));if(we.length>0){const K=we[0],he=(0,c.isEqualAuthority)(ne?.remoteAuthority,K.remoteAuthority)?ne:void 0;Q(this.doOpenFilesInExistingWindow(R,K,he),!!he),fe=!0}for(const K of We){if(we.some(Ie=>(0,ue.isSingleFolderWorkspaceIdentifier)(Ie.openedWorkspace)&&c.extUriBiasedIgnorePathCase.isEqual(Ie.openedWorkspace.uri,K.workspace.uri)))continue;const he=K.remoteAuthority,me=(0,c.isEqualAuthority)(ne?.remoteAuthority,he)?ne:void 0;Q(await this.doOpenFolderOrWorkspace(R,K,fe,me),!!me),fe=!0}}const ye=(0,D.distinct)(q,we=>we.backupFolder);if(ye.length>0)for(const we of ye){const K=we.remoteAuthority,he=(0,c.isEqualAuthority)(ne?.remoteAuthority,K)?ne:void 0;Q(await this.doOpenEmpty(R,!0,K,he,we),!!he),fe=!0}if(V.length===0||ne){ne&&!re&&re++;const we=ne?ne.remoteAuthority:R.remoteAuthority;for(let K=0;K<re;K++)Q(await this.doOpenEmpty(R,fe,we,ne),!!ne),fe=!0}return{windows:(0,D.distinct)(V),filesOpenedInWindow:ie}}doOpenFilesInExistingWindow(R,_,N){this.logService.trace("windowsManager#doOpenFilesInExistingWindow",{filesToOpen:N}),_.focus();const q={filesToOpenOrCreate:N?.filesToOpenOrCreate,filesToDiff:N?.filesToDiff,filesToMerge:N?.filesToMerge,filesToWait:N?.filesToWait,termProgram:R?.userEnv?.TERM_PROGRAM};return _.sendWhenReady("vscode:openFiles",P.CancellationToken.None,q),_}doAddFoldersToExistingWindow(R,_){this.logService.trace("windowsManager#doAddFoldersToExistingWindow",{foldersToAdd:_}),R.focus();const N={foldersToAdd:_};return R.sendWhenReady("vscode:addFolders",P.CancellationToken.None,N),R}doOpenEmpty(R,_,N,q,re){this.logService.trace("windowsManager#doOpenEmpty",{restore:!!re,remoteAuthority:N,filesToOpen:q,forceNewWindow:_});let ne;return!_&&typeof R.contextWindowId=="number"&&(ne=this.getWindowById(R.contextWindowId)),this.openInBrowserWindow({userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,remoteAuthority:N,forceNewWindow:_,forceNewTabbedWindow:R.forceNewTabbedWindow,filesToOpen:q,windowToUse:ne,emptyWindowBackupInfo:re,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile})}doOpenFolderOrWorkspace(R,_,N,q,re){return this.logService.trace("windowsManager#doOpenFolderOrWorkspace",{folderOrWorkspace:_,filesToOpen:q}),!N&&!re&&typeof R.contextWindowId=="number"&&(re=this.getWindowById(R.contextWindowId)),this.openInBrowserWindow({workspace:_.workspace,userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,remoteAuthority:_.remoteAuthority,forceNewWindow:N,forceNewTabbedWindow:R.forceNewTabbedWindow,filesToOpen:q,windowToUse:re,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile})}async getPathsToOpen(R){let _,N=!1,q=!1;if(R.urisToOpen&&R.urisToOpen.length>0?(_=await this.doExtractPathsFromAPI(R),N=!0):R.forceEmpty?_=[Object.create(null)]:R.cli._.length||R.cli["folder-uri"]||R.cli["file-uri"]?(_=await this.doExtractPathsFromCLI(R.cli),_.length===0&&_.push(Object.create(null)),N=!0):(_=await this.doGetPathsFromLastSession(),_.length===0&&_.push(Object.create(null)),q=!0),!R.addMode&&N){const re=_.filter(ne=>se(ne));if(re.length>1){const ne=re[0].remoteAuthority;if(re.every(le=>(0,c.isEqualAuthority)(le.remoteAuthority,ne))){const le=await this.workspacesManagementMainService.createUntitledWorkspace(re.map(V=>({uri:V.workspace.uri})));_.push({workspace:le,remoteAuthority:ne}),_=_.filter(V=>!se(V))}}}if(R.initialStartup&&!q&&this.configurationService.getValue("window")?.restoreWindows==="preserve"){const re=await this.doGetPathsFromLastSession();_.unshift(...re.filter(ne=>Y(ne)||se(ne)||ne.backupPath))}return _}async doExtractPathsFromAPI(R){const _={gotoLineMode:R.gotoLineMode,remoteAuthority:R.remoteAuthority},N=await Promise.all((0,D.coalesce)(R.urisToOpen||[]).map(async q=>{const re=await this.resolveOpenable(q,_);if(re)return re.label=q.label,re;const ne=this.resourceFromOpenable(q);this.dialogMainService.showMessageBox({type:"info",buttons:[(0,w.localize)(0,null)],message:ne.scheme===d.Schemas.file?(0,w.localize)(1,null):(0,w.localize)(2,null),detail:ne.scheme===d.Schemas.file?(0,w.localize)(3,null,(0,g.getPathLabel)(ne,{os:l.OS,tildify:this.environmentMainService})):(0,w.localize)(4,null,ne.toString(!0))},b.BrowserWindow.getFocusedWindow()??void 0)}));return(0,D.coalesce)(N)}async doExtractPathsFromCLI(R){const _=[],N={ignoreFileNotFound:!0,gotoLineMode:R.goto,remoteAuthority:R.remote||void 0,forceOpenWorkspaceAsFile:R.diff&&R._.length===2||R.merge&&R._.length===4},q=R["folder-uri"];if(q){const le=await Promise.all(q.map(V=>{const ie=this.cliArgToUri(V);if(ie)return this.resolveOpenable({folderUri:ie},N)}));_.push(...(0,D.coalesce)(le))}const re=R["file-uri"];if(re){const le=await Promise.all(re.map(V=>{const ie=this.cliArgToUri(V);if(ie)return this.resolveOpenable((0,ue.hasWorkspaceFileExtension)(V)?{workspaceUri:ie}:{fileUri:ie},N)}));_.push(...(0,D.coalesce)(le))}const ne=await Promise.all(R._.map(le=>N.remoteAuthority?this.doResolveRemotePath(le,N):this.doResolveFilePath(le,N)));return _.push(...(0,D.coalesce)(ne)),_}cliArgToUri(R){try{const _=I.URI.parse(R);if(!_.scheme){this.logService.error(`Invalid URI input string, scheme missing: ${R}`);return}return _.path?_:_.with({path:"/"})}catch(_){this.logService.error(`Invalid URI input string: ${R}, ${_.message}`)}}async doGetPathsFromLastSession(){const R=this.getRestoreWindowsSetting();switch(R){case"none":return[];case"one":case"all":case"preserve":case"folders":{const _=[];R!=="one"&&_.push(...this.windowsStateHandler.state.openedWindows),this.windowsStateHandler.state.lastActiveWindow&&_.push(this.windowsStateHandler.state.lastActiveWindow);const N=await Promise.all(_.map(async q=>{if(q.workspace){const re=await this.resolveOpenable({workspaceUri:q.workspace.configPath},{remoteAuthority:q.remoteAuthority,rejectTransientWorkspaces:!0});if(Y(re))return re}else if(q.folderUri){const re=await this.resolveOpenable({folderUri:q.folderUri},{remoteAuthority:q.remoteAuthority});if(se(re))return re}else if(R!=="folders"&&q.backupPath)return{backupPath:q.backupPath,remoteAuthority:q.remoteAuthority}}));return(0,D.coalesce)(N)}}}getRestoreWindowsSetting(){let R;return this.lifecycleMainService.wasRestarted?R="all":(R=this.configurationService.getValue("window")?.restoreWindows||"all",["preserve","all","folders","one","none"].includes(R)||(R="all")),R}async resolveOpenable(R,_=Object.create(null)){const N=this.resourceFromOpenable(R);return N.scheme===d.Schemas.file?((0,F.isFileToOpen)(R)&&(_={..._,forceOpenWorkspaceAsFile:!0}),this.doResolveFilePath(N.fsPath,_)):this.doResolveRemoteOpenable(R,_)}doResolveRemoteOpenable(R,_){let N=this.resourceFromOpenable(R);const q=(0,A.getRemoteAuthority)(N)||_.remoteAuthority;if(N=(0,c.removeTrailingPathSeparator)((0,c.normalizePath)(N)),(0,F.isFileToOpen)(R)){if(_.gotoLineMode){const{path:re,line:ne,column:le}=(0,u.parseLineAndColumnAware)(N.path);return{fileUri:N.with({path:re}),options:{selection:ne?{startLineNumber:ne,startColumn:le||1}:void 0},remoteAuthority:q}}return{fileUri:N,remoteAuthority:q}}else if((0,F.isWorkspaceToOpen)(R))return{workspace:(0,ae.getWorkspaceIdentifier)(N),remoteAuthority:q};return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(N),remoteAuthority:q}}resourceFromOpenable(R){return(0,F.isWorkspaceToOpen)(R)?R.workspaceUri:(0,F.isFolderToOpen)(R)?R.folderUri:R.fileUri}async doResolveFilePath(R,_,N){let q,re;_.gotoLineMode&&({path:R,line:q,column:re}=(0,u.parseLineAndColumnAware)(R)),R=(0,u.sanitizeFilePath)((0,y.normalize)(R),(0,p.cwd)());try{const ne=await L.Promises.stat(R);if(ne.isFile()){if(!_.forceOpenWorkspaceAsFile){const le=await this.workspacesManagementMainService.resolveLocalWorkspace(I.URI.file(R));if(le)return le.transient&&_.rejectTransientWorkspaces?void 0:{workspace:{id:le.id,configPath:le.configPath},type:n.FileType.File,exists:!0,remoteAuthority:le.remoteAuthority,transient:le.transient}}return{fileUri:I.URI.file(R),type:n.FileType.File,exists:!0,options:{selection:q?{startLineNumber:q,startColumn:re||1}:void 0}}}else{if(ne.isDirectory())return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(I.URI.file(R),ne),type:n.FileType.Directory,exists:!0};if(!l.isWindows&&R==="/dev/null")return{fileUri:I.URI.file(R),type:n.FileType.File,exists:!0}}}catch(ne){if(ne.code==="ERR_UNC_HOST_NOT_ALLOWED"&&!N)return this.onUNCHostNotAllowed(R,_);const le=I.URI.file(R);if(this.workspacesHistoryMainService.removeRecentlyOpened([le]),_.ignoreFileNotFound)return{fileUri:le,type:n.FileType.File,exists:!1}}}async onUNCHostNotAllowed(R,_){const N=I.URI.file(R),{response:q,checkboxChecked:re}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[(0,w.localize)(5,null),(0,w.localize)(6,null),(0,w.localize)(7,null)],message:(0,w.localize)(8,null,N.authority),detail:(0,w.localize)(9,null,(0,g.getPathLabel)(N,{os:l.OS,tildify:this.environmentMainService})),checkboxLabel:(0,w.localize)(10,null,N.authority),cancelId:1});if(q===0)return(0,r.addUNCHostToAllowlist)(N.authority),re&&this._register(h.Event.once(this.onDidOpenWindow)(ne=>{ne.sendWhenReady("vscode:configureAllowedUNCHost",P.CancellationToken.None,N.authority)})),this.doResolveFilePath(R,_,!0);if(q===2)return b.shell.openExternal("https://aka.ms/vscode-windows-unc"),this.onUNCHostNotAllowed(R,_)}doResolveRemotePath(R,_){const N=R.charCodeAt(0),q=_.remoteAuthority;let re,ne;_.gotoLineMode&&({path:R,line:re,column:ne}=(0,u.parseLineAndColumnAware)(R)),N!==47&&((0,u.isWindowsDriveLetter)(N)&&R.charCodeAt(R.charCodeAt(1))===58&&(R=(0,u.toSlashes)(R)),R=`/${R}`);const le=I.URI.from({scheme:d.Schemas.vscodeRemote,authority:q,path:R});if(R.charCodeAt(R.length-1)!==47){if((0,ue.hasWorkspaceFileExtension)(R))return _.forceOpenWorkspaceAsFile?{fileUri:le,options:{selection:re?{startLineNumber:re,startColumn:ne||1}:void 0},remoteAuthority:_.remoteAuthority}:{workspace:(0,ae.getWorkspaceIdentifier)(le),remoteAuthority:q};if(_.gotoLineMode||y.posix.basename(R).indexOf(".")!==-1)return{fileUri:le,options:{selection:re?{startLineNumber:re,startColumn:ne||1}:void 0},remoteAuthority:q}}return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(le),remoteAuthority:q}}shouldOpenNewWindow(R){const _=this.configurationService.getValue("window"),N=_?.openFoldersInNewWindow||"default",q=_?.openFilesInNewWindow||"off";let re=(R.preferNewWindow||R.forceNewWindow)&&!R.forceReuseWindow;!R.forceNewWindow&&!R.forceReuseWindow&&(N==="on"||N==="off")&&(re=N==="on");let ne=!1;return R.forceNewWindow||R.forceReuseWindow?ne=!!R.forceNewWindow&&!R.forceReuseWindow:(l.isMacintosh?R.context===1&&(ne=!0):R.context!==3&&R.context!==2&&!(R.userEnv&&R.userEnv.TERM_PROGRAM==="vscode")&&(ne=!0),!R.cli.extensionDevelopmentPath&&(q==="on"||q==="off")&&(ne=q==="on")),{openFolderInNewWindow:!!re,openFilesInNewWindow:ne}}async openExtensionDevelopmentHostWindow(R,_){const N=(0,oe.findWindowOnExtensionDevelopmentPath)(this.getWindows(),R);if(N)return this.lifecycleMainService.reload(N,_.cli),N.focus(),[N];let q=_.cli["folder-uri"]||[],re=_.cli["file-uri"]||[],ne=_.cli._;if(!ne.length&&!q.length&&!re.length&&!_.cli.extensionTestsPath){const ie=this.windowsStateHandler.state.lastPluginDevelopmentHostWindow,Q=ie?.workspace??ie?.folderUri;Q&&(I.URI.isUri(Q)?Q.scheme===d.Schemas.file?ne=[Q.fsPath]:q=[Q.toString()]:Q.configPath.scheme===d.Schemas.file?ne=[(0,c.originalFSPath)(Q.configPath)]:re=[Q.configPath.toString()])}let le=_.remoteAuthority;for(const ie of R)if(ie.match(/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/)){const Q=I.URI.parse(ie),fe=(0,A.getRemoteAuthority)(Q);fe&&(le?(0,c.isEqualAuthority)(fe,le)||this.logService.error("more than one extension development path authority"):le=fe)}ne=ne.filter(ie=>{const Q=I.URI.file(ie);return(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:(0,c.isEqualAuthority)((0,A.getRemoteAuthority)(Q),le)}),q=q.filter(ie=>{const Q=this.cliArgToUri(ie);return Q&&(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:Q?(0,c.isEqualAuthority)((0,A.getRemoteAuthority)(Q),le):!1}),re=re.filter(ie=>{const Q=this.cliArgToUri(ie);return Q&&(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:Q?(0,c.isEqualAuthority)((0,A.getRemoteAuthority)(Q),le):!1}),_.cli._=ne,_.cli["folder-uri"]=q,_.cli["file-uri"]=re;const V={context:_.context,cli:_.cli,forceNewWindow:!0,forceEmpty:!ne.length&&!q.length&&!re.length,userEnv:_.userEnv,noRecentEntry:!0,waitMarkerFileURI:_.waitMarkerFileURI,remoteAuthority:le,forceProfile:_.forceProfile,forceTempProfile:_.forceTempProfile};return this.open(V)}async openInBrowserWindow(R){const _=this.configurationService.getValue("window"),N=this.getLastActiveWindow(),q=N?.profile??this.userDataProfilesMainService.defaultProfile;let re;!R.forceNewWindow&&!R.forceNewTabbedWindow&&(re=R.windowToUse||N,re&&re.focus());const ne={...this.environmentMainService.args,...R.cli,machineId:this.machineId,windowId:-1,mainPid:process.pid,appRoot:this.environmentMainService.appRoot,execPath:process.execPath,codeCachePath:this.environmentMainService.codeCachePath,backupPath:R.emptyWindowBackupInfo?(0,y.join)(this.environmentMainService.backupHome,R.emptyWindowBackupInfo.backupFolder):void 0,profiles:{home:this.userDataProfilesMainService.profilesHome,all:this.userDataProfilesMainService.profiles,profile:q},homeDir:this.environmentMainService.userHome.fsPath,tmpDir:this.environmentMainService.tmpDir.fsPath,userDataDir:this.environmentMainService.userDataPath,remoteAuthority:R.remoteAuthority,workspace:R.workspace,userEnv:{...this.initialUserEnv,...R.userEnv},filesToOpenOrCreate:R.filesToOpen?.filesToOpenOrCreate,filesToDiff:R.filesToOpen?.filesToDiff,filesToMerge:R.filesToOpen?.filesToMerge,filesToWait:R.filesToOpen?.filesToWait,logLevel:this.loggerService.getLogLevel(),loggers:{window:[],global:this.loggerService.getRegisteredLoggers()},logsPath:this.environmentMainService.logsHome.fsPath,product:M.default,isInitialStartup:R.initialStartup,perfMarks:(0,E.getMarks)(),os:{release:(0,O.release)(),hostname:(0,O.hostname)(),arch:(0,O.arch)()},zoomLevel:typeof _?.zoomLevel=="number"?_.zoomLevel:void 0,autoDetectHighContrast:_?.autoDetectHighContrast??!0,autoDetectColorScheme:_?.autoDetectColorScheme??!1,accessibilitySupport:b.app.accessibilitySupportEnabled,colorScheme:this.themeMainService.getColorScheme(),policiesData:this.policyService.serialize(),continueOn:this.environmentMainService.continueOn};if(re){const le=re.config;!ne.extensionDevelopmentPath&&le?.extensionDevelopmentPath&&(ne.extensionDevelopmentPath=le.extensionDevelopmentPath,ne.extensionDevelopmentKind=le.extensionDevelopmentKind,ne["enable-proposed-api"]=le["enable-proposed-api"],ne.verbose=le.verbose,ne["inspect-extensions"]=le["inspect-extensions"],ne["inspect-brk-extensions"]=le["inspect-brk-extensions"],ne.debugId=le.debugId,ne.extensionEnvironment=le.extensionEnvironment,ne["extensions-dir"]=le["extensions-dir"],ne["disable-extensions"]=le["disable-extensions"]),ne.loggers={global:ne.loggers.global,window:le?.loggers.window??ne.loggers.window}}else{const le=this.windowsStateHandler.getNewWindowState(ne);(0,E.mark)("code/willCreateCodeWindow");const V=re=this.instantiationService.createInstance(z.CodeWindow,{state:le,extensionDevelopmentPath:ne.extensionDevelopmentPath,isExtensionTestHost:!!ne.extensionTestsPath});(0,E.mark)("code/didCreateCodeWindow"),R.forceNewTabbedWindow&&this.getLastActiveWindow()?.addTabbedWindow(V),$.WINDOWS.push(V),this._onDidOpenWindow.fire(V),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()-1,newCount:this.getWindowCount()}),(0,m.once)(V.onDidSignalReady)(()=>this._onDidSignalReadyWindow.fire(V)),(0,m.once)(V.onDidClose)(()=>this.onWindowClosed(V)),(0,m.once)(V.onDidDestroy)(()=>this._onDidDestroyWindow.fire(V)),V.onDidTriggerSystemContextMenu(({x:Q,y:fe})=>this._onDidTriggerSystemContextMenu.fire({window:V,x:Q,y:fe}));const ie=(0,f.assertIsDefined)(V.win?.webContents);ie.removeAllListeners("devtools-reload-page"),ie.on("devtools-reload-page",()=>this.lifecycleMainService.reload(V)),this.lifecycleMainService.registerWindow(V)}return ne.windowId=re.id,re.isReady?this.lifecycleMainService.unload(re,4).then(async le=>{le||await this.doOpenInBrowserWindow(re,ne,R,q)}):await this.doOpenInBrowserWindow(re,ne,R,q),re}async doOpenInBrowserWindow(R,_,N,q){if(_.extensionDevelopmentPath||((0,ue.isWorkspaceIdentifier)(_.workspace)?_.backupPath=this.backupMainService.registerWorkspaceBackup({workspace:_.workspace,remoteAuthority:_.remoteAuthority}):(0,ue.isSingleFolderWorkspaceIdentifier)(_.workspace)?_.backupPath=this.backupMainService.registerFolderBackup({folderUri:_.workspace.uri,remoteAuthority:_.remoteAuthority}):_.backupPath=this.backupMainService.registerEmptyWindowBackup({backupFolder:N.emptyWindowBackupInfo?.backupFolder??(0,ae.createEmptyWorkspaceIdentifier)().id,remoteAuthority:_.remoteAuthority})),this.userDataProfilesMainService.isEnabled()){const re=_.workspace??(0,ue.toWorkspaceIdentifier)(_.backupPath,!1),ne=this.resolveProfileForBrowserWindow(N,re,q),le=ne instanceof Promise?await ne:ne;_.profiles.profile=le,_.extensionDevelopmentPath||await this.userDataProfilesMainService.setProfileForWorkspace(re,le)}R.load(_)}resolveProfileForBrowserWindow(R,_,N){return R.forceProfile?this.userDataProfilesMainService.profiles.find(q=>q.name===R.forceProfile)??this.userDataProfilesMainService.createNamedProfile(R.forceProfile):R.forceTempProfile?this.userDataProfilesMainService.createTransientProfile():this.userDataProfilesMainService.getProfileForWorkspace(_)??N}onWindowClosed(R){const _=$.WINDOWS.indexOf(R);$.WINDOWS.splice(_,1),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()+1,newCount:this.getWindowCount()})}getFocusedWindow(){const R=b.BrowserWindow.getFocusedWindow();if(R)return this.getWindowById(R.id)}getLastActiveWindow(){return this.doGetLastActiveWindow(this.getWindows())}getLastActiveWindowForAuthority(R){return this.doGetLastActiveWindow(this.getWindows().filter(_=>(0,c.isEqualAuthority)(_.remoteAuthority,R)))}doGetLastActiveWindow(R){const _=Math.max.apply(Math,R.map(N=>N.lastFocusTime));return R.find(N=>N.lastFocusTime===_)}sendToFocused(R,..._){(this.getFocusedWindow()||this.getLastActiveWindow())?.sendWhenReady(R,P.CancellationToken.None,..._)}sendToAll(R,_,N){for(const q of this.getWindows())N&&N.indexOf(q.id)>=0||q.sendWhenReady(R,P.CancellationToken.None,_)}getWindows(){return $.WINDOWS}getWindowCount(){return $.WINDOWS.length}getWindowById(R){const _=this.getWindows().filter(N=>N.id===R);return(0,D.firstOrDefault)(_)}getWindowByWebContents(R){const _=b.BrowserWindow.fromWebContents(R);if(_)return this.getWindowById(_.id)}};e.WindowsMainService=ce,e.WindowsMainService=ce=$=be([X(2,k.ILogService),X(3,U.ILoggerMainService),X(4,T.IStateService),X(5,B.IPolicyService),X(6,i.IEnvironmentMainService),X(7,W.IUserDataProfilesMainService),X(8,S.ILifecycleMainService),X(9,t.IBackupMainService),X(10,a.IConfigurationService),X(11,de.IWorkspacesHistoryMainService),X(12,j.IWorkspacesManagementMainService),X(13,o.IInstantiationService),X(14,s.IDialogMainService),X(15,n.IFileService),X(16,C.IProtocolMainService),X(17,G.IThemeMainService)],ce)}),define(Z[309],te([0,1,64,29,84,54]),function(H,e,b,L,r,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesMainService=void 0;let D=class{constructor(h,u,m,g){this.workspacesManagementMainService=h,this.windowsMainService=u,this.workspacesHistoryMainService=m,this.backupMainService=g,this.onDidChangeRecentlyOpened=this.workspacesHistoryMainService.onDidChangeRecentlyOpened}async enterWorkspace(h,u){const m=this.windowsMainService.getWindowById(h);if(m)return this.workspacesManagementMainService.enterWorkspace(m,this.windowsMainService.getWindows(),u)}createUntitledWorkspace(h,u,m){return this.workspacesManagementMainService.createUntitledWorkspace(u,m)}deleteUntitledWorkspace(h,u){return this.workspacesManagementMainService.deleteUntitledWorkspace(u)}getWorkspaceIdentifier(h,u){return this.workspacesManagementMainService.getWorkspaceIdentifier(u)}getRecentlyOpened(h){return this.workspacesHistoryMainService.getRecentlyOpened()}addRecentlyOpened(h,u){return this.workspacesHistoryMainService.addRecentlyOpened(u)}removeRecentlyOpened(h,u){return this.workspacesHistoryMainService.removeRecentlyOpened(u)}clearRecentlyOpened(h){return this.workspacesHistoryMainService.clearRecentlyOpened()}async getDirtyWorkspaces(){return this.backupMainService.getDirtyWorkspaces()}};e.WorkspacesMainService=D,e.WorkspacesMainService=D=be([X(0,O.IWorkspacesManagementMainService),X(1,L.IWindowsMainService),X(2,r.IWorkspacesHistoryMainService),X(3,b.IBackupMainService)],D)}),define(Z[310],te([0,1,14,134,38,27,17,50,13,32,49,44,46,2,15,10,4,12,7,31,148,42,160,113,292,163,64,288,18,77,201,92,135,61,118,221,28,63,96,210,236,211,297,120,212,213,16,225,95,76,6,94,219,302,289,277,20,5,307,68,22,60,298,97,34,280,83,125,25,253,255,52,48,267,294,303,295,304,130,269,270,271,274,278,29,308,279,30,100,84,309,54,276,39,234,53,246,51,82,132,282,296,285,8,257,281,229,66,93,300,273,24,128,299,265,241,85]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M,C,A,T,F,z,oe,ee,ue,ae,de,j,G,B,W,U,$,Y,se,ce,x,R,_,N,q,re,ne,le,V,ie,Q,fe,pe,Pe,De,We,ye,we,K,he,me,Ie,Le,Fe,Oe,qe,Ne,He,J,ge,ve,Ee,Ae,Me,_e,ze,Be,Ve,Ye,Xe,Je,nt,rt,pt,vt,ot,wt,St,yt,bt,Et,Pt,It,at,Ct,kt,Dt,Mt,Rt,ct,Lt,ht,lt,At,Ot,ut,_t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeApplication=void 0;let dt=class extends d.Disposable{constructor(ke,Ce,Se,Te,Re,Ue,Ke,Ze,Qe,je,$e,xe){super(),this.mainProcessNodeIpcServer=ke,this.userEnv=Ce,this.mainInstantiationService=Se,this.logService=Te,this.loggerService=Re,this.environmentMainService=Ue,this.lifecycleMainService=Ke,this.configurationService=Ze,this.stateService=Qe,this.fileService=je,this.productService=$e,this.userDataProfilesMainService=xe,this.configureSession(),this.registerListeners()}configureSession(){const ke=je=>je?.startsWith(`${y.Schemas.vscodeWebview}://`),Ce=new Set(this.productService.quality==="stable"?[]:["media"]),Se=new Set(["clipboard-read","clipboard-sanitized-write"]);b.session.defaultSession.setPermissionRequestHandler((je,$e,xe,Ge)=>ke(Ge.requestingUrl)?xe(Se.has($e)):Ge.isMainFrame&&Ge.securityOrigin==="vscode-file://vscode-app/"?xe(Ce.has($e)):xe(!1)),b.session.defaultSession.setPermissionCheckHandler((je,$e,xe,Ge)=>ke(Ge.requestingUrl)?Se.has($e):Ge.isMainFrame&&Ge.securityOrigin==="vscode-file://vscode-app/"?Ce.has($e):!1);const Te=new Set([y.Schemas.file,y.Schemas.vscodeFileResource,y.Schemas.vscodeRemoteResource,y.Schemas.vscodeManagedRemoteResource,"devtools"]),Re=je=>{for(let $e=je;$e;$e=$e.parent)if($e.url.startsWith(`${y.Schemas.vscodeWebview}://`))return!0;return!1},Ue=je=>je.resourceType==="xhr"||Re(je.frame),Ke=je=>{const $e=je.frame;if(!$e||!this.windowsMainService)return!1;const xe=b.BrowserWindow.getAllWindows();for(const Ge of xe)if($e.processId===Ge.webContents.mainFrame.processId)return!0;return!1},Ze=(je,$e)=>{if(je.path!=="/index.html")return!0;const xe=$e.frame;if(!xe||!this.windowsMainService)return!1;for(const Ge of this.windowsMainService.getWindows())if(Ge.win&&xe.processId===Ge.win.webContents.mainFrame.processId)return!0;return!1};b.session.defaultSession.webRequest.onBeforeRequest((je,$e)=>{const xe=c.URI.parse(je.url);return xe.scheme===y.Schemas.vscodeWebview&&!Ze(xe,je)?(this.logService.error("Blocked vscode-webview request",je.url),$e({cancel:!0})):xe.scheme===y.Schemas.vscodeFileResource&&!Ke(je)?(this.logService.error("Blocked vscode-file request",je.url),$e({cancel:!0})):xe.path.endsWith(".svg")&&!Te.has(xe.scheme)?$e({cancel:!Ue(je)}):$e({cancel:!1})}),b.session.defaultSession.webRequest.onHeadersReceived((je,$e)=>{const xe=je.responseHeaders,Ge=xe["content-type"]||xe["Content-Type"];if(Ge&&Array.isArray(Ge)){const it=c.URI.parse(je.url);if(it.path.endsWith(".svg")&&Te.has(it.scheme))return xe["Content-Type"]=["image/svg+xml"],$e({cancel:!1,responseHeaders:xe});if(!it.path.endsWith(y.Schemas.vscodeRemoteResource)&&Ge.some(et=>et.toLowerCase().includes("image/svg")))return $e({cancel:!Ue(je)})}return $e({cancel:!1})});const Qe=b.session.defaultSession;typeof Qe.setCodeCachePath=="function"&&this.environmentMainService.codeCachePath&&Qe.setCodeCachePath((0,E.join)(this.environmentMainService.codeCachePath,"chrome")),l.isWindows&&(this.configurationService.getValue("security.restrictUNCAccess")===!1?(0,L.disableUNCAccessRestrictions)():(0,L.addUNCHostToAllowlist)(this.configurationService.getValue("security.allowedUNCHosts")))}registerListeners(){(0,h.setUnexpectedErrorHandler)(Se=>this.onUnexpectedError(Se)),process.on("uncaughtException",Se=>{(0,h.isSigPipeError)(Se)||(0,h.onUnexpectedError)(Se)}),process.on("unhandledRejection",Se=>(0,h.onUnexpectedError)(Se)),this.lifecycleMainService.onWillShutdown(()=>this.dispose()),(0,I.registerContextMenuListener)(),b.app.on("accessibility-support-changed",(Se,Te)=>{this.windowsMainService?.sendToAll("vscode:accessibilitySupportChanged",Te)}),b.app.on("activate",async(Se,Te)=>{this.logService.trace("app#activate"),Te||await this.windowsMainService?.openEmptyWindow({context:1})}),b.app.on("web-contents-created",(Se,Te)=>{Te.on("will-navigate",Re=>{this.logService.error("webContents#will-navigate: Prevented webcontent navigation"),Re.preventDefault()}),Te.setWindowOpenHandler(({url:Re})=>(this.nativeHostMainService?.openExternal(void 0,Re),{action:"deny"}))});let ke=[],Ce;b.app.on("open-file",(Se,Te)=>{this.logService.trace("app#open-file: ",Te),Se.preventDefault(),ke.push((0,Ve.hasWorkspaceFileExtension)(Te)?{workspaceUri:c.URI.file(Te)}:{fileUri:c.URI.file(Te)}),Ce!==void 0&&(clearTimeout(Ce),Ce=void 0),Ce=setTimeout(async()=>{await this.windowsMainService?.open({context:1,cli:this.environmentMainService.args,urisToOpen:ke,gotoLineMode:!1,preferNewWindow:!0}),ke=[],Ce=void 0},100)}),b.app.on("new-window-for-tab",async()=>{await this.windowsMainService?.openEmptyWindow({context:4})}),r.validatedIpcMain.handle("vscode:fetchShellEnv",Se=>{const Te=this.windowsMainService?.getWindowByWebContents(Se.sender);let Re,Ue;return Te?.config?(Re=Te.config,Ue={...process.env,...Te.config.userEnv}):(Re=this.environmentMainService.args,Ue=process.env),this.resolveShellEnvironment(Re,Ue,!1)}),r.validatedIpcMain.handle("vscode:writeNlsFile",(Se,Te,Re)=>{const Ue=this.validateNlsPath([Te]);if(!Ue||typeof Re!="string")throw new Error("Invalid operation (vscode:writeNlsFile)");return this.fileService.writeFile(Ue,D.VSBuffer.fromString(Re))}),r.validatedIpcMain.handle("vscode:readNlsFile",async(Se,...Te)=>{const Re=this.validateNlsPath(Te);if(!Re)throw new Error("Invalid operation (vscode:readNlsFile)");return(await this.fileService.readFile(Re)).value.toString()}),r.validatedIpcMain.on("vscode:toggleDevTools",Se=>Se.sender.toggleDevTools()),r.validatedIpcMain.on("vscode:openDevTools",Se=>Se.sender.openDevTools()),r.validatedIpcMain.on("vscode:reloadWindow",Se=>Se.sender.reload())}validateNlsPath(ke){let Ce;for(const Se of ke)typeof Se=="string"&&(typeof Ce!="string"?Ce=Se:Ce=(0,E.join)(Ce,Se));if(!(typeof Ce!="string"||!(0,E.isAbsolute)(Ce)||!(0,u.isEqualOrParent)(Ce,this.environmentMainService.cachedLanguagesPath,!l.isLinux)))return c.URI.file(Ce)}onUnexpectedError(ke){if(ke){const Ce={message:`[uncaught exception in main]: ${ke.message}`,stack:ke.stack};this.windowsMainService?.sendToFocused("vscode:reportError",JSON.stringify(Ce))}this.logService.error(`[uncaught exception in main]: ${ke}`),ke.stack&&this.logService.error(ke.stack)}async startup(){this.logService.debug("Starting VS Code"),this.logService.debug(`from: ${this.environmentMainService.appRoot}`),this.logService.debug("args:",this.environmentMainService.args);const ke=this.productService.win32AppUserModelId;l.isWindows&&ke&&b.app.setAppUserModelId(ke);try{l.isMacintosh&&this.configurationService.getValue("window.nativeTabs")===!0&&!b.systemPreferences.getUserDefault("NSUseImprovedLayoutPass","boolean")&&b.systemPreferences.setUserDefault("NSUseImprovedLayoutPass","boolean",!0)}catch(Qe){this.logService.error(Qe)}const Ce=new t.Server;this.lifecycleMainService.onWillShutdown(Qe=>{Qe.reason===2&&Ce.dispose()}),this.logService.trace("Resolving machine identifier...");const Se=await(0,Ct.resolveMachineId)(this.stateService,this.logService);this.logService.trace(`Resolved machine identifier: ${Se}`);const{sharedProcessReady:Te,sharedProcessClient:Re}=this.setupSharedProcess(Se),Ue=await this.initServices(Se,Te);this._register(Ue.createInstance(s.ProxyAuthHandler)),this._register(Ue.createInstance(Pt.UserDataProfilesHandler)),this._register(Ue.createInstance(s.ProxyAuthHandler)),Ue.invokeFunction(Qe=>this.initChannels(Qe,Ce,Re));const Ke=Ue.invokeFunction(Qe=>this.setupProtocolUrlHandlers(Qe,Ce));this.setupManagedRemoteResourceUrlHandler(Ce),this.lifecycleMainService.phase=2,await Ue.invokeFunction(Qe=>this.openFirstWindow(Qe,Ke)),this.lifecycleMainService.phase=3,this.afterWindowOpen(),this._register(new at.RunOnceScheduler(()=>{this._register((0,at.runWhenIdle)(()=>this.lifecycleMainService.phase=4,2500))},2500)).schedule()}setupProtocolUrlHandlers(ke,Ce){const Se=this.windowsMainService=ke.get(_e.IWindowsMainService),Te=ke.get(J.IURLService),Re=this.nativeHostMainService=ke.get(ie.INativeHostMainService),Ue=this;Te.registerHandler({async handleURL(xe,Ge){return Ue.handleProtocolUrl(Se,Te,xe,Ge)}});const Ke=this._register(new Be.ActiveWindowManager({onDidOpenWindow:Re.onDidOpenWindow,onDidFocusWindow:Re.onDidFocusWindow,getActiveWindowId:()=>Re.getActiveWindowId(-1)})),Ze=new w.StaticRouter(xe=>Ke.getActiveClientId().then(Ge=>xe===Ge)),Qe=new ge.URLHandlerRouter(Ze,this.logService),je=Ce.getChannel("urlHandler",Qe);Te.registerHandler(new ge.URLHandlerChannelClient(je));const $e=this.resolveInitialProtocolUrls();return this._register(new Ee.ElectronURLListener($e?.urls,Te,Se,this.environmentMainService,this.productService,this.logService)),$e}setupManagedRemoteResourceUrlHandler(ke){const Ce=()=>({statusCode:404,data:"Not found"}),Se=new _t.Lazy(()=>ke.getChannel(ut.NODE_REMOTE_RESOURCE_CHANNEL_NAME,new ut.NodeRemoteResourceRouter));b.protocol.registerBufferProtocol(y.Schemas.vscodeManagedRemoteResource,(Te,Re)=>{const Ue=c.URI.parse(Te.url);if(!Ue.authority.startsWith("window:"))return Re(Ce());Se.value.call(ut.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME,[Ue]).then(Ke=>Re({...Ke,data:Buffer.from(Ke.body,"base64")}),Ke=>{this.logService.warn("error dispatching remote resource call",Ke),Re({statusCode:500,data:String(Ke)})})})}resolveInitialProtocolUrls(){const ke=this.environmentMainService.args["open-url"]?this.environmentMainService.args._urls||[]:[];ke.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from command line:",ke);const Ce=global.getOpenUrls()||[];if(Ce.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from macOS 'open-url' event:",Ce),ke.length+Ce.length===0)return;const Se=[];return{urls:[...ke,...Ce].map(Re=>{try{return{uri:c.URI.parse(Re),originalUrl:Re}}catch{this.logService.trace("app#resolveInitialProtocolUrls() protocol url failed to parse:",Re);return}}).filter(Re=>{if(!Re)return!1;if(this.shouldBlockURI(Re.uri))return this.logService.trace("app#resolveInitialProtocolUrls() protocol url was blocked:",Re.uri.toString(!0)),!1;const Ue=this.getWindowOpenableFromProtocolUrl(Re.uri);return Ue?(this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be handled as window to open:",Re.uri.toString(!0),Ue),Se.push(Ue),!1):(this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be passed to active window for handling:",Re.uri.toString(!0)),!0)}),openables:Se}}shouldBlockURI(ke){if(ke.authority===y.Schemas.file&&l.isWindows){const{options:Ce,buttonIndeces:Se}=(0,Rt.massageMessageBoxOptions)({type:"warning",buttons:[(0,i.localize)(0,null),(0,i.localize)(1,null)],message:(0,i.localize)(2,null,(0,v.getPathLabel)(ke,{os:l.OS,tildify:this.environmentMainService}),this.productService.nameShort),detail:(0,i.localize)(3,null)},this.productService);if(Se[b.dialog.showMessageBoxSync(Ce)]===1)return!0}return!1}getWindowOpenableFromProtocolUrl(ke){if(ke.path){if(ke.authority===y.Schemas.file){const Ce=c.URI.file(ke.fsPath);return(0,Ve.hasWorkspaceFileExtension)(Ce)?{workspaceUri:Ce}:{fileUri:Ce}}else if(ke.authority===y.Schemas.vscodeRemote){const Ce=ke.path.indexOf(E.posix.sep,1);if(Ce!==-1){const Se=ke.path.substring(1,Ce),Te=ke.path.substring(Ce),Re=c.URI.from({scheme:y.Schemas.vscodeRemote,authority:Se,path:Te,query:ke.query,fragment:ke.fragment});return(0,Ve.hasWorkspaceFileExtension)(Te)?{workspaceUri:Re}:/:[\d]+$/.test(Te)?{fileUri:Re}:{folderUri:Re}}}}}async handleProtocolUrl(ke,Ce,Se,Te){if(this.logService.trace("app#handleProtocolUrl():",Se.toString(!0),Te),Se.scheme===this.productService.urlProtocol&&Se.path==="workspace"&&(Se=Se.with({authority:"file",path:c.URI.parse(Se.query).path,query:""})),this.shouldBlockURI(Se))return this.logService.trace("app#handleProtocolUrl() protocol url was blocked:",Se.toString(!0)),!0;let Re=!1;const Ue=new URLSearchParams(Se.query);Ue.get("windowId")==="_blank"?(this.logService.trace("app#handleProtocolUrl() found 'windowId=_blank' as parameter, setting shouldOpenInNewWindow=true:",Se.toString(!0)),Ue.delete("windowId"),Se=Se.with({query:Ue.toString()}),Re=!0):l.isMacintosh&&ke.getWindowCount()===0&&(this.logService.trace("app#handleProtocolUrl() running on macOS with no window open, setting shouldOpenInNewWindow=true:",Se.toString(!0)),Re=!0);const Ke=Ue.get("continueOn");Ke!==null&&(this.logService.trace("app#handleProtocolUrl() found 'continueOn' as parameter:",Se.toString(!0)),Ue.delete("continueOn"),Se=Se.with({query:Ue.toString()}),this.environmentMainService.continueOn=Ke??void 0);const Ze=this.getWindowOpenableFromProtocolUrl(Se);return Ze?(this.logService.trace("app#handleProtocolUrl() opening protocol url as window:",Ze,Se.toString(!0)),(0,ht.firstOrDefault)(await ke.open({context:5,cli:{...this.environmentMainService.args},urisToOpen:[Ze],forceNewWindow:Re,gotoLineMode:!0}))?.focus(),!0):Re?(this.logService.trace("app#handleProtocolUrl() opening empty window and passing in protocol url:",Se.toString(!0)),await(0,ht.firstOrDefault)(await ke.open({context:5,cli:{...this.environmentMainService.args},forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,remoteAuthority:(0,fe.getRemoteAuthority)(Se)}))?.ready(),Ce.open(Se,Te)):(this.logService.trace("app#handleProtocolUrl(): not handled",Se.toString(!0),Te),!1)}setupSharedProcess(ke){const Ce=this._register(this.mainInstantiationService.createInstance(pe.SharedProcess,ke)),Se=(async()=>{this.logService.trace("Main->SharedProcess#connect");const Re=await Ce.connect();return this.logService.trace("Main->SharedProcess#connect: connection established"),new a.Client(Re,"main")})();return{sharedProcessReady:(async()=>(await Ce.whenReady(),Se))(),sharedProcessClient:Se}}async initServices(ke,Ce){const Se=new R.ServiceCollection;switch(process.platform){case"win32":Se.set(Le.IUpdateService,new ce.SyncDescriptor(He.Win32UpdateService));break;case"linux":l.isLinuxSnap?Se.set(Le.IUpdateService,new ce.SyncDescriptor(Ne.SnapUpdateService,[process.env.SNAP,process.env.SNAP_REVISION])):Se.set(Le.IUpdateService,new ce.SyncDescriptor(qe.LinuxUpdateService));break;case"darwin":Se.set(Le.IUpdateService,new ce.SyncDescriptor(Oe.DarwinUpdateService));break}Se.set(_e.IWindowsMainService,new ce.SyncDescriptor(ze.WindowsMainService,[ke,this.userEnv],!1));const Te=new T.DialogMainService(this.logService,this.productService);Se.set(T.IDialogMainService,Te),Se.set(re.ILaunchMainService,new ce.SyncDescriptor(re.LaunchMainService,void 0,!1)),Se.set(A.IDiagnosticsMainService,new ce.SyncDescriptor(A.DiagnosticsMainService,void 0,!1)),Se.set(C.IDiagnosticsService,w.ProxyChannel.toService((0,w.getDelayedChannel)(Ce.then(Qe=>Qe.getChannel("diagnostics"))))),Se.set(_.IIssueMainService,new ce.SyncDescriptor(N.IssueMainService,[this.userEnv])),Se.set(F.IEncryptionMainService,new ce.SyncDescriptor(z.EncryptionMainService,[ke])),Se.set(q.IKeyboardLayoutMainService,new ce.SyncDescriptor(q.KeyboardLayoutMainService)),Se.set(ie.INativeHostMainService,new ce.SyncDescriptor(ie.NativeHostMainService,void 0,!1)),Se.set(k.ICredentialsMainService,new ce.SyncDescriptor(rt.CredentialsNativeMainService)),Se.set(Ae.IWebviewManagerService,new ce.SyncDescriptor(Me.WebviewMainService)),Se.set(V.IMenubarMainService,new ce.SyncDescriptor(V.MenubarMainService)),Se.set(ae.IExtensionUrlTrustService,new ce.SyncDescriptor(de.ExtensionUrlTrustService)),Se.set(j.IExtensionHostStarter,new ce.SyncDescriptor(G.ExtensionHostStarter)),Se.set(ye.IStorageMainService,new ce.SyncDescriptor(ye.StorageMainService)),Se.set(ye.IApplicationStorageMainService,new ce.SyncDescriptor(ye.ApplicationStorageMainService));const Re=new At.ElectronPtyHostStarter({graceTime:6e4,shortGraceTime:6e3,scrollback:this.configurationService.getValue("terminal.integrated.persistentSessionScrollback")??100},this.configurationService,this.environmentMainService,this.lifecycleMainService,this.logService),Ue=new Ot.PtyHostService(Re,this.configurationService,this.logService,this.loggerService);Se.set(lt.ILocalPtyService,Ue),l.isWindows?Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.WindowsExternalTerminalService)):l.isMacintosh?Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.MacExternalTerminalService)):l.isLinux&&Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.LinuxExternalTerminalService));const Ke=new o.BackupMainService(this.environmentMainService,this.configurationService,this.logService,this.stateService);Se.set(n.IBackupMainService,Ke);const Ze=new nt.WorkspacesManagementMainService(this.environmentMainService,this.logService,this.userDataProfilesMainService,Ke,Te);if(Se.set(nt.IWorkspacesManagementMainService,Ze),Se.set(Ye.IWorkspacesService,new ce.SyncDescriptor(Je.WorkspacesMainService,void 0,!1)),Se.set(Xe.IWorkspacesHistoryMainService,new ce.SyncDescriptor(Xe.WorkspacesHistoryMainService,void 0,!1)),Se.set(J.IURLService,new ce.SyncDescriptor(ve.NativeURLService,void 0,!1)),(0,Ie.supportsTelemetry)(this.productService,this.environmentMainService)){const Qe=(0,Ie.isInternalTelemetry)(this.productService,this.configurationService),je=(0,w.getDelayedChannel)(Ce.then(et=>et.getChannel("telemetryAppender"))),$e=new he.TelemetryAppenderClient(je),xe=(0,we.resolveCommonProperties)((0,O.release)(),(0,O.hostname)(),process.arch,this.productService.commit,this.productService.version,ke,Qe),Ge=(0,Ie.getPiiPathsFromEnvironment)(this.environmentMainService),it={appenders:[$e],commonProperties:xe,piiPaths:Ge,sendErrorTelemetry:!0};Se.set(K.ITelemetryService,new ce.SyncDescriptor(me.TelemetryService,[it],!1))}else Se.set(K.ITelemetryService,Ie.NullTelemetryService);return Se.set(yt.IExtensionsProfileScannerService,new ce.SyncDescriptor(kt.ExtensionsProfileScannerService,void 0,!0)),Se.set(bt.IExtensionsScannerService,new ce.SyncDescriptor(Et.ExtensionsScannerService,void 0,!0)),Se.set(ct.IUtilityProcessWorkerMainService,new ce.SyncDescriptor(ct.UtilityProcessWorkerMainService,void 0,!0)),await at.Promises.settled([Ke.initialize(),Ze.initialize()]),this.mainInstantiationService.createChild(Se)}initChannels(ke,Ce,Se){const Te=w.ProxyChannel.fromService(ke.get(re.ILaunchMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("launch",Te);const Re=w.ProxyChannel.fromService(ke.get(A.IDiagnosticsMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("diagnostics",Re);const Ue=new vt.PolicyChannel(ke.get(pt.IPolicyService));Ce.registerChannel("policy",Ue),Se.then(tt=>tt.registerChannel("policy",Ue));const Ke=this.fileService.getProvider(y.Schemas.file);(0,p.assertType)(Ke instanceof se.DiskFileSystemProvider);const Ze=new Y.DiskFileSystemProviderChannel(Ke,this.logService,this.environmentMainService);Ce.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,Ze),Se.then(tt=>tt.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,Ze));const Qe=w.ProxyChannel.fromService(ke.get(ot.IUserDataProfilesMainService));Ce.registerChannel("userDataProfiles",Qe),Se.then(tt=>tt.registerChannel("userDataProfiles",Qe));const je=new wt.RequestChannel(ke.get(St.IRequestService));Se.then(tt=>tt.registerChannel("request",je));const $e=new Fe.UpdateChannel(ke.get(Le.IUpdateService));Ce.registerChannel("update",$e);const xe=w.ProxyChannel.fromService(ke.get(_.IIssueMainService));Ce.registerChannel("issue",xe);const Ge=w.ProxyChannel.fromService(ke.get(F.IEncryptionMainService));Ce.registerChannel("encryption",Ge);const it=w.ProxyChannel.fromService(ke.get(k.ICredentialsMainService));Ce.registerChannel("credentials",it);const et=w.ProxyChannel.fromService(ke.get(Pe.ISignService));Ce.registerChannel("sign",et);const st=w.ProxyChannel.fromService(ke.get(q.IKeyboardLayoutMainService));Ce.registerChannel("keyboardLayout",st),this.nativeHostMainService=ke.get(ie.INativeHostMainService);const ft=w.ProxyChannel.fromService(this.nativeHostMainService);Ce.registerChannel("nativeHost",ft),Se.then(tt=>tt.registerChannel("nativeHost",ft));const Tt=w.ProxyChannel.fromService(ke.get(Ye.IWorkspacesService));Ce.registerChannel("workspaces",Tt);const Wt=w.ProxyChannel.fromService(ke.get(V.IMenubarMainService));Ce.registerChannel("menubar",Wt);const Ft=w.ProxyChannel.fromService(ke.get(J.IURLService));Ce.registerChannel("url",Ft);const Ut=w.ProxyChannel.fromService(ke.get(ae.IExtensionUrlTrustService));Ce.registerChannel("extensionUrlTrust",Ut);const Nt=w.ProxyChannel.fromService(ke.get(Ae.IWebviewManagerService));Ce.registerChannel("webview",Nt);const gt=this._register(new We.StorageDatabaseChannel(this.logService,ke.get(ye.IStorageMainService)));Ce.registerChannel("storage",gt),Se.then(tt=>tt.registerChannel("storage",gt));const zt=this._register(new It.ProfileStorageChangesListenerChannel(ke.get(ye.IStorageMainService),ke.get(ot.IUserDataProfilesMainService),this.logService));Se.then(tt=>tt.registerChannel("profileStorageListener",zt));const Bt=w.ProxyChannel.fromService(ke.get(lt.ILocalPtyService));Ce.registerChannel(lt.TerminalIpcChannels.LocalPty,Bt);const $t=w.ProxyChannel.fromService(ke.get(B.IExternalTerminalMainService));Ce.registerChannel("externalTerminal",$t);const mt=new Dt.LoggerChannel(ke.get(Mt.ILoggerMainService));Ce.registerChannel("logger",mt),Se.then(tt=>tt.registerChannel("logger",mt));const qt=new M.ElectronExtensionHostDebugBroadcastChannel(ke.get(_e.IWindowsMainService));Ce.registerChannel("extensionhostdebugservice",qt);const Ht=w.ProxyChannel.fromService(ke.get(j.IExtensionHostStarter));Ce.registerChannel(j.ipcExtensionHostStarterChannelName,Ht);const jt=w.ProxyChannel.fromService(ke.get(ct.IUtilityProcessWorkerMainService));Ce.registerChannel(Lt.ipcUtilityProcessWorkerChannelName,jt)}async openFirstWindow(ke,Ce){const Se=this.windowsMainService=ke.get(_e.IWindowsMainService),Te=(0,ee.isLaunchedFromCli)(process.env)?0:4,Re=this.environmentMainService.args;if(Ce){if(Ce.openables.length>0)return Se.open({context:Te,cli:Re,urisToOpen:Ce.openables,gotoLineMode:!0,initialStartup:!0});if(Ce.urls.length>0)for(const et of Ce.urls){const st=new URLSearchParams(et.uri.query);if(st.get("windowId")==="_blank")return st.delete("windowId"),et.originalUrl=et.uri.toString(!0),et.uri=et.uri.with({query:st.toString()}),Se.open({context:Te,cli:Re,forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,initialStartup:!0})}}const Ue=global.macOpenFiles,Ke=Re._.length,Ze=!!Re["folder-uri"],Qe=!!Re["file-uri"],je=Re["skip-add-to-recently-opened"]===!0,$e=Re.wait&&Re.waitMarkerFilePath?c.URI.file(Re.waitMarkerFilePath):void 0,xe=Re.remote||void 0,Ge=Re.profile,it=Re["profile-temp"];if(!Ke&&!Ze&&!Qe){if(Re["new-window"]||Ge||it)return Se.open({context:Te,cli:Re,forceNewWindow:!0,forceEmpty:!0,noRecentEntry:je,waitMarkerFileURI:$e,initialStartup:!0,remoteAuthority:xe,forceProfile:Ge,forceTempProfile:it});if(Ue.length)return Se.open({context:1,cli:Re,urisToOpen:Ue.map(et=>(0,Ve.hasWorkspaceFileExtension)(et)?{workspaceUri:c.URI.file(et)}:{fileUri:c.URI.file(et)}),noRecentEntry:je,waitMarkerFileURI:$e,initialStartup:!0})}return Se.open({context:Te,cli:Re,forceNewWindow:Re["new-window"]||!Ke&&Re["unity-launch"],diffMode:Re.diff,mergeMode:Re.merge,noRecentEntry:je,waitMarkerFileURI:$e,gotoLineMode:Re.goto,initialStartup:!0,remoteAuthority:xe,forceProfile:Ge,forceTempProfile:it})}afterWindowOpen(){this.installMutex(),b.protocol.registerHttpProtocol(y.Schemas.vscodeRemoteResource,(ke,Ce)=>{Ce({url:ke.url.replace(/^vscode-remote-resource:/,"http:"),method:ke.method})}),this.resolveShellEnvironment(this.environmentMainService.args,process.env,!0),this.updateCrashReporterEnablement(),l.isMacintosh&&b.app.runningUnderARM64Translation&&this.windowsMainService?.sendToFocused("vscode:showTranslatedBuildWarning")}async installMutex(){const ke=this.productService.win32MutexName;if(l.isWindows&&ke)try{const Ce=await new Promise((Te,Re)=>{H(["@vscode/windows-mutex"],Te,Re)}),Se=new Ce.Mutex(ke);(0,m.once)(this.lifecycleMainService.onWillShutdown)(()=>Se.release())}catch(Ce){this.logService.error(Ce)}}async resolveShellEnvironment(ke,Ce,Se){try{return await(0,ue.getResolvedShellEnv)(this.configurationService,this.logService,ke,Ce)}catch(Te){const Re=(0,P.toErrorMessage)(Te);Se?this.windowsMainService?.sendToFocused("vscode:showResolveShellEnvError",Re):this.logService.error(Re)}return{}}async updateCrashReporterEnablement(){try{const Ce=(await this.fileService.readFile(this.environmentMainService.argvResource)).value.toString(),Se=JSON.parse((0,g.stripComments)(Ce)),Re=(0,Ie.getTelemetryLevel)(this.configurationService)>=1;if(Se["enable-crash-reporter"]===void 0){const Ue=["","	// Allows to disable crash reporting.","	// Should restart the app if the value is changed.",`	"enable-crash-reporter": ${Re},`,"","	// Unique id used for correlating crash reports sent from this instance.","	// Do not edit this value.",`	"crash-reporter-id": "${(0,f.generateUuid)()}"`,"}"],Ke=Ce.substring(0,Ce.length-2).concat(`,
`,Ue.join(`
`));await this.fileService.writeFile(this.environmentMainService.argvResource,D.VSBuffer.fromString(Ke))}else{const Ue=Ce.replace(/"enable-crash-reporter": .*,/,`"enable-crash-reporter": ${Re},`);Ue!==Ce&&await this.fileService.writeFile(this.environmentMainService.argvResource,D.VSBuffer.fromString(Ue))}}catch(ke){this.logService.error(ke)}}};e.CodeApplication=dt,e.CodeApplication=dt=be([X(2,x.IInstantiationService),X(3,le.ILogService),X(4,le.ILoggerService),X(5,oe.IEnvironmentMainService),X(6,ne.ILifecycleMainService),X(7,S.IConfigurationService),X(8,De.IStateService),X(9,$.IFileService),X(10,Q.IProductService),X(11,ot.IUserDataProfilesMainService)],dt)}),define(Z[316],te([0,1,14,45,7,24,8,50,13,32,49,46,15,10,65,4,36,26,21,42,102,310,9,18,240,252,28,63,203,16,223,95,76,218,94,20,226,5,67,22,79,283,129,293,51,291,97,251,34,52,80,53,39,235,233,2,40,268,66,228,93,124,272,266]),function(H,e,b,L,r,O,D,P,h,u,m,g,v,d,y,E,l,p,c,f,I,w,t,a,s,i,n,o,S,k,M,C,A,T,F,z,oe,ee,ue,ae,de,j,G,B,W,U,$,Y,se,ce,x,R,_,N,q,re,ne,le,V,ie,Q,fe,pe){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class Pe{main(){try{this.startup()}catch(ye){console.error(ye.message),b.app.exit(1)}}async startup(){(0,h.setUnexpectedErrorHandler)(Oe=>console.error(Oe));const[ye,we,K,he,me,Ie,Le,Fe]=this.createServices();try{try{await this.initServices(K,Fe,he,me,Le)}catch(Oe){throw this.handleStartupDataDirError(K,Le,Oe),Oe}await ye.invokeFunction(async Oe=>{const qe=Oe.get(ee.ILogService),Ne=Oe.get(z.ILifecycleMainService),He=Oe.get(k.IFileService),J=Oe.get(ee.ILoggerService),ge=await this.claimInstance(qe,K,Ne,ye,Le,!0);return c.Promises.writeFile(K.mainLockfile,String(process.pid)).catch(ve=>{qe.warn(`app#startup(): Error writing main lockfile: ${ve.stack}`)}),Ie.logger=J.createLogger("main",{name:(0,t.localize)(0,null)}),(0,m.once)(Ne.onWillShutdown)(ve=>{He.dispose(),he.dispose(),ve.join("instanceLockfile",c.Promises.unlink(K.mainLockfile).catch(()=>{}))}),ye.createInstance(w.CodeApplication,ge,we).startup()})}catch(Oe){ye.invokeFunction(this.quit,Oe)}}createServices(){const ye=new F.ServiceCollection,we=new re.DisposableStore;process.once("exit",()=>we.dispose());const K={_serviceBrand:void 0,...ue.default};ye.set(ae.IProductService,K);const he=new n.EnvironmentMainService(this.resolveArgs(),K),me=this.patchEnvironment(he);ye.set(n.IEnvironmentMainService,he);const Ie=new V.LoggerMainService((0,ee.getLogLevel)(he),he.logsHome);ye.set(V.ILoggerMainService,Ie);const Le=new oe.BufferLogger(Ie.getLogLevel()),Fe=we.add(new ie.LogService(Le,[new ee.ConsoleMainLogger(Ie.getLogLevel())]));ye.set(ee.ILogService,Fe);const Oe=new M.FileService(Fe);ye.set(k.IFileService,Oe);const qe=new C.DiskFileSystemProvider(Fe);Oe.registerProvider(v.Schemas.file,qe),Oe.registerProvider(v.Schemas.vscodeUserData,new pe.FileUserDataProvider(v.Schemas.file,qe,v.Schemas.vscodeUserData,Fe));const Ne=new le.UriIdentityService(Oe);ye.set(ne.IUriIdentityService,Ne);const He=new fe.StateService(1,he,Fe,Oe);ye.set(se.IStateReadService,He),ye.set(se.IStateService,He);const J=new R.UserDataProfilesMainService(He,Ne,he,Oe,Fe);ye.set(R.IUserDataProfilesMainService,J);const ge=E.isWindows&&K.win32RegValueName?we.add(new N.NativePolicyService(Fe,K.win32RegValueName)):he.policyFile?we.add(new q.FilePolicyService(he.policyFile,Oe,Fe)):new _.NullPolicyService;ye.set(_.IPolicyService,ge);const ve=new s.ConfigurationService(J.defaultProfile.settingsResource,Oe,ge,Fe);return ye.set(a.IConfigurationService,ve),ye.set(z.ILifecycleMainService,new A.SyncDescriptor(z.LifecycleMainService,void 0,!1)),ye.set(W.IRequestService,new A.SyncDescriptor(U.RequestMainService,void 0,!0)),ye.set(x.IThemeMainService,new A.SyncDescriptor(x.ThemeMainService)),ye.set($.ISignService,new A.SyncDescriptor(Y.SignService,void 0,!1)),ye.set(G.ITunnelService,new A.SyncDescriptor(B.TunnelService)),ye.set(de.IProtocolMainService,new j.ProtocolMainService(he,J,Fe)),[new T.InstantiationService(ye,!0),me,he,ve,He,Le,K,J]}patchEnvironment(ye){const we={VSCODE_IPC_HOOK:ye.mainIPCHandle};return["VSCODE_NLS_CONFIG","VSCODE_LOGS","VSCODE_PORTABLE","ADS_LOGS"].forEach(K=>{const he=process.env[K];typeof he=="string"&&(we[K]=he)}),Object.assign(process.env,we),we}async initServices(ye,we,K,he,me){await D.Promises.settled([Promise.all([ye.extensionsPath,ye.codeCachePath,ye.logsHome.fsPath,we.defaultProfile.globalStorageHome.fsPath,ye.workspaceStorageHome.fsPath,ye.localHistoryHome.fsPath,ye.backupHome].map(Ie=>Ie?c.Promises.mkdir(Ie,{recursive:!0}):void 0)),he.init(),K.initialize()]),we.init()}async claimInstance(ye,we,K,he,me,Ie){let Le;try{(0,y.mark)("code/willStartMainServer"),Le=await(0,I.serve)(we.mainIPCHandle),(0,y.mark)("code/didStartMainServer"),(0,m.once)(K.onWillShutdown)(()=>Le.dispose())}catch(Fe){if(Fe.code!=="EADDRINUSE")throw this.handleStartupDataDirError(we,me,Fe),Fe;let Oe;try{Oe=await(0,I.connect)(we.mainIPCHandle,"main")}catch(J){if(!Ie||E.isWindows||J.code!=="ECONNREFUSED")throw J.code==="EPERM"&&this.showStartupWarningDialog((0,t.localize)(1,null,me.nameShort),(0,t.localize)(2,null),me),J;try{(0,L.unlinkSync)(we.mainIPCHandle)}catch(ge){throw ye.warn("Could not delete obsolete instance handle",ge),ge}return this.claimInstance(ye,we,K,he,me,!1)}if(we.extensionTestsLocationURI&&!we.debugExtensionHost.break){const J=`Running extension tests from the command line is currently only supported if no other instance of ${me.nameShort} is running.`;throw ye.error(J),Oe.dispose(),new Error(J)}let qe;!we.args.wait&&!we.args.status&&(qe=setTimeout(()=>{this.showStartupWarningDialog((0,t.localize)(3,null,me.nameShort),(0,t.localize)(4,null),me)},1e4));const Ne=f.ProxyChannel.toService(Oe.getChannel("launch"),{disableMarshalling:!0}),He=f.ProxyChannel.toService(Oe.getChannel("diagnostics"),{disableMarshalling:!0});if(we.args.status)return he.invokeFunction(async()=>{const J=new i.DiagnosticsService(ce.NullTelemetryService,me),ge=await He.getMainDiagnostics(),ve=await He.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0}),Ee=await J.getDiagnostics(ge,ve);throw console.log(Ee),new h.ExpectedError});throw E.isWindows&&await this.windowsAllowSetForegroundWindow(Ne,ye),ye.trace("Sending env to running instance..."),await Ne.start(we.args,process.env),Oe.dispose(),qe&&clearTimeout(qe),new h.ExpectedError("Sent env to running instance. Terminating...")}if(we.args.status)throw console.log((0,t.localize)(5,null,me.nameShort)),new h.ExpectedError("Terminating...");return process.env.VSCODE_PID=String(process.pid),Le}handleStartupDataDirError(ye,we,K){if(K.code==="EACCES"||K.code==="EPERM"){const he=(0,O.coalesce)([ye.userDataPath,ye.extensionsPath,I.XDG_RUNTIME_DIR]).map(me=>(0,g.getPathLabel)(r.URI.file(me),{os:E.OS,tildify:ye}));this.showStartupWarningDialog((0,t.localize)(6,null),(0,t.localize)(7,null,(0,P.toErrorMessage)(K),he.join(`
`)),we)}}showStartupWarningDialog(ye,we,K){b.dialog.showMessageBoxSync((0,Q.massageMessageBoxOptions)({type:"warning",buttons:[(0,t.localize)(8,null)],message:ye,detail:we},K).options)}async windowsAllowSetForegroundWindow(ye,we){if(E.isWindows){const K=await ye.getMainProcessId();we.trace("Sending some foreground love to the running instance:",K);try{(await new Promise((he,me)=>{H(["windows-foreground-love"],he,me)})).allowSetForegroundWindow(K)}catch(he){we.error(he)}}}quit(ye,we){const K=ye.get(ee.ILogService),he=ye.get(z.ILifecycleMainService);let me=0;we&&(we.isExpected?we.message&&K.trace(we.message):(me=1,we.stack?K.error(we.stack):K.error(`Startup error: ${we.toString()}`))),he.kill(me)}resolveArgs(){const ye=this.validatePaths((0,o.parseMainProcessArgv)(process.argv));if(ye.wait&&!ye.waitMarkerFilePath){const we=(0,S.createWaitMarkerFileSync)(ye.verbose);we&&((0,o.addArg)(process.argv,"--waitMarkerFilePath",we),ye.waitMarkerFilePath=we)}return ye}validatePaths(ye){if(ye["open-url"]&&(ye._urls=ye._,ye._=[]),!ye.remote){const we=this.doValidatePaths(ye._,ye.goto);ye._=we}return ye}doValidatePaths(ye,we){const K=(0,l.cwd)(),he=ye.map(Le=>{let Fe=String(Le),Oe;we&&(Oe=(0,u.parseLineAndColumnAware)(Fe),Fe=Oe.path),Fe&&(Fe=this.preparePath(K,Fe));const qe=(0,u.sanitizeFilePath)(Fe,K),Ne=(0,d.basename)(qe);return Ne&&!(0,u.isValidBasename)(Ne)?null:we&&Oe?(Oe.path=qe,this.toPath(Oe)):qe}),me=E.isWindows||E.isMacintosh,Ie=(0,O.distinct)(he,Le=>Le&&me?Le.toLowerCase():Le||"");return(0,O.coalesce)(Ie)}preparePath(ye,we){return E.isWindows&&(we=(0,p.rtrim)(we,'"')),we=(0,p.trim)((0,p.trim)(we," "),"	"),E.isWindows&&(we=(0,d.resolve)(ye,we),we=(0,p.rtrim)(we,".")),we}toPath(ye){const we=[ye.path];return typeof ye.line=="number"&&we.push(String(ye.line)),typeof ye.column=="number"&&we.push(String(ye.column)),we.join(":")}}new Pe().main()})}).call(this);

//# sourceMappingURL=https://sqlopsbuilds.blob.core.windows.net/sourcemaps/82e35eb142bf0f4567ff8c6dd4f16f33abfc2d50/core/vs/code/electron-main/main.js.map