/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/path","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/platform","vs/platform/instantiation/common/instantiation","vs/base/common/errors","vs/base/node/pfs","vs/base/common/types","vs/base/common/objects","vs/base/common/uri","vs/nls","vs/base/common/strings","vs/base/common/async","vs/nls!vs/code/electron-browser/sharedProcess/sharedProcessMain","vs/platform/log/common/log","vs/platform/environment/common/environment","vs/base/common/network","vs/platform/configuration/common/configuration","vs/base/common/arrays","vs/platform/product/node/product","fs","os","vs/base/common/uuid","vs/platform/registry/common/platform","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/configuration/common/configurationRegistry","vs/base/common/cancellation","vs/base/common/amd","vs/base/common/map","vs/platform/product/node/package","vs/base/common/json","vs/base/parts/ipc/common/ipc","vs/base/common/buffer","vs/platform/extensionManagement/common/extensionManagement","vs/base/common/resources","vs/platform/telemetry/common/telemetry","vs/platform/request/node/request","vs/base/common/extpath","vs/base/node/extfs","vs/base/node/request","vs/platform/extensions/common/extensions","vs/platform/ipc/electron-browser/mainProcessService","vs/platform/instantiation/common/serviceCollection","vs/platform/download/common/download","vs/platform/extensions/node/extensionValidator","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/descriptors","vs/platform/localizations/common/localizations","vs/base/common/errorMessage","vs/platform/configuration/common/configurationModels","vs/base/common/iterator","vs/base/common/functional","vs/base/node/zip","vs/nls!vs/platform/extensions/node/extensionValidator","vs/base/parts/ipc/node/ipc.net","vs/platform/extensionManagement/node/extensionGalleryService","vs/nls!vs/base/common/errorMessage","vs/base/common/linkedList","vs/base/common/glob","vs/base/common/normalization","vs/nls!vs/base/node/zip","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/nls!vs/platform/extensionManagement/node/extensionManagementUtil","vs/base/common/assert","vs/nls!vs/platform/request/node/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/workspaces/common/workspaces","vs/base/common/labels","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/extensionManagement/node/extensionManagementIpc","vs/base/common/uriIpc","vs/platform/extensionManagement/node/extensionsManifestCache","vs/base/common/date","vs/platform/instantiation/common/graph","vs/base/node/flow","vs/platform/request/electron-browser/requestService","vs/platform/dialogs/node/dialogIpc","vs/base/node/paths","vs/base/node/proxy","vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner","vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner","url","vs/platform/history/common/history","vs/base/node/stream","vs/platform/instantiation/common/instantiationService","vs/base/common/collections","vs/base/node/encoding","vs/platform/localizations/node/localizationsIpc","vs/platform/request/node/requestService","vs/platform/log/node/logIpc","vs/platform/log/node/spdlogService","child_process","stream","vs/base/common/jsonFormatter","vs/code/electron-browser/sharedProcess/contrib/languagePackCachedDataCleaner","vs/code/electron-browser/sharedProcess/contrib/nodeCachedDataCleaner","vs/platform/environment/node/environmentService","crypto","vs/platform/extensions/node/extensionsUtil","vs/platform/localizations/node/localizations","vs/base/node/config","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/base/common/jsonEdit","vs/base/common/decorators","vs/base/common/process","vs/platform/configuration/node/configuration","vs/platform/configuration/node/configurationService","vs/base/parts/ipc/common/ipc.net","vs/base/parts/ipc/node/ipc.electron","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/appInsightsAppender","vs/platform/download/node/downloadService","vs/platform/telemetry/node/commonProperties","vs/platform/telemetry/node/telemetryIpc","vs/platform/windows/common/windows","vs/platform/workspaces/common/workspaces","vs/platform/windows/electron-browser/windowsService","vs/base/parts/ipc/electron-browser/ipc.electron-browser","electron","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/extensionManagement/node/extensionManagementUtil","yazl","semver","yauzl","zlib","applicationinsights","net","iconv-lite","assert","vs/code/electron-browser/sharedProcess/sharedProcessMain"],t=function(t){
for(var n=[],i=0,r=t.length;i<r;i++)n[i]=e[t[i]];return n};define(e[68],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[34],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof Buffer;class i{static alloc(e){return new i(n?Buffer.allocUnsafe(e):new Uint8Array(e))}static wrap(e){return new i(e)}static fromString(e){return new i(Buffer.from(e))}static concat(e,t){if(void 0===t){t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].byteLength}const n=i.alloc(t);let r=0;for(let t=0,i=e.length;t<i;t++){const i=e[t];n.set(i,r),r+=i.byteLength}return n}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return this.buffer.toString()}slice(e,t){return new i(this.buffer.slice(e,t))}set(e,t){this.buffer.set(e.buffer,t)}readUint32BE(e){return function(e,t){
return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}(this.buffer,e)}writeUint32BE(e,t){!function(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}(this.buffer,e,t)}readUint8(e){return function(e,t){return e[t]}(this.buffer,e)}writeUint8(e,t){!function(e,t,n){e[n]=t}(this.buffer,e,t)}}t.VSBuffer=i}),define(e[91],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=Object.prototype.hasOwnProperty;t.values=function(e){const t=[];for(let i in e)n.call(e,i)&&t.push(e[i]);return t},t.size=function(e){let t=0;for(let i in e)n.call(e,i)&&(t+=1);return t},t.first=function(e){for(let t in e)if(n.call(e,t))return e[t]},t.forEach=function(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},function(){delete e[i]}))return},t.groupBy=function(e,t){const n=Object.create(null);for(const i of e){const e=t(i);let r=n[e];r||(r=n[e]=[]),r.push(i)}return n},t.fromMap=function(e){const t=Object.create(null);return e&&e.forEach((e,n)=>{t[n]=e}),
t}}),define(e[109],t([0,1]),function(e,t){"use strict";function n(e){return(t,n,i)=>{let r=null,s=null;if("function"==typeof i.value?(r="value",s=i.value):"function"==typeof i.get&&(r="get",s=i.get),!s)throw new Error("not supported");i[r]=e(s,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=n,t.memoize=function(e,t,n){let i=null,r=null;if("function"==typeof n.value?(i="value",0!==(r=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",r=n.get),!r)throw new Error("not supported");const s=`$memoize$${t}`;n[i]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,e)}),this[s]}},t.debounce=function(e,t,i){return n((n,r)=>{const s=`$debounce$${r}`,o=`$debounce$result$${r}`;return function(...r){this[o]||(this[o]=i?i():void 0),clearTimeout(this[s]),t&&(this[o]=t(this[o],...r),r=[this[o]]),this[s]=setTimeout(()=>{n.apply(this,r),
this[o]=i?i():void 0},e)}})}}),define(e[7],t([0,1]),function(e,t){"use strict";function n(e){return e instanceof Error&&e.name===r&&e.message===r}Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}t.ErrorHandler=i,t.errorHandler=new i,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=function(e){n(e)||t.errorHandler.onUnexpectedError(e)},
t.onUnexpectedExternalError=function(e){n(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error){let{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e};const r="Canceled";t.isPromiseCanceledError=n,t.canceled=function(){const e=new Error(r);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")},t.readonly=function(e){return e?new Error(`readonly property '${e} cannot be changed'`):new Error("readonly property cannot be changed")},t.disposed=function(e){const t=new Error(`${e} has been disposed`);return t.name="DISPOSED",t},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}});var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,s){function o(e){
try{c(i.next(e))}catch(e){s(e)}}function a(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(o,a)}c((i=i.apply(e,t||[])).next())})};define(e[20],t([0,1,7]),function(e,t,i){"use strict";function r(e,t){let n=0,i=e.length;if(0===i)return 0;for(;n<i;){const r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}function s(e,t){return o(e,t,0,e.length-1,[]),e}function o(e,t,n,i,r){if(i<=n)return;const s=n+(i-n)/2|0;o(e,t,n,s,r),o(e,t,s+1,i,r),t(e[s],e[s+1])<=0||function(e,t,n,i,r,s){let o=n,a=i+1;for(let t=n;t<=r;t++)s[t]=e[t];for(let c=n;c<=r;c++)o>i?e[c]=s[a++]:a>r?e[c]=s[o++]:t(s[a],s[o])<0?e[c]=s[a++]:e[c]=s[o++]}(e,t,n,s,i,r)}function a(e,t,n){function i(e,t,n){if(0===t&&0===n.length)return;const i=r[r.length-1];i&&i.start+i.deleteCount===e?(i.deleteCount+=t,i.toInsert.push(...n)):r.push({start:e,deleteCount:t,toInsert:n})}const r=[];let s=0,o=0;for(;;){if(s===e.length){i(s,0,t.slice(o));break}if(o===t.length){i(s,e.length-s,[]);break}
const r=e[s],a=t[o],c=n(r,a);0===c?(s+=1,o+=1):c<0?(i(s,1,[]),s+=1):c>0&&(i(s,0,[a]),o+=1)}return r}function c(e,t,n,i,s){for(const o=n.length;i<s;i++){const s=e[i];if(t(s,n[o-1])<0){n.pop();const e=r(n,e=>t(s,e)<0);n.splice(e,0,s)}}}function l(e,t){for(let n=0;n<e.length;n++){if(t(e[n]))return n}return-1}Object.defineProperty(t,"__esModule",{value:!0}),t.tail=function(e,t=0){return e[e.length-(1+t)]},t.tail2=function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]},t.equals=function(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0},t.binarySearch=function(e,t,n){let i=0,r=e.length-1;for(;i<=r;){const s=(i+r)/2|0,o=n(e[s],t);if(o<0)i=s+1;else{if(!(o>0))return s;r=s-1}}return-(i+1)},t.findFirstInSorted=r,t.mergeSort=s,t.groupBy=function(e,t){const n=[];let i=void 0;for(const r of s(e.slice(0),t))i&&0===t(i[0],r)?i.push(r):(i=[r],n.push(i));return n},
t.sortedDiff=a,t.delta=function(e,t,n){const i=a(e,t,n),r=[],s=[];for(const t of i)r.push(...e.slice(t.start,t.start+t.deleteCount)),s.push(...t.toInsert);return{removed:r,added:s}},t.top=function(e,t,n){if(0===n)return[];const i=e.slice(0,n).sort(t);return c(e,t,i,n,e.length),i},t.topAsync=function(e,t,r,s,o){return 0===r?Promise.resolve([]):new Promise((a,l)=>{(()=>n(this,void 0,void 0,function*(){const n=e.length,a=e.slice(0,r).sort(t);for(let l=r,u=Math.min(r+s,n);l<n;l=u,u=Math.min(u+s,n)){if(l>r&&(yield new Promise(e=>setTimeout(e))),o&&o.isCancellationRequested)throw i.canceled();c(e,t,a,l,u)}return a}))().then(a,l)})},t.coalesce=function(e){return e?e.filter(e=>!!e):e},t.coalesceInPlace=function(e){if(!e)return;let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t},t.move=function(e,t,n){e.splice(n,0,e.splice(t,1)[0])},t.isFalsyOrEmpty=function(e){return!Array.isArray(e)||0===e.length},t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.distinct=function(e,t){
if(!t)return e.filter((t,n)=>e.indexOf(t)===n);const n=Object.create(null);return e.filter(e=>{const i=t(e);return!n[i]&&(n[i]=!0,!0)})},t.distinctES6=function(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))},t.uniqueFilter=function(e){const t=Object.create(null);return n=>{const i=e(n);return!t[i]&&(t[i]=!0,!0)}},t.lastIndex=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1},t.firstIndex=l,t.first=function(e,t,n){const i=l(e,t);return i<0?n:e[i]},t.commonPrefixLength=function(e,t,n=((e,t)=>e===t)){let i=0;for(let r=0,s=Math.min(e.length,t.length);r<s&&n(e[r],t[r]);r++)i++;return i},t.flatten=function(e){return[].concat(...e)},t.range=function(e,t){let n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);const i=[];if(n<=t)for(let e=n;e<t;e++)i.push(e);else for(let e=n;e>t;e--)i.push(e);return i},t.fill=function(e,t,n=[]){for(let i=0;i<e;i++)n[i]=t;return n},t.index=function(e,t,n=(e=>e)){return e.reduce((e,i)=>{const r=t(i);return e[r]=n(i,e[r]),e
},Object.create(null))},t.insert=function(e,t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)},t.shuffle=function(e,t){let n;if("number"==typeof t){let e=t;n=(()=>{const t=179426549*Math.sin(e++);return t-Math.floor(t)})}else n=Math.random;for(let t=e.length-1;t>0;t-=1){const i=Math.floor(n()*(t+1)),r=e[t];e[t]=e[i],e[i]=r}},t.pushToStart=function(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))},t.find=function(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(t(i,n,e))return i}},t.mapArrayOrNot=function(e,t){return Array.isArray(e)?e.map(t):t(e)},t.asArray=function(e){return Array.isArray(e)?e:[e]}}),define(e[53],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){const t=this;let n,i=!1;return function(){return i?n:(i=!0,n=e.apply(t,arguments))}}}),
define(e[52],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FIN={done:!0,value:void 0};var n;!function(e){function n(e,t){for(let n=e.next();!n.done;n=e.next())t(n.value)}const i={next:()=>t.FIN};e.empty=function(){return i},e.fromArray=function(e,n=0,i=e.length){return{next:()=>n>=i?t.FIN:{done:!1,value:e[n++]}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,n){return{next(){const i=e.next();return i.done?t.FIN:{done:!1,value:n(i.value)}}}},e.filter=function(e,n){return{next(){for(;;){const i=e.next();if(i.done)return t.FIN;if(n(i.value))return{done:!1,value:i.value}}}}},e.forEach=n,e.collect=function(e){const t=[];return n(e,e=>t.push(e)),t}}(n=t.Iterator||(t.Iterator={})),t.getSequenceIterator=function(e){return Array.isArray(e)?n.fromArray(e):e};class i{constructor(e,t=0,n=e.length,i=t-1){this.items=e,this.start=t,this.end=n,this.index=i}first(){return this.index=this.start,this.current()}next(){
return this.index=Math.min(this.index+1,this.end),this.current()}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}}t.ArrayIterator=i;class r extends i{constructor(e,t=0,n=e.length,i=t-1){super(e,t,n,i)}current(){return super.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}parent(){return null}}t.ArrayNavigator=r;class s{constructor(e,t){this.iterator=e,this.fn=t}next(){return this.fn(this.iterator.next())}}t.MappedIterator=s;class o extends s{constructor(e,t){super(e,t),this.navigator=e}current(){return this.fn(this.navigator.current())}previous(){return this.fn(this.navigator.previous())}parent(){return this.fn(this.navigator.parent())}first(){return this.fn(this.navigator.first())}last(){return this.fn(this.navigator.last())}next(){return this.fn(this.navigator.next())}}t.MappedNavigator=o}),
define(e[32],t([0,1]),function(e,t){"use strict";function n(e,t=!1){function n(t){let n=0,i=0;for(;n<t;){const t=e.charCodeAt(a);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}a++,n++}return n<t&&(i=-1),i}function o(){if(l="",d=0,u=a,a>=c)return u=c,h=17;let t=e.charCodeAt(a);if(i(t)){do{a++,l+=String.fromCharCode(t),t=e.charCodeAt(a)}while(i(t));return h=15}if(r(t))return a++,l+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,l+="\n"),h=14;switch(t){case 123:return a++,h=1;case 125:return a++,h=2;case 91:return a++,h=3;case 93:return a++,h=4;case 58:return a++,h=6;case 44:return a++,h=5;case 34:return a++,l=function(){let t="",i=a;for(;;){if(a>=c){t+=e.substring(i,a),d=2;break}let s=e.charCodeAt(a);if(34===s){t+=e.substring(i,a),a++;break}if(92!==s){if(s>=0&&s<=31){if(r(s)){t+=e.substring(i,a),d=2;break}d=6}a++}else{if(t+=e.substring(i,a),++a>=c){d=2;break}switch(i=e.charCodeAt(a++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:
t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const i=n(4);i>=0?t+=String.fromCharCode(i):d=4;break;default:d=5}i=a}}return t}(),h=10;case 47:const o=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<c&&!r(e.charCodeAt(a));)a++;return l=e.substring(o,a),h=12}if(42===e.charCodeAt(a+1)){a+=2;const t=c-1;let n=!1;for(;a<t;){if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,n=!0;break}a++}return n||(a++,d=1),l=e.substring(o,a),h=13}return l+=String.fromCharCode(t),a++,h=16;case 45:if(l+=String.fromCharCode(t),++a===c||!s(e.charCodeAt(a)))return h=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return l+=function(){const t=a;if(48===e.charCodeAt(a))a++;else for(a++;a<e.length&&s(e.charCodeAt(a));)a++;if(a<e.length&&46===e.charCodeAt(a)){if(!(++a<e.length&&s(e.charCodeAt(a))))return d=3,e.substring(t,a);for(a++;a<e.length&&s(e.charCodeAt(a));)a++}let n=a
;if(a<e.length&&(69===e.charCodeAt(a)||101===e.charCodeAt(a)))if((++a<e.length&&43===e.charCodeAt(a)||45===e.charCodeAt(a))&&a++,a<e.length&&s(e.charCodeAt(a))){for(a++;a<e.length&&s(e.charCodeAt(a));)a++;n=a}else d=3;return e.substring(t,n)}(),h=11;default:for(;a<c&&function(e){if(i(e)||r(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}(t);)a++,t=e.charCodeAt(a);if(u!==a){switch(l=e.substring(u,a)){case"true":return h=8;case"false":return h=9;case"null":return h=7}return h=16}return l+=String.fromCharCode(t),a++,h=16}}let a=0,c=e.length,l="",u=0,h=16,d=0;return{setPosition:function(e){a=e,l="",u=0,h=16,d=0},getPosition:()=>a,scan:t?function(){let e;do{e=o()}while(e>=12&&e<=15);return e}:o,getToken:()=>h,getTokenValue:()=>l,getTokenOffset:()=>u,getTokenLength:()=>a-u,getTokenError:()=>d}}function i(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){
return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function o(e){if(!e.parent||!e.parent.children)return[];const t=o(e.parent);if("property"===e.parent.type){const n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){const n=e.parent.children.indexOf(e);-1!==n&&t.push(n)}return t}function a(e){switch(e.type){case"array":return e.children.map(a);case"object":const t=Object.create(null);for(let n of e.children){const e=n.children[1];e&&(t[n.children[0].value]=a(e))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function c(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function l(e,t,n=!1){if(c(e,t,n)){const i=e.children;if(Array.isArray(i))for(let e=0;e<i.length&&i[e].offset<=t;e++){const r=l(i[e],t,n);if(r)return r}return e}}function u(e,t,i=d.DEFAULT){function r(e){return e?()=>e(h.getTokenOffset(),h.getTokenLength()):()=>!0}function s(e){
return e?t=>e(t,h.getTokenOffset(),h.getTokenLength()):()=>!0}function o(){for(;;){const e=h.scan();switch(h.getTokenError()){case 4:a(14);break;case 5:a(15);break;case 3:a(13);break;case 1:E||a(11);break;case 2:a(12);break;case 6:a(16)}switch(e){case 12:case 13:E?a(10):C();break;case 16:a(1);break;case 15:case 14:break;default:return e}}}function a(e,t=[],n=[]){if(w(e),t.length+n.length>0){let e=h.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){o();break}if(-1!==n.indexOf(e))break;e=o()}}}function c(e){const t=h.getTokenValue();return e?y(t):g(t),o(),!0}function l(){return 10!==h.getToken()?(a(3,[],[2,5]),!1):(c(!1),6===h.getToken()?(_(":"),o(),u()||a(4,[],[2,5])):a(5,[],[2,5]),!0)}function u(){switch(h.getToken()){case 3:return function(){m(),o();let e=!1;for(;4!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),_(","),o(),4===h.getToken()&&b)break}else e&&a(6,[],[]);u()||a(4,[],[4,5]),e=!0}return v(),4!==h.getToken()?a(8,[4],[]):o(),!0}();case 1:return function(){f(),o();let e=!1
;for(;2!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),_(","),o(),2===h.getToken()&&b)break}else e&&a(6,[],[]);l()||a(4,[],[2,5]),e=!0}return p(),2!==h.getToken()?a(7,[2],[]):o(),!0}();case 10:return c(!0);default:return function(){switch(h.getToken()){case 11:let e=0;try{"number"!=typeof(e=JSON.parse(h.getTokenValue()))&&(a(2),e=0)}catch(e){a(2)}y(e);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return o(),!0}()}}const h=n(e,!1),f=r(t.onObjectBegin),g=s(t.onObjectProperty),p=r(t.onObjectEnd),m=r(t.onArrayBegin),v=r(t.onArrayEnd),y=s(t.onLiteralValue),_=s(t.onSeparator),C=r(t.onComment),w=s(t.onError),E=i&&i.disallowComments,b=i&&i.allowTrailingComma;return o(),17===h.getToken()||(u()?(17!==h.getToken()&&a(9,[],[]),!0):(a(4,[],[]),!1))}function h(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){
e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(t.ScanError||(t.ScanError={}));!function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(t.SyntaxKind||(t.SyntaxKind={}));!function(e){
e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(t.ParseErrorCode||(t.ParseErrorCode={}));var d;!function(e){e.DEFAULT={allowTrailingComma:!0}}(d=t.ParseOptions||(t.ParseOptions={})),t.createScanner=n;var f;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",
e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",
e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",
e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(f||(f={})),t.getLocation=function(e,t){function n(e,t,n,i){o.value=e,o.offset=t,o.length=n,o.type=i,o.colonOffset=void 0,s=o}const i=[],r=new Object;let s=void 0;const o={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;try{u(e,{onObjectBegin:(e,n)=>{if(t<=e)throw r;s=void 0,a=t>e,i.push("")},onObjectProperty:(e,s,o)=>{if(t<s)throw r
;if(n(e,s,o,"property"),i[i.length-1]=e,t<=s+o)throw r},onObjectEnd:(e,n)=>{if(t<=e)throw r;s=void 0,i.pop()},onArrayBegin:(e,n)=>{if(t<=e)throw r;s=void 0,i.push(0)},onArrayEnd:(e,n)=>{if(t<=e)throw r;s=void 0,i.pop()},onLiteralValue:(e,i,s)=>{if(t<i)throw r;if(n(e,i,s,h(e)),t<=i+s)throw r},onSeparator:(e,n,o)=>{if(t<=n)throw r;if(":"===e&&s&&"property"===s.type)s.colonOffset=n,a=!1,s=void 0;else if(","===e){const e=i[i.length-1];"number"==typeof e?i[i.length-1]=e+1:(a=!0,i[i.length-1]=""),s=void 0}}})}catch(e){if(e!==r)throw e}return{path:i,previousNode:s,isAtPropertyKey:a,matches:e=>{let t=0;for(let n=0;t<e.length&&n<i.length;n++)if(e[t]===i[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.parse=function(e,t=[],n=d.DEFAULT){function i(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let r=null,s=[];const o=[];return u(e,{onObjectBegin:()=>{const e={};i(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{const e=[];i(e),o.push(s),s=e,r=null},
onArrayEnd:()=>{s=o.pop()},onLiteralValue:i,onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n),s[0]},t.parseTree=function(e,t=[],n=d.DEFAULT){function i(e){"property"===s.type&&(s.length=e-s.offset,s=s.parent)}function r(e){return s.children.push(e),e}let s={type:"array",offset:-1,length:-1,children:[],parent:void 0};u(e,{onObjectBegin:e=>{s=r({type:"object",offset:e,length:-1,parent:s,children:[]})},onObjectProperty:(e,t,n)=>{(s=r({type:"property",offset:t,length:-1,parent:s,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:s})},onObjectEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,i(e+t)},onArrayBegin:(e,t)=>{s=r({type:"array",offset:e,length:-1,parent:s,children:[]})},onArrayEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,i(e+t)},onLiteralValue:(e,t,n)=>{r({type:h(e),offset:t,length:n,parent:s,value:e}),i(t+n)},onSeparator:(e,t,n)=>{"property"===s.type&&(":"===e?s.colonOffset=t:","===e&&i(t))},onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n);const o=s.children[0]
;return o&&delete o.parent,o},t.findNodeAtLocation=function(e,t){if(!e)return;let n=e;for(let e of t)if("string"==typeof e){if("object"!==n.type||!Array.isArray(n.children))return;let t=!1;for(const i of n.children)if(Array.isArray(i.children)&&i.children[0].value===e){n=i.children[1],t=!0;break}if(!t)return}else{const t=e;if("array"!==n.type||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n},t.getNodePath=o,t.getNodeValue=a,t.contains=c,t.findNodeAtOffset=l,t.visit=u,t.stripComments=function(e,t){let i,r,s=n(e),o=[],a=0;do{switch(r=s.getPosition(),i=s.scan()){case 12:case 13:case 17:a!==r&&o.push(e.substring(a,r)),void 0!==t&&o.push(s.getTokenValue().replace(/[^\r\n]/g,t)),a=s.getPosition()}}while(17!==i);return o.join("")}}),define(e[99],t([0,1,32]),function(e,t,n){"use strict";function i(e,t,i){function o(){return g+r(p,l+v)}function a(){let e=y.scan();for(m=!1;15===e||14===e;)m=m||14===e,e=y.scan();return _=16===e||0!==y.getTokenError(),e}function c(t,n,i){
!_&&n<f&&i>d&&e.substring(n,i)!==t&&C.push({offset:n,length:i-n,content:t})}let l,u,h,d,f;if(t){for(d=t.offset,f=d+t.length,h=d;h>0&&!s(e,h-1);)h--;let n=f;for(;n<e.length&&!s(e,n);)n++;u=e.substring(h,n),l=function(e,t){let n=0,i=0;const r=t.tabSize||4;for(;n<e.length;){const t=e.charAt(n);if(" "===t)i++;else{if("\t"!==t)break;i+=r}n++}return Math.floor(i/r)}(u,i)}else u=e,l=0,h=0,d=0,f=e.length;const g=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(i,e);let p,m=!1,v=0;p=i.insertSpaces?r(" ",i.tabSize||4):"\t";const y=n.createScanner(u,!1);let _=!1;const C=[];let w=a();if(17!==w){const e=y.getTokenOffset()+h;c(r(p,l),h,e)}for(;17!==w;){let e=y.getTokenOffset()+y.getTokenLength()+h,t=a(),n="";for(;!m&&(12===t||13===t);){c(" ",e,y.getTokenOffset()+h),e=y.getTokenOffset()+y.getTokenLength()+h,n=12===t?o():"",t=a()}if(2===t)1!==w&&(v--,n=o());else if(4===t)3!==w&&(v--,n=o());else{
switch(w){case 3:case 1:v++,n=o();break;case 5:case 12:n=o();break;case 13:n=m?o():" ";break;case 6:n=" ";break;case 10:if(6===t){n="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===t||13===t?n=" ":5!==t&&17!==t&&(_=!0);break;case 16:_=!0}!m||12!==t&&13!==t||(n=o())}c(n,e,y.getTokenOffset()+h),w=t}return C}function r(e,t){let n="";for(let i=0;i<t;i++)n+=e;return n}function s(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.format=i,t.isEOL=s}),define(e[108],t([0,1,32,99]),function(e,t,n,i){"use strict";function r(e,t,i,r,o){const a=t.slice(),c=n.parseTree(e,[]);let l=void 0,u=void 0;for(;a.length>0&&(u=a.pop(),void 0===(l=n.findNodeAtLocation(c,a))&&void 0!==i);)i="string"==typeof u?{[u]:i}:[i];if(l){if("object"===l.type&&"string"==typeof u&&Array.isArray(l.children)){const t=n.findNodeAtLocation(l,[u]);if(void 0!==t){if(void 0===i){if(!t.parent)throw new Error("Malformed AST");const n=l.children.indexOf(t.parent);let i,o=t.parent.offset+t.parent.length
;if(n>0){const e=l.children[n-1];i=e.offset+e.length}else if(i=l.offset+1,l.children.length>1){o=l.children[1].offset}return s(e,{offset:i,length:o-i,content:""},r)}return s(e,{offset:t.offset,length:t.length,content:JSON.stringify(i)},r)}{if(void 0===i)return[];const t=`${JSON.stringify(u)}: ${JSON.stringify(i)}`,n=o?o(l.children.map(e=>e.children[0].value)):l.children.length;let a;if(n>0){const e=l.children[n-1];a={offset:e.offset+e.length,length:0,content:","+t}}else a=0===l.children.length?{offset:l.offset+1,length:0,content:t}:{offset:l.offset+1,length:0,content:t+","};return s(e,a,r)}}if("array"===l.type&&"number"==typeof u&&Array.isArray(l.children)){if(-1===u){const t=`${JSON.stringify(i)}`;let n;if(0===l.children.length)n={offset:l.offset+1,length:0,content:t};else{const e=l.children[l.children.length-1];n={offset:e.offset+e.length,length:0,content:","+t}}return s(e,n,r)}if(void 0===i&&l.children.length>=0){const t=u,n=l.children[t];let i;if(1===l.children.length)i={offset:l.offset+1,
length:l.length-2,content:""};else if(l.children.length-1===t){const e=l.children[t-1],n=e.offset+e.length;i={offset:n,length:l.offset+l.length-2-n,content:""}}else i={offset:n.offset,length:l.children[t+1].offset-n.offset,content:""};return s(e,i,r)}throw new Error("Array modification not supported yet")}throw new Error(`Can not add ${"number"!=typeof u?"index":"property"} to parent of type ${l.type}`)}if(void 0===i)throw new Error("Can not delete in empty document");return s(e,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(i)},r)}function s(e,t,n){let r=o(e,t),s=t.offset,a=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;s>0&&!i.isEOL(r,s-1);)s--;for(;a<r.length&&!i.isEOL(r,a);)a++}const c=i.format(r,{offset:s,length:a-s},n);for(let e=c.length-1;e>=0;e--){const t=c[e];r=o(r,t),s=Math.min(s,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}return[{offset:s,length:e.length-(r.length-a)-s,content:r.substring(s,a)}]}function o(e,t){
return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.removeProperty=function(e,t,n){return r(e,t,void 0,n)},t.setProperty=r,t.applyEdit=o,t.isWS=function(e,t){return-1!=="\r\n \t".indexOf(e.charAt(t))}}),define(e[3],t([0,1,53]),function(e,t,n){"use strict";function i(e,...t){if(Array.isArray(e))return e.forEach(e=>e&&e.dispose()),[];if(0!==t.length)return i(e),i(t),[];if(e)return e.dispose(),e}Object.defineProperty(t,"__esModule",{value:!0}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=i,t.combinedDisposable=function(e){return{dispose:()=>i(e)}},t.toDisposable=function(e){return{dispose(){e()}}};class r{constructor(){this._toDispose=[],this._lifecycle_disposable_isDisposed=!1}get toDispose(){return this._toDispose}dispose(){this._lifecycle_disposable_isDisposed=!0,this._toDispose=i(this._toDispose)}_register(e){
return this._lifecycle_disposable_isDisposed?(console.warn("Registering disposable on object that has already been disposed."),e.dispose()):this._toDispose.push(e),e}}r.None=Object.freeze({dispose(){}}),t.Disposable=r;class s{constructor(){this.references=Object.create(null)}acquire(e){let t=this.references[e];t||(t=this.references[e]={counter:0,object:this.createReferencedObject(e)});const{object:i}=t,r=n.once(()=>{0==--t.counter&&(this.destroyReferencedObject(e,t.object),delete this.references[e])});return t.counter++,{object:i,dispose:r}}}t.ReferenceCollection=s;class o{constructor(e){this.object=e}dispose(){}}t.ImmortalReference=o}),define(e[59],t([0,1,52]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this.element=e}}class r{constructor(){this._size=0}get size(){return this._size}isEmpty(){return!this._first}clear(){this._first=void 0,this._last=void 0,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){
const n=new i(e);if(this._first)if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}else this._first=n,this._last=n;return this._size+=1,this._remove.bind(this,n)}shift(){if(this._first){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last){const e=this._last.element;return this._remove(this._last),e}}_remove(e){let t=this._first;for(;t instanceof i;){if(t===e){if(t.prev&&t.next){const e=t.prev;e.next=t.next,t.next.prev=e}else t.prev||t.next?t.next?t.prev||(this._first=this._first.next,this._first.prev=void 0):(this._last=this._last.prev,this._last.next=void 0):(this._first=void 0,this._last=void 0);this._size-=1;break}t=t.next}}iterator(){let e,t=this._first;return{next:()=>t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):n.FIN}}toArray(){const e=[];for(let t=this._first;t instanceof i;t=t.next)e.push(t.element);return e}}t.LinkedList=r}),define(e[4],t([0,1,7,53,3,59]),function(e,t,i,r,s,o){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){function t(e){return(t,n=null,i)=>{let r,s=!1;return r=e(e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)},null,i),s&&r.dispose(),r}}function n(e,t){return a((n,i=null,r)=>e(e=>n.call(i,t(e)),null,r))}function i(e,t){return a((n,i=null,r)=>e(e=>{t(e),n.call(i,e)},null,r))}function r(e,t){return a((n,i=null,r)=>e(e=>t(e)&&n.call(i,e),null,r))}function o(e,t,i){let r=i;return n(e,e=>r=t(r,e))}function a(e){let t;const n=new u({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function c(e){let t,n=!0;return r(e,e=>{const i=n||e!==t;return n=!1,t=e,i})}const l={dispose(){}};e.None=function(){return l},e.once=t,e.map=n,e.forEach=i,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>s.combinedDisposable(e.map(e=>e(e=>t.call(n,e),null,i)))},e.reduce=o,e.snapshot=a,e.debounce=function(e,t,n=100,i=!1,r){let s,o=void 0,a=void 0,c=0;const l=new u({leakWarningThreshold:r,
onFirstListenerAdd(){s=e(e=>{c++,o=t(o,e),i&&!a&&l.fire(o),clearTimeout(a),a=setTimeout(()=>{const e=o;o=void 0,a=void 0,(!i||c>1)&&l.fire(e),c=0},n)})},onLastListenerRemove(){s.dispose()}});return l.event},e.stopwatch=function(e){const i=(new Date).getTime();return n(t(e),e=>(new Date).getTime()-i)},e.latch=c,e.buffer=function(e,t=!1,n=[]){let i=n.slice(),r=e(e=>{i?i.push(e):o.fire(e)});const s=()=>{i&&i.forEach(e=>o.fire(e)),i=null},o=new u({onFirstListenerAdd(){r||(r=e(e=>o.fire(e)))},onFirstListenerDidAdd(){i&&(t?setTimeout(s):s())},onLastListenerRemove(){r&&r.dispose(),r=null}});return o.event},e.echo=function(e,t=!1,n=[]){n=n.slice(),e(e=>{n.push(e),r.fire(e)});const i=(e,t)=>n.forEach(n=>e.call(t,n)),r=new u({onListenerDidAdd(e,n,r){t?setTimeout(()=>i(n,r)):i(n,r)}});return r.event};class h{constructor(e){this.event=e}map(e){return new h(n(this.event,e))}forEach(e){return new h(i(this.event,e))}filter(e){return new h(r(this.event,e))}reduce(e,t){return new h(o(this.event,e,t))}latch(){
return new h(c(this.event))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new u({onFirstListenerAdd:()=>e.on(t,i),onLastListenerRemove:()=>e.removeListener(t,i)});return r.event},e.fromPromise=function(e){const t=new u;let n=!1;return e.then(void 0,()=>null).then(()=>{n?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),n=!0,t.event},e.toPromise=function(e){return new Promise(n=>t(e)(n))}}(a=t.Event||(t.Event={}));let c=-1;t.setGlobalLeakWarningThreshold=function(e){const t=c;return c=e,{dispose(){c=t}}};class l{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=c;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map)
;const n=(new Error).stack.split("\n").slice(3).join("\n"),i=this._stacks.get(n)||0;if(this._stacks.set(n,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*t;let n,i=0;this._stacks.forEach((e,t)=>{(!n||i<e)&&(n=t,i=e)}),console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${i}):`),console.warn(n)}return()=>{const e=this._stacks.get(n)||0;this._stacks.set(n,e-1)}}}class u{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=c>0?new l(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=((e,t,n)=>{this._listeners||(this._listeners=new o.LinkedList);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(t?[e,t]:e);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),
this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);let s;this._leakageMon&&(s=this._leakageMon.check(this._listeners.size));let a;return a={dispose:()=>{if(s&&s(),a.dispose=u._noop,!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}},Array.isArray(n)&&n.push(a),a})),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(let t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){i.onUnexpectedError(e)}}}}dispose(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}u._noop=function(){},t.Emitter=u;class h extends u{fireAsync(e){
return n(this,void 0,void 0,function*(){if(this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]);for(let t=this._listeners.iterator(),n=t.next();!n.done;n=t.next()){const t=[];this._asyncDeliveryQueue.push([n.value,e(t,"function"==typeof n.value?n.value:n.value[0]),t])}for(;this._asyncDeliveryQueue.length>0;){const[e,t,n]=this._asyncDeliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){i.onUnexpectedError(e);continue}Object.freeze(n),yield Promise.all(n)}}})}}t.AsyncEmitter=h;class d{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);return s.toDisposable(r.once(()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)}))}onFirstListenerAdd(){this.hasListeners=!0,
this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(e=>this.emitter.fire(e))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}t.EventMultiplexer=d;class f{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(e=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>t.call(n,e)):t.call(n,e)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(e=>e()),n}}t.EventBufferer=f;class g{constructor(){this.listening=!1,this.inputEvent=a.None,this.inputEventListener=s.Disposable.None,this.emitter=new u({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),
this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}t.Relay=g}),define(e[28],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var r;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));class s{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?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class o{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}t.CancellationTokenSource=o}),define(e[14],t([0,1,28,7,4,3]),function(e,t,i,r,s,o){"use strict";function a(e){return e&&"function"==typeof e.then}function c(e){const t=new i.CancellationTokenSource,n=e(t.token),s=new Promise((e,i)=>{t.token.onCancellationRequested(()=>{i(r.canceled())}),Promise.resolve(n).then(n=>{t.dispose(),e(n)},e=>{t.dispose(),i(e)})});return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function l(e,t){return t?new Promise((n,i)=>{const s=setTimeout(n,e)
;t.onCancellationRequested(()=>{clearTimeout(s),i(r.canceled())})}):c(t=>l(e,t))}function u(e){function t(s){void 0!==s&&null!==s&&n.push(s);const o=i<r?e[i++]():null;return o?o.then(t):Promise.resolve(n)}const n=[];let i=0;const r=e.length;return Promise.resolve(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=a,t.createCancelablePromise=c,t.asPromise=function(e){return new Promise((t,n)=>{const i=e();a(i)?i.then(t,n):t(i)})};class h{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{
this.activePromise=null,t(e)})})}}t.Throttler=h;class d{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e())}}t.Sequencer=d;class f{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{this.completionPromise=null,this.doResolve=null;const e=this.task;return this.task=null,e()})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject(r.canceled()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}t.Delayer=f;class g{constructor(e){this.delayer=new f(e),this.throttler=new h}
trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}t.ThrottledDelayer=g;class p{constructor(){this._isOpen=!1,this._promise=new Promise((e,t)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}t.Barrier=p,t.timeout=l,t.disposableTimeout=function(e,t=0){const n=setTimeout(e,t);return o.toDisposable(()=>clearTimeout(n))},t.ignoreErrors=function(e){return e.then(void 0,e=>void 0)},t.sequence=u,t.first=function(e,t=(e=>!!e),n=null){let i=0;const r=e.length,s=()=>{if(i>=r)return Promise.resolve(n);const o=e[i++];return Promise.resolve(o()).then(e=>t(e)?Promise.resolve(e):s())};return s()};class m{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new s.Emitter}get onFinished(){return this._onFinished.event}get size(){
return this._size}queue(e){return this._size++,new Promise((t,n)=>{this.outstandingPromises.push({factory:e,c:t,e:n}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const e=this.outstandingPromises.shift();this.runningPromises++;const t=e.factory();t.then(e.c,e.e),t.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()}dispose(){this._onFinished.dispose()}}t.Limiter=m;class v extends m{constructor(){super(1)}}t.Queue=v;class y{constructor(){this.queues=Object.create(null)}queueFor(e){const t=e.toString();if(!this.queues[t]){const e=new v;e.onFinished(()=>{e.dispose(),delete this.queues[t]}),this.queues[t]=e}return this.queues[t]}}t.ResourceQueue=y;class _ extends o.Disposable{constructor(e,t){super(),this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),super.dispose()}cancel(){
-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}t.TimeoutTimer=_;class C extends o.Disposable{constructor(){super(),this._token=-1}dispose(){this.cancel(),super.dispose()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}t.IntervalTimer=C;class w{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}t.RunOnceScheduler=w
;class E extends w{constructor(e,t){super(e,t),this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){const e=this.units;this.units=[],this.runner&&this.runner(e)}dispose(){this.units=[],super.dispose()}}t.RunOnceWorker=E,t.nfcall=function(e,...t){return new Promise((n,i)=>e(...t,(e,t)=>e?i(e):n(t)))},t.ninvoke=function(e,t,...n){return new Promise((i,r)=>t.call(e,...n,(e,t)=>e?r(e):i(t)))},function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});t.runWhenIdle=(t=>{const n=setTimeout(()=>t(e));let i=!1;return{dispose(){i||(i=!0,clearTimeout(n))}}})}else t.runWhenIdle=((e,t)=>{const n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(n))}}})}();class b{constructor(e){this._didRun=!1,this._executor=(()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}}),this._handle=t.runWhenIdle(()=>this._executor())}
dispose(){this._handle.dispose()}getValue(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}t.IdleValue=b,t.retry=function(e,t,i){return n(this,void 0,void 0,function*(){let n;for(let r=0;r<i;r++)try{return yield e()}catch(e){n=e,yield l(t)}return Promise.reject(n)})}}),define(e[18],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command"}(t.Schemas||(t.Schemas={}))}),define(e[5],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=!1,i=!1,r=!1,s=!1,o=!1,a=void 0,c="en",l=void 0;const u="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type
;if("object"!=typeof navigator||u){if("object"==typeof process){n="win32"===process.platform,i="darwin"===process.platform,r="linux"===process.platform,a="en",c="en";const e=process.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];a=t.locale,c=n||"en",l=t._translationsConfigFile}catch(e){}s=!0}}else{const e=navigator.userAgent;n=e.indexOf("Windows")>=0,i=e.indexOf("Macintosh")>=0,r=e.indexOf("Linux")>=0,o=!0,c=a=navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(t.Platform||(t.Platform={})),t.PlatformToString=function(e){switch(e){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}};let h=0;s&&(i?h=1:n?h=3:r&&(h=2)),t.isWindows=n,t.isMacintosh=i,t.isLinux=r,t.isNative=s,t.isWeb=o,t.platform=h,t.isRootUser=function(){return s&&!n&&0===process.getuid()},t.language=c;!function(e){e.value=function(){return t.language},e.isDefaultVariant=function(){
return 2===t.language.length?"en"===t.language:t.language.length>=3&&"e"===t.language[0]&&"n"===t.language[1]&&"-"===t.language[2]},e.isDefault=function(){return"en"===t.language}}(t.Language||(t.Language={})),t.locale=a,t.translationsConfigFile=l;const d="object"==typeof self?self:"object"==typeof global?global:{};t.globals=d;let f=null;t.setImmediate=function(e){return null===f&&(f=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),f(e)};!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=i?2:n?1:3}),define(e[110],t([0,1,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="undefined"==typeof process?{cwd:()=>"/",env:Object.create(null),get platform(){return n.isWindows?"win32":n.isMacintosh?"darwin":"linux"},nextTick:e=>n.setImmediate(e)
}:process;t.cwd=i.cwd,t.env=i.env,t.platform=i.platform,t.nextTick=i.nextTick}),define(e[2],t([0,1,110]),function(e,t,n){"use strict";function i(e,t){if("string"!=typeof e)throw new m(t,"string",e)}function r(e){return e===g||e===p}function s(e){return e===g}function o(e){return e>=l&&e<=h||e>=u&&e<=d}function a(e,t,n,i){let r,s="",o=0,a=-1,c=0;for(let l=0;l<=e.length;++l){if(l<e.length)r=e.charCodeAt(l);else{if(i(r))break;r=g}if(i(r)){if(a===l-1||1===c);else if(a!==l-1&&2===c){if(s.length<2||2!==o||s.charCodeAt(s.length-1)!==f||s.charCodeAt(s.length-2)!==f){if(s.length>2){const e=s.lastIndexOf(n);-1===e?(s="",o=0):o=(s=s.slice(0,e)).length-1-s.lastIndexOf(n),a=l,c=0;continue}if(2===s.length||1===s.length){s="",o=0,a=l,c=0;continue}}t&&(s.length>0?s+=`${n}..`:s="..",o=2)}else s.length>0?s+=n+e.slice(a+1,l):s=e.slice(a+1,l),o=l-a-1;a=l,c=0}else r===f&&-1!==c?++c:c=-1}return s}function c(e,t){const n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}
Object.defineProperty(t,"__esModule",{value:!0});const l=65,u=97,h=90,d=122,f=46,g=47,p=92;class m extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let r=`The "${e}" ${-1!==e.indexOf(".")?"property":"argument"} ${i} of type ${t}`;super(r+=`. Received type ${typeof n}`)}}t.win32={resolve(...e){let t="",s="",c=!1;for(let a=e.length-1;a>=-1;a--){let l;if(a>=0?l=e[a]:t?void 0!==(l=n.env["="+t]||n.cwd())&&l.slice(0,3).toLowerCase()===t.toLowerCase()+"\\"||(l=t+"\\"):l=n.cwd(),i(l,"path"),0===l.length)continue;const u=l.length;let h=0,d="",f=!1;const g=l.charCodeAt(0);if(u>1)if(r(g))if(f=!0,r(l.charCodeAt(1))){let e=2,t=e;for(;e<u&&!r(l.charCodeAt(e));++e);if(e<u&&e!==t){const n=l.slice(t,e);for(t=e;e<u&&r(l.charCodeAt(e));++e);if(e<u&&e!==t){for(t=e;e<u&&!r(l.charCodeAt(e));++e);e===u?(d="\\\\"+n+"\\"+l.slice(t),h=e):e!==t&&(d="\\\\"+n+"\\"+l.slice(t,e),h=e)}}}else h=1;else o(g)&&58===l.charCodeAt(1)&&(d=l.slice(0,2),h=2,
u>2&&r(l.charCodeAt(2))&&(f=!0,h=3));else r(g)&&(h=1,f=!0);if(!(d.length>0&&t.length>0&&d.toLowerCase()!==t.toLowerCase())&&(0===t.length&&d.length>0&&(t=d),c||(s=l.slice(h)+"\\"+s,c=f),t.length>0&&c))break}return s=a(s,!c,"\\",r),t+(c?"\\":"")+s||"."},normalize(e){i(e,"path");const t=e.length;if(0===t)return".";let n,s=0,c=!1;const l=e.charCodeAt(0);if(t>1)if(r(l))if(c=!0,r(e.charCodeAt(1))){let i=2,o=i;for(;i<t&&!r(e.charCodeAt(i));++i);if(i<t&&i!==o){const a=e.slice(o,i);for(o=i;i<t&&r(e.charCodeAt(i));++i);if(i<t&&i!==o){for(o=i;i<t&&!r(e.charCodeAt(i));++i);if(i===t)return"\\\\"+a+"\\"+e.slice(o)+"\\";i!==o&&(n="\\\\"+a+"\\"+e.slice(o,i),s=i)}}}else s=1;else o(l)&&58===e.charCodeAt(1)&&(n=e.slice(0,2),s=2,t>2&&r(e.charCodeAt(2))&&(c=!0,s=3));else if(r(l))return"\\";let u;return 0!==(u=s<t?a(e.slice(s),!c,"\\",r):"").length||c||(u="."),u.length>0&&r(e.charCodeAt(t-1))&&(u+="\\"),void 0===n?c?u.length>0?"\\"+u:"\\":u.length>0?u:"":c?u.length>0?n+"\\"+u:n+"\\":u.length>0?n+u:n},isAbsolute(e){i(e,"path")
;const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return!!r(n)||!!(o(n)&&t>2&&58===e.charCodeAt(1)&&r(e.charCodeAt(2)))},join(...e){if(0===e.length)return".";let n,s;for(let t=0;t<e.length;++t){const r=e[t];i(r,"path"),r.length>0&&(void 0===n?n=s=r:n+="\\"+r)}if(void 0===n)return".";let o=!0,a=0;if("string"==typeof s&&r(s.charCodeAt(0))){++a;const e=s.length;e>1&&r(s.charCodeAt(1))&&(++a,e>2&&(r(s.charCodeAt(2))?++a:o=!1))}if(o){for(;a<n.length&&r(n.charCodeAt(a));++a);a>=2&&(n="\\"+n.slice(a))}return t.win32.normalize(n)},relative(e,n){if(i(e,"from"),i(n,"to"),e===n)return"";const r=t.win32.resolve(e),s=t.win32.resolve(n);if(r===s)return"";if(e=r.toLowerCase(),n=s.toLowerCase(),e===n)return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===p;++o);let a=e.length;for(;a-1>o&&e.charCodeAt(a-1)===p;--a);const c=a-o;let l=0;for(;l<n.length&&n.charCodeAt(l)===p;++l);let u=n.length;for(;u-1>l&&n.charCodeAt(u-1)===p;--u);const h=u-l,d=c<h?c:h;let f=-1,g=0;for(;g<=d;++g){if(g===d){if(h>d){
if(n.charCodeAt(l+g)===p)return s.slice(l+g+1);if(2===g)return s.slice(l+g)}c>d&&(e.charCodeAt(o+g)===p?f=g:2===g&&(f=3));break}const t=e.charCodeAt(o+g);if(t!==n.charCodeAt(l+g))break;t===p&&(f=g)}if(g!==d&&-1===f)return s;let m="";for(-1===f&&(f=0),g=o+f+1;g<=a;++g)g!==a&&e.charCodeAt(g)!==p||(0===m.length?m+="..":m+="\\..");return m.length>0?m+s.slice(l+f,u):(l+=f,s.charCodeAt(l)===p&&++l,s.slice(l,u))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const n=t.win32.resolve(e);if(n.length>=3)if(n.charCodeAt(0)===p){if(n.charCodeAt(1)===p){const e=n.charCodeAt(2);if(63!==e&&e!==f)return"\\\\?\\UNC\\"+n.slice(2)}}else if(o(n.charCodeAt(0))&&58===n.charCodeAt(1)&&n.charCodeAt(2)===p)return"\\\\?\\"+n;return e},dirname(e){i(e,"path");const t=e.length;if(0===t)return".";let n=-1,s=-1,a=!0,c=0;const l=e.charCodeAt(0);if(t>1)if(r(l)){if(n=c=1,r(e.charCodeAt(1))){let i=2,s=i;for(;i<t&&!r(e.charCodeAt(i));++i);if(i<t&&i!==s){for(s=i;i<t&&r(e.charCodeAt(i));++i);if(i<t&&i!==s){
for(s=i;i<t&&!r(e.charCodeAt(i));++i);if(i===t)return e;i!==s&&(n=c=i+1)}}}}else o(l)&&58===e.charCodeAt(1)&&(n=c=2,t>2&&r(e.charCodeAt(2))&&(n=c=3));else if(r(l))return e;for(let n=t-1;n>=c;--n)if(r(e.charCodeAt(n))){if(!a){s=n;break}}else a=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&i(t,"ext"),i(e,"path");let n,s=0,a=-1,c=!0;if(e.length>=2){o(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(s=2)}if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let i=t.length-1,o=-1;for(n=e.length-1;n>=s;--n){const l=e.charCodeAt(n);if(r(l)){if(!c){s=n+1;break}}else-1===o&&(c=!1,o=n+1),i>=0&&(l===t.charCodeAt(i)?-1==--i&&(a=n):(i=-1,a=o))}return s===a?a=o:-1===a&&(a=e.length),e.slice(s,a)}for(n=e.length-1;n>=s;--n)if(r(e.charCodeAt(n))){if(!c){s=n+1;break}}else-1===a&&(c=!1,a=n+1);return-1===a?"":e.slice(s,a)},extname(e){i(e,"path");let t=0,n=-1,s=0,a=-1,c=!0,l=0;e.length>=2&&58===e.charCodeAt(1)&&o(e.charCodeAt(0))&&(t=s=2)
;for(let i=e.length-1;i>=t;--i){const t=e.charCodeAt(i);if(r(t)){if(!c){s=i+1;break}}else-1===a&&(c=!1,a=i+1),t===f?-1===n?n=i:1!==l&&(l=1):-1!==n&&(l=-1)}return-1===n||-1===a||0===l||1===l&&n===a-1&&n===s+1?"":e.slice(n,a)},format(e){if(null===e||"object"!=typeof e)throw new m("pathObject","Object",e);return c("\\",e)},parse(e){i(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let s=0,a=e.charCodeAt(0);if(n>1){if(r(a)){if(s=1,r(e.charCodeAt(1))){let t=2,i=t;for(;t<n&&!r(e.charCodeAt(t));++t);if(t<n&&t!==i){for(i=t;t<n&&r(e.charCodeAt(t));++t);if(t<n&&t!==i){for(i=t;t<n&&!r(e.charCodeAt(t));++t);t===n?s=t:t!==i&&(s=t+1)}}}}else if(o(a)&&58===e.charCodeAt(1)){if(s=2,!(n>2))return t.root=t.dir=e,t;if(r(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;s=3}}}else if(r(a))return t.root=t.dir=e,t;s>0&&(t.root=e.slice(0,s));let c=-1,l=s,u=-1,h=!0,d=e.length-1,g=0;for(;d>=s;--d)if(a=e.charCodeAt(d),r(a)){if(!h){l=d+1;break}}else-1===u&&(h=!1,u=d+1),
a===f?-1===c?c=d:1!==g&&(g=1):-1!==c&&(g=-1);return-1===c||-1===u||0===g||1===g&&c===u-1&&c===l+1?-1!==u&&(t.base=t.name=e.slice(l,u)):(t.name=e.slice(l,c),t.base=e.slice(l,u),t.ext=e.slice(c,u)),t.dir=l>0&&l!==s?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve(...e){let t="",r=!1;for(let s=e.length-1;s>=-1&&!r;s--){let o;i(o=s>=0?e[s]:n.cwd(),"path"),0!==o.length&&(t=o+"/"+t,r=o.charCodeAt(0)===g)}return t=a(t,!r,"/",s),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize(e){if(i(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===g,n=e.charCodeAt(e.length-1)===g;return 0!==(e=a(e,!t,"/",s)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:e=>(i(e,"path"),e.length>0&&e.charCodeAt(0)===g),join(...e){if(0===e.length)return".";let n;for(let t=0;t<e.length;++t){const e=arguments[t];i(e,"path"),e.length>0&&(void 0===n?n=e:n+="/"+e)}return void 0===n?".":t.posix.normalize(n)},relative(e,n){if(i(e,"from"),i(n,"to"),e===n)return"";if(e=t.posix.resolve(e),
n=t.posix.resolve(n),e===n)return"";let r=1;for(;r<e.length&&e.charCodeAt(r)===g;++r);const s=e.length,o=s-r;let a=1;for(;a<n.length&&n.charCodeAt(a)===g;++a);const c=n.length-a,l=o<c?o:c;let u=-1,h=0;for(;h<=l;++h){if(h===l){if(c>l){if(n.charCodeAt(a+h)===g)return n.slice(a+h+1);if(0===h)return n.slice(a+h)}else o>l&&(e.charCodeAt(r+h)===g?u=h:0===h&&(u=0));break}const t=e.charCodeAt(r+h);if(t!==n.charCodeAt(a+h))break;t===g&&(u=h)}let d="";for(h=r+u+1;h<=s;++h)h!==s&&e.charCodeAt(h)!==g||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(a+u):(a+=u,n.charCodeAt(a)===g&&++a,n.slice(a))},toNamespacedPath:e=>e,dirname(e){if(i(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===g;let n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===g){if(!r){n=t;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&i(t,"ext"),i(e,"path");let n,r=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return""
;let i=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const c=e.charCodeAt(n);if(c===g){if(!o){r=n+1;break}}else-1===a&&(o=!1,a=n+1),i>=0&&(c===t.charCodeAt(i)?-1==--i&&(s=n):(i=-1,s=a))}return r===s?s=a:-1===s&&(s=e.length),e.slice(r,s)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===g){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":e.slice(r,s)},extname(e){i(e,"path");let t=-1,n=0,r=-1,s=!0,o=0;for(let i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a!==g)-1===r&&(s=!1,r=i+1),a===f?-1===t?t=i:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){n=i+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format(e){if(null===e||"object"!=typeof e)throw new m("pathObject","Object",e);return c("/",e)},parse(e){i(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===g;let r;n?(t.root="/",r=1):r=0;let s=-1,o=0,a=-1,c=!0,l=e.length-1,u=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(t!==g)-1===a&&(c=!1,a=l+1),
t===f?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){o=l+1;break}}return-1===s||-1===a||0===u||1===u&&s===a-1&&s===o+1?-1!==a&&(t.base=t.name=0===o&&n?e.slice(1,a):e.slice(o,a)):(0===o&&n?(t.name=e.slice(1,s),t.base=e.slice(1,a)):(t.name=e.slice(o,s),t.base=e.slice(o,a)),t.ext=e.slice(s,a)),o>0?t.dir=e.slice(0,o-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,t.posix.posix=t.win32.posix=t.posix,t.normalize="win32"===n.platform?t.win32.normalize:t.posix.normalize,t.isAbsolute="win32"===n.platform?t.win32.isAbsolute:t.posix.isAbsolute,t.join="win32"===n.platform?t.win32.join:t.posix.join,t.resolve="win32"===n.platform?t.win32.resolve:t.posix.resolve,t.relative="win32"===n.platform?t.win32.relative:t.posix.relative,t.dirname="win32"===n.platform?t.win32.dirname:t.posix.dirname,t.basename="win32"===n.platform?t.win32.basename:t.posix.basename,t.extname="win32"===n.platform?t.win32.extname:t.posix.extname,
t.format="win32"===n.platform?t.win32.format:t.posix.format,t.parse="win32"===n.platform?t.win32.parse:t.posix.parse,t.toNamespacedPath="win32"===n.platform?t.win32.toNamespacedPath:t.posix.toNamespacedPath,t.sep="win32"===n.platform?t.win32.sep:t.posix.sep,t.delimiter="win32"===n.platform?t.win32.delimiter:t.posix.delimiter}),define(e[13],t([0,1]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function i(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;for(;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function r(e,t){if(!e||!t)return e;const n=t.length,i=e.length;if(0===n||0===i)return e;let r=i,s=-1;for(;;){if(-1===(s=e.lastIndexOf(t,r-1))||s+n!==r)break;if(0===s)return"";r=s}return e.substring(0,r)}function s(e,t){return e<t?-1:e>t?1:0}function o(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function c(e){return o(e)||a(e)}function l(e,t,n=e.length){if("string"!=typeof e||"string"!=typeof t)return!1
;for(let i=0;i<n;i++){const n=e.charCodeAt(i),r=t.charCodeAt(i);if(n!==r)if(c(n)&&c(r)){const e=Math.abs(n-r);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(n).toLowerCase()!==String.fromCharCode(r).toLowerCase())return!1}return!0}function u(e,t,n,i,r,s){for(;t<n&&r<s;){if(e[t]!==i[r])return!1;t+=1,r+=1}return!0}function h(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function d(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n="0"){const i=""+e,r=[i];for(let e=i.length;e<t;e++)r.push(n);return r.reverse().join("")};const f=/{(\d+)}/g;t.format=function(e,...t){return 0===t.length?e:e.replace(f,function(e,n){const i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]})},t.escape=function(e){return e.replace(/[<>&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;"
;default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t=" "){return r(i(e,t),t)},t.ltrim=i,t.rtrim=r,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},t.endsWith=function(e,t){const n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let r="";return i.global&&(r+="g"),i.matchCase||(r+="i"),i.multiline&&(r+="m"),i.unicode&&(r+="u"),new RegExp(e,r)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},
t.regExpContainsBackreference=function(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(let t=0,n=e.length;t<n;t++){const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}return-1},t.getLeadingWhitespace=function(e,t=0,n=e.length){for(let i=t;i<n;i++){const n=e.charCodeAt(i);if(32!==n&&9!==n)return e.substring(t,i)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t=e.length-1){for(let n=t;n>=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++){let n=e.charCodeAt(i),r=t.charCodeAt(i);if(n===r)continue;a(n)&&(n+=32),a(r)&&(r+=32);const c=n-r;if(0!==c)return o(n)&&o(r)?c:s(e.toLowerCase(),t.toLowerCase())}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=o,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){
return(e?e.length:0)===(t?t.length:0)&&l(e,t)},t.startsWithIgnoreCase=function(e,t){const n=t.length;return!(t.length>e.length)&&l(e,t,n)},t.commonPrefixLength=function(e,t){let n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i},t.commonSuffixLength=function(e,t){let n,i=Math.min(e.length,t.length);const r=e.length-1,s=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(r-n)!==t.charCodeAt(s-n))return n;return i},t.overlap=function(e,t){const n=e.length;let i=t.length,r=n-i;if(0===r)return e===t?n:0;for(r<0&&(i+=r,r=0);r<n&&i>0;){if(u(e,r,n,t,0,i))return i;i-=1,r+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343}
;const g=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return g.test(e)};const p=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return p.test(e)};const m=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return m.test(e)},t.containsFullWidthCharacter=function(e){for(let t=0,n=e.length;t<n;t++)if(h(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=h,t.lcut=function(e,n){if(e.length<n)return e;const i=/\b/g
;let r=0;for(;i.test(e)&&!(e.length-i.lastIndex<n);)r=i.lastIndex,i.lastIndex+=1;return e.substring(r).replace(/^\s/,t.empty)};const v=/\x1B\x5B[12]?K/g,y=/\x1b\[\d+m/g,_=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(v,"")).replace(y,"")).replace(_,"")),e},t.removeAccents=function(){if("function"!=typeof String.prototype.normalize)return function(e){return e};{const e=/[\u0300-\u036f]/g;return function(n){return n.normalize("NFD").replace(e,t.empty)}}}(),t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=d,t.stripUTF8BOM=function(e){return d(e)?e.substr(1):e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){let n="";for(let i=0;i<t;i++)n+=e;return n},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;const n=t.length,i=e.toLowerCase();let r=0,s=-1;for(;r<n;){const e=i.indexOf(t[r],s+1);if(e<0)return!1;s=e,r++}return!0},t.containsUppercaseCharacter=function(e,t=!1){
return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)},t.uppercaseFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.getNLines=function(e,t=1){if(0===t)return"";let n=-1;do{n=e.indexOf("\n",n+1),t--}while(t>0&&n>=0);return n>=0?e.substr(0,n):e}}),define(e[78],t([0,1,13]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalISOString=function(e){return e.getFullYear()+"-"+n.pad(e.getMonth()+1,2)+"-"+n.pad(e.getDate(),2)+"T"+n.pad(e.getHours(),2)+":"+n.pad(e.getMinutes(),2)+":"+n.pad(e.getSeconds(),2)+"."+(e.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}),define(e[39],t([0,1,5,13,2]),function(e,t,n,i,r){"use strict";function s(e){return 47===e||92===e}function o(e){return e>=65&&e<=90||e>=97&&e<=122}Object.defineProperty(t,"__esModule",{value:!0}),t.toSlashes=function(e){return e.replace(/[\\/]/g,r.posix.sep)},t.getRoot=function(e,t=r.posix.sep){if(!e)return"";const n=e.length,i=e.charCodeAt(0);if(s(i)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){
let i=3;const r=i;for(;i<n&&!s(e.charCodeAt(i));i++);if(r!==i&&!s(e.charCodeAt(i+1)))for(i+=1;i<n;i++)if(s(e.charCodeAt(i)))return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if(o(i)&&58===e.charCodeAt(1))return s(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let a=e.indexOf("://");if(-1!==a)for(a+=3;a<n;a++)if(s(e.charCodeAt(a)))return e.slice(0,a+1);return""},t.isUNC=function(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;let t=e.charCodeAt(0);if(92!==t)return!1;if(92!==(t=e.charCodeAt(1)))return!1;let i=2;const r=i;for(;i<e.length&&92!==(t=e.charCodeAt(i));i++);return r!==i&&(t=e.charCodeAt(i+1),!isNaN(t)&&92!==t)};const a=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,c=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(a.lastIndex=0,a.test(e)||n.isWindows&&c.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length||e.length>255))},t.isEqual=function(e,t,n){const r=e===t
;return!n||r?r:!(!e||!t)&&i.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,t,n,s=r.sep){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!i.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===s&&n--,e.charAt(n)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)},t.isWindowsDriveLetter=o}),define(e[9],t([0,1]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==l.number||e.constructor!==Array)}function i(e){return typeof e===l.string||e instanceof String}function r(e){return!(typeof e!==l.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return typeof e===l.undefined}function o(e){return s(e)||null===e}function a(e){return typeof e===l.function}function c(e,t){if(i(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(a(t)){try{if(e instanceof t)return}catch(e){}
if(!o(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});const l={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=i,t.isStringArray=function(e){return n(e)&&e.every(e=>i(e))},t.isObject=r,t.isNumber=function(e){return(typeof e===l.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=s,t.isUndefinedOrNull=o;const u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!r(e))return!1;for(let t in e)if(u.call(e,t))return!1;return!0},t.isFunction=a,t.areFunctions=function(...e){return e.length>0&&e.every(a)},t.validateConstraints=function(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)c(e[i],t[i])},t.validateConstraint=c,t.create=function(e,...t){
if(function(e){return"function"==typeof e&&e.hasOwnProperty("prototype")&&!e.hasOwnProperty("arguments")}(e))return new e(...t);{const n=Object.create(e.prototype);return e.apply(n,t),n}},t.getAllPropertyNames=function(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t},t.withNullAsUndefined=function(e){return null===e?void 0:e},t.withUndefinedAsNull=function(e){return void 0===e?null:e}}),define(e[10],t([0,1,9]),function(e,t,n){"use strict";function i(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function r(e,t,i){if(n.isUndefinedOrNull(e))return e;const s=t(e);if(void 0!==s)return s;if(n.isArray(e)){const n=[];for(const s of e)n.push(r(s,t,i));return n}if(n.isObject(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={}
;for(let s in e)a.call(e,s)&&(n[s]=r(e[s],t,i));return i.delete(e),n}return e}function s(e,t,i=!0){return n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(r=>{r in e?i&&(n.isObject(e[r])&&n.isObject(t[r])?s(e[r],t[r],i):e[r]=t[r]):e[r]=t[r]}),e):t}function o(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!o(e[n],t[n]))return!1}else{const r=[];for(i in e)r.push(i);r.sort();const s=[];for(i in t)s.push(i);if(s.sort(),!o(r,s))return!1;for(n=0;n<r.length;n++)if(!o(e[r[n]],t[r[n]]))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=i,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const n in e)if(a.call(e,n)){const i=e[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}
return e};const a=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return r(e,t,new Set)},t.mixin=s,t.assign=function(e,...t){return t.forEach(t=>Object.keys(t).forEach(n=>e[n]=t[n])),e},t.equals=o,t.createKeywordMatcher=function(e,t=!1){t&&(e=e.map(function(e){return e.toLowerCase()}));const n=function(e){const t={};for(const n of e)t[n]=!0;return t}(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}},t.safeStringify=function(e){const t=[];return JSON.stringify(e,(e,i)=>{if(n.isObject(i)||Array.isArray(i)){if(-1!==t.indexOf(i))return"[Circular]";t.push(i)}return i})},t.getOrDefault=function(e,t,n){const i=t(e);return void 0===i?n:i},t.distinct=function(e,t){const n=Object.create(null);return e&&t?(Object.keys(t).forEach(i=>{const r=e[i],s=t[i];o(r,s)||(n[i]=s)}),n):n}}),define(e[11],t([0,1,5]),function(e,t,n){"use strict";function i(e,t){let n=void 0,i=-1;for(let r=0;r<e.length;r++){
const s=e.charCodeAt(r);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));const t=p[s];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=t):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function r(e){let t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){const n=t?function(e){let t=void 0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=p[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:i;let r="",{scheme:s,authority:o,path:a,query:c,fragment:l}=e
;if(s&&(r+=s,r+=":"),(o||"file"===s)&&(r+=h,r+=h),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.indexOf(":"))?r+=n(t,!1):(r+=n(t.substr(0,e),!1),r+=":",r+=n(t.substr(e+1),!1)),r+="@"}-1===(e=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,e),!1),r+=o.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0)}return c&&(r+="?",r+=n(c,!1)),l&&(r+="#",r+=t?l:i(l,!1)),r}Object.defineProperty(t,"__esModule",{value:!0});const o=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;let l=!0;t.setUriThrowOnMissingScheme=function(e){const t=l;return l=e,t};const u="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){
return e instanceof f||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}constructor(e,t,n,i,r,s=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return t||l?e||u:(e||(console.trace("BAD uri lacks scheme, falling back to file-scheme."),e="file"),e)}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||u),this.query=i||u,this.fragment=r||u,function(e,t){if(!e.scheme){if(t||l)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`)
;console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`)}if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!a.test(e.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(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,s))}get fsPath(){return r(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===s?s=this.fragment:null===s&&(s=u),
t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new g(t,n,i,r,s)}static parse(e,t=!1){const n=d.exec(e);return n?new g(n[2]||u,decodeURIComponent(n[4]||u),decodeURIComponent(n[5]||u),decodeURIComponent(n[7]||u),decodeURIComponent(n[9]||u),t):new g(u,u,u,u,u)}static file(e){let t=u;if(n.isWindows&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,u,u)}static from(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)}toString(e=!1){return s(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new g(e);return t._fsPath=e.fsPath,t._formatted=e.external,t}}return e}}t.URI=f;class g extends f{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=r(this)),this._fsPath}toString(e=!1){return e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),
this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}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"}}),define(e[29],t([0,1,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathFromAmdModule=function(e,t){return n.URI.parse(e.toUrl(t)).fsPath}}),define(e[30],t([0,1,11,52]),function(e,t,n,i){"use strict";function r(e){const t=[];return e.forEach(e=>t.push(e)),t}function s(e){const t=[];return e.forEach((e,n)=>t.push(n)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=r,t.keys=s,t.getOrSet=function(e,t,n){let i=e.get(t);return void 0===i&&(i=n,e.set(t,i)),i},
t.mapToString=function(e){const t=[];return e.forEach((e,n)=>{t.push(`${n} => ${e}`)}),`Map(${e.size}) {${t.join(", ")}}`},t.setToString=function(e){const t=[];return e.forEach(e=>{t.push(e)}),`Set(${e.size}) {${t.join(", ")}}`},t.mapToSerializable=function(e){const t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},t.serializableToMap=function(e){const t=new Map;for(const[n,i]of e)t.set(n,i);return t};class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}t.StringIterator=o;class a{reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||92===t){if(!e)break;this._from++}else e=!1}
return this}cmp(e){let t=0;const n=e.length;let i=this._from;for(;t<n&&i<this._to;){const n=e.charCodeAt(t)-this._value.charCodeAt(i);if(0!==n)return n;t+=1,i+=1}return n===this._to-this._from?0:t<n?-1:1}value(){return this._value.substring(this._from,this._to)}}t.PathIterator=a;class c{isEmpty(){return!(this.left||this.mid||this.right||this.value)}}class l{constructor(e){this._iter=e}static forPaths(){return new l(new a)}static forStrings(){return new l(new o)}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let i;for(this._root||(this._root=new c,this._root.segment=n.value()),i=this._root;;){const e=n.cmp(i.segment);if(e>0)i.left||(i.left=new c,i.left.segment=n.value()),i=i.left;else if(e<0)i.right||(i.right=new c,i.right.segment=n.value()),i=i.right;else{if(!n.hasNext())break;n.next(),i.mid||(i.mid=new c,i.mid.segment=n.value()),i=i.mid}}const r=i.value;return i.value=t,i.key=e,r}get(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const e=t.cmp(n.segment)
;if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0}delete(e){const t=this._iter.reset(e),n=[];let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)n.push([1,i]),i=i.left;else if(e<0)n.push([-1,i]),i=i.right;else{if(!t.hasNext()){for(i.value=void 0;n.length>0&&i.isEmpty();){let[e,t]=n.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}i=t}break}t.next(),n.push([0,i]),i=i.mid}}}findSubstr(e){const t=this._iter.reset(e);let n=this._root,i=void 0;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())return n.mid?this._nodeIterator(n.mid):void 0;t.next(),n=n.mid}}}_nodeIterator(e){let t,n,r;return{next:()=>(r||(r=[],n=0,this._forEach(e,e=>r.push(e))),
n>=r.length?i.FIN:(t?t.value=r[n++]:t={done:!1,value:r[n++]},t))}}forEach(e){this._forEach(this._root,e)}_forEach(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))}}t.TernarySearchTree=l;class u{constructor(){this.map=new Map,this.ignoreCase=!1}set(e,t){this.map.set(this.toKey(e),t)}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e){this.map.forEach(e)}values(){return r(this.map)}toKey(e){let t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t}keys(){return s(this.map).map(e=>n.URI.parse(e))}clone(){const e=new u;return this.map.forEach((t,n)=>e.map.set(n,t)),e}}t.ResourceMap=u;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(t.Touch||(t.Touch={}));class h{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),
this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i)}this._map.set(e,i),this._size++}}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}values(){const e=[];let t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){
const e=[];let t=this._head;for(;t;)e.push(t.key),t=t.next;return e}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0)}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0}
touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=h;class d extends h{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e){return super.get(e,2)}peek(e){return super.get(e,0)}set(e,t){super.set(e,t,2),this.checkTrim()}checkTrim(){
this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}t.LRUCache=d}),define(e[60],t([0,1,20,13,39,2,30,14]),function(e,t,n,i,r,s,o,a){"use strict";function c(e){switch(e){case 0:return"";case 1:return`${E}*?`;default:return`(?:${w}|${E}+${w}|${w}${E}+)*?`}}function l(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1}s+=o}return s&&n.push(s),n}function u(e){if(!e)return"";let t="";const n=l(e,C);if(n.every(e=>e===_))t=".*";else{let e=!1;n.forEach((r,s)=>{if(r===_)return void(e||(t+=c(2),e=!0));let o=!1,a="",h=!1,d="";for(const e of r)if("}"!==e&&o)a+=e;else if(!h||"]"===e&&d)switch(e){case"{":o=!0;continue;case"[":h=!0;continue;case"}":const n=`(?:${l(a,",").map(e=>u(e)).join("|")})`;t+=n,o=!1,a="";break;case"]":t+="["+d+"]",h=!1,d="";break;case"?":t+=E;continue;case"*":t+=c(1);continue;default:t+=i.escapeRegExpCharacters(e)}else{let t
;d+=t="-"===e?e:"^"!==e&&"!"!==e||d?e===C?"":i.escapeRegExpCharacters(e):"^"}s<n.length-1&&(n[s+1]!==_||s+2<n.length)&&(t+=w),e=!1})}return t}function h(e,t){if(!e)return T;let r;r="string"!=typeof e?e.pattern:e;const s=`${r=r.trim()}_${!!t.trimForExclusions}`;let o=O.get(s);if(o)return d(o,e);let a;if(S.test(r)){const e=r.substr(4);o=function(t,n){return"string"==typeof t&&i.endsWith(t,e)?r:null}}else o=(a=x.exec(f(r,t)))?function(e,t){const n=`/${e}`,r=`\\${e}`,s=function(s,o){return"string"!=typeof s?null:o?o===e?t:null:s===e||i.endsWith(s,n)||i.endsWith(s,r)?t:null},o=[e];return s.basenames=o,s.patterns=[t],s.allBasenames=o,s}(a[1],r):(t.trimForExclusions?k:P).test(r)?function(e,t){const i=y(e.slice(1,-1).split(",").map(e=>h(e,t)).filter(e=>e!==T),e),r=i.length;if(!r)return T;if(1===r)return i[0];const s=function(t,n){for(let r=0,s=i.length;r<s;r++)if(i[r](t,n))return e;return null},o=n.first(i,e=>!!e.allBasenames);o&&(s.allBasenames=o.allBasenames)
;const a=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);a.length&&(s.allPaths=a);return s}(r,t):(a=I.exec(f(r,t)))?g(a[1].substr(1),r,!0):(a=A.exec(f(r,t)))?g(a[1],r,!1):function(e){try{const t=new RegExp(`^${u(e)}$`);return function(n,i){return t.lastIndex=0,"string"==typeof n&&t.test(n)?e:null}}catch(e){return T}}(r);return O.set(s,o),d(o,e)}function d(e,t){return"string"==typeof t?e:function(n,i){return r.isEqualOrParent(n,t.base)?e(s.relative(t.base,n),i):null}}function f(e,t){return t.trimForExclusions&&i.endsWith(e,"/**")?e.substr(0,e.length-2):e}function g(e,t,n){const r=s.sep!==s.posix.sep?e.replace(b,s.sep):e,o=s.sep+r,a=n?function(e,n){return"string"!=typeof e||e!==r&&!i.endsWith(e,o)?null:t}:function(e,n){return"string"==typeof e&&e===r?t:null};return a.allPaths=[(n?"*/":"./")+e],a}function p(e,t={}){if(!e)return D;if("string"==typeof e||v(e)){const n=h(e,t);if(n===T)return D;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),
n.allPaths&&(i.allPaths=n.allPaths),i}return function(e,t){const i=y(Object.getOwnPropertyNames(e).map(n=>(function(e,t,n){if(!1===t)return T;const i=h(e,n);if(i===T)return T;if("boolean"==typeof t)return i;if(t){const n=t.when;if("string"==typeof n){const t=(t,r,s,o)=>{if(!o||!i(t,r))return null;const c=n.replace("$(basename)",s),l=o(c);return a.isThenable(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return i})(n,e[n],t)).filter(e=>e!==T)),r=i.length;if(!r)return T;if(!i.some(e=>!!e.requiresSiblings)){if(1===r)return i[0];const e=function(e,t){for(let n=0,r=i.length;n<r;n++){const r=i[n](e,t);if(r)return r}return null},t=n.first(i,e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const s=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(e.allPaths=s),e}const o=function(e,t,n){let r=void 0;for(let o=0,a=i.length;o<a;o++){const a=i[o];a.requiresSiblings&&n&&(t||(t=s.basename(e)),r||(r=t.substr(0,t.length-s.extname(e).length)));const c=a(e,t,r,n);if(c)return c}
return null},c=n.first(i,e=>!!e.allBasenames);c&&(o.allBasenames=c.allBasenames);const l=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);l.length&&(o.allPaths=l);return o}(e,t)}function m(e){const t={};for(const n of e)t[n]=!0;return t}function v(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}function y(e,t){const n=e.filter(e=>!!e.basenames);if(n.length<2)return e;const i=n.reduce((e,t)=>{const n=t.basenames;return n?e.concat(n):e},[]);let r;if(t){r=[];for(let e=0,n=i.length;e<n;e++)r.push(t)}else r=n.reduce((e,t)=>{const n=t.patterns;return n?e.concat(n):e},[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter(e=>!e.basenames);return o.push(s),o}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)}
;const _="**",C="/",w="[/\\\\]",E="[^/\\\\]",b=/\//g;t.splitGlobAware=l;const S=/^\*\*\/\*\.[\w\.-]+$/,x=/^\*\*\/([\w\.-]+)\/?$/,P=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,k=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,I=/^\*\*((\/[\w\.-]+)+)\/?$/,A=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,O=new o.LRUCache(1e4),D=function(){return!1},T=function(){return null};t.match=function(e,t,n){return!(!e||"string"!=typeof t)&&p(e)(t,void 0,n)},t.parse=p,t.hasSiblingPromiseFn=function(e){if(!e)return;let t;return n=>(t||(t=(e()||Promise.resolve([])).then(e=>e?m(e):{})),t.then(e=>!!e[n]))},t.hasSiblingFn=function(e){if(!e)return;let t;return n=>{if(!t){const n=e();t=n?m(n):{}}return!!t[n]}},t.isRelativePattern=v,t.parseToAsync=function(e,t){const n=p(e,t);return(e,t,i)=>{const r=n(e,t,i);return a.isThenable(r)?r:Promise.resolve(r)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[61],t([0,1,30]),function(e,t,n){
"use strict";function i(e,n,i){if(!t.canNormalize||!e)return e;const r=i.get(e);if(r)return r;let s;return s=o.test(e)?e.normalize(n):e,i.set(e,s),s}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;const r=new n.LRUCache(1e4);t.normalizeNFC=function(e){return i(e,"NFC",r)};const s=new n.LRUCache(1e4);t.normalizeNFD=function(e){return i(e,"NFD",s)};const o=/[^\u0000-\u0080]/}),define(e[36],t([0,1,39,2,11,13,18,5,60,30]),function(e,t,n,i,r,s,o,a,c,l){"use strict";function u(e){return!e||e.scheme!==o.Schemas.file||!a.isLinux}function h(e,t,i=u(e)){if(e.scheme===t.scheme){if(e.scheme===o.Schemas.file)return n.isEqualOrParent(g(e),g(t),i);if(d(e.authority,t.authority))return n.isEqualOrParent(e.path,t.path,i,"/")}return!1}function d(e,t){return e===t||s.equalsIgnoreCase(e,t)}function f(e){return i.posix.basename(e.path)}function g(e){let t;const i=e.path
;return t=e.authority&&i.length>1&&"file"===e.scheme?`//${e.authority}${i}`:a.isWindows&&47===i.charCodeAt(0)&&n.isWindowsDriveLetter(i.charCodeAt(1))&&58===i.charCodeAt(2)?i.substr(1):i,a.isWindows&&(t=t.replace(/\//g,"\\")),t}function p(e){if(e.scheme===o.Schemas.file){const t=g(e);return t.length>n.getRoot(t).length&&t[t.length-1]===i.sep}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)}}function m(e,t){if(e.scheme===t.scheme&&d(e.authority,t.authority)){if(e.scheme===o.Schemas.file){const r=i.relative(e.path,t.path);return a.isWindows?n.toSlashes(r):r}return i.posix.relative(e.path||"/",t.path||"/")}}Object.defineProperty(t,"__esModule",{value:!0}),t.getComparisonKey=function(e){return u(e)?e.toString().toLowerCase():e.toString()},t.hasToIgnoreCase=u,t.basenameOrAuthority=function(e){return f(e)||e.authority},t.isEqualOrParent=h,t.isEqualAuthority=d,t.isEqual=function(e,t,n=u(e)){if(e===t)return!0;if(!e||!t)return!1;if(e.scheme!==t.scheme||!d(e.authority,t.authority))return!1
;const i=e.path||"/",r=t.path||"/";return i===r||n&&s.equalsIgnoreCase(i||"/",r||"/")},t.basename=f,t.extname=function(e){return i.posix.extname(e.path)},t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===o.Schemas.file)return r.URI.file(i.dirname(g(e)));let t=i.posix.dirname(e.path);return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/"),e.with({path:t})},t.joinPath=function(e,...t){let n;return n=e.scheme===o.Schemas.file?r.URI.file(i.join(g(e),...t)).path:i.posix.join(e.path||"/",...t),e.with({path:n})},t.normalizePath=function(e){if(!e.path.length)return e;let t;return t=e.scheme===o.Schemas.file?r.URI.file(i.normalize(g(e))).path:i.posix.normalize(e.path),e.with({path:t})},t.originalFSPath=g,t.isAbsolutePath=function(e){return!!e.path&&"/"===e.path[0]},t.hasTrailingPathSeparator=p,t.removeTrailingPathSeparator=function(e){return p(e)?e.with({path:e.path.substr(0,e.path.length-1)}):e},t.relativePath=m,
t.resolvePath=function(e,t){if(e.scheme===o.Schemas.file){const n=r.URI.file(i.resolve(g(e),t));return e.with({authority:n.authority,path:n.path})}return e.with({path:i.posix.resolve(e.path,t)})},t.distinctParents=function(e,t){const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);e.some((e,n)=>n!==i&&h(r,t(e)))||n.push(e[i])}return n};!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)});const i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(t.DataUri||(t.DataUri={}));class v{constructor(e,t){this.expressionsByRoot=l.TernarySearchTree.forPaths(),this.globalExpression=c.parse(e);for(const e of t)this.expressionsByRoot.set(e.root.toString(),{root:e.root,expression:c.parse(e.expression)})}matches(e){
const t=this.expressionsByRoot.findSubstr(e.toString());if(t){const n=m(t.root,e);if(n&&t.expression(n))return!0}return!!this.globalExpression(e.path)}}t.ResourceGlobMatcher=v}),define(e[72],t([0,1,11,2,13,18,5,36]),function(e,t,n,i,r,s,o,a){"use strict";function c(e){return!(!o.isWindows||!e||":"!==e[1])}function l(e){return c(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function u(e,t){if(o.isWindows||!e||!t)return e;let n=h.original===t?h.normalized:void 0;return n||(n=`${r.rtrim(t,i.posix.sep)}${i.posix.sep}`,h={original:t,normalized:n}),(o.isLinux?r.startsWith(e,n):r.startsWithIgnoreCase(e,n))&&(e=`~/${e.substr(n.length)}`),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,h){if("string"==typeof e&&(e=n.URI.file(e)),h){const t=h.getWorkspaceFolder(e);if(t){const n=h.getWorkspace().folders.length>1;let s;if(s=a.isEqual(t.uri,e)?"":i.normalize(r.ltrim(e.path.substr(t.uri.path.length),i.posix.sep)),n){const e=t&&t.name?t.name:a.basename(t.uri);s=s?e+" • "+s:e}return s}}
if(e.scheme!==s.Schemas.file&&e.scheme!==s.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(c(e.fsPath))return i.normalize(l(e.fsPath));let d=i.normalize(e.fsPath);return!o.isWindows&&t&&(d=u(d,t.userHome)),d},t.getBaseLabel=function(e){if(!e)return;"string"==typeof e&&(e=n.URI.file(e));const t=a.basename(e)||(e.scheme===s.Schemas.file?e.fsPath:e.path);return c(t)?l(t):t},t.normalizeDriveLetter=l;let h=Object.create(null);t.tildify=u,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,`${t}$1`)};const d="…",f="\\\\",g="~";t.shorten=function(e){const t=new Array(e.length);let n=!1;for(let s=0;s<e.length;s++){let o=e[s];if(""===o){t[s]=`.${i.sep}`;continue}if(!o){t[s]=o;continue}n=!0;let a="";0===o.indexOf(f)?(a=o.substr(0,o.indexOf(f)+f.length),o=o.substr(o.indexOf(f)+f.length)):0===o.indexOf(i.sep)?(a=o.substr(0,o.indexOf(i.sep)+i.sep.length),o=o.substr(o.indexOf(i.sep)+i.sep.length)):0===o.indexOf(g)&&(a=o.substr(0,o.indexOf(g)+g.length),o=o.substr(o.indexOf(g)+g.length))
;const c=o.split(i.sep);for(let o=1;n&&o<=c.length;o++)for(let l=c.length-o;n&&l>=0;l--){n=!1;let u=c.slice(l,l+o).join(i.sep);for(let t=0;!n&&t<e.length;t++)if(t!==s&&e[t]&&e[t].indexOf(u)>-1){const s=l+o===c.length,a=l>0&&e[t].indexOf(i.sep)>-1?i.sep+u:u,h=r.endsWith(e[t],a);n=!s||h}if(!n){let e="";(r.endsWith(c[0],":")||""!==a)&&(1===l&&(l=0,o++,u=c[0]+i.sep+u),l>0&&(e=c[0]+i.sep),e=a+e),l>0&&(e=e+d+i.sep),e+=u,l+o<c.length&&(e=e+i.sep+d),t[s]=e}}n&&(t[s]=o)}return t};var p;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(p||(p={})),t.template=function(e,t=Object.create(null)){const n=[];let i=!1,r="";for(const s of e)if("$"===s||i&&"{"===s)r&&n.push({value:r,type:p.TEXT}),r="",i=!0;else if("}"===s&&i){const e=t[r];if("string"==typeof e)e.length&&n.push({value:e,type:p.VARIABLE});else if(e){const t=n[n.length-1];t&&t.type===p.SEPARATOR||n.push({value:e.label,type:p.SEPARATOR})}r="",i=!1}else r+=s;return r&&!i&&n.push({value:r,type:p.TEXT}),
n.filter((e,t)=>e.type!==p.SEPARATOR||[n[t-1],n[t+1]].every(e=>e&&(e.type===p.VARIABLE||e.type===p.TEXT)&&e.value.length>0)).map(e=>e.value).join("")},t.mnemonicMenuLabel=function(e,t){return o.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,"").replace(/&/g,o.isMacintosh?"&":"&&"):e.replace(/&&|&/g,e=>"&"===e?"&&":"&")},t.mnemonicButtonLabel=function(e,t){return o.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):o.isWindows?e.replace(/&&|&/g,e=>"&"===e?"&&":"&"):e.replace(/&&/g,"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")},t.splitName=function(e){for(let t=e.length-1;t>=1;t--){const n=e.charCodeAt(t);if(47===n||92===n)return{parentPath:e.substr(0,t),name:e.substr(t+1)}}return{parentPath:"",name:e}}}),define(e[76],t([0,1,11]),function(e,t,n){"use strict";function i(e,t,r){if(!e||r>200)return null;if("object"==typeof e){if(e instanceof n.URI)return t.transformOutgoing(e);for(let n in e)if(Object.hasOwnProperty.call(e,n)){const s=i(e[n],t,r+1);null!==s&&(e[n]=s)}}return null}function r(e,t,i,s){
if(!e||s>200)return null;if("object"==typeof e){if(1===e.$mid)return i?n.URI.revive(t.transformIncoming(e)):t.transformIncoming(e);for(let n in e)if(Object.hasOwnProperty.call(e,n)){const o=r(e[n],t,i,s+1);null!==o&&(e[n]=o)}}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultURITransformer=new class{transformIncoming(e){return e}transformOutgoing(e){return e}transformOutgoingURI(e){return e}},t.transformOutgoingURIs=function(e,t){const n=i(e,t,0);return null===n?e:n},t.transformIncomingURIs=function(e,t){const n=r(e,t,!1,0);return null===n?e:n},t.transformAndReviveIncomingURIs=function(e,t){const n=r(e,t,!0,0);return null===n?e:n}}),define(e[24],t([0,1]),function(e,t){"use strict";function n(){return new s}function i(e){return o.test(e)}Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._value=e}asHex(){return this._value}}class s extends r{constructor(){
super([s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-","4",s._randomHex(),s._randomHex(),s._randomHex(),"-",s._oneOf(s._timeHighBits),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return s._oneOf(s._chars)}}s._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],s._timeHighBits=["8","9","a","b"],t.v4=n;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=i,t.parse=function(e){if(!i(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return n().asHex()}}),define(e[80],t([0,1,135]),function(e,t,n){"use strict";function i(e,t,r){
if(n.ok(e,"Missing first parameter"),n.ok("function"==typeof t,"Second parameter must be a function that is called for each element"),n.ok("function"==typeof r,"Third parameter must be a function that is called on error and success"),"function"==typeof e)try{e((e,n)=>{e?r(e,null):i(n,t,r)})}catch(e){r(e,null)}else{const n=[],i=function(s){if(s<e.length)try{t(e[s],(e,t)=>{!0!==e&&!1!==e||(t=e,e=null),e?r(e,null):(t&&n.push(t),process.nextTick(()=>{i(s+1)}))},s,e.length)}catch(e){r(e,null)}else r(null,n)};i(0)}}function r(e){!function(e){n.ok(e.length>1,"Need at least one error handler and one function to process sequence"),e.forEach(e=>{n.ok("function"==typeof e)});const t=e.splice(0,1)[0];let r=null;i(e,(e,t)=>{const n=function(e,n){!0!==e&&!1!==e||(n=e,e=null),e?t(e,null):(r=n,t(null,null))};try{e.call(n,r)}catch(e){t(e,null)}},(e,n)=>{e&&t(e)})}(Array.isArray(e)?e:Array.prototype.slice.call(arguments))}Object.defineProperty(t,"__esModule",{value:!0}),t.parallel=function(e,t,n){
const i=new Array(e.length),r=new Array(e.length);let s=!1,o=0;if(0===e.length)return n(null,[]);e.forEach((a,c)=>{t(a,(t,a)=>{if(t?(s=!0,i[c]=null,r[c]=t):(i[c]=a,r[c]=null),++o===e.length)return n(s?r:null,i)})})},t.loop=i,t.sequence=r}),define(e[83],t([0,1,29]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n.getPathFromAmdModule(e,"paths"),r=e.__$__nodeRequire(i);t.getAppDataPath=r.getAppDataPath,t.getDefaultUserDataPath=r.getDefaultUserDataPath}),define(e[84],t([0,1,87,9]),function(e,t,i,r){"use strict";function s(t,s={}){return n(this,void 0,void 0,function*(){const n=i.parse(t),o=s.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null:null}(n);if(!o)return null;const a=i.parse(o);if(!/^https?:$/.test(a.protocol||""))return null;const c={host:a.hostname||"",port:Number(a.port),auth:a.auth,
rejectUnauthorized:!r.isBoolean(s.strictSSL)||s.strictSSL};return new("http:"===n.protocol?yield new Promise((t,n)=>{e(["http-proxy-agent"],t,n)}):yield new Promise((t,n)=>{e(["https-proxy-agent"],t,n)}))(c)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[89],t([0,1,22]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readExactlyByFile=function(e,t){return new Promise((i,r)=>{n.open(e,"r",null,(e,s)=>{function o(e,t,o){n.close(s,n=>n?r(n):e&&"EISDIR"===e.code?r(e):i({buffer:t,bytesRead:o}))}function a(){n.read(s,c,l,t-l,null,(e,n)=>e?o(e,null,0):0===n?o(null,c,l):(l+=n)===t?o(null,c,l):a())}if(e)return r(e);const c=Buffer.allocUnsafe(t);let l=0;a()})})},t.readToMatchingString=function(e,t,i,r){return new Promise((s,o)=>n.open(e,"r",null,(a,c)=>{function l(e,t){n.close(c,n=>n?o(n):e&&"EISDIR"===e.code?o(e):s(t))}function u(){n.read(c,h,d,i,null,(n,i)=>{if(n)return l(n,null);if(0===i)return l(null,null);d+=i;const s=h.indexOf(t)
;return s>=0?l(null,h.toString("utf8").substr(0,s)):d>=r?l(new Error(`Could not find ${t} in first ${r} bytes of ${e}`),null):u()})}if(a)return o(a);const h=Buffer.allocUnsafe(r);let d=0;u()}))}}),define(e[92],t([0,1,89,134,5,97,98]),function(e,t,n,i,r,s,o){"use strict";function a(e){return i.decodeStream(c(e))}function c(e){return e===t.UTF8_with_bom||null===e?t.UTF8:e}function l(e,n){if(!e||n<2)return null;const i=e.readUInt8(0),r=e.readUInt8(1);if(254===i&&255===r)return t.UTF16be;if(255===i&&254===r)return t.UTF16le;if(n<3)return null;const s=e.readUInt8(2);return 239===i&&187===r&&191===s?t.UTF8:null}function u(t){return new Promise((t,n)=>{e(["jschardet"],t,n)}).then(e=>{e.Constants.MINIMUM_THRESHOLD=f;const n=e.detect(t);if(!n||!n.encoding)return null;const i=n.encoding.toLowerCase();return 0<=g.indexOf(i)?null:h(n.encoding)})}function h(e){const t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return p[t]||t}function d({buffer:e,bytesRead:n},i){let r=l(e,n),s=!1;if(r!==t.UTF16be&&r!==t.UTF16le&&e){
let i=!0,o=!0,a=!1;for(let t=0;t<n&&t<m;t++){const n=t%2==1,r=0===e.readInt8(t);if(r&&(a=!0),i&&(n&&!r||!n&&r)&&(i=!1),o&&(n&&r||!n&&!r)&&(o=!1),r&&!i&&!o)break}a&&(i?r=t.UTF16le:o?r=t.UTF16be:s=!0)}return i&&!s&&!r&&e?u(e.slice(0,n)).then(e=>({seemsBinary:!1,encoding:e})):{seemsBinary:s,encoding:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.toDecodeStream=function(e,n){return n.minBytesRequiredForDetection||(n.minBytesRequiredForDetection=n.guessEncoding?y:v),n.overwriteEncoding||(n.overwriteEncoding=(e=>e||t.UTF8)),new Promise((t,i)=>{e.on("error",i),e.pipe(new class extends o.Writable{constructor(){super(...arguments),this._buffer=[],this._bytesBuffered=0}_write(e,t,i){Buffer.isBuffer(e)||i(new Error("data must be a buffer")),this._decodeStream?this._decodeStream.write(e,i):(this._buffer.push(e),this._bytesBuffered+=e.length,
this._decodeStreamConstruction?this._decodeStreamConstruction.then(e=>i(),e=>i(e)):"number"==typeof n.minBytesRequiredForDetection&&this._bytesBuffered>=n.minBytesRequiredForDetection?this._startDecodeStream(i):i())}_startDecodeStream(e){this._decodeStreamConstruction=Promise.resolve(d({buffer:Buffer.concat(this._buffer),bytesRead:this._bytesBuffered},n.guessEncoding)).then(i=>{n.overwriteEncoding&&(i.encoding=n.overwriteEncoding(i.encoding)),this._decodeStream=a(i.encoding);for(const e of this._buffer)this._decodeStream.write(e);e(),t({detected:i,stream:this._decodeStream})},t=>{this.emit("error",t),e(t)})}_final(e){this._decodeStream?this._decodeStream.end(e):this._startDecodeStream(()=>this._decodeStream.end(e))}})})},t.bomLength=function(e){switch(e){case t.UTF8:return 3;case t.UTF16be:case t.UTF16le:return 2}return 0},t.decode=function(e,t){return i.decode(e,c(t))},t.encode=function(e,t,n){return i.encode(e,c(t),n)},t.encodingExists=function(e){return i.encodingExists(c(e))},t.decodeStream=a,
t.encodeStream=function(e,t){return i.encodeStream(c(e),t)},t.detectEncodingByBOMFromBuffer=l,t.detectEncodingByBOM=function(e){return n.readExactlyByFile(e,3).then(({buffer:e,bytesRead:t})=>l(e,t))};const f=.2,g=["ascii","utf-8","utf-16","utf-32"];t.guessEncodingByBuffer=u;const p={ibm866:"cp866",big5:"cp950"};t.toCanonicalName=function(e){switch(e){case"shiftjis":return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:const t=e.match(/windows(\d+)/);return t?"windows-"+t[1]:e}};const m=512,v=512,y=4096;t.detectEncodingFromBuffer=d;const _={437:"cp437",850:"cp850",852:"cp852",855:"cp855",857:"cp857",860:"cp860",861:"cp861",863:"cp863",865:"cp865",866:"cp866",869:"cp869",936:"cp936",1252:"cp1252"};t.resolveTerminalEncoding=function(e){let n
;const o=process.env.VSCODE_CLI_ENCODING;return o?(e&&console.log(`Found VSCODE_CLI_ENCODING variable: ${o}`),n=Promise.resolve(o)):n=r.isLinux||r.isMacintosh?new Promise(t=>{e&&console.log('Running "locale charmap" to detect terminal encoding...'),s.exec("locale charmap",(e,n,i)=>t(n))}):new Promise(t=>{e&&console.log('Running "chcp" to detect terminal encoding...'),s.exec("chcp",(e,n,i)=>{if(n){const e=Object.keys(_);for(const i of e)if(n.indexOf(i)>=0)return t(_[i])}return t(void 0)})}),n.then(n=>{if(e&&console.log(`Detected raw terminal encoding: ${n}`),!n||"utf-8"===n.toLowerCase()||n.toLowerCase()===t.UTF8)return t.UTF8;const r=h(n);return i.encodingExists(r)?r:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[40],t([0,1,22,2,14,61,5,13,24,92,80,3]),function(e,t,n,i,r,s,o,a,c,l,u,h){"use strict";function d(e){return o.isMacintosh?n.readdirSync(e).map(e=>s.normalizeNFC(e)):n.readdirSync(e)}function f(e,t){
return o.isMacintosh?n.readdir(e,(e,n)=>e?t(e,[]):t(null,n.map(e=>s.normalizeNFC(e)))):n.readdir(e,t)}function g(e,t,r,s){const o=s||Object.create(null);n.stat(e,(s,a)=>{if(s)return r(s);if(!a.isDirectory())return function(e,t,i,r){const s=n.createReadStream(e),o=n.createWriteStream(t,{mode:i});let a=!1;const c=e=>{a||(a=!0,e?r(e):n.chmod(t,i,r))};s.once("error",e=>c(e)),o.once("error",e=>c(e)),o.once("close",()=>c()),s.pipe(o)}(e,t,511&a.mode,r);if(o[e])return r(null);o[e]=!0;const c=function(){f(e,(n,s)=>{E(s,(n,r)=>{g(i.join(e,n),i.join(t,n),e=>r(e,[]),o)},r)})};p(t,511&a.mode).then(c,c)})}function p(e,t,s){const o=()=>r.nfcall(n.mkdir,e,t).then(void 0,t=>"ENOENT"===t.code?Promise.reject(t):r.nfcall(n.stat,e).then(t=>t.isDirectory()?null:Promise.reject(new Error(`'${e}' exists and is not a directory.`)),e=>Promise.reject(t)));return e===i.dirname(e)?Promise.resolve(!0):o().then(void 0,n=>s&&s.isCancellationRequested?Promise.resolve(!1):"ENOENT"===n.code?p(i.dirname(e),t).then(o):Promise.reject(n))}
function m(e,t){if(e===i.win32.sep||e===i.posix.sep)return t(new Error("Will not delete root!"));n.exists(e,r=>{r?n.lstat(e,(r,s)=>{if(r||!s)t(r);else if(!s.isDirectory()||s.isSymbolicLink()){const i=s.mode;128&i?n.unlink(e,t):n.chmod(e,128|i,i=>{i?t(i):n.unlink(e,t)})}else f(e,(r,s)=>{if(r||!s)t(r);else if(0===s.length)n.rmdir(e,t);else{let r=null,o=s.length;s.forEach(s=>{m(i.join(e,s),i=>{o--,i&&(r=r||i),0===o&&(r?t(r):n.rmdir(e,t))})})}})}):t(null)})}function v(e){if(e===i.win32.sep||e===i.posix.sep)throw new Error("Will not delete root!");try{const t=n.lstatSync(e);t.isDirectory()&&!t.isSymbolicLink()?(d(e).forEach(t=>v(i.join(e,t))),n.rmdirSync(e)):n.unlinkSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}}function y(e,t,i,r){i=_(i),"string"==typeof t||Buffer.isBuffer(t)||t instanceof Uint8Array?function(e,t,i,r){i.encoding&&(t=l.encode(t instanceof Uint8Array?Buffer.from(t):t,i.encoding.charset,{addBOM:i.encoding.addBOM}));if(!b)return n.writeFile(e,t,{mode:i.mode,flag:i.flag},r)
;n.open(e,"string"==typeof i.flag?i.flag:"r",i.mode,(e,i)=>{if(e)return r(e);n.writeFile(i,t,e=>{if(e)return n.close(i,()=>r(e));n.fdatasync(i,e=>(e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),b=!1),n.close(i,e=>r(e))))})})}(e,t,i,r):function(e,t,i,r){let s=!1;const o=e=>{s||(s=!0,e?u?(a.once("close",()=>r(e)),a.destroy()):r(e):r())},a=n.createWriteStream(e,{mode:i.mode,flags:i.flag,autoClose:!1});let c,u;a.once("open",e=>{c=e,u=!0,i.encoding&&(t=t.pipe(l.encodeStream(i.encoding.charset,{addBOM:i.encoding.addBOM}))),t.pipe(a)}),t.once("error",e=>o(e)),a.once("error",e=>o(e)),a.once("finish",()=>{b&&u?n.fdatasync(c,e=>{e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),b=!1),a.destroy()}):a.destroy()}),a.once("close",()=>o())}(e,t,i,r)}function _(e){if(!e)return{mode:438,flag:"w"};const t={mode:e.mode,flag:e.flag,encoding:e.encoding};return"number"!=typeof t.mode&&(t.mode=438),
"string"!=typeof t.flag&&(t.flag="w"),t}function C(e){const t=i.dirname(e);if(e===t)return e;const n=(i.basename(e)||e).toLowerCase();try{const e=d(t).filter(e=>e.toLowerCase()===n);if(1===e.length){const n=C(t);if(n)return i.join(n,e[0])}else if(e.length>1){const r=e.indexOf(n);if(r>=0){const n=C(t);if(n)return i.join(n,e[r])}}}catch(e){}return null}function w(e){return a.rtrim(i.normalize(e),i.sep)}Object.defineProperty(t,"__esModule",{value:!0});const E=u.loop;t.readdirSync=d,t.readdir=f,t.statLink=function(e,t){n.lstat(e,(i,r)=>{i||r.isSymbolicLink()?n.stat(e,(e,n)=>{if(e)return t(e,null);t(null,{stat:n,isSymbolicLink:r&&r.isSymbolicLink()})}):t(null,{stat:r,isSymbolicLink:!1})})},t.copy=g,t.mkdirp=p,t.del=function(e,t,r,s){n.exists(e,o=>{if(!o)return r(null);n.stat(e,(o,l)=>{if(o||!l)return r(o);if("."===e[e.length-1]||a.endsWith(e,"./")||a.endsWith(e,".\\"))return m(e,r);const u=i.join(t,c.generateUuid());n.rename(e,u,t=>{if(t)return m(e,r);r(null),m(u,e=>{s&&s(e)})})})})},t.delSync=v,
t.mv=function(e,t,i){function r(e){if(e)return i(e);n.lstat(t,(e,r)=>e?i(e):r.isDirectory()||r.isSymbolicLink()?i(null):void n.open(t,"a",null,(e,t)=>{if(e)return i(e);n.futimes(t,r.atime,new Date,e=>{if(e)return i(e);n.close(t,i)})}))}if(e===t)return i(null);n.rename(e,t,n=>n?n&&e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===n.code||a.endsWith(e,".")?g(e,t,t=>{if(t)return i(t);m(e,r)}):i(n):r(null))};let b=!0;t.writeFileAndFlush=y,t.writeFileAndFlushSync=function(e,t,i){if((i=_(i)).encoding&&(t=l.encode(t,i.encoding.charset,{addBOM:i.encoding.addBOM})),!b)return n.writeFileSync(e,t,{mode:i.mode,flag:i.flag});const r=n.openSync(e,"string"==typeof i.flag?i.flag:"r",i.mode);try{n.writeFileSync(r,t);try{n.fdatasyncSync(r)}catch(e){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),b=!1}}finally{n.closeSync(r)}},t.realcaseSync=C,t.realpathSync=function(e){try{return n.realpathSync(e)}catch(t){const i=w(e);return n.accessSync(i,n.constants.R_OK),i}},
t.realpath=function(e,t){return n.realpath(e,(i,r)=>{if(!i)return t(null,r);const s=w(e);return n.access(s,n.constants.R_OK,e=>t(e,s))})},t.watch=function(e,t,i){try{const r=n.watch(e);return r.on("change",(e,n)=>{let i;n&&(i=n.toString(),o.isMacintosh&&(i=s.normalizeNFC(i))),t(e,i)}),r.on("error",(t,n)=>i(`Failed to watch ${e} for changes (${t}, ${n})`)),h.toDisposable(()=>{r.removeAllListeners(),r.close()})}catch(t){n.exists(e,n=>{n&&i(`Failed to watch ${e} for changes (${t.toString()})`)})}return h.Disposable.None},t.sanitizeFilePath=function(e,t){return o.isWindows&&a.endsWith(e,":")&&(e+=i.sep),i.isAbsolute(e)||(e=i.join(t,e)),e=i.normalize(e),o.isWindows?(e=a.rtrim(e,i.sep),a.endsWith(e,":")&&(e+=i.sep)):(e=a.rtrim(e,i.sep))||(e=i.sep),e}}),define(e[106],t([0,1,22,2,10,3,4,32,40,5]),function(e,t,n,i,r,s,o,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e,t={defaultConfig:Object.create(null),onError:e=>console.error(e)}){this._path=e,this.options=t,
this.disposables=[],this.configName=i.basename(this._path),this._onDidUpdateConfiguration=new o.Emitter,this.disposables.push(this._onDidUpdateConfiguration),this.registerWatcher(),this.initAsync()}get path(){return this._path}get hasParseErrors(){return this.parseErrors&&this.parseErrors.length>0}get onDidUpdateConfiguration(){return this._onDidUpdateConfiguration.event}initAsync(){this.loadAsync(e=>{this.loaded||this.updateCache(e),this.options.initCallback&&this.options.initCallback(this.getConfig())})}updateCache(e){this.cache=e,this.loaded=!0}loadSync(){try{return this.parse(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}}loadAsync(e){n.readFile(this._path,(t,n)=>e(t?this.options.defaultConfig:this.parse(n.toString())))}parse(e){let t;try{return this.parseErrors=[],(t=this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors))||this.options.defaultConfig}catch(e){return this.options.defaultConfig}}registerWatcher(){
const e=i.dirname(this._path);this.watch(e,!0),n.lstat(this._path,(e,t)=>{e||t.isDirectory()||t.isSymbolicLink()&&n.readlink(this._path,(e,t)=>{e||this.watch(t,!1)})})}watch(e,t){this.disposed||this.disposables.push(c.watch(e,(e,n)=>this.onConfigFileChange(e,n,t),e=>this.options.onError(e)))}onConfigFileChange(e,t,n){n&&(l.isWindows&&t&&t!==this.configName&&(t=i.basename(t)),t!==this.configName)||(this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(()=>this.reload(),this.options.changeBufferDelay||0))}reload(e){this.loadAsync(t=>{if(r.equals(t,this.cache)||(this.updateCache(t),this._onDidUpdateConfiguration.fire({config:this.cache})),e)return e(t)})}getConfig(){return this.ensureLoaded(),this.cache}ensureLoaded(){this.loaded||this.updateCache(this.loadSync())}dispose(){this.disposed=!0,this.disposables=s.dispose(this.disposables)}}t.ConfigWatcher=u}),define(e[8],t([0,1,40,2,14,22,23,5,4]),function(e,t,n,i,r,s,o,a,c){"use strict"
;function l(e){return r.nfcall(n.readdir,e)}function u(e){return d(e).then(t=>t.isDirectory()&&!t.isSymbolicLink()?l(e).then(t=>Promise.all(t.map(t=>u(i.join(e,t))))).then(()=>f(e)):g(e),e=>{if("ENOENT"!==e.code)return Promise.reject(e)})}function h(e){return r.nfcall(s.stat,e)}function d(e){return r.nfcall(s.lstat,e)}function f(e){return r.nfcall(s.rmdir,e)}function g(e){return r.nfcall(s.unlink,e)}function p(e,t,i){return function(e){let t=y[e];if(!t){t=new r.Queue,y[e]=t;c.Event.once(t.onFinished)(()=>{delete y[e],t.dispose()})}return t}(function(e){let t=e;(a.isWindows||a.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(()=>r.nfcall(n.writeFileAndFlush,e,t,i))}function m(e){return h(e).then(e=>e.isDirectory(),()=>!1)}function v(e,t=(_||(_=o.tmpdir()),_)){return r.nfcall(n.del,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=l,t.exists=function(e){return new Promise(t=>s.exists(e,t))},t.chmod=function(e,t){return r.nfcall(s.chmod,e,t)},t.mkdirp=n.mkdirp,t.rimraf=u,
t.realpath=function(e){return r.nfcall(n.realpath,e)},t.stat=h,t.statLink=function(e){return r.nfcall(n.statLink,e)},t.lstat=d,t.move=function(e,t){return r.nfcall(n.mv,e,t)},t.rename=function(e,t){return r.nfcall(s.rename,e,t)},t.renameIgnoreError=function(e,t){return new Promise(n=>{s.rename(e,t,()=>n())})},t.rmdir=f,t.unlink=g,t.symlink=function(e,t,n){return r.nfcall(s.symlink,e,t,n)},t.readlink=function(e){return r.nfcall(s.readlink,e)},t.truncate=function(e,t){return r.nfcall(s.truncate,e,t)},t.readFile=function(e,t){return r.nfcall(s.readFile,e,t)};const y=Object.create(null);t.writeFile=p,t.readDirsInDir=function(e){return l(e).then(t=>Promise.all(t.map(t=>m(i.join(e,t)))).then(e=>t.filter((t,n)=>e[n])))},t.dirExists=m,t.fileExists=function(e){return h(e).then(e=>e.isFile(),()=>!1)};let _=null;t.del=v,t.whenDeleted=function(e){return new Promise(t=>{let n=!1;const i=setInterval(()=>{n||(n=!0,s.exists(e,e=>{n=!1,e||(clearInterval(i),t(void 0))}))},1e3)})},t.copy=function(e,t){
return r.nfcall(n.copy,e,t)}}),define(e[33],t([0,1,4,3,14,28,7,34]),function(e,t,i,r,s,o,a,c){"use strict";function l(e){const t=c.VSBuffer.alloc(4);return t.writeUint32BE(e,0),t}function u(e){return e.read(4).readUint32BE(0)}function h(e){const t=c.VSBuffer.alloc(1);return t.writeUint8(e,0),t}function d(e,t){if(void 0===t)e.write(_.Undefined);else if("string"==typeof t){const n=c.VSBuffer.fromString(t);e.write(_.String),e.write(l(n.byteLength)),e.write(n)}else if(C&&Buffer.isBuffer(t)){const n=c.VSBuffer.wrap(t);e.write(_.Buffer),e.write(l(n.byteLength)),e.write(n)}else if(t instanceof c.VSBuffer)e.write(_.VSBuffer),e.write(l(t.byteLength)),e.write(t);else if(Array.isArray(t)){e.write(_.Array),e.write(l(t.length));for(const n of t)d(e,n)}else{const n=c.VSBuffer.fromString(JSON.stringify(t));e.write(_.Object),e.write(l(n.byteLength)),e.write(n)}}function f(e){switch(e.read(1).readUint8(0)){case y.Undefined:return;case y.String:return e.read(u(e)).toString();case y.Buffer:return e.read(u(e)).buffer
;case y.VSBuffer:return e.read(u(e));case y.Array:{const t=u(e),n=[];for(let i=0;i<t;i++)n.push(f(e));return n}case y.Object:return JSON.parse(e.read(u(e)).toString())}}function g(e){return{call:(t,n,i)=>e.then(e=>e.call(t,n,i)),listen(t,n){const r=new i.Relay;return e.then(e=>r.input=e.listen(t,n)),r.event}}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Promise=100]="Promise",e[e.PromiseCancel=101]="PromiseCancel",e[e.EventListen=102]="EventListen",e[e.EventDispose=103]="EventDispose"}(t.RequestType||(t.RequestType={}));!function(e){e[e.Initialize=200]="Initialize",e[e.PromiseSuccess=201]="PromiseSuccess",e[e.PromiseError=202]="PromiseError",e[e.PromiseErrorObj=203]="PromiseErrorObj",e[e.EventFire=204]="EventFire"}(t.ResponseType||(t.ResponseType={}));var p;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(p||(p={}));class m{constructor(e){this.buffer=e,this.pos=0}read(e){const t=this.buffer.slice(this.pos,this.pos+e);return this.pos+=t.byteLength,t}}class v{
constructor(){this.buffers=[]}get buffer(){return c.VSBuffer.concat(this.buffers)}write(e){this.buffers.push(e)}}var y;!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.VSBuffer=3]="VSBuffer",e[e.Array=4]="Array",e[e.Object=5]="Object"}(y||(y={}));const _={Undefined:h(y.Undefined),String:h(y.String),Buffer:h(y.Buffer),VSBuffer:h(y.VSBuffer),Array:h(y.Array),Object:h(y.Object)},C="undefined"!=typeof Buffer;class w{constructor(e,t){this.protocol=e,this.ctx=t,this.channels=new Map,this.activeRequests=new Map,this.protocolListener=this.protocol.onMessage(e=>this.onRawMessage(e)),this.sendResponse({type:200})}registerChannel(e,t){this.channels.set(e,t)}sendResponse(e){switch(e.type){case 200:return this.send([e.type]);case 201:case 202:case 204:case 203:return this.send([e.type,e.id],e.data)}}send(e,t){const n=new v;d(n,e),d(n,t),this.sendBuffer(n.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onRawMessage(e){const t=new m(e),n=f(t),i=f(t),r=n[0];switch(r){
case 100:return this.onPromise({type:r,id:n[1],channelName:n[2],name:n[3],arg:i});case 102:return this.onEventListen({type:r,id:n[1],channelName:n[2],name:n[3],arg:i});case 101:case 103:return this.disposeActiveRequest({type:r,id:n[1]})}}onPromise(e){const t=this.channels.get(e.channelName);if(!t)throw new Error("Unknown channel");const n=new o.CancellationTokenSource;let i;try{i=t.call(this.ctx,e.name,e.arg,n.token)}catch(e){i=Promise.reject(e)}const s=e.id;i.then(t=>{this.sendResponse({id:s,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:s,data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:202}):this.sendResponse({id:s,data:t,type:203}),this.activeRequests.delete(e.id)});const a=r.toDisposable(()=>n.cancel());this.activeRequests.set(e.id,a)}onEventListen(e){const t=this.channels.get(e.channelName);if(!t)throw new Error("Unknown channel");const n=e.id,i=t.listen(this.ctx,e.name,e.arg)(e=>this.sendResponse({
id:n,data:e,type:204}));this.activeRequests.set(e.id,i)}disposeActiveRequest(e){const t=this.activeRequests.get(e.id);t&&(t.dispose(),this.activeRequests.delete(e.id))}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelServer=w;class E{constructor(e){this.protocol=e,this.state=p.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new i.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(e=>this.onBuffer(e))}getChannel(e){const t=this;return{call:(n,i,r)=>t.requestPromise(e,n,i,r),listen:(n,i)=>t.requestEvent(e,n,i)}}requestPromise(e,t,n,i=o.CancellationToken.None){const c=this.lastRequestId++,l={id:c,type:100,channelName:e,name:t,arg:n};if(i.isCancellationRequested)return Promise.reject(a.canceled());let u;return new Promise((e,t)=>{
if(i.isCancellationRequested)return t(a.canceled());let n=s.createCancelablePromise(e=>this.whenInitialized());n.then(()=>{n=null;this.handlers.set(c,n=>{switch(n.type){case 201:this.handlers.delete(c),e(n.data);break;case 202:this.handlers.delete(c);const i=new Error(n.data.message);i.stack=n.data.stack,i.name=n.data.name,t(i);break;case 203:this.handlers.delete(c),t(n.data)}}),this.sendRequest(l)});const o=()=>{n?(n.cancel(),n=null):this.sendRequest({id:c,type:101}),t(a.canceled())},h=i.onCancellationRequested(o);u=r.combinedDisposable([r.toDisposable(o),h]),this.activeRequests.add(u)}).finally(()=>this.activeRequests.delete(u))}requestEvent(e,t,n){const r=this.lastRequestId++,o={id:r,type:102,channelName:e,name:t,arg:n};let a=null;const c=new i.Emitter({onFirstListenerAdd:()=>{(a=s.createCancelablePromise(e=>this.whenInitialized())).then(()=>{a=null,this.activeRequests.add(c),this.sendRequest(o)})},onLastListenerRemove:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(c),this.sendRequest({id:r,
type:103}))}});return this.handlers.set(r,e=>c.fire(e.data)),c.event}sendRequest(e){switch(e.type){case 100:case 102:return this.send([e.type,e.id,e.channelName,e.name],e.arg);case 101:case 103:return this.send([e.type,e.id])}}send(e,t){const n=new v;d(n,e),d(n,t),this.sendBuffer(n.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onBuffer(e){const t=new m(e),n=f(t),i=f(t);switch(n[0]){case 200:return this.onResponse({type:n[0]});case 201:case 202:case 204:case 203:return this.onResponse({type:n[0],id:n[1],data:i})}}onResponse(e){if(200===e.type)return this.state=p.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===p.Idle?Promise.resolve():i.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=E;class b{constructor(e){this.channels=new Map,this._connections=new Set,
this._onDidChangeConnections=new i.Emitter,this.onDidChangeConnections=this._onDidChangeConnections.event,e(({protocol:e,onDidClientDisconnect:t})=>{i.Event.once(e.onMessage)(n=>{const i=f(new m(n)),r=new w(e,i),s=new E(e);this.channels.forEach((e,t)=>r.registerChannel(t,e));const o={channelClient:s,ctx:i};this._connections.add(o),this._onDidChangeConnections.fire(o),t(()=>{r.dispose(),s.dispose(),this._connections.delete(o)})})})}get connections(){const e=[];return this._connections.forEach(t=>e.push(t)),e}getChannel(e,t){const n=this;return{call:(i,r,s)=>g(t.routeCall(n,i,r).then(t=>t.channelClient.getChannel(e))).call(i,r,s),listen:(i,r)=>g(t.routeEvent(n,i,r).then(t=>t.channelClient.getChannel(e))).listen(i,r)}}registerChannel(e,t){this.channels.set(e,t)}dispose(){this.channels.clear(),this._connections.clear(),this._onDidChangeConnections.dispose()}}t.IPCServer=b;class S{constructor(e,t){const n=new v;d(n,t),e.send(n.buffer),this.channelClient=new E(e),this.channelServer=new w(e,t)}getChannel(e){
return this.channelClient.getChannel(e)}registerChannel(e,t){this.channelServer.registerChannel(e,t)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}t.IPCClient=S,t.getDelayedChannel=g,t.getNextTickChannel=function(e){let t=!1;return{call:(n,i,r)=>t?e.call(n,i,r):s.timeout(0).then(()=>t=!0).then(()=>e.call(n,i,r)),listen(n,r){if(t)return e.listen(n,r);const o=new i.Relay;return s.timeout(0).then(()=>t=!0).then(()=>o.input=e.listen(n,r)),o.event}}};class x{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){return this.route(e)}route(e){return n(this,void 0,void 0,function*(){for(const t of e.connections)if(yield Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return yield i.Event.toPromise(e.onDidChangeConnections),yield this.route(e)})}}t.StaticRouter=x}),define(e[113],t([0,1,4,33,3,34,5]),function(e,t,n,i,r,s,o){"use strict";function a(){return l||(l=s.VSBuffer.alloc(0)),l}function c(e){let t,i=!1,r=!1,s=[];const a=()=>{if(!r){
for(r=!0;i&&s.length>0;)t.fire(s.shift());r=!1}};return e(e=>{s.push(e),a()}),(t=new n.Emitter({onFirstListenerAdd:()=>{i=!0,"undefined"!=typeof process?process.nextTick(a):o.setImmediate(a)},onLastListenerRemove:()=>{i=!1}})).event}Object.defineProperty(t,"__esModule",{value:!0});let l=null;class u{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(e){this._chunks.push(e),this._totalLength+=e.byteLength}read(e){if(0===e)return a();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks.shift();return this._totalLength-=e,t}if(this._chunks[0].byteLength>e){const t=this._chunks[0].slice(0,e);return this._chunks[0]=this._chunks[0].slice(e),this._totalLength-=e,t}let t=s.VSBuffer.alloc(e),n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){this._chunks[0]=i.slice(e);const r=i.slice(0,e);t.set(r,n),n+=e,this._totalLength-=e,e-=e}else this._chunks.shift(),t.set(i,n),n+=i.byteLength,
this._totalLength-=i.byteLength,e-=i.byteLength}return t}}var h;!function(e){e[e.None=0]="None",e[e.Regular=1]="Regular",e[e.Control=2]="Control",e[e.Ack=3]="Ack",e[e.KeepAlive=4]="KeepAlive"}(h||(h={}));!function(e){e[e.HeaderLength=13]="HeaderLength",e[e.AcknowledgeTime=2e3]="AcknowledgeTime",e[e.AcknowledgeTimeoutTime=1e4]="AcknowledgeTimeoutTime",e[e.KeepAliveTime=3e4]="KeepAliveTime",e[e.KeepAliveTimeoutTime=6e4]="KeepAliveTimeoutTime",e[e.ReconnectionGraceTime=36e5]="ReconnectionGraceTime"}(t.ProtocolConstants||(t.ProtocolConstants={}));class d{constructor(e,t,n,i){this.type=e,this.id=t,this.ack=n,this.data=i,this.writtenTime=0}get size(){return this.data.byteLength}}class f extends r.Disposable{constructor(e){super(),this._onMessage=new n.Emitter,this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=e,this._isDisposed=!1,this._incomingData=new u,this._register(this._socket.onData(e=>this.acceptChunk(e))),this.lastReadTime=Date.now()}
acceptChunk(e){if(e&&0!==e.byteLength)for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(e);this._incomingData.byteLength>=this._state.readLen;){const e=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=e.readUint32BE(9),this._state.messageType=e.readUint8(0),this._state.id=e.readUint32BE(1),this._state.ack=e.readUint32BE(5);else{const t=this._state.messageType,n=this._state.id,i=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._onMessage.fire(new d(t,n,i,e)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class g{constructor(e){this._isDisposed=!1,this._socket=e,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){this.flush(),this._isDisposed=!0}flush(){this._writeNow()}write(e){
if(this._isDisposed)return console.warn("Cannot write message in a disposed ProtocolWriter"),void console.warn(e);e.writtenTime=Date.now(),this.lastWriteTime=Date.now();const t=s.VSBuffer.alloc(13);t.writeUint8(e.type,0),t.writeUint32BE(e.id,1),t.writeUint32BE(e.ack,5),t.writeUint32BE(e.data.byteLength,9),this._writeSoon(t,e.data)}_bufferAdd(e,t){const n=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.byteLength+t.byteLength,n}_bufferTake(){const e=s.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e}_writeSoon(e,t){this._bufferAdd(e,t)&&o.setImmediate(()=>{this._writeNow()})}_writeNow(){0!==this._totalLength&&this._socket.write(this._bufferTake())}}class p extends r.Disposable{constructor(e){super(),this._onMessage=new n.Emitter,this.onMessage=this._onMessage.event,this._onClose=new n.Emitter,this.onClose=this._onClose.event,this._socket=e,this._socketWriter=this._register(new g(this._socket)),
this._socketReader=this._register(new f(this._socket)),this._register(this._socketReader.onMessage(e=>{1===e.type&&this._onMessage.fire(e.data)})),this._register(this._socket.onClose(()=>this._onClose.fire()))}getSocket(){return this._socket}send(e){this._socketWriter.write(new d(1,0,0,e))}}t.Protocol=p;class m extends i.IPCClient{constructor(e,t){super(e,t),this.protocol=e}static fromSocket(e,t){return new m(new p(e),t)}get onClose(){return this.protocol.onClose}dispose(){super.dispose();const e=this.protocol.getSocket();this.protocol.dispose(),e.end()}}t.Client=m;class v{constructor(e){this.data=e,this.next=null}}class y{constructor(){this._first=null,this._last=null}peek(){return this._first?this._first.data:null}toArray(){let e=[],t=0,n=this._first;for(;n;)e[t++]=n.data,n=n.next;return e}pop(){if(this._first)return this._first===this._last?(this._first=null,void(this._last=null)):void(this._first=this._first.next)}push(e){const t=new v(e);if(!this._first)return this._first=t,void(this._last=t)
;this._last.next=t,this._last=t}}class _{constructor(e,t=null){this._onControlMessage=new n.Emitter,this.onControlMessage=c(this._onControlMessage.event),this._onMessage=new n.Emitter,this.onMessage=c(this._onMessage.event),this._onClose=new n.Emitter,this.onClose=c(this._onClose.event),this._onSocketClose=new n.Emitter,this.onSocketClose=c(this._onSocketClose.event),this._onSocketTimeout=new n.Emitter,this.onSocketTimeout=c(this._onSocketTimeout.event),this._isReconnecting=!1,this._outgoingUnackMsg=new y,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._outgoingKeepAliveTimeout=null,this._incomingKeepAliveTimeout=null,this._socketDisposables=[],this._socket=e,this._socketWriter=new g(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new f(this._socket),this._socketDisposables.push(this._socketReader),
this._socketDisposables.push(this._socketReader.onMessage(e=>this._receiveMessage(e))),this._socketDisposables.push(this._socket.onClose(()=>this._onSocketClose.fire())),this._socketDisposables.push(this._socket.onEnd(()=>this._onClose.fire())),t&&this._socketReader.acceptChunk(t),this._sendKeepAliveCheck(),this._recvKeepAliveCheck()}get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._outgoingKeepAliveTimeout&&(clearTimeout(this._outgoingKeepAliveTimeout),this._outgoingKeepAliveTimeout=null),this._incomingKeepAliveTimeout&&(clearTimeout(this._incomingKeepAliveTimeout),this._incomingKeepAliveTimeout=null),this._socketDisposables=r.dispose(this._socketDisposables)}_sendKeepAliveCheck(){if(this._outgoingKeepAliveTimeout)return;const e=Date.now()-this._socketWriter.lastWriteTime
;if(e>=3e4){const e=new d(4,0,0,a());return this._socketWriter.write(e),void this._sendKeepAliveCheck()}this._outgoingKeepAliveTimeout=setTimeout(()=>{this._outgoingKeepAliveTimeout=null,this._sendKeepAliveCheck()},3e4-e+5)}_recvKeepAliveCheck(){if(this._incomingKeepAliveTimeout)return;const e=Date.now()-this._socketReader.lastReadTime;e>=6e4?this._onSocketTimeout.fire(void 0):this._incomingKeepAliveTimeout=setTimeout(()=>{this._incomingKeepAliveTimeout=null,this._recvKeepAliveCheck()},6e4-e+5)}getSocket(){return this._socket}beginAcceptReconnection(e,t){this._isReconnecting=!0,this._socketDisposables=r.dispose(this._socketDisposables),this._socket=e,this._socketWriter=new g(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new f(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(e=>this._receiveMessage(e))),this._socketDisposables.push(this._socket.onClose(()=>this._onSocketClose.fire())),
this._socketDisposables.push(this._socket.onEnd(()=>this._onClose.fire())),this._socketReader.acceptChunk(t)}endAcceptReconnection(){this._isReconnecting=!1;const e=this._outgoingUnackMsg.toArray();for(let t=0,n=e.length;t<n;t++)this._socketWriter.write(e[t]);this._recvAckCheck(),this._sendKeepAliveCheck(),this._recvKeepAliveCheck()}_receiveMessage(e){if(e.ack>this._outgoingAckId)for(this._outgoingAckId=e.ack;;){const t=this._outgoingUnackMsg.peek();if(!(t&&t.id<=e.ack))break;this._outgoingUnackMsg.pop()}1===e.type?e.id>this._incomingMsgId&&(e.id!==this._incomingMsgId+1&&console.error(`PROTOCOL CORRUPTION, LAST SAW MSG ${this._incomingMsgId} AND HAVE NOW RECEIVED MSG ${e.id}`),this._incomingMsgId=e.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(e.data)):2===e.type&&this._onControlMessage.fire(e.data)}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(e){const t=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId
;const n=new d(1,t,this._incomingAckId,e);this._outgoingUnackMsg.push(n),this._isReconnecting||(this._socketWriter.write(n),this._recvAckCheck())}sendControl(e){const t=new d(2,0,0,e);this._socketWriter.write(t)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId)return;if(this._incomingAckTimeout)return;const e=Date.now()-this._incomingMsgLastTime;e>=2e3?this._sendAck():this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-e+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId)return;if(this._outgoingAckTimeout)return;const e=this._outgoingUnackMsg.peek(),t=Date.now()-e.writtenTime;t>=1e4?this._onSocketTimeout.fire(void 0):this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},1e4-t+5)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const e=new d(3,0,this._incomingAckId,a());this._socketWriter.write(e)}}t.PersistentProtocol=_}),
define(e[114],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.sender=e,this.onMessage=t}send(e){try{this.sender.send("ipc:message",e.buffer)}catch(e){}}dispose(){this.sender.send("ipc:disconnect",null)}}t.Protocol=n}),define(e[124],t([0,1,4,33,114,125,34]),function(e,t,n,i,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends i.IPCClient{static createProtocol(){const e=n.Event.fromNodeEventEmitter(s.ipcRenderer,"ipc:message",(e,t)=>o.VSBuffer.wrap(t));return s.ipcRenderer.send("ipc:hello"),new r.Protocol(s.ipcRenderer,e)}constructor(e){const t=a.createProtocol();super(t,e),this.protocol=t}dispose(){this.protocol.dispose()}}t.Client=a}),define(e[56],t([0,1,133,4,33,2,23,24,34,113]),function(e,t,n,i,r,s,o,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e){this.socket=e}onData(e){const t=t=>e(c.VSBuffer.wrap(t));return this.socket.on("data",t),{
dispose:()=>this.socket.off("data",t)}}onClose(e){return this.socket.on("close",e),{dispose:()=>this.socket.off("close",e)}}onEnd(e){return this.socket.on("end",e),{dispose:()=>this.socket.off("end",e)}}write(e){this.socket.destroyed||this.socket.write(e.buffer)}end(){this.socket.end()}}t.NodeSocket=u,t.generateRandomPipeName=function(){const e=a.generateUuid();return"win32"===process.platform?`\\\\.\\pipe\\vscode-ipc-${e}-sock`:s.join(o.tmpdir(),`vscode-ipc-${e}.sock`)};class h extends r.IPCServer{static toClientConnectionEvent(e){const t=i.Event.fromNodeEventEmitter(e,"connection");return i.Event.map(t,e=>({protocol:new l.Protocol(new u(e)),onDidClientDisconnect:i.Event.once(i.Event.fromNodeEventEmitter(e,"close"))}))}constructor(e){super(h.toClientConnectionEvent(e)),this.server=e}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}t.Server=h,t.serve=function(e){return new Promise((t,i)=>{const r=n.createServer();r.on("error",i),r.listen(e,()=>{r.removeListener("error",i),
t(new h(r))})})},t.connect=function(e,t){return new Promise((i,r)=>{const s=n.createConnection(e,()=>{s.removeListener("error",r),i(l.Client.fromSocket(new u(s),t))});s.once("error",r)})}}),define(e[58],t([12,15]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[50],t([0,1,58,9,20]),function(e,t,n,i,r){"use strict";function s(e,t){return e.message?t&&(e.stack||e.stacktrace)?n.localize(0,null,o(e),e.stack||e.stacktrace):o(e):n.localize(1,null)}function o(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?n.localize(2,null,e.message):e.message}function a(e=null,t=!1){if(!e)return n.localize(3,null);if(Array.isArray(e)){const i=r.coalesce(e),s=a(i[0],t);return i.length>1?n.localize(4,null,s,i.length):s}if(i.isString(e))return e;if(e.detail){const n=e.detail;if(n.error)return s(n.error,t);if(n.exception)return s(n.exception,t)}return e.stack?s(e,t):e.message?e.message:n.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=a
}),define(e[62],t([12,15]),function(e,t){return e.create("vs/base/node/zip",t)}),define(e[63],t([12,15]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[64],t([12,15]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[65],t([12,15]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[66],t([12,15]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[67],t([12,15]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementUtil",t)}),define(e[55],t([12,15]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[69],t([12,15]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[70],t([12,15]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[71],t([12,15]),function(e,t){
return e.create("vs/platform/workspaces/common/workspaces",t)}),define(e[26],t([0,1,13]),function(e,t,n){"use strict";function i(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===n.compareIgnoreCase(e.id,t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=i,t.adoptToGalleryExtensionId=function(e){return e.toLocaleLowerCase()},t.getGalleryExtensionId=function(e,t){return`${e.toLocaleLowerCase()}.${t.toLocaleLowerCase()}`},t.groupByExtension=function(e,t){const n=[],r=e=>{for(const r of n)if(r.some(n=>i(t(n),t(e))))return r;return null};for(const t of e){const e=r(t);e?e.push(t):n.push([t])}return n},t.getLocalExtensionTelemetryData=function(e){return{id:e.identifier.id,name:e.manifest.name,galleryId:null,publisherId:e.metadata?e.metadata.publisherId:null,publisherName:e.manifest.publisher,publisherDisplayName:e.metadata?e.metadata.publisherDisplayName:null,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},
t.getGalleryExtensionTelemetryData=function(e){return Object.assign({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:!!(e.properties.dependencies&&e.properties.dependencies.length>0)},e.telemetryData)},t.BetterMergeId="pprice.better-merge",t.getMaliciousExtensionsSet=function(e){const t=new Set;for(const n of e)n.malicious&&t.add(n.id.id);return t}}),define(e[73],t([0,1,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return n.cloneAndChange(e,e=>{if("string"!=typeof e)return;const n=i.exec(e);return n?t[n[1]]||e:void 0})}}),define(e[74],t([0,1,3,97,50,2,14,4,18,8]),function(e,t,i,r,s,o,a,c,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class h extends i.Disposable{constructor(e,t){super(),this.environmentService=e,this.logService=t,this.processesLimiter=new a.Limiter(5)}
postUninstall(e){return n(this,void 0,void 0,function*(){const t=this.parseScript(e,"uninstall");return t&&(this.logService.info(e.identifier.id,e.manifest.version,"Running post uninstall script"),yield this.processesLimiter.queue(()=>this.runLifecycleHook(t.script,"uninstall",t.args,!0,e).then(()=>this.logService.info(e.identifier.id,e.manifest.version,"Finished running post uninstall script"),t=>this.logService.error(e.identifier.id,e.manifest.version,`Failed to run post uninstall script: ${t}`)))),u.rimraf(this.getExtensionStoragePath(e)).then(void 0,e=>this.logService.error("Error while removing extension storage path",e))})}parseScript(e,t){const n=`vscode:${t}`;if(e.location.scheme===l.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts[n]){const t=e.manifest.scripts[n].split(" ");return t.length<2||"node"!==t[0]||!t[1]?(this.logService.warn(e.identifier.id,e.manifest.version,`${n} should be a node script`),null):{script:o.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}
return null}runLifecycleHook(e,t,n,i,r){return new Promise((o,a)=>{const c=this.start(e,t,n,r);let l;const u=e=>{l&&(clearTimeout(l),l=null),e?a(e):o(void 0)};c.on("error",e=>{u(s.toErrorMessage(e)||"Unknown")}),c.on("exit",(e,n)=>{u(e?`post-${t} process exited with code ${e}`:void 0)}),i&&(l=setTimeout(()=>{l=null,c.kill(),a("timed out")},5e3))})}start(e,t,n,i){const s={silent:!0,execArgv:void 0},o=r.fork(e,[`--type=extension-post-${t}`,...n],s);o.stdout.setEncoding("utf8"),o.stderr.setEncoding("utf8");const a=c.Event.fromNodeEventEmitter(o.stdout,"data"),l=c.Event.fromNodeEventEmitter(o.stderr,"data");a(e=>this.logService.info(i.identifier.id,i.manifest.version,`post-${t}`,e)),l(e=>this.logService.error(i.identifier.id,i.manifest.version,`post-${t}`,e));const u=c.Event.any(c.Event.map(a,e=>({data:`%c${e}`,format:[""]})),c.Event.map(l,e=>({data:`%c${e}`,format:["color: red"]})));return c.Event.debounce(u,(e,t)=>e?{data:e.data+t.data,format:[...e.format,...t.format]}:{data:t.data,format:t.format},100)(e=>{
console.group(i.identifier.id),console.log(e.data,...e.format),console.groupEnd()}),o}getExtensionStoragePath(e){return o.join(this.environmentService.globalStorageHome,e.identifier.id.toLowerCase())}}t.ExtensionsLifecycle=h}),define(e[75],t([0,1,4,11,76,10]),function(e,t,n,i,r,s){"use strict";function o(e,t){return i.URI.revive(t?t.transformIncoming(e):e)}function a(e,t){t=t||r.DefaultURITransformer;const n=e.manifest,i=r.transformAndReviveIncomingURIs(Object.assign({},e,{manifest:void 0}),t);return Object.assign({},i,{manifest:n})}function c(e,t){return t?s.cloneAndChange(e,e=>e instanceof i.URI?t.transformOutgoingURI(e):void 0):e}Object.defineProperty(t,"__esModule",{value:!0});class l{constructor(e,t){this.service=e,this.getUriTransformer=t,this.onInstallExtension=n.Event.buffer(e.onInstallExtension,!0),this.onDidInstallExtension=n.Event.buffer(e.onDidInstallExtension,!0),this.onUninstallExtension=n.Event.buffer(e.onUninstallExtension,!0),
this.onDidUninstallExtension=n.Event.buffer(e.onDidUninstallExtension,!0)}listen(e,t){const i=this.getUriTransformer(e);switch(t){case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtension":return n.Event.map(this.onDidInstallExtension,e=>Object.assign({},e,{local:e.local?c(e.local,i):e.local}));case"onUninstallExtension":return this.onUninstallExtension;case"onDidUninstallExtension":return this.onDidUninstallExtension}throw new Error("Invalid listen")}call(e,t,n){const i=this.getUriTransformer(e);switch(t){case"zip":return this.service.zip(a(n[0],i)).then(e=>(function(e,t){return t?t.transformOutgoingURI(e):e})(e,i));case"unzip":return this.service.unzip(o(n[0],i),n[1]);case"install":return this.service.install(o(n[0],i));case"installFromGallery":return this.service.installFromGallery(n[0]);case"uninstall":return this.service.uninstall(a(n[0],i),n[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(a(n[0],i));case"getInstalled":
return this.service.getInstalled(n[0]).then(e=>e.map(e=>c(e,i)));case"updateMetadata":return this.service.updateMetadata(a(n[0],i),n[1]).then(e=>c(e,i));case"getExtensionsReport":return this.service.getExtensionsReport()}throw new Error("Invalid call")}}t.ExtensionManagementChannel=l;class u{constructor(e){this.channel=e}get onInstallExtension(){return this.channel.listen("onInstallExtension")}get onDidInstallExtension(){return n.Event.map(this.channel.listen("onDidInstallExtension"),e=>Object.assign({},e,{local:e.local?a(e.local,null):e.local}))}get onUninstallExtension(){return this.channel.listen("onUninstallExtension")}get onDidUninstallExtension(){return this.channel.listen("onDidUninstallExtension")}zip(e){return Promise.resolve(this.channel.call("zip",[e]).then(e=>i.URI.revive(e)))}unzip(e,t){return Promise.resolve(this.channel.call("unzip",[e,t]))}install(e){return Promise.resolve(this.channel.call("install",[e]))}installFromGallery(e){
return Promise.resolve(this.channel.call("installFromGallery",[e]))}uninstall(e,t=!1){return Promise.resolve(this.channel.call("uninstall",[e,t]))}reinstallFromGallery(e){return Promise.resolve(this.channel.call("reinstallFromGallery",[e]))}getInstalled(e=null){return Promise.resolve(this.channel.call("getInstalled",[e])).then(e=>e.map(e=>a(e,null)))}updateMetadata(e,t){return Promise.resolve(this.channel.call("updateMetadata",[e,t])).then(e=>a(e,null))}getExtensionsReport(){return Promise.resolve(this.channel.call("getExtensionsReport"))}}t.ExtensionManagementChannelClient=u}),define(e[42],t([0,1,26,13]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin";class r{constructor(e,t){this.identifier=e,this.version=t}key(){return`${this.identifier.id}-${this.version}`}equals(e){
return e instanceof r&&(n.areSameExtensions(this.identifier,e.identifier)&&this.version===e.version)}}t.ExtensionIdentifierWithVersion=r,t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)};!function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.ExtensionType||(t.ExtensionType={}));class s{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(void 0===e||null===e)return void 0===t||null===t;if(void 0===t||null===t)return!1;if("string"==typeof e||"string"==typeof t){let n="string"==typeof e?e:e.value,r="string"==typeof t?t:t.value;return i.equalsIgnoreCase(n,r)}return e._lower===t._lower}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}t.ExtensionIdentifier=s,t.isLanguagePackExtension=function(e){return!(!e.contributes||!e.contributes.localizations)&&e.contributes.localizations.length>0}}),define(e[77],t([0,1,3,2,42,8]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});class o extends n.Disposable{constructor(e,t){super(),this.environmentService=e,this.extensionsManifestCache=i.join(this.environmentService.userDataPath,r.MANIFEST_CACHE_FOLDER,r.USER_MANIFEST_CACHE_FILE),this._register(t.onDidInstallExtension(e=>this.onDidInstallExtension(e))),this._register(t.onDidUninstallExtension(e=>this.onDidUnInstallExtension(e)))}onDidInstallExtension(e){e.error||this.invalidate()}onDidUnInstallExtension(e){e.error||this.invalidate()}invalidate(){s.del(this.extensionsManifestCache).then(()=>{},()=>{})}}t.ExtensionsManifestCache=o}),define(e[48],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}t.SyncDescriptor=n,t.createSyncDescriptor=((e,...t)=>new n(e,t))}),define(e[79],t([0,1,9,91]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._hashFn=e,this._nodes=Object.create(null)}
roots(){const e=[];return i.forEach(this._nodes,t=>{n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n}removeNode(e){const t=this._hashFn(e);delete this._nodes[t],i.forEach(this._nodes,e=>{delete e.value.outgoing[t],delete e.value.incoming[t]})}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes[t];return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n}lookup(e){return this._nodes[this._hashFn(e)]}isEmpty(){for(const e in this._nodes)return!1;return!0}toString(){let e=[];return i.forEach(this._nodes,t=>{e.push(`${t.key}, (incoming)[${Object.keys(t.value.incoming).join(", ")}], (outgoing)[${Object.keys(t.value.outgoing).join(",")}]`)}),e.join("\n")}}t.Graph=r}),define(e[6],t([0,1]),function(e,t){"use strict";function n(e,t,n,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n,
optional:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[r.DI_TARGET]=t)}function i(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);const t=function(e,i,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,r,!1)};return t.toString=(()=>e),r.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(r=t._util||(t._util={})),t.IInstantiationService=i("instantiationService"),t.createDecorator=i,t.optional=function(e){return function(t,i,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,r,!0)}}}),define(e[47],t([0,1,6,36,64]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService"),
t.IFileDialogService=n.createDecorator("fileDialogService");const s=10;t.getConfirmMessage=function(e,t){const n=[e];return n.push(""),n.push(...t.slice(0,s).map(e=>i.basename(e))),t.length>s&&(t.length-s==1?n.push(r.localize(0,null)):n.push(r.localize(1,null,t.length-s))),n.push(""),n.join("\n")}});var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};define(e[82],t([0,1,47]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=class{constructor(e){this.dialogService=e}listen(e,t){throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"show":return this.dialogService.show(n[0],n[1],n[2]);case"confirm":
return this.dialogService.confirm(n[0])}return Promise.reject(new Error("invalid command"))}};s=i([r(0,n.IDialogService)],s),t.DialogChannel=s;class o{constructor(e){this.channel=e}show(e,t,n){return this.channel.call("show",[e,t,n])}confirm(e){return this.channel.call("confirm",[e])}}t.DialogChannelClient=o}),define(e[45],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=n.createDecorator("downloadService")}),define(e[17],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[85],t([0,1,17,2,8,7,3]),function(e,t,n,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class extends c.Disposable{constructor(e){super(),this.environmentService=e,this.cleanUpOldLogsSoon()}cleanUpOldLogsSoon(){let e=setTimeout(()=>{e=void 0;const t=s.basename(this.environmentService.logsPath),n=s.dirname(this.environmentService.logsPath)
;o.readdir(n).then(e=>{const i=e.filter(e=>/^\d{8}T\d{6}$/.test(e)).sort().filter((e,n)=>e!==t),r=i.slice(0,Math.max(0,i.length-9));return Promise.all(r.map(e=>o.rimraf(s.join(n,e))))}).then(null,a.onUnexpectedError)},1e4);this._register(c.toDisposable(()=>clearTimeout(e)))}};l=i([r(0,n.IEnvironmentService)],l),t.LogsDataCleaner=l}),define(e[86],t([0,1,17,2,8,7,3]),function(e,t,n,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class e extends c.Disposable{constructor(e){super(),this.environmentService=e,this.cleanUpStorageSoon()}cleanUpStorageSoon(){let t=setTimeout(()=>{t=void 0,o.readFile(this.environmentService.backupWorkspacesPath,"utf8").then(t=>{const n=JSON.parse(t).emptyWorkspaceInfos.map(e=>e.backupFolder);return o.readdir(this.environmentService.workspaceStorageHome).then(t=>{const i=[];return t.forEach(t=>{t.length!==e.NON_EMPTY_WORKSPACE_ID_LENGTH&&-1===n.indexOf(t)&&i.push(o.rimraf(s.join(this.environmentService.workspaceStorageHome,t)))}),Promise.all(i)})
}).then(null,a.onUnexpectedError)},3e4);this._register(c.toDisposable(()=>clearTimeout(t)))}};l.NON_EMPTY_WORKSPACE_ID_LENGTH=32,l=i([r(0,n.IEnvironmentService)],l),t.StorageDataCleaner=l}),define(e[35],t([0,1,65,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)},t.IExtensionManagementService=i.createDecorator("extensionManagementService"),t.IExtensionGalleryService=i.createDecorator("extensionGalleryService");!function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName",e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",e[e.AverageRating=6]="AverageRating",
e[e.WeightedRating=12]="WeightedRating"}(t.SortBy||(t.SortBy={}));!function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={}));!function(e){e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={}));!function(e){e[e.None=0]="None",e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.INSTALL_ERROR_MALICIOUS="malicious",t.INSTALL_ERROR_INCOMPATIBLE="incompatible",t.IExtensionManagementServerService=i.createDecorator("extensionManagementServerService");!function(e){e[e.Disabled=0]="Disabled",e[e.WorkspaceDisabled=1]="WorkspaceDisabled",e[e.Enabled=2]="Enabled",e[e.WorkspaceEnabled=3]="WorkspaceEnabled"}(t.EnablementState||(t.EnablementState={})),t.IExtensionEnablementService=i.createDecorator("extensionEnablementService"),t.IExtensionTipsService=i.createDecorator("extensionTipsService");!function(e){e[e.Workspace=0]="Workspace",e[e.File=1]="File",e[e.Executable=2]="Executable",
e[e.DynamicWorkspace=3]="DynamicWorkspace",e[e.Experimental=4]="Experimental"}(t.ExtensionRecommendationReason||(t.ExtensionRecommendationReason={})),t.ExtensionsLabel=n.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=n.localize(1,null)}),define(e[88],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHistoryMainService=n.createDecorator("historyMainService"),t.isRecentWorkspace=function(e){return!!e.workspace},t.isRecentFolder=function(e){return!!e.folderUri},t.isRecentFile=function(e){return!!e.fileUri}}),define(e[44],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){this._entries.forEach((t,n)=>e(n,t))}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}t.ServiceCollection=n}),
define(e[90],t([0,1,7,9,79,48,6,44,14]),function(e,t,n,i,r,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l="function"==typeof Proxy;class u{constructor(e=new a.ServiceCollection,t=!1,n){this._services=e,this._strict=t,this._parent=n,this._services.set(o.IInstantiationService,this)}createChild(e){return new u(e,this._strict,this)}invokeFunction(e,...t){let i=d.traceInvocation(e),r=!1;try{const s={get:(e,t)=>{if(r)throw n.illegalState("service accessor is only valid during the invocation of its target method");const s=this._getOrCreateServiceInstance(e,i);if(!s&&t!==o.optional)throw new Error(`[invokeFunction] unknown service '${e}'`);return s}};return e.apply(void 0,[s,...t])}finally{r=!0,i.stop()}}createInstance(e,...t){let n,i;return e instanceof s.SyncDescriptor?(n=d.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=d.traceCreation(e),i=this._createInstance(e,t,n)),n.stop(),i}_createInstance(e,t=[],n){
let r=o._util.getServiceDependencies(e).sort((e,t)=>e.index-t.index),s=[];for(const t of r){let i=this._getOrCreateServiceInstance(t.id,n);if(!i&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);s.push(i)}let a=r.length>0?r[0].index:t.length;if(t.length!==a){console.warn(`[createInstance] First service dependency of ${e.name} at position ${a+1} conflicts with ${t.length} static arguments`);let n=a-t.length;t=n>0?t.concat(new Array(n)):t.slice(0,a)}return i.create.apply(null,[e].concat(t,s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof s.SyncDescriptor)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e)
;return n instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_createAndCacheServiceInstance(e,t,n){function i(){const e=new Error("[createInstance] cyclic dependency between services");throw e.message=a.toString(),e}const a=new r.Graph(e=>e.id.toString());let c=0;const l=[{id:e,desc:t,_trace:n}];for(;l.length;){const t=l.pop();a.lookupOrInsertNode(t),c++>100&&i();let n=o._util.getServiceDependencies(t.desc.ctor);for(let i of n){let n=this._getServiceInstanceOrDescriptor(i.id);if(n||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),n instanceof s.SyncDescriptor){const e={id:i.id,desc:n,_trace:t._trace.branch(i.id,!0)};a.insertEdge(t,e),l.push(e)}}}for(;;){let e=a.roots();if(0===e.length){a.isEmpty()||i();break}for(let{data:t}of e){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e),a.removeNode(t)}}
return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],i,r){if(this._services.get(e)instanceof s.SyncDescriptor)return this._createServiceInstance(t,n,i,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,r);throw new Error("illegalState - creating UNKNOWN service instance")}_createServiceInstance(e,t=[],n,i){if(n&&l){const n=new c.IdleValue(()=>this._createInstance(e,t,i));return new Proxy(Object.create(null),{get:(e,t)=>n.getValue()[t],set:(e,t,i)=>(n.getValue()[t]=i,!0)})}return this._createInstance(e,t,i)}}t.InstantiationService=u;var h;!function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"}(h||(h={}));class d{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return d._None}static traceCreation(e){return d._None}branch(e,t){let n=new d(2,e.toString());return this._dep.push([e,t,n]),n}stop(){function e(t,i){let r=[],s=new Array(t+1).join("\t")
;for(const[o,a,c]of i._dep)if(a&&c){n=!0,r.push(`${s}CREATES -> ${o}`);let i=e(t+1,c);i&&r.push(i)}else r.push(`${s}uses -> ${o}`);return r.join("\n")}let t=Date.now()-this._start;d._totals+=t;let n=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${e(1,this)}`,`DONE, took ${t.toFixed(2)}ms (grand total ${d._totals.toFixed(2)}ms)`];(t>2||n)&&console.log(i.join("\n"))}}d._None=new class extends d{constructor(){super(-1,null)}stop(){}branch(){return this}},d._totals=0}),define(e[43],t([0,1,6,124,3]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMainProcessService=n.createDecorator("mainProcessService");class s extends r.Disposable{constructor(e){super(),this.mainProcessConnection=this._register(new i.Client(`window:${e}`))}getChannel(e){return this.mainProcessConnection.getChannel(e)}registerChannel(e,t){this.mainProcessConnection.registerChannel(e,t)}}t.MainProcessService=s}),define(e[49],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});!function(e){e[e.Core=1]="Core",e[e.Contributed=2]="Contributed"}(t.LanguageType||(t.LanguageType={})),t.ILocalizationsService=n.createDecorator("localizationsService"),t.isValidLocalization=function(e){if("string"!=typeof e.languageId)return!1;if(!Array.isArray(e.translations)||0===e.translations.length)return!1;for(const t of e.translations){if("string"!=typeof t.id)return!1;if("string"!=typeof t.path)return!1}return!(e.languageName&&"string"!=typeof e.languageName||e.localizedLanguageName&&"string"!=typeof e.localizedLanguageName)}}),define(e[93],t([0,1,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this.service=e,this.onDidLanguagesChange=n.Event.buffer(e.onDidLanguagesChange,!0)}listen(e,t){switch(t){case"onDidLanguagesChange":return this.onDidLanguagesChange}throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"getLanguageIds":return this.service.getLanguageIds(n)}throw new Error(`Call not found: ${t}`)}}
t.LocalizationsChannel=i}),define(e[16],t([0,1,6,3,5,4]),function(e,t,n,i,r,s){"use strict";function o(){return(new Date).toISOString()}Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=n.createDecorator("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;class c extends i.Disposable{constructor(){super(...arguments),this.level=t.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new s.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}t.AbstractLogService=c;class l extends c{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e),this.useColors=!r.isWindows}trace(e,...t){
this.getLevel()<=a.Trace&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}debug(e,...t){this.getLevel()<=a.Debug&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}info(e,...t){this.getLevel()<=a.Info&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}warn(e,...t){this.getLevel()<=a.Warning&&(this.useColors?console.warn(`[93m[main ${o()}][0m`,e,...t):console.warn(`[main ${o()}]`,e,...t))}error(e,...t){this.getLevel()<=a.Error&&(this.useColors?console.error(`[91m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}critical(e,...t){this.getLevel()<=a.Critical&&(this.useColors?console.error(`[90m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}dispose(){}}t.ConsoleLogMainService=l;class u extends c{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e)}trace(e,...t){
this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}warn(e,...t){this.getLevel()<=a.Warning&&console.log("%c WARN","color: #993",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c  ERR","color: #f33",e,...t)}critical(e,...t){this.getLevel()<=a.Critical&&console.log("%cCRITI","background: #f33; color: white",e,...t)}dispose(){}}t.ConsoleLogService=u;class h extends c{constructor(e){super(),this.logServices=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.logServices)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const n of this.logServices)n.trace(e,...t)}debug(e,...t){for(const n of this.logServices)n.debug(e,...t)}info(e,...t){for(const n of this.logServices)n.info(e,...t)}warn(e,...t){for(const n of this.logServices)n.warn(e,...t)}error(e,...t){
for(const n of this.logServices)n.error(e,...t)}critical(e,...t){for(const n of this.logServices)n.critical(e,...t)}dispose(){for(const e of this.logServices)e.dispose()}}t.MultiplexLogService=h;class d extends i.Disposable{constructor(e){super(),this.logService=e,this._register(e)}get onDidChangeLogLevel(){return this.logService.onDidChangeLogLevel}setLevel(e){this.logService.setLevel(e)}getLevel(){return this.logService.getLevel()}trace(e,...t){this.logService.trace(e,...t)}debug(e,...t){this.logService.debug(e,...t)}info(e,...t){this.logService.info(e,...t)}warn(e,...t){this.logService.warn(e,...t)}error(e,...t){this.logService.error(e,...t)}critical(e,...t){this.logService.critical(e,...t)}}t.DelegatedLogService=d;class f{constructor(){this.onDidChangeLogLevel=(new s.Emitter).event}setLevel(e){}getLevel(){return a.Info}trace(e,...t){}debug(e,...t){}info(e,...t){}warn(e,...t){}error(e,...t){}critical(e,...t){}dispose(){}}t.NullLogService=f,t.getLogLevel=function(e){if(e.verbose)return a.Trace
;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return a.Trace;case"debug":return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Critical;case"off":return a.Off}return t.DEFAULT_LOG_LEVEL}}),define(e[95],t([0,1,16,4]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this.service=e,this.onDidChangeLogLevel=i.Event.buffer(e.onDidChangeLogLevel,!0)}listen(e,t){switch(t){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"setLevel":return this.service.setLevel(n),Promise.resolve()}throw new Error(`Call not found: ${t}`)}}t.LogLevelSetterChannel=r;class s{constructor(e){this.channel=e}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(e){this.channel.call("setLevel",e)}}t.LogLevelSetterChannelClient=s;class o extends n.DelegatedLogService{constructor(e,t){
super(t),this.master=e,this._register(e.onDidChangeLogLevel(e=>t.setLevel(e)))}setLevel(e){this.master.setLevel(e)}}t.FollowerLogService=o}),define(e[96],t([0,1,2,16]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,s,o){try{const i=e.__$__nodeRequire("spdlog");i.setAsyncMode(8192,500);const a=n.join(o,`${t}.log`),c=new i.RotatingLogger(t,a,5242880,6);return c.setLevel(0),new r(c,s)}catch(e){console.error(e)}return new i.NullLogService},t.createRotatingLogger=function(t,n,i,r){return e.__$__nodeRequire("spdlog").createRotatingLogger(t,n,i,r)};class r extends i.AbstractLogService{constructor(e,t=i.LogLevel.Error){super(),this.logger=e,this.setLevel(t)}trace(){this.getLevel()<=i.LogLevel.Trace&&this.logger.trace(this.format(arguments))}debug(){this.getLevel()<=i.LogLevel.Debug&&this.logger.debug(this.format(arguments))}info(){this.getLevel()<=i.LogLevel.Info&&this.logger.info(this.format(arguments))}warn(){
this.getLevel()<=i.LogLevel.Warning&&this.logger.warn(this.format(arguments))}error(){if(this.getLevel()<=i.LogLevel.Error){const e=arguments[0];if(e instanceof Error){const t=Array.prototype.slice.call(arguments);t[0]=e.stack,this.logger.error(this.format(t))}else this.logger.error(this.format(arguments))}}critical(){this.getLevel()<=i.LogLevel.Critical&&this.logger.critical(this.format(arguments))}dispose(){this.logger.drop()}format(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if("object"==typeof i)try{i=JSON.stringify(i)}catch(e){}t+=(n>0?" ":"")+i}return t}}}),define(e[31],t([0,1,2,29]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.dirname(i.getPathFromAmdModule(e,"")),s=n.join(r,"package.json");t.default=e.__$__nodeRequire(s)}),define(e[46],t([0,1,55,31]),function(e,t,n,i){"use strict";function r(e){return"*"===(e=e.trim())||l.test(e)}function s(e){if(!r(e))return null;if("*"===(e=e.trim()))return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,
majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let t=e.match(l);return t?{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6],preRelease:t[8]||null}:null}function o(e){if(!e)return null;let t=e.majorBase,n=e.majorMustEqual,i=e.minorBase,r=e.minorMustEqual,s=e.patchBase,o=e.patchMustEqual;return e.hasCaret&&(0===t?o=!1:(r=!1,o=!1)),{majorBase:t,majorMustEqual:n,minorBase:i,minorMustEqual:r,patchBase:s,patchMustEqual:o,isMinimum:e.hasGreaterEquals}}function a(e,t){let n;n="string"==typeof e?o(s(e)):e;let i;if(i="string"==typeof t?o(s(t)):t,!n||!i)return!1;let r=n.majorBase,a=n.minorBase,c=n.patchBase,l=i.majorBase,u=i.minorBase,h=i.patchBase,d=i.majorMustEqual,f=i.minorMustEqual,g=i.patchMustEqual
;return i.isMinimum?r>l||!(r<l)&&(a>u||!(a<u)&&c>=h):(1!==r||0!==l||d&&f&&g||(l=1,u=0,h=0,d=!0,f=!1,g=!1),!(r<l)&&(r>l?!d:!(a<u)&&(a>u?!f:!(c<h)&&(!(c>h)||!g))))}function c(e,t,i=[]){let r=o(s(t));if(!r)return i.push(n.localize(0,null,t)),!1;if(0===r.majorBase){if(!r.majorMustEqual||!r.minorMustEqual)return i.push(n.localize(1,null,t)),!1}else if(!r.majorMustEqual)return i.push(n.localize(2,null,t)),!1;return!!a(e,r)||(i.push(n.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});const l=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=r,t.parseVersion=s,t.normalizeVersion=o,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,n){return!(!t.isBuiltin&&void 0!==t.main)||c(e,t.engines.vscode,n)},t.isEngineValid=function(e){return"*"===e||c(i.default.version,e)},t.isVersionValid=c}),define(e[21],t([0,1,2,29]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;const r=n.dirname(i.getPathFromAmdModule(e,"")),s=n.join(r,"product.json"),o=e.__$__nodeRequire(s);process.env.VSCODE_DEV&&(o.nameShort+=" Dev",o.nameLong+=" Dev",o.dataFolderName+="-dev"),t.default=o}),define(e[100],t([0,1,2,8,21,3,7,16,17]),function(e,t,s,o,a,c,l,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e,t){this._environmentService=e,this._logService=t,this._disposables=[],this._environmentService.isBuilt&&this._manageCachedDataSoon()}dispose(){this._disposables=c.dispose(this._disposables)}_manageCachedDataSoon(){let e=setTimeout(()=>n(this,void 0,void 0,function*(){e=void 0,this._logService.info("Starting to clean up unused language packs.");const t=a.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6;try{const e=Object.create(null),n=JSON.parse(yield o.readFile(s.join(this._environmentService.userDataPath,"languagepacks.json"),"utf8"));for(let t of Object.keys(n)){e[`${n[t].hash}.${t}`]=!0}const i=s.join(this._environmentService.userDataPath,"clp")
;if(!(yield o.exists(i)))return;for(let t of yield o.readdir(i))e[t]?this._logService.info(`Skipping directory ${t}. Language pack still in use.`):(this._logService.info("Removing unused language pack:",t),yield o.rimraf(s.join(i,t)));const r=Date.now();for(let n of Object.keys(e)){const e=s.join(i,n);for(let i of yield o.readdir(e)){if("tcf.json"===i)continue;const a=s.join(e,i),c=yield o.stat(a);if(c.isDirectory()){r-c.mtime.getTime()>t&&(this._logService.info("Removing language pack cache entry: ",s.join(n,i)),yield o.rimraf(a))}}}}catch(e){l.onUnexpectedError(e)}}),4e4);this._disposables.push({dispose(){void 0!==e&&clearTimeout(e)}})}};d=i([r(0,h.IEnvironmentService),r(1,u.ILogService)],d),t.LanguagePackCachedDataCleaner=d}),define(e[101],t([0,1,2,7,3,8,17,21]),function(e,t,n,s,o,a,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let u=class e{constructor(e){this._environmentService=e,this._disposables=[],this._manageCachedDataSoon()}dispose(){
this._disposables=o.dispose(this._disposables)}_manageCachedDataSoon(){if(!this._environmentService.nodeCachedDataDir)return;const t=n.dirname(this._environmentService.nodeCachedDataDir),i=n.basename(this._environmentService.nodeCachedDataDir);let r=setTimeout(()=>{r=void 0,a.readdir(t).then(r=>{const s=Date.now(),o=[];return r.forEach(r=>{if(r!==i){const i=n.join(t,r);o.push(a.stat(i).then(t=>{if(t.isDirectory()){if(s-t.mtime.getTime()>e._DataMaxAge)return a.rimraf(i)}}))}}),Promise.all(o)}).then(void 0,s.onUnexpectedError)},3e4);this._disposables.push({dispose(){clearTimeout(r)}})}};u._DataMaxAge=l.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6,u=i([r(0,c.IEnvironmentService)],u),t.NodeCachedDataCleaner=u}),define(e[102],t([0,1,103,83,23,2,109,31,21,78,5,29,11]),function(e,t,n,r,s,o,a,c,l,u,h,d,f){"use strict";function g(e,t){return h.isWindows?function(e,t){return`\\\\.\\pipe\\${n.createHash("md5").update(e).digest("hex")}-${c.default.version}-${t}-sock`}(e,t):function(e,t){if(C){
const i=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(C,`vscode-${i}-${c.default.version}-${t}.sock`)}return o.join(e,`${c.default.version}-${t}.sock`)}(e,t)}function p(e,t){return v(e["inspect-extensions"],e["inspect-brk-extensions"],5870,t,e.debugId)}function m(e,t){return v(e["inspect-search"],e["inspect-brk-search"],5876,t)}function v(e,t,n,i,r){const s=t||e,o=Number(s)||(i?null:n);return{port:o,break:!!o&&Boolean(!!t),debugId:r}}function y(e,t){if(!e)return;const n=o.resolve(e);return o.normalize(e)===n?n:o.resolve(t.env.VSCODE_CWD||t.cwd(),e)}function _(e,t){return y(e["user-data-dir"],t)||o.resolve(r.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0});const C=process.env.XDG_RUNTIME_DIR;class w{constructor(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){const e=u.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=o.join(this.userDataPath,"logs",e)}this.logsPath=process.env.VSCODE_LOGS}get args(){
return this._args}get appRoot(){return o.dirname(d.getPathFromAmdModule(e,""))}get execPath(){return this._execPath}get cliPath(){return function(e,t,n){return h.isWindows?n?o.join(o.dirname(e),"bin",`${l.default.applicationName}.cmd`):o.join(t,"scripts","code-cli.bat"):h.isLinux?n?o.join(o.dirname(e),"bin",`${l.default.applicationName}`):o.join(t,"scripts","code-cli.sh"):n?o.join(t,"bin","code"):o.join(t,"scripts","code-cli.sh")}(this.execPath,this.appRoot,this.isBuilt)}get userHome(){return s.homedir()}get userDataPath(){const e=process.env.VSCODE_PORTABLE;return e?o.join(e,"user-data"):_(this._args,process)}get appNameLong(){return l.default.nameLong}get appQuality(){return l.default.quality}get appSettingsHome(){return o.join(this.userDataPath,"User")}get appSettingsPath(){return o.join(this.appSettingsHome,"settings.json")}get globalStorageHome(){return o.join(this.appSettingsHome,"globalStorage")}get workspaceStorageHome(){return o.join(this.appSettingsHome,"workspaceStorage")}
get settingsSearchBuildId(){return l.default.settingsSearchBuildId}get settingsSearchUrl(){return l.default.settingsSearchUrl}get appKeybindingsPath(){return o.join(this.appSettingsHome,"keybindings.json")}get isExtensionDevelopment(){return!!this._args.extensionDevelopmentPath}get backupHome(){return o.join(this.userDataPath,"Backups")}get backupWorkspacesPath(){return o.join(this.backupHome,"workspaces.json")}get untitledWorkspacesHome(){return f.URI.file(o.join(this.userDataPath,"Workspaces"))}get installSourcePath(){return o.join(this.userDataPath,"installSource")}get builtinExtensionsPath(){const t=y(this._args["builtin-extensions-dir"],process);return t||o.normalize(o.join(d.getPathFromAmdModule(e,""),"..","extensions"))}get extensionsPath(){const e=y(this._args["extensions-dir"],process);if(e)return e;const t=process.env.VSCODE_EXTENSIONS;if(t)return t;const n=process.env.VSCODE_PORTABLE;return n?o.join(n,"extensions"):o.join(this.userHome,l.default.dataFolderName,"extensions")}
get extensionDevelopmentLocationURI(){const e=this._args.extensionDevelopmentPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?f.URI.parse(e):f.URI.file(o.normalize(e))}get extensionTestsLocationURI(){const e=this._args.extensionTestsPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?f.URI.parse(e):f.URI.file(o.normalize(e))}get disableExtensions(){if(this._args["disable-extensions"])return!0;const e=this._args["disable-extension"];if(e){if("string"==typeof e)return[e];if(Array.isArray(e)&&e.length>0)return e}return!1}get skipGettingStarted(){return!!this._args["skip-getting-started"]}get skipReleaseNotes(){return!!this._args["skip-release-notes"]}get skipAddToRecentlyOpened(){return!!this._args["skip-add-to-recently-opened"]}get debugExtensionHost(){return p(this._args,this.isBuilt)}get debugSearch(){return m(this._args,this.isBuilt)}get isBuilt(){return!process.env.VSCODE_DEV}get verbose(){return!!this._args.verbose}get log(){return this._args.log}get wait(){return!!this._args.wait}get logExtensionHostCommunication(){
return!!this._args.logExtensionHostCommunication}get status(){return!!this._args.status}get mainIPCHandle(){return g(this.userDataPath,"main")}get sharedIPCHandle(){return g(this.userDataPath,"shared")}get nodeCachedDataDir(){return process.env.VSCODE_NODE_CACHED_DATA_DIR||void 0}get disableUpdates(){return!!this._args["disable-updates"]}get disableCrashReporter(){return!!this._args["disable-crash-reporter"]}get driverHandle(){return this._args.driver}get driverVerbose(){return!!this._args["driver-verbose"]}}i([a.memoize],w.prototype,"appRoot",null),i([a.memoize],w.prototype,"cliPath",null),i([a.memoize],w.prototype,"userHome",null),i([a.memoize],w.prototype,"userDataPath",null),i([a.memoize],w.prototype,"appSettingsHome",null),i([a.memoize],w.prototype,"appSettingsPath",null),i([a.memoize],w.prototype,"globalStorageHome",null),i([a.memoize],w.prototype,"workspaceStorageHome",null),i([a.memoize],w.prototype,"settingsSearchBuildId",null),i([a.memoize],w.prototype,"settingsSearchUrl",null),
i([a.memoize],w.prototype,"appKeybindingsPath",null),i([a.memoize],w.prototype,"isExtensionDevelopment",null),i([a.memoize],w.prototype,"backupHome",null),i([a.memoize],w.prototype,"backupWorkspacesPath",null),i([a.memoize],w.prototype,"untitledWorkspacesHome",null),i([a.memoize],w.prototype,"installSourcePath",null),i([a.memoize],w.prototype,"builtinExtensionsPath",null),i([a.memoize],w.prototype,"extensionsPath",null),i([a.memoize],w.prototype,"extensionDevelopmentLocationURI",null),i([a.memoize],w.prototype,"extensionTestsLocationURI",null),i([a.memoize],w.prototype,"debugExtensionHost",null),i([a.memoize],w.prototype,"debugSearch",null),i([a.memoize],w.prototype,"mainIPCHandle",null),i([a.memoize],w.prototype,"sharedIPCHandle",null),i([a.memoize],w.prototype,"nodeCachedDataDir",null),t.EnvironmentService=w,t.parseExtensionHostPort=p,t.parseSearchPort=m,t.parseDebugPort=v,t.parseUserDataDir=_}),define(e[104],t([0,1,26,20,21]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0
}),t.isUIExtension=function(e,t,s){const o=n.getGalleryExtensionId(e.publisher,e.name),a=s.getValue("_workbench.uiExtensions")||[];if(a.length){if(-1!==a.indexOf(o))return!0;if(-1!==a.indexOf(`-${o}`))return!1}switch(e.extensionKind){case"ui":return!0;case"workspace":return!1;default:return!(!i.isNonEmptyArray(r.default.uiExtensions)||!r.default.uiExtensions.some(e=>n.areSameExtensions({id:e},{id:o})))||!e.main&&!(e.contributes&&(!t.length||Object.keys(e.contributes).some(e=>-1===t.indexOf(e))))}}}),define(e[105],t([0,1,8,103,35,3,17,14,26,16,49,21,20,4,18,2]),function(e,t,n,s,o,a,c,l,u,h,d,f,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const y=["de","en","en-US","es","fr","it","ja","ko","ru","zh-CN","zh-TW"];"stable"!==f.default.quality&&y.push("hu");let _=class extends a.Disposable{constructor(e,t,n){super(),this.extensionManagementService=e,this.logService=n,this._onDidLanguagesChange=this._register(new p.Emitter),this.onDidLanguagesChange=this._onDidLanguagesChange.event,
this.cache=this._register(new C(t,n)),this._register(e.onDidInstallExtension(({local:e})=>this.onDidInstallExtension(e))),this._register(e.onDidUninstallExtension(({identifier:e})=>this.onDidUninstallExtension(e)))}getLanguageIds(e){return 1===e?Promise.resolve([...y]):this.cache.getLanguagePacks().then(t=>{const n=2===e?Object.keys(t):[...y,...Object.keys(t)];return g.distinct(n)})}onDidInstallExtension(e){e&&e.manifest&&e.manifest.contributes&&e.manifest.contributes.localizations&&e.manifest.contributes.localizations.length&&(this.logService.debug("Adding language packs from the extension",e.identifier.id),this.update().then(e=>{e&&this._onDidLanguagesChange.fire()}))}onDidUninstallExtension(e){this.cache.getLanguagePacks().then(t=>{Object.keys(t).some(n=>t[n]&&t[n].extensions.some(t=>u.areSameExtensions(t.extensionIdentifier,e)))&&(this.logService.debug("Removing language packs from the extension",e.id),this.update().then(e=>{e&&this._onDidLanguagesChange.fire()}))})}update(){
return Promise.all([this.cache.getLanguagePacks(),this.extensionManagementService.getInstalled()]).then(([e,t])=>this.cache.update(t).then(t=>!g.equals(Object.keys(e),Object.keys(t))))}};_=i([r(0,o.IExtensionManagementService),r(1,c.IEnvironmentService),r(2,h.ILogService)],_),t.LocalizationsService=_;let C=class extends a.Disposable{constructor(e,t){super(),this.logService=t,this.languagePacks={},this.languagePacksFilePath=v.join(e.userDataPath,"languagepacks.json"),this.languagePacksFileLimiter=new l.Queue}getLanguagePacks(){return this.languagePacksFileLimiter.size||!this.initializedCache?this.withLanguagePacks().then(()=>this.languagePacks):Promise.resolve(this.languagePacks)}update(e){return this.withLanguagePacks(t=>{Object.keys(t).forEach(e=>delete t[e]),this.createLanguagePacksFromExtensions(t,...e)}).then(()=>this.languagePacks)}createLanguagePacksFromExtensions(e,...t){
for(const n of t)n&&n.manifest&&n.manifest.contributes&&n.manifest.contributes.localizations&&n.manifest.contributes.localizations.length&&this.createLanguagePacksFromExtension(e,n);Object.keys(e).forEach(t=>this.updateHash(e[t]))}createLanguagePacksFromExtension(e,t){const n=t.identifier,i=t.manifest.contributes&&t.manifest.contributes.localizations?t.manifest.contributes.localizations:[];for(const r of i)if(t.location.scheme===m.Schemas.file&&d.isValidLocalization(r)){let i=e[r.languageId];i||(i={hash:"",extensions:[],translations:{}},e[r.languageId]=i);let s=i.extensions.filter(e=>u.areSameExtensions(e.extensionIdentifier,n))[0];s?s.version=t.manifest.version:i.extensions.push({extensionIdentifier:n,version:t.manifest.version});for(const e of r.translations)i.translations[e.id]=v.join(t.location.fsPath,e.path)}}updateHash(e){if(e){const t=s.createHash("md5");for(const n of e.extensions)t.update(n.extensionIdentifier.uuid||n.extensionIdentifier.id).update(n.version);e.hash=t.digest("hex")}}
withLanguagePacks(e=(()=>null)){return this.languagePacksFileLimiter.queue(()=>{let t=null;return n.readFile(this.languagePacksFilePath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(n=>(t=e(n),n)).then(e=>{for(const t of Object.keys(e))e[t]||delete e[t];this.languagePacks=e,this.initializedCache=!0;const t=JSON.stringify(this.languagePacks);return this.logService.debug("Writing language packs",t),n.writeFile(this.languagePacksFilePath,t)}).then(()=>t,e=>this.logService.error(e))})}};C=i([r(0,c.IEnvironmentService),r(1,h.ILogService)],C)}),define(e[25],t([0,1,9,68]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.data={}}add(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t}knows(e){return this.data.hasOwnProperty(e)}as(e){return this.data[e]||null}}t.Registry=new r}),
define(e[107],t([0,1,25,4]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};class r{constructor(){this._onDidChangeSchema=new i.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(e,t){this.schemasById[function(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}}const s=new r;n.Registry.add(t.Extensions.JSONContribution,s)}),define(e[27],t([0,1,63,4,25,9,13,107]),function(e,t,n,i,r,s,o,a){"use strict";function c(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function l(e){
return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==p.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor";const u=r.Registry.as(a.Extensions.JSONContribution);class h{constructor(){this.overrideIdentifiers=[],this._onDidSchemaChange=new i.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new i.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.defaultOverridesConfigurationNode={
id:"defaultOverrides",title:n.localize(0,null),properties:{}},this.configurationContributors=[this.defaultOverridesConfigurationNode],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=[];e.forEach(e=>{n.push(...this.validateAndRegisterProperties(e,t)),this.configurationContributors.push(e),this.registerJSONConfiguration(e),this.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}deregisterConfigurations(e){const n=[],i=e=>{if(e.properties)for(const i in e.properties)switch(n.push(i),delete this.configurationProperties[i],
delete this.editorConfigurationSchema.properties[i],delete t.allSettings.properties[i],e.properties[i].scope){case 1:delete t.applicationSettings.properties[i];break;case 2:delete t.windowSettings.properties[i];break;case 3:delete t.resourceSettings.properties[i]}e.allOf&&e.allOf.forEach(e=>i(e))};for(const t of e){i(t);const e=this.configurationContributors.indexOf(t);-1!==e&&this.configurationContributors.splice(e,1)}u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}registerDefaultConfigurations(e){const i=[];for(const r of e)for(const e in r.defaults){const s=r.defaults[e];if(t.OVERRIDE_PROPERTY_PATTERN.test(e)&&"object"==typeof s){const r={type:"object",default:s,description:n.localize(1,null,e),$ref:t.editorConfigurationSchemaId};t.allSettings.properties[e]=r,this.defaultOverridesConfigurationNode.properties[e]=r,this.configurationProperties[e]=r,i.push(e)}}this._onDidSchemaChange.fire(),
this._onDidUpdateConfiguration.fire(i)}deregisterDefaultConfigurations(e){const n=[];for(const i of e)for(const e in i.defaults)n.push(e),delete t.allSettings.properties[e],delete this.defaultOverridesConfigurationNode.properties[e],delete this.configurationProperties[e];this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){this.overrideIdentifiers.push(...e),this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,n=!0,i=2,r=!1){i=s.isUndefinedOrNull(e.scope)?i:e.scope,r=e.overridable||r;let o=[],a=e.properties;if(a)for(let e in a){let u;if(n&&(u=l(e))){console.warn(u),delete a[e];continue}let h=a[e],d=h.default;s.isUndefined(d)&&(h.default=c(h.type)),r&&(h.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(e)?h.scope=void 0:h.scope=s.isUndefinedOrNull(h.scope)?i:h.scope,!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],
o.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let u=e.allOf;if(u)for(let e of u)o.push(...this.validateAndRegisterProperties(e,n,i,r));return o}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}registerJSONConfiguration(e){function n(e){let i=e.properties;if(i)for(const e in i)switch(t.allSettings.properties[e]=i[e],i[e].scope){case 1:t.applicationSettings.properties[e]=i[e];break;case 2:t.windowSettings.properties[e]=i[e];break;case 3:t.resourceSettings.properties[e]=i[e]}let r=e.allOf;r&&r.forEach(n)}n(e)}updateSchemaForOverrideSettingsConfiguration(e){e.id!==d&&(this.update(e),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))}updateOverridePropertyPatternKey(){let e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",description:n.localize(2,null),
errorMessage:"Unknown Identifier. Use language identifiers",$ref:t.editorConfigurationSchemaId}),delete t.allSettings.patternProperties[this.overridePropertyPattern],delete t.applicationSettings.patternProperties[this.overridePropertyPattern],delete t.windowSettings.patternProperties[this.overridePropertyPattern],delete t.resourceSettings.patternProperties[this.overridePropertyPattern],this.computeOverridePropertyPattern(),t.allSettings.patternProperties[this.overridePropertyPattern]=e,t.applicationSettings.patternProperties[this.overridePropertyPattern]=e,t.windowSettings.patternProperties[this.overridePropertyPattern]=e,t.resourceSettings.patternProperties[this.overridePropertyPattern]=e,this._onDidSchemaChange.fire()}update(e){let t=e.properties;if(t)for(let e in t)t[e].overridable&&(this.editorConfigurationSchema.properties[e]=this.getConfigurationProperties()[e]);let n=e.allOf;n&&n.forEach(e=>this.update(e))}computeOverridePropertyPattern(){
this.overridePropertyPattern=this.overrideIdentifiers.length?g.replace("${0}",this.overrideIdentifiers.map(e=>o.createRegExp(e,!1).source).join("|")):f}}const d="override",f="\\[.*\\]$",g="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(f),t.getDefaultValue=c;const p=new h;r.Registry.add(t.Extensions.Configuration,p),t.validateProperty=l,t.getScopes=function(){const e={},t=p.getConfigurationProperties();for(const n of Object.keys(t))e[n]=t[n].scope;return e.launch=3,e.task=3,e}}),define(e[19],t([0,1,10,9,11,25,6,27]),function(e,t,n,i,r,s,o,a){"use strict";function c(e,t){const n=Object.create(null);for(let i in e)l(n,i,e[i],t);return n}function l(e,t,n,i){const r=t.split("."),s=r.pop();let o=e;for(let e=0;e<r.length;e++){let n=r[e],s=o[n];switch(typeof s){case"undefined":s=o[n]=Object.create(null);break;case"object":break;default:return void i(`Ignoring ${t} as ${r.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}o=s}"object"==typeof o?o[s]=n:i(`Ignoring ${t} as ${r.join(".")} is ${JSON.stringify(o)}`)
}function u(e,t){const n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){const i=e[n];"object"!=typeof i||Array.isArray(i)||(u(i,t),0===Object.keys(i).length&&delete e[n])}}else delete e[n]}function h(e,t,n){const i=function(e,t){let n=e;for(const e of t){if("object"!=typeof n||null===n)return;n=n[e]}return n}(e,t.split("."));return void 0===i?n:i}function d(e,t,n){Object.keys(t).forEach(r=>{r in e?i.isObject(e[r])&&i.isObject(t[r])?d(e[r],t[r],n):n&&(e[r]=t[r]):e[r]=t[r]})}function f(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=o.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof r.URI)};!function(e){e[e.USER=1]="USER",e[e.USER_LOCAL=2]="USER_LOCAL",e[e.USER_REMOTE=3]="USER_REMOTE",e[e.WORKSPACE=4]="WORKSPACE",e[e.WORKSPACE_FOLDER=5]="WORKSPACE_FOLDER",
e[e.DEFAULT=6]="DEFAULT",e[e.MEMORY=7]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.ConfigurationTargetToString=function(e){switch(e){case 1:return"USER";case 2:return"USER_LOCAL";case 3:return"USER_REMOTE";case 4:return"WORKSPACE";case 5:return"WORKSPACE_FOLDER";case 6:return"DEFAULT";case 7:return"MEMORY"}},t.compare=function(e,t){const i=t.keys.filter(t=>-1===e.keys.indexOf(t)),r=e.keys.filter(e=>-1===t.keys.indexOf(e)),s=[];for(const i of e.keys){const r=h(e.contents,i),o=h(t.contents,i);n.equals(r,o)||s.push(i)}return{added:i,removed:r,updated:s}},t.toOverrides=function(e,t){const n=[],i=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(const r of Object.keys(e))if(a.OVERRIDE_PROPERTY_PATTERN.test(r)){const s={};for(const t in e[r])i[t]&&i[t].overridable&&(s[t]=e[r][t]);n.push({identifiers:[f(r).trim()],contents:c(s,t)})}return n},t.toValuesTree=c,t.addToValueTree=l,t.removeFromValueTree=function(e,t){u(e,t.split("."))},t.getConfigurationValue=h,t.merge=d,
t.getConfigurationKeys=function(){const e=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)},t.getDefaultValues=function(){const e=Object.create(null),t=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(let n in t)l(e,n,t[n].default,e=>console.error(`Conflict in default settings: ${e}`));return e},t.overrideIdentifierFromKey=f,t.keyFromOverrideIdentifier=function(e){return`[${e}]`},t.getMigratedSettingValue=function(e,t,n){const i=e.inspect(t),r=e.inspect(n);return void 0!==i.user||void 0!==i.workspace||void 0!==i.workspaceFolder?i.value:void 0!==r.user||void 0!==r.workspace||void 0!==r.workspaceFolder?r.value:i.default}}),define(e[51],t([0,1,32,30,20,9,10,27,19]),function(e,t,n,i,r,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l{constructor(e={},t=[],n=[]){this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){
return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?c.getConfigurationValue(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let n={};for(const e of r.distinct([...Object.keys(this.contents),...Object.keys(t)])){let i=this.contents[e],r=t[e];r&&("object"==typeof i&&"object"==typeof r?(i=o.deepClone(i),this.mergeContents(i,r)):i=r),n[e]=i}return new l(n)}merge(...e){const t=o.deepClone(this.contents),n=o.deepClone(this.overrides),i=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=n.filter(t=>r.equals(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):n.push(o.deepClone(e))}for(const e of s.keys)-1===i.indexOf(e)&&i.push(e)}return new l(t,i,n)}freeze(){
return this.isFrozen=!0,this}mergeContents(e,t){for(const n of Object.keys(t))n in e&&s.isObject(e[n])&&s.isObject(t[n])?this.mergeContents(e[n],t[n]):e[n]=o.deepClone(t[n])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?o.deepFreeze(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),c.addToValueTree(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&c.removeFromValueTree(this.contents,e)}addKey(e){let t=this.keys.length;for(let n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}t.ConfigurationModel=l;class u extends l{constructor(){const e=c.getDefaultValues(),t=c.getConfigurationKeys(),n=[];for(const t of Object.keys(e))a.OVERRIDE_PROPERTY_PATTERN.test(t)&&n.push({
identifiers:[c.overrideIdentifierFromKey(t).trim()],contents:c.toValuesTree(e[t],e=>console.error(`Conflict in default settings file: ${e}`))});super(e,t,n)}}t.DefaultConfigurationModel=u;class h{constructor(e){this._name=e,this._configurationModel=null,this._parseErrors=[]}get configurationModel(){return this._configurationModel||new l}get errors(){return this._parseErrors}parse(e){if(e){const t=this.parseContent(e),n=this.parseRaw(t);this._configurationModel=new l(n.contents,n.keys,n.overrides)}}parseContent(e){function t(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let i={},r=null,s=[],o=[],a=[],c={onObjectBegin:()=>{let e={};t(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{let e=[];t(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:t,onError:(e,t,n)=>{a.push({error:e,offset:t,length:n})}};if(e)try{n.visit(e,c),i=s[0]||{}}catch(e){console.error(`Error while parsing settings file ${this._name}: ${e}`),this._parseErrors=[e]}return i}
parseRaw(e){return{contents:c.toValuesTree(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`)),keys:Object.keys(e),overrides:c.toOverrides(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`))}}}t.ConfigurationModelParser=h;class d{constructor(e,t,n=new l,r=new l,s=new i.ResourceMap,o=new l,a=new i.ResourceMap,c=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=n,this._workspaceConfiguration=r,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new i.ResourceMap}getValue(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource))||(i=new l,this._memoryConfigurationByResource.set(n.resource,i)):i=this._memoryConfiguration,void 0===t?i.removeValue(e):i.setValue(e,t),
n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const i=this.getConsolidateConfigurationModel(t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration;return{default:t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),user:t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),userLocal:t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),userRemote:t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),
workspace:n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:r?t.overrideIdentifier?r.freeze().override(t.overrideIdentifier).getValue(e):r.freeze().getValue(e):void 0,memory:t.overrideIdentifier?s.override(t.overrideIdentifier).getValue(e):s.getValue(e),value:i.getValue(e)}}keys(e){const t=this.getFolderConfigurationModelForResource(void 0,e);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}}updateDefaultConfiguration(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(e){this._localUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}
updateRemoteUserConfiguration(e){this._remoteUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)}deleteFolderConfiguration(e){this.folderConfigurations.delete(e),this._foldersConsolidatedConfigurations.delete(e)}get defaults(){return this._defaultConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){
return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidateConfigurationModel(e,t){let n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){
let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const n=t.getFolder(e);if(n)return s.withUndefinedAsNull(this._folderConfigurations.get(n.uri))}return null}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.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((e,t)=>{const{contents:n,overrides:i,keys:r}=this._folderConfigurations.get(t);return e[t.toString()]={contents:n,overrides:i,
keys:r},e},Object.create({})),isComplete:!0}}allKeys(e){let t=this.keys(e),n=[...t.default];const i=e=>{for(const t of e)-1===n.indexOf(t)&&n.push(t)};i(t.user),i(t.workspace);for(const e of this.folderConfigurations.keys())i(this.folderConfigurations.get(e).keys);return n}}t.Configuration=d;class f{doesConfigurationContains(e,t){let n,i=e.contents,r=c.toValuesTree({[t]:!0},()=>{});for(;"object"==typeof r&&(n=Object.keys(r)[0]);){if(!(i=i[n]))return!1;r=r[n]}return!0}updateKeys(e,t,n){for(const n of t)e.setValue(n,{})}}t.AbstractConfigurationChangeEvent=f;class g extends f{constructor(e=new l,t=new i.ResourceMap){super(),this._changedConfiguration=e,this._changedConfigurationByResource=t}get changedConfiguration(){return this._changedConfiguration}get changedConfigurationByResource(){return this._changedConfigurationByResource}change(e,t){if(e instanceof g){this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(const t of e._changedConfigurationByResource.keys()){
let n=this.getOrSetChangedConfigurationForResource(t);n=n.merge(e._changedConfigurationByResource.get(t)),this._changedConfigurationByResource.set(t,n)}}else this.changeWithKeys(e,t);return this}telemetryData(e,t){return this._source=e,this._sourceConfig=t,this}get affectedKeys(){const e=[...this._changedConfiguration.keys];return this._changedConfigurationByResource.forEach(t=>e.push(...t.keys)),r.distinct(e)}get source(){return this._source}get sourceConfig(){return this._sourceConfig}affectsConfiguration(e,t){let n=[this._changedConfiguration];if(t){let e=this._changedConfigurationByResource.get(t);e&&n.push(e)}else n.push(...this._changedConfigurationByResource.values());for(const t of n)if(this.doesConfigurationContains(t,e))return!0;return!1}changeWithKeys(e,t){let n=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(n,e)}getOrSetChangedConfigurationForResource(e){let t=this._changedConfigurationByResource.get(e);return t||(t=new l,
this._changedConfigurationByResource.set(e,t)),t}}t.ConfigurationChangeEvent=g}),define(e[111],t([0,1,3,7,51,106,4,14,36]),function(e,t,n,i,r,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l extends n.Disposable{constructor(e){super(),this.settingsPath=e,this._onDidChangeConfiguration=this._register(new o.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event}initialize(){return this.initializePromise||(this.initializePromise=new Promise((e,t)=>{this.userConfigModelWatcher=new s.ConfigWatcher(this.settingsPath,{changeBufferDelay:300,onError:e=>i.onUnexpectedError(e),defaultConfig:new r.ConfigurationModelParser(this.settingsPath),parse:(e,t)=>{const n=new r.ConfigurationModelParser(this.settingsPath);return n.parse(e),[...n.errors],n},initCallback:()=>e(void 0)}),this._register(this.userConfigModelWatcher),
this._register(this.userConfigModelWatcher.onDidUpdateConfiguration(()=>this._onDidChangeConfiguration.fire(this.userConfigModelWatcher.getConfig().configurationModel)))})),this.initializePromise.then(()=>this.userConfigModelWatcher.getConfig().configurationModel)}initializeSync(){return this.initialize(),this.userConfigModelWatcher.getConfig().configurationModel}reload(){return this.initialize().then(()=>new Promise(e=>this.userConfigModelWatcher.reload(t=>e(t.configurationModel))))}}t.NodeBasedUserConfiguration=l;class u extends n.Disposable{constructor(e,t){super(),this.configurationResource=e,this.fileService=t,this._onDidChangeConfiguration=this._register(new o.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(t.onFileChanges(e=>this.handleFileEvents(e))),this.reloadConfigurationScheduler=this._register(new a.RunOnceScheduler(()=>this.reload().then(e=>this._onDidChangeConfiguration.fire(e)),50)),this.fileService.watchFileChanges(this.configurationResource),
this._register(n.toDisposable(()=>this.fileService.unwatchFileChanges(this.configurationResource)))}initialize(){return this.reload()}reload(){return this.fileService.resolveContent(this.configurationResource).then(e=>e.value,()=>"").then(e=>{const t=new r.ConfigurationModelParser(this.configurationResource.toString());return t.parse(e),t.configurationModel})}handleFileEvents(e){const t=e.changes;let n=!1;for(let e=0,i=t.length;e<i&&!n;e++)n=c.isEqual(this.configurationResource,t[e].resource);n&&this.reloadConfigurationScheduler.schedule()}}t.FileServiceBasedUserConfiguration=u}),define(e[112],t([0,1,25,27,3,19,51,4,17,111]),function(e,t,n,s,o,a,c,l,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class extends o.Disposable{constructor(e){super(),this._onDidChangeConfiguration=this._register(new l.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.userConfiguration=this._register(new h.NodeBasedUserConfiguration(e.appSettingsPath))
;const t=new c.DefaultConfigurationModel,i=this.userConfiguration.initializeSync();this._configuration=new c.Configuration(t,i),this._register(this.userConfiguration.onDidChangeConfiguration(e=>this.onDidChangeUserConfiguration(e))),this._register(n.Registry.as(s.Extensions.Configuration).onDidUpdateConfiguration(e=>this.onDidDefaultConfigurationChange(e)))}get configuration(){return this._configuration}getConfigurationData(){return this.configuration.toData()}getValue(e,t){const n="string"==typeof e?e:void 0,i=a.isConfigurationOverrides(e)?e:a.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(n,i,void 0)}updateValue(e,t,n,i){return Promise.reject(new Error("not supported"))}inspect(e){return this.configuration.inspect(e,{},void 0)}keys(){return this.configuration.keys(void 0)}reloadConfiguration(e){return e?Promise.resolve(void 0):this.userConfiguration.reload().then(e=>this.onDidChangeUserConfiguration(e))}onDidChangeUserConfiguration(e){
const{added:t,updated:n,removed:i}=a.compare(this._configuration.localUserConfiguration,e),r=[...t,...n,...i];r.length&&(this._configuration.updateLocalUserConfiguration(e),this.trigger(r,1))}onDidDefaultConfigurationChange(e){this._configuration.updateDefaultConfiguration(new c.DefaultConfigurationModel),this.trigger(e,6)}trigger(e,t){this._onDidChangeConfiguration.fire((new c.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))}getTargetConfiguration(e){switch(e){case 6:return this._configuration.defaults.contents;case 1:return this._configuration.localUserConfiguration.contents}return{}}};d=i([r(0,u.IEnvironmentService)],d),t.ConfigurationService=d}),define(e[38],t([0,1,69,6,27,25]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=i.createDecorator("requestService"),s.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{
type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",description:n.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,description:n.localize(3,null)},"http.proxySupport":{type:"string",enum:["off","on","override"],enumDescriptions:[n.localize(4,null),n.localize(5,null),n.localize(6,null)],default:"override",description:n.localize(7,null)},"http.systemCertificates":{type:"boolean",default:!0,description:n.localize(8,null)}}})}),define(e[37],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[115],t([0,1,70,13,6,19,27,3,10,25]),function(e,t,n,s,o,a,c,l,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,
this._commonProperties=e.commonProperties||Promise.resolve({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(let e of this._piiPaths)this._cleanupPatterns.push(new RegExp(s.escapeRegExpCharacters(e),"gi"));this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog("optInStatus",{optIn:this._userOptIn}),this._commonProperties.then(e=>{const t=/^[a-f0-9]+$/i.test(e["common.machineId"]);this.publicLog("machineIdFallback",{usingFallbackGuid:!t})}))}_updateUserOptIn(){const e=this._configurationService.getValue(f);this._userOptIn=e?e.enableTelemetry:this._userOptIn}get isOptedIn(){return this._userOptIn}getTelemetryInfo(){return this._commonProperties.then(e=>{return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"]}})}dispose(){this._disposables=l.dispose(this._disposables)}publicLog(e,t,n){
return this._userOptIn?this._commonProperties.then(i=>{t=u.mixin(t,i),t=u.cloneAndChange(t,e=>{if("string"==typeof e)return this._cleanupInfo(e,n)}),this._appender.log(e,t)},e=>{console.error(e)}):Promise.resolve(void 0)}_cleanupInfo(e,t){let n=e;if(t){const t=[];for(let n of this._cleanupPatterns)for(;;){const i=n.exec(e);if(!i)break;t.push([i.index,n.lastIndex])}const i=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,r=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let s=0;for(n="";;){const o=r.exec(e);if(!o)break;!i.test(o[0])&&t.every(([e,t])=>o.index<e||o.index>=t)&&(n+=e.substring(s,o.index)+"<REDACTED: user-file-path>",s=r.lastIndex)}s<e.length&&(n+=e.substr(s))}for(let e of this._cleanupPatterns)n=n.replace(e,"");return n}};d.IDLE_START_EVENT_NAME="UserIdleStart",d.IDLE_STOP_EVENT_NAME="UserIdleStop",d=i([r(1,o.optional(a.IConfigurationService))],d),t.TelemetryService=d;const f="telemetry";h.Registry.as(c.Extensions.Configuration).registerConfiguration({id:f,
order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:n.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})}),define(e[116],t([0,1,19,16]),function(e,t,n,s){"use strict";function o(e,t){return t.onDidChangeConfiguration(t=>{6!==t.source&&(e.publicLog("updateConfiguration",{configurationSource:n.ConfigurationTargetToString(t.source),configurationKeys:function(e){if(!e)return[];const t=[];return a(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:n.ConfigurationTargetToString(t.source),configurationValues:function(e,t){if(!e)return[];return t.reduce((t,n)=>{const i=n.split(".").reduce((e,t)=>e&&"object"==typeof e?e[t]:void 0,e);return void 0!==i&&t.push({[n]:i}),t},[])}(t.sourceConfig,l)}))})}function a(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(i=>a(e,t?`${t}.${i}`:i,n[i])):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new class{
publicLog(e,t){return Promise.resolve(void 0)}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})}},t.combinedAppender=function(...e){return{log:(t,n)=>e.forEach(e=>e.log(t,n)),dispose:()=>Promise.all(e.map(e=>e.dispose()))}},t.NullAppender={log:()=>null,dispose:()=>Promise.resolve(null)};let c=class{constructor(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}dispose(){return Promise.resolve(void 0)}log(e,t){const n={};Object.keys(t).forEach(e=>{this.commonPropertiesRegex.test(e)||(n[e]=t[e])}),this._logService.trace(`telemetry/${e}`,n)}};c=i([r(0,s.ILogService)],c),t.LogAppender=c
;const l=["editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","editor.indentSize","editor.insertSpaces","editor.detectIndentation","editor.roundedSelection","editor.scrollBeyondLastLine","editor.minimap.enabled","editor.minimap.side","editor.minimap.renderCharacters","editor.minimap.maxColumn","editor.find.seedSearchStringFromSelection","editor.find.autoFindInSelection","editor.wordWrap","editor.wordWrapColumn","editor.wrappingIndent","editor.mouseWheelScrollSensitivity","editor.multiCursorModifier","editor.quickSuggestions","editor.quickSuggestionsDelay","editor.parameterHints.enabled","editor.parameterHints.cycle","editor.autoClosingBrackets","editor.autoClosingQuotes","editor.autoSurround","editor.autoIndent","editor.formatOnType","editor.formatOnPaste","editor.suggestOnTriggerCharacters","editor.acceptSuggestionOnEnter","editor.acceptSuggestionOnCommitCharacter","editor.snippetSuggestions","editor.emptySelectionClipboard","editor.wordBasedSuggestions","editor.suggestSelection","editor.suggestFontSize","editor.suggestLineHeight","editor.tabCompletion","editor.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","editor.cursorSmoothCaretAnimation","editor.cursorStyle","editor.mouseWheelZoom","editor.fontLigatures","editor.hideCursorInOverviewRuler","editor.renderWhitespace","editor.renderControlCharacters","editor.renderIndentGuides","editor.renderLineHighlight","editor.codeLens","editor.folding","editor.showFoldingControls","editor.matchBrackets","editor.glyphMargin","editor.useTabStops","editor.trimAutoWhitespace","editor.stablePeek","editor.dragAndDrop","editor.formatOnSave","editor.colorDecorators","breadcrumbs.enabled","breadcrumbs.filePath","breadcrumbs.symbolPath","breadcrumbs.symbolSortOrder","breadcrumbs.useQuickPick","explorer.openEditors.visible","extensions.autoUpdate","files.associations","files.autoGuessEncoding","files.autoSave","files.autoSaveDelay","files.encoding","files.eol","files.hotExit","files.trimTrailingWhitespace","git.confirmSync","git.enabled","http.proxyStrictSSL","javascript.validate.enable","php.builtInCompletions.enable","php.validate.enable","php.validate.run","terminal.integrated.fontFamily","window.openFilesInNewWindow","window.restoreWindows","window.zoomLevel","workbench.editor.enablePreview","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.showTabs","workbench.editor.highlightModifiedTabs","workbench.editor.swipeToNavigate","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=o,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(t=>{2===t.source&&t.keybindings&&e.publicLog("updateKeybindings",{bindings:t.keybindings.map(e=>({key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}))})})}}),define(e[117],t([0,1,132,9,10,16]),function(e,t,n,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class e{constructor(e,t,i,r){this._eventPrefix=e,this._defaultData=t,this._logService=r,this._defaultData||(this._defaultData=Object.create(null)),"string"==typeof i?this._aiClient=function(e){let t;return n.defaultClient?(t=new n.TelemetryClient(e)).channel.setUseDiskRetryCaching(!0):(n.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setInternalLogging(!1,!1).setUseDiskRetryCaching(!0).start(),t=n.defaultClient),
0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}(i):"function"==typeof i&&(this._aiClient=i())}static _getData(t){const n=Object.create(null),i=Object.create(null),r=Object.create(null);e._flaten(t,r);for(let e in r){const t=r[e=e.length>150?e.substr(e.length-149):e];"number"==typeof t?i[e]=t:"boolean"==typeof t?i[e]=t?1:0:"string"==typeof t?n[e]=t.substring(0,1023):void 0!==t&&null!==t&&(n[e]=t)}return{properties:n,measurements:i}}static _flaten(t,n,i=0,r){if(t)for(let a of Object.getOwnPropertyNames(t)){const c=t[a],l=r?r+a:a;Array.isArray(c)?n[l]=o.safeStringify(c):c instanceof Date?n[l]=c.toISOString():s.isObject(c)?i<2?e._flaten(c,n,i+1,l+"."):n[l]=o.safeStringify(c):n[l]=c}}log(t,n){this._aiClient&&(n=o.mixin(n,this._defaultData),n=e._getData(n),this._logService&&this._logService.trace(`telemetry/${t}`,n),this._aiClient.trackEvent({name:this._eventPrefix+"/"+t,properties:n.properties,measurements:n.measurements}))}dispose(){
if(this._aiClient)return new Promise(e=>{this._aiClient.flush({callback:()=>{this._aiClient=void 0,e(void 0)}})})}};c=i([r(3,a.ILogService)],c),t.AppInsightsAppender=c}),define(e[119],t([0,1,5,23,24,8]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,o,a){const c=Object.create(null);c["common.machineId"]=o,c.sessionID=r.generateUuid()+Date.now(),c.commitHash=e,c.version=t,c["common.platformVersion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),c["common.platform"]=n.PlatformToString(n.platform),c["common.nodePlatform"]=process.platform,c["common.nodeArch"]=process.arch;let l=0;const u=Date.now();return Object.defineProperties(c,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-u,enumerable:!0},"common.sequence":{get:()=>l++,enumerable:!0}}),"linux"===process.platform&&process.env.SNAP&&process.env.SNAP_REVISION&&(c["common.snap"]="true"),
s.readFile(a,"utf8").then(e=>(c["common.source"]=e.slice(0,30),c),e=>c)}}),define(e[120],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.appender=e}listen(e,t){throw new Error(`Event not found: ${t}`)}call(e,t,{eventName:n,data:i}){return this.appender.log(n,i),Promise.resolve(null)}}t.TelemetryAppenderChannel=n;class i{constructor(e){this.channel=e}log(e,t){return this.channel.call("log",{eventName:e,data:t}).then(void 0,e=>`Failed to log telemetry: ${console.warn(e)}`),Promise.resolve(null)}dispose(){}}t.TelemetryAppenderClient=i}),define(e[121],t([0,1,6,4,5,3]),function(e,t,n,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowsService=n.createDecorator("windowsService"),t.IWindowService=n.createDecorator("windowService"),t.getTitleBarStyle=function(e,t,n=t.isExtensionDevelopment){const i=e.getValue("window"),r=!t.isBuilt||n;if(o.isMacintosh&&r)return"native";if(i){if(o.isMacintosh&&!0===i.nativeTabs)return"native"
;if(o.isMacintosh&&!1===i.nativeFullScreen)return"native";const e=i.titleBarStyle;if("native"===e||"custom"===e)return e}return o.isLinux?"native":"custom"};!function(e){e[e.CLI=0]="CLI",e[e.DOCK=1]="DOCK",e[e.MENU=2]="MENU",e[e.DIALOG=3]="DIALOG",e[e.DESKTOP=4]="DESKTOP",e[e.API=5]="API"}(t.OpenContext||(t.OpenContext={}));!function(e){e[e.NONE=0]="NONE",e[e.LOADING=1]="LOADING",e[e.NAVIGATING=2]="NAVIGATING",e[e.READY=3]="READY"}(t.ReadyState||(t.ReadyState={}));let c=class{constructor(e){this.disposables=[];s.Event.latch(s.Event.any(e.onWindowOpen,e.onWindowFocus))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=e.getActiveWindowId().then(e=>void 0===this._activeWindowId&&this.setActiveWindow(e))}setActiveWindow(e){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise=null),this._activeWindowId=e}getActiveClientId(){return this.firstActiveWindowIdPromise?this.firstActiveWindowIdPromise:Promise.resolve(`window:${this._activeWindowId}`)}dispose(){
this.disposables=a.dispose(this.disposables)}};c=i([r(0,t.IWindowsService)],c),t.ActiveWindowManager=c}),define(e[122],t([0,1,6,71,11,5,2,36,108,32,18,72,39]),function(e,t,n,i,r,s,o,a,c,l,u,h,d){"use strict";function f(e){return g(e)||p(e)}function g(e){return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function p(e){return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}function m(e){return e instanceof r.URI}function v(e,t,n,i=!s.isWindows){if(e.scheme!==n.scheme)return{name:t,uri:e.toString(!0)};let r;if(a.isEqualOrParent(e,n))r=a.relativePath(n,e)||".",s.isWindows&&e.scheme===u.Schemas.file&&!i&&(r=r.replace(/\//g,"\\"));else if(e.scheme===u.Schemas.file)r=e.fsPath,s.isWindows&&(r=h.normalizeDriveLetter(r),i&&(r=d.toSlashes(r)));else{if(!a.isEqualAuthority(e.authority,n.authority))return{name:t,uri:e.toString(!0)};r=e.path}return{name:t,path:r}}function y(e,t,n){let i=function(e,t){let n=l.parse(t)
;Array.isArray(n.folders)&&(n.folders=n.folders.filter(e=>f(e)));if(!Array.isArray(n.folders))throw new Error(`${e} looks like an invalid workspace file.`);return n}(t,e);const o=a.dirname(t),u=a.dirname(n),h=[],d=_(i.folders);for(const e of i.folders){let t=g(e)?a.resolvePath(o,e.path):r.URI.parse(e.uri);h.push(v(t,e.name,u,d))}let p=e;return c.setProperty(e,["folders"],h,{insertSpaces:!1,tabSize:4,eol:s.isLinux||s.isMacintosh?"\n":"\r\n"}).forEach(t=>{p=c.applyEdit(e,t)}),p}function _(e){if(s.isWindows){for(const t of e)if(g(t)&&t.path.indexOf(w)>=0)return!0;return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspacesMainService=n.createDecorator("workspacesMainService"),t.IWorkspacesService=n.createDecorator("workspacesService"),t.WORKSPACE_EXTENSION="code-workspace",t.WORKSPACE_FILTER=[{name:i.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.reviveWorkspaceIdentifier=function(e){return{id:e.id,configPath:r.URI.revive(e.configPath)}},
t.isStoredWorkspaceFolder=f,t.isRawFileWorkspaceFolder=g,t.isRawUriWorkspaceFolder=p,t.isSingleFolderWorkspaceIdentifier=m,t.isWorkspaceIdentifier=function(e){const t=e;return t&&"string"==typeof t.id&&t.configPath instanceof r.URI},t.toWorkspaceIdentifier=function(e){return e.configuration?{configPath:e.configuration,id:e.id}:1===e.folders.length?e.folders[0].uri:void 0},t.isSingleFolderWorkspaceInitializationPayload=function(e){return m(e.folder)};const C="."+t.WORKSPACE_EXTENSION;t.hasWorkspaceFileExtension=function(e){return o.extname(e)===C};const w="/";t.getStoredWorkspaceFolder=v,t.rewriteWorkspaceFileForNewLocation=y,t.useSlashForPath=_}),define(e[123],t([0,1,122,88,11,43]),function(e,t,n,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class{constructor(e){this.channel=e.getChannel("windows")}get onWindowOpen(){return this.channel.listen("onWindowOpen")}get onWindowFocus(){return this.channel.listen("onWindowFocus")}get onWindowBlur(){
return this.channel.listen("onWindowBlur")}get onWindowMaximize(){return this.channel.listen("onWindowMaximize")}get onWindowUnmaximize(){return this.channel.listen("onWindowUnmaximize")}get onRecentlyOpenedChange(){return this.channel.listen("onRecentlyOpenedChange")}pickFileFolderAndOpen(e){return this.channel.call("pickFileFolderAndOpen",e)}pickFileAndOpen(e){return this.channel.call("pickFileAndOpen",e)}pickFolderAndOpen(e){return this.channel.call("pickFolderAndOpen",e)}pickWorkspaceAndOpen(e){return this.channel.call("pickWorkspaceAndOpen",e)}showMessageBox(e,t){return this.channel.call("showMessageBox",[e,t])}showSaveDialog(e,t){return this.channel.call("showSaveDialog",[e,t])}showOpenDialog(e,t){return this.channel.call("showOpenDialog",[e,t])}reloadWindow(e,t){return this.channel.call("reloadWindow",[e,t])}openDevTools(e,t){return this.channel.call("openDevTools",[e,t])}toggleDevTools(e){return this.channel.call("toggleDevTools",e)}closeWorkspace(e){return this.channel.call("closeWorkspace",e)}
enterWorkspace(e,t){return this.channel.call("enterWorkspace",[e,t]).then(e=>(e.workspace=n.reviveWorkspaceIdentifier(e.workspace),e))}toggleFullScreen(e){return this.channel.call("toggleFullScreen",e)}setRepresentedFilename(e,t){return this.channel.call("setRepresentedFilename",[e,t])}addRecentlyOpened(e){return this.channel.call("addRecentlyOpened",e)}removeFromRecentlyOpened(e){return this.channel.call("removeFromRecentlyOpened",e)}clearRecentlyOpened(){return this.channel.call("clearRecentlyOpened")}getRecentlyOpened(e){return this.channel.call("getRecentlyOpened",e).then(e=>(e.workspaces.forEach(e=>s.isRecentWorkspace(e)?e.workspace=n.reviveWorkspaceIdentifier(e.workspace):e.folderUri=o.URI.revive(e.folderUri)),e.files.forEach(e=>e.fileUri=o.URI.revive(e.fileUri)),e))}newWindowTab(){return this.channel.call("newWindowTab")}showPreviousWindowTab(){return this.channel.call("showPreviousWindowTab")}showNextWindowTab(){return this.channel.call("showNextWindowTab")}moveWindowTabToNewWindow(){
return this.channel.call("moveWindowTabToNewWindow")}mergeAllWindowTabs(){return this.channel.call("mergeAllWindowTabs")}toggleWindowTabsBar(){return this.channel.call("toggleWindowTabsBar")}focusWindow(e){return this.channel.call("focusWindow",e)}closeWindow(e){return this.channel.call("closeWindow",e)}isFocused(e){return this.channel.call("isFocused",e)}isMaximized(e){return this.channel.call("isMaximized",e)}maximizeWindow(e){return this.channel.call("maximizeWindow",e)}unmaximizeWindow(e){return this.channel.call("unmaximizeWindow",e)}minimizeWindow(e){return this.channel.call("minimizeWindow",e)}onWindowTitleDoubleClick(e){return this.channel.call("onWindowTitleDoubleClick",e)}setDocumentEdited(e,t){return this.channel.call("setDocumentEdited",[e,t])}quit(){return this.channel.call("quit")}relaunch(e){return this.channel.call("relaunch",[e])}whenSharedProcessReady(){return this.channel.call("whenSharedProcessReady")}toggleSharedProcess(){return this.channel.call("toggleSharedProcess")}openWindow(e,t,n){
return this.channel.call("openWindow",[e,t,n])}openNewWindow(e){return this.channel.call("openNewWindow",e)}getWindows(){return this.channel.call("getWindows").then(e=>{for(const t of e)t.folderUri&&(t.folderUri=o.URI.revive(t.folderUri)),t.workspace&&(t.workspace=n.reviveWorkspaceIdentifier(t.workspace));return e})}getWindowCount(){return this.channel.call("getWindowCount")}log(e,...t){return this.channel.call("log",[e,t])}showItemInFolder(e){return this.channel.call("showItemInFolder",e)}getActiveWindowId(){return this.channel.call("getActiveWindowId")}openExternal(e){return this.channel.call("openExternal",e)}startCrashReporter(e){return this.channel.call("startCrashReporter",e)}updateTouchBar(e,t){return this.channel.call("updateTouchBar",[e,t])}openAboutDialog(){return this.channel.call("openAboutDialog")}resolveProxy(e,t){return Promise.resolve(this.channel.call("resolveProxy",[e,t]))}};c=i([r(0,a.IMainProcessService)],c),t.WindowsService=c}),
define(e[54],t([0,1,62,2,22,14,8,130,128,4]),function(e,t,n,i,r,s,o,a,c,l){"use strict";function u(e,t,a,c){let u=s.createCancelablePromise(()=>Promise.resolve()),h=0;return l.Event.once(c.onCancellationRequested)(()=>{u.cancel(),e.close()}),new Promise((d,g)=>{const p=new s.Sequencer,m=t=>{t.isCancellationRequested||(h++,e.readEntry())};e.once("error",g),e.once("close",()=>u.then(()=>{c.isCancellationRequested||e.entryCount===h?d():g(new f("Incomplete",new Error(n.localize(1,null,h,e.entryCount))))},g)),e.readEntry(),e.on("entry",h=>{if(c.isCancellationRequested)return;if(!a.sourcePathRegex.test(h.fileName))return void m(c);const d=h.fileName.replace(a.sourcePathRegex,"");if(/\/$/.test(d)){const e=i.join(t,d);return void(u=s.createCancelablePromise(t=>o.mkdirp(e,void 0,t).then(()=>m(t)).then(void 0,g)))}const f=s.ninvoke(e,e.openReadStream,h),v=function(e){const t=e.externalFileAttributes>>16||33188;return[448,56,7].map(e=>t&e).reduce((e,t)=>e+t,61440&t)}(h)
;u=s.createCancelablePromise(e=>p.queue(()=>f.then(s=>(function(e,t,s,a,c,u){const h=i.dirname(t),d=i.join(a,h);if(0!==d.indexOf(a))return Promise.reject(new Error(n.localize(0,null,t)));const f=i.join(a,t);let g;return l.Event.once(u.onCancellationRequested)(()=>{g&&g.destroy()}),Promise.resolve(o.mkdirp(d,void 0,u)).then(()=>new Promise((t,n)=>{if(!u.isCancellationRequested)try{(g=r.createWriteStream(f,{mode:s})).once("close",()=>t()),g.once("error",n),e.once("error",n),e.pipe(g)}catch(e){n(e)}}))})(s,d,v,t,0,e).then(()=>m(e)))).then(null,g))})})}function h(e,t=!1){return s.nfcall(a.open,e,t?{lazyEntries:!0}:void 0).then(void 0,e=>Promise.reject(function(e){if(e instanceof f)return e;let t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new f(t,e)}(e)))}function d(e,t){return function(e,t){return h(e).then(e=>new Promise((i,r)=>{e.on("entry",n=>{n.fileName===t&&s.ninvoke(e,e.openReadStream,n).then(e=>i(e),e=>r(e))}),
e.once("close",()=>r(new Error(n.localize(2,null,t))))}))}(e,t).then(e=>new Promise((t,n)=>{const i=[];e.once("error",n),e.on("data",e=>i.push(e)),e.on("end",()=>t(Buffer.concat(i)))}))}Object.defineProperty(t,"__esModule",{value:!0});class f extends Error{constructor(e,t){let n=t.message;switch(e){case"CorruptZip":n=`Corrupt ZIP: ${n}`}super(n),this.type=e,this.cause=t}}t.ExtractError=f,t.zip=function(e,t){return new Promise((n,i)=>{const s=new c.ZipFile;t.forEach(e=>{e.contents?s.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):e.localPath&&s.addFile(e.localPath,e.path)}),s.end();const o=r.createWriteStream(e);s.outputStream.pipe(o),s.outputStream.once("error",i),o.once("error",i),o.once("finish",()=>n(e))})},t.extract=function(e,t,n={},i){const r=new RegExp(n.sourcePath?`^${n.sourcePath}`:"");let s=h(e,!0);return n.overwrite&&(s=s.then(e=>o.rimraf(t).then(()=>e))),s.then(e=>u(e,t,{sourcePathRegex:r},i))},t.buffer=d}),define(e[127],t([0,1,54,67]),function(e,t,n,i){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=function(e){return n.buffer(e,"extension/package.json").then(e=>{try{return JSON.parse(e.toString("utf8"))}catch(e){throw new Error(i.localize(0,null))}})}}),define(e[126],t([0,1,66,2,8,10,3,20,54,35,26,73,17,14,4,129,11,31,5,16,77,74,50,37,46,23,24,45,6,18,28,29,127,42,19,104]),function(e,t,s,o,a,c,l,u,h,d,f,g,p,m,v,y,_,C,w,E,b,S,x,P,k,I,A,O,D,T,L,R,j,M,U,F){"use strict";function N(e){return new Promise((t,n)=>{try{const i=JSON.parse(e),r=i.__metadata||null;delete i.__metadata,t({manifest:i,metadata:r})}catch(e){n(new Error(s.localize(0,null)))}})}Object.defineProperty(t,"__esModule",{value:!0});class z extends Error{constructor(e,t){super(e),this.code=t}}t.ExtensionManagementError=z;let B=class extends l.Disposable{constructor(e,t,n,i,r,s,a){super(),this.remote=e,this.environmentService=t,this.configurationService=n,this.galleryService=i,this.logService=r,this.downloadService=s,this.telemetryService=a,this.lastReportTimestamp=0,
this.installingExtensions=new Map,this.uninstallingExtensions=new Map,this._onInstallExtension=new v.Emitter,this.onInstallExtension=this._onInstallExtension.event,this._onDidInstallExtension=new v.Emitter,this.onDidInstallExtension=this._onDidInstallExtension.event,this._onUninstallExtension=new v.Emitter,this.onUninstallExtension=this._onUninstallExtension.event,this._onDidUninstallExtension=new v.Emitter,this.onDidUninstallExtension=this._onDidUninstallExtension.event,this._devSystemExtensionsPath=null,this._devSystemExtensionsFilePath=null,this.systemExtensionsPath=t.builtinExtensionsPath,this.extensionsPath=t.extensionsPath,this.uninstalledPath=o.join(this.extensionsPath,".obsolete"),this.uninstalledFileLimiter=new m.Queue,this.manifestCache=this._register(new b.ExtensionsManifestCache(t,this)),this.extensionLifecycle=this._register(new S.ExtensionsLifecycle(t,this.logService)),this._register(l.toDisposable(()=>{this.installingExtensions.forEach(e=>e.cancel()),
this.uninstallingExtensions.forEach(e=>e.cancel()),this.installingExtensions.clear(),this.uninstallingExtensions.clear()}))}zip(e){return this.logService.trace("ExtensionManagementService#zip",e.identifier.id),this.collectFiles(e).then(e=>h.zip(o.join(I.tmpdir(),A.generateUuid()),e)).then(e=>_.URI.file(e))}unzip(e,t){return this.logService.trace("ExtensionManagementService#unzip",e.toString()),this.install(e,t)}collectFiles(e){const t=e=>n(this,void 0,void 0,function*(){let n=yield a.readdir(e);n=n.map(t=>o.join(e,t));const i=yield Promise.all(n.map(e=>a.stat(e)));let r=Promise.resolve([]);return i.forEach((e,i)=>{const s=n[i];e.isFile()&&(r=r.then(e=>[...e,s])),e.isDirectory()&&(r=r.then(e=>t(s).then(t=>[...e,...t])))}),r});return t(e.location.fsPath).then(t=>t.map(t=>({path:`extension/${o.relative(e.location.fsPath,t)}`,localPath:t})))}install(e,t=1){return this.logService.trace("ExtensionManagementService#install",e.toString()),m.createCancelablePromise(n=>this.downloadVsix(e).then(e=>{
const i=o.resolve(e.fsPath);return j.getManifest(i).then(e=>{const r={id:f.getGalleryExtensionId(e.publisher,e.name)};let o=1;if(e.engines&&e.engines.vscode&&!k.isEngineValid(e.engines.vscode))return Promise.reject(new Error(s.localize(1,null,r.id,C.default.version)));const a=new M.ExtensionIdentifierWithVersion(r,e.version);return this.getInstalled(1).then(t=>{const n=t.filter(e=>f.areSameExtensions(r,e.identifier))[0];if(n){if(o=2,a.equals(new M.ExtensionIdentifierWithVersion(n.identifier,n.manifest.version)))return this.removeExtension(n,"existing").then(null,t=>Promise.reject(new Error(s.localize(2,null,e.displayName||e.name))));if(y.gt(n.manifest.version,e.version))return this.uninstall(n,!0)}}).then(()=>(this.logService.info("Installing the extension:",r.id),this._onInstallExtension.fire({identifier:r,zipPath:i}),
this.getMetadata(f.getGalleryExtensionId(e.publisher,e.name)).then(e=>this.installFromZipPath(a,i,e,t,o,n),()=>this.installFromZipPath(a,i,null,t,o,n)).then(()=>(this.logService.info("Successfully installed the extension:",r.id),r),e=>(this.logService.error("Failed to install the extension:",r.id,e.message),Promise.reject(e)))))})}))}downloadVsix(e){if(e.scheme===T.Schemas.file)return Promise.resolve(e);if(!this.downloadService)throw new Error("Download service is not available");const t=o.join(I.tmpdir(),A.generateUuid());return this.downloadService.download(e,t).then(()=>_.URI.file(t))}installFromZipPath(e,t,n,i,r,s){return this.toNonCancellablePromise(this.installExtension({zipPath:t,identifierWithVersion:e,metadata:n},i,s).then(e=>this.installDependenciesAndPackExtensions(e,null).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(n=>(this._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,local:n,operation:r}),n),n=>(this._onDidInstallExtension.fire({
identifier:e.identifier,zipPath:t,operation:r,error:n}),Promise.reject(n))))}installFromGallery(e){return n(this,void 0,void 0,function*(){const t=(new Date).getTime();this.logService.info("Installing extension:",e.identifier.id),this._onInstallExtension.fire({identifier:e.identifier,gallery:e});const i=(e,n,i)=>{const r=i&&i.code?i.code:"unknown";this.logService.error("Failed to install extension:",e.identifier.id,i?i.message:r),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,operation:n,error:r}),this.reportTelemetry(this.getTelemetryEvent(n),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,i),i instanceof Error&&(i.name=r)};try{e=yield this.checkAndGetCompatibleVersion(e)}catch(t){return i(e,1,t),Promise.reject(t)}const r=new M.ExtensionIdentifierWithVersion(e.identifier,e.version).key();let s=this.installingExtensions.get(r);if(!s){let o,c,l,u=1;s=m.createCancelablePromise(e=>(o=e,new Promise((e,t)=>{c=e,l=t}))),this.installingExtensions.set(r,s);try{
const s=(yield this.getInstalled(1)).filter(t=>f.areSameExtensions(t.identifier,e.identifier))[0];s&&(u=2),this.downloadInstallableExtension(e,u).then(e=>this.installExtension(e,1,o).then(t=>a.rimraf(e.zipPath).finally(()=>null).then(()=>t))).then(e=>this.installDependenciesAndPackExtensions(e,s).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(i=>n(this,void 0,void 0,function*(){s&&y.neq(s.manifest.version,e.version)&&(yield this.setUninstalled(s)),this.installingExtensions.delete(r),((e,n,i)=>{this.logService.info("Extensions installed successfully:",e.identifier.id),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,local:i,operation:n}),this.reportTelemetry(this.getTelemetryEvent(n),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,void 0)})(e,u,i),c(null)}),t=>{this.installingExtensions.delete(r),i(e,u,t),l(t)})}catch(t){return this.installingExtensions.delete(r),i(e,u,t),Promise.reject(t)}}return s})}checkAndGetCompatibleVersion(e){
return n(this,void 0,void 0,function*(){if(yield this.isMalicious(e))return Promise.reject(new z(s.localize(3,null),d.INSTALL_ERROR_MALICIOUS));const t=yield this.galleryService.getCompatibleExtension(e);if(!t)return Promise.reject(new z(s.localize(4,null,e.identifier.id,C.default.version),d.INSTALL_ERROR_INCOMPATIBLE));if(this.remote){const t=yield this.galleryService.getManifest(e,L.CancellationToken.None);if(t&&F.isUIExtension(t,[],this.configurationService)&&!M.isLanguagePackExtension(t))return Promise.reject(new Error(s.localize(5,null,e.identifier.id)))}return t})}reinstallFromGallery(e){return this.logService.trace("ExtensionManagementService#reinstallFromGallery",e.identifier.id),
this.galleryService.isEnabled()?this.findGalleryExtension(e).then(t=>t?this.setUninstalled(e).then(()=>this.removeUninstalledExtension(e).then(()=>this.installFromGallery(t),e=>Promise.reject(new Error(s.localize(7,null,x.toErrorMessage(e)))))):Promise.reject(new Error(s.localize(8,null)))):Promise.reject(new Error(s.localize(6,null)))}getTelemetryEvent(e){return 2===e?"extensionGallery:update":"extensionGallery:install"}isMalicious(e){return this.getExtensionsReport().then(t=>f.getMaliciousExtensionsSet(t).has(e.identifier.id))}downloadInstallableExtension(e,t){const n={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.logService.trace("Started downloading extension:",e.identifier.id),this.galleryService.download(e,t).then(t=>(this.logService.info("Downloaded extension:",e.identifier.id,t),j.getManifest(t).then(i=>({zipPath:t,identifierWithVersion:new M.ExtensionIdentifierWithVersion(e.identifier,i.version),metadata:n
}),e=>Promise.reject(new z(this.joinErrors(e).message,"validating")))),e=>Promise.reject(new z(this.joinErrors(e).message,"downloading")))}installExtension(e,t,n){return this.unsetUninstalledAndGetLocal(e.identifierWithVersion).then(i=>i||this.extractAndInstall(e,t,n),e=>w.isMacintosh?Promise.reject(new z(s.localize(9,null),"unsetUninstalled")):Promise.reject(new z(s.localize(10,null),"unsetUninstalled")))}unsetUninstalledAndGetLocal(e){return this.isUninstalled(e).then(t=>t?(this.logService.trace("Removing the extension from uninstalled list:",e.identifier.id),this.unsetUninstalled(e).then(()=>(this.logService.info("Removed the extension from uninstalled list:",e.identifier.id),this.getInstalled(1))).then(t=>t.filter(t=>new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(e))[0])):null)}extractAndInstall({zipPath:e,identifierWithVersion:t,metadata:n},i,r){const{identifier:c}=t,l=1===i?this.extensionsPath:this.systemExtensionsPath,u=t.key(),h=o.join(l,`.${u}`),d=o.join(l,u)
;return a.rimraf(d).then(()=>this.extractAndRename(c,e,h,d,r),e=>Promise.reject(new z(s.localize(11,null,d,c.id),"deleting"))).then(()=>this.scanExtension(u,l,i)).then(e=>e?(this.logService.info("Installation completed.",c.id),n?(e.metadata=n,this.saveMetadataForLocalExtension(e)):e):Promise.reject(s.localize(12,null,l)),e=>a.rimraf(d).then(()=>Promise.reject(e),()=>Promise.reject(e)))}extractAndRename(e,t,n,i,r){return this.extract(e,t,n,r).then(()=>this.rename(e,n,i,Date.now()+12e4).then(()=>this.logService.info("Renamed to",i),e=>(this.logService.info("Rename failed. Deleting from extracted location",n),a.rimraf(n).finally(()=>null).then(()=>Promise.reject(e)))))}extract(e,t,n,i){return this.logService.trace(`Started extracting the extension from ${t} to ${n}`),a.rimraf(n).then(()=>h.extract(t,n,{sourcePath:"extension",overwrite:!0
},i).then(()=>this.logService.info(`Extracted extension to ${n}:`,e.id),e=>a.rimraf(n).finally(()=>null).then(()=>Promise.reject(new z(e.message,e instanceof h.ExtractError&&e.type?e.type:"extracting")))),e=>Promise.reject(new z(this.joinErrors(e).message,"deleting")))}rename(e,t,n,i){return a.rename(t,n).then(void 0,r=>w.isWindows&&r&&"EPERM"===r.code&&Date.now()<i?(this.logService.info(`Failed renaming ${t} to ${n} with 'EPERM' error. Trying again...`,e.id),this.rename(e,t,n,i)):Promise.reject(new z(r.message||s.localize(13,null,t,n),r.code||"renaming")))}installDependenciesAndPackExtensions(e,t){return n(this,void 0,void 0,function*(){if(this.galleryService.isEnabled()){const i=e.manifest.extensionDependencies||[];if(e.manifest.extensionPack)for(const n of e.manifest.extensionPack)t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(e=>f.areSameExtensions({id:e},{id:n}))||i.every(e=>!f.areSameExtensions({id:e},{id:n}))&&i.push(n);if(i.length)return this.getInstalled().then(e=>{
const t=i.filter(t=>e.every(({identifier:e})=>!f.areSameExtensions(e,{id:t})));return t.length?this.galleryService.query({names:t,pageSize:i.length},L.CancellationToken.None).then(e=>{const t=e.firstPage;return Promise.all(t.map(e=>n(this,void 0,void 0,function*(){if(this.remote){const t=yield this.galleryService.getManifest(e,L.CancellationToken.None);if(t&&F.isUIExtension(t,[],this.configurationService)&&!M.isLanguagePackExtension(t))return void this.logService.info("Ignored installing the UI dependency",e.identifier.id)}return this.installFromGallery(e)}))).then(()=>null,e=>this.rollback(t).then(()=>Promise.reject(e),()=>Promise.reject(e)))}):null})}return Promise.resolve(void 0)})}rollback(e){return this.getInstalled(1).then(t=>Promise.all(t.filter(t=>e.some(e=>new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(new M.ExtensionIdentifierWithVersion(e.identifier,e.version)))).map(e=>this.uninstall(e,!0)))).then(()=>void 0,()=>void 0)}uninstall(e,t=!1){
return this.logService.trace("ExtensionManagementService#uninstall",e.identifier.id),this.toNonCancellablePromise(this.getInstalled(1).then(t=>{const n=t.filter(t=>f.areSameExtensions(t.identifier,e.identifier))[0];return n?this.checkForDependenciesAndUninstall(n,t).then(()=>null,e=>Promise.reject(this.joinErrors(e))):Promise.reject(new Error(s.localize(14,null,e.manifest.displayName||e.manifest.name)))}))}updateMetadata(e,t){return this.logService.trace("ExtensionManagementService#updateMetadata",e.identifier.id),e.metadata=t,this.saveMetadataForLocalExtension(e).then(e=>(this.manifestCache.invalidate(),e))}saveMetadataForLocalExtension(e){if(!e.metadata)return Promise.resolve(e);const t=o.join(e.location.fsPath,"package.json");return a.readFile(t,"utf8").then(e=>N(e)).then(({manifest:t})=>c.assign(t,{__metadata:e.metadata})).then(e=>a.writeFile(t,JSON.stringify(e,null,"\t"))).then(()=>e)}getMetadata(e){return this.findGalleryExtensionByName(e).then(e=>e?{id:e.identifier.uuid,
publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null)}findGalleryExtension(e){return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(t=>t||this.findGalleryExtensionByName(e.identifier.id)):this.findGalleryExtensionByName(e.identifier.id)}findGalleryExtensionById(e){return this.galleryService.query({ids:[e],pageSize:1},L.CancellationToken.None).then(e=>e.firstPage[0])}findGalleryExtensionByName(e){return this.galleryService.query({names:[e],pageSize:1},L.CancellationToken.None).then(e=>e.firstPage[0])}joinErrors(e){const t=Array.isArray(e)?e:[e];return 1===t.length?t[0]instanceof Error?t[0]:new Error(t[0]):t.reduce((e,t)=>new Error(`${e.message}${e.message?",":""}${t instanceof Error?t.message:t}`),new Error(""))}checkForDependenciesAndUninstall(e,t){return this.preUninstallExtension(e).then(()=>{const n=this.getAllPackExtensionsToUninstall(e,t);return n.length?this.uninstallExtensions(e,n,t):this.uninstallExtensions(e,[],t)
}).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new z(t instanceof Error?t.message:t,"local")),Promise.reject(t)))}uninstallExtensions(e,t,n){const i=this.getDependents(e,n);if(i.length){const n=i.filter(n=>e!==n&&-1===t.indexOf(n));if(n.length)return Promise.reject(new Error(this.getDependentsErrorMessage(e,n)))}return Promise.all([this.uninstallExtension(e),...t.map(e=>this.doUninstall(e))]).then(()=>void 0)}getDependentsErrorMessage(e,t){return 1===t.length?s.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?s.localize(16,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name):s.localize(17,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name)}getAllPackExtensionsToUninstall(e,t,n=[]){if(-1!==n.indexOf(e))return[];n.push(e)
;const i=e.manifest.extensionPack?e.manifest.extensionPack:[];if(i.length){const e=t.filter(e=>i.some(t=>f.areSameExtensions({id:t},e.identifier))),r=[];for(const i of e)r.push(...this.getAllPackExtensionsToUninstall(i,t,n));return[...e,...r]}return[]}getDependents(e,t){return t.filter(t=>t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(t=>f.areSameExtensions({id:t},e.identifier)))}doUninstall(e){return this.preUninstallExtension(e).then(()=>this.uninstallExtension(e)).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new z(t instanceof Error?t.message:t,"local")),Promise.reject(t)))}preUninstallExtension(e){return Promise.resolve(a.exists(e.location.fsPath)).then(e=>e?null:Promise.reject(new Error(s.localize(18,null)))).then(()=>{this.logService.info("Uninstalling extension:",e.identifier.id),this._onUninstallExtension.fire(e.identifier)})}uninstallExtension(e){let t=this.uninstallingExtensions.get(e.identifier.id)
;return t||(t=m.createCancelablePromise(t=>this.scanUserExtensions(!1).then(t=>this.setUninstalled(...t.filter(t=>f.areSameExtensions(t.identifier,e.identifier)))).then(()=>{this.uninstallingExtensions.delete(e.identifier.id)})),this.uninstallingExtensions.set(e.identifier.id,t)),t}postUninstallExtension(e,t){return n(this,void 0,void 0,function*(){t?this.logService.error("Failed to uninstall extension:",e.identifier.id,t.message):(this.logService.info("Successfully uninstalled extension:",e.identifier.id),e.identifier.uuid&&(yield this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,"uninstall"))),this.reportTelemetry("extensionGallery:uninstall",f.getLocalExtensionTelemetryData(e),void 0,t);const n=t?t instanceof z?t.code:"unknown":void 0;this._onDidUninstallExtension.fire({identifier:e.identifier,error:n})})}getInstalled(e=null){const t=[]
;return null!==e&&0!==e||t.push(this.scanSystemExtensions().then(null,e=>Promise.reject(new z(this.joinErrors(e).message,"scanningSystem")))),null!==e&&1!==e||t.push(this.scanUserExtensions(!0).then(null,e=>Promise.reject(new z(this.joinErrors(e).message,"scanningUser")))),Promise.all(t).then(u.flatten,e=>Promise.reject(this.joinErrors(e)))}scanSystemExtensions(){this.logService.trace("Started scanning system extensions");const e=this.scanExtensions(this.systemExtensionsPath,0).then(e=>(this.logService.info("Scanned system extensions:",e.length),e));if(this.environmentService.isBuilt)return e;const t=this.getDevSystemExtensionsList().then(e=>e.length?this.scanExtensions(this.devSystemExtensionsPath,0).then(t=>(this.logService.info("Scanned dev system extensions:",t.length),t.filter(t=>e.some(e=>f.areSameExtensions(t.identifier,{id:e}))))):[]);return Promise.all([e,t]).then(([e,t])=>[...e,...t])}scanUserExtensions(e){return this.logService.trace("Started scanning user extensions"),
Promise.all([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,1)]).then(([t,n])=>{if(n=n.filter(e=>!t[new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]),e){n=f.groupByExtension(n,e=>e.identifier).map(e=>e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version))[0])}return this.logService.info("Scanned user extensions:",n.length),n})}scanExtensions(e,t){const n=new m.Limiter(10);return a.readdir(e).then(i=>Promise.all(i.map(i=>n.queue(()=>this.scanExtension(i,e,t))))).then(e=>e.filter(e=>e&&e.identifier))}scanExtension(e,t,n){if(1===n&&0===e.indexOf("."))return Promise.resolve(null);const i=o.join(t,e);return a.readdir(i).then(e=>(function(e){const t=[a.readFile(o.join(e,"package.json"),"utf8").then(e=>N(e)),a.readFile(o.join(e,"package.nls.json"),"utf8").then(void 0,e=>"ENOENT"!==e.code?Promise.reject(e):"{}").then(e=>JSON.parse(e))];return Promise.all(t).then(([{manifest:e,metadata:t},n])=>({manifest:g.localizeManifest(e,n),metadata:t}))
})(i).then(({manifest:t,metadata:r})=>{const s=e.filter(e=>/^readme(\.txt|\.md|)$/i.test(e))[0],a=s?_.URI.file(o.join(i,s)):null,c=e.filter(e=>/^changelog(\.txt|\.md|)$/i.test(e))[0],l=c?_.URI.file(o.join(i,c)):null,u={id:f.getGalleryExtensionId(t.publisher,t.name),uuid:r?r.id:null};return{type:n,identifier:u,manifest:t,metadata:r,location:_.URI.file(i),readmeUrl:a,changelogUrl:l}})).then(void 0,()=>null)}removeDeprecatedExtensions(){return this.removeUninstalledExtensions().then(()=>this.removeOutdatedExtensions())}removeUninstalledExtensions(){return this.getUninstalledExtensions().then(e=>this.scanExtensions(this.extensionsPath,1).then(t=>{const n=t.filter(t=>e[new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).key()]);return Promise.all(n.map(e=>this.extensionLifecycle.postUninstall(e).then(()=>this.removeUninstalledExtension(e))))})).then(()=>void 0)}removeOutdatedExtensions(){return this.scanExtensions(this.extensionsPath,1).then(e=>{const t=[],n=f.groupByExtension(e,e=>e.identifier)
;return t.push(...u.flatten(n.map(e=>e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version)).slice(1)))),Promise.all(t.map(e=>this.removeExtension(e,"outdated")))}).then(()=>void 0)}removeUninstalledExtension(e){return this.removeExtension(e,"uninstalled").then(()=>this.withUninstalledExtensions(t=>delete t[new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()])).then(()=>void 0)}removeExtension(e,t){return this.logService.trace(`Deleting ${t} extension from disk`,e.identifier.id,e.location.fsPath),a.rimraf(e.location.fsPath).then(()=>this.logService.info("Deleted from disk",e.identifier.id,e.location.fsPath))}isUninstalled(e){return this.filterUninstalled(e).then(e=>1===e.length)}filterUninstalled(...e){return this.withUninstalledExtensions(t=>{const n=[];for(const i of e)t[i.key()]&&n.push(i.key());return n})}setUninstalled(...e){const t=e.map(e=>new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version))
;return this.withUninstalledExtensions(e=>c.assign(e,t.reduce((e,t)=>(e[t.key()]=!0,e),{})))}unsetUninstalled(e){return this.withUninstalledExtensions(t=>delete t[e.key()])}getUninstalledExtensions(){return this.withUninstalledExtensions(e=>e)}withUninstalledExtensions(e){return n(this,void 0,void 0,function*(){return yield this.uninstalledFileLimiter.queue(()=>{let t=null;return a.readFile(this.uninstalledPath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(n=>(t=e(n),n)).then(e=>{if(0===Object.keys(e).length)return a.rimraf(this.uninstalledPath);{const t=JSON.stringify(e);return a.writeFile(this.uninstalledPath,t)}}).then(()=>t)})})}getExtensionsReport(){const e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions}updateReportCache(){
return this.logService.trace("ExtensionManagementService.refreshReportedCache"),this.galleryService.getExtensionsReport().then(e=>(this.logService.trace(`ExtensionManagementService.refreshReportedCache - got ${e.length} reported extensions from service`),e),e=>(this.logService.trace("ExtensionManagementService.refreshReportedCache - failed to get extension report"),[]))}get devSystemExtensionsPath(){return this._devSystemExtensionsPath||(this._devSystemExtensionsPath=o.normalize(o.join(R.getPathFromAmdModule(e,""),"..",".build","builtInExtensions"))),this._devSystemExtensionsPath}get devSystemExtensionsFilePath(){return this._devSystemExtensionsFilePath||(this._devSystemExtensionsFilePath=o.normalize(o.join(R.getPathFromAmdModule(e,""),"..","build","builtInExtensions.json"))),this._devSystemExtensionsFilePath}getDevSystemExtensionsList(){return a.readFile(this.devSystemExtensionsFilePath,"utf8").then(e=>{return JSON.parse(e).map(({name:e})=>e)})}toNonCancellablePromise(e){
return new Promise((t,n)=>e.then(e=>t(e),e=>n(e)))}reportTelemetry(e,t,n,i){const r=i?i instanceof z?i.code:"unknown":void 0;this.telemetryService.publicLog(e,c.assign(t,{success:!i,duration:n,errorcode:r}))}};B=i([r(1,p.IEnvironmentService),r(2,U.IConfigurationService),r(3,d.IExtensionGalleryService),r(4,E.ILogService),r(5,D.optional(O.IDownloadService)),r(6,P.ITelemetryService)],B),t.ExtensionManagementService=B}),define(e[41],t([0,1,9,87,22,10,131,7]),function(e,t,i,r,s,o,a,c){"use strict";function l(t,s){let u;return(t.getRawRequest?Promise.resolve(t.getRawRequest(t)):Promise.resolve(function(t){return n(this,void 0,void 0,function*(){return("https:"===r.parse(t.url).protocol?yield new Promise((t,n)=>{e(["https"],t,n)}):yield new Promise((t,n)=>{e(["http"],t,n)})).request})}(t))).then(e=>new Promise((n,h)=>{const d=r.parse(t.url),f={hostname:d.hostname,port:d.port?parseInt(d.port):"https:"===d.protocol?443:80,protocol:d.protocol,path:d.path,method:t.type||"GET",headers:t.headers,agent:t.agent,
rejectUnauthorized:!i.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(f.auth=t.user+":"+t.password),(u=e(f,e=>{const r=i.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode&&e.statusCode>=300&&e.statusCode<400&&r>0&&e.headers.location)l(o.assign({},t,{url:e.headers.location,followRedirects:r-1}),s).then(n,h);else{let t=e;"gzip"===e.headers["content-encoding"]&&(t=t.pipe(a.createGunzip())),n({res:e,stream:t})}})).on("error",h),t.timeout&&u.setTimeout(t.timeout),t.data){if("string"!=typeof t.data)return void t.data.pipe(u);u.write(t.data)}u.end(),s.onCancellationRequested(()=>{u.abort(),h(c.canceled())})}))}function u(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function h(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=l,t.download=function(e,t){return new Promise((n,i)=>{const r=s.createWriteStream(e);r.once("finish",()=>n(void 0)),t.stream.once("error",i),t.stream.pipe(r)})},
t.asText=function(e){return new Promise((t,n)=>{if(!u(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);const i=[];e.stream.on("data",e=>i.push(e)),e.stream.on("end",()=>t(i.join(""))),e.stream.on("error",n)})},t.asJson=function(e){return new Promise((t,n)=>{if(!u(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);const i=[];e.stream.on("data",e=>i.push(e)),e.stream.on("end",()=>{try{t(JSON.parse(i.join("")))}catch(e){n(e)}}),e.stream.on("error",n)})}}),define(e[118],t([0,1,18,8,38,41,28,2,23,24]),function(e,t,n,s,o,a,c,l,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e){this.requestService=e}download(e,t=l.join(u.tmpdir(),h.generateUuid()),i=c.CancellationToken.None){if(e.scheme===n.Schemas.file)return s.copy(e.fsPath,t).then(()=>t);const r={type:"GET",url:e.toString()}
;return this.requestService.request(r,i).then(e=>200===e.res.statusCode?a.download(t,e).then(()=>t):a.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`))))}};d=i([r(0,o.IRequestService)],d),t.DownloadService=d}),define(e[57],t([0,1,23,2,20,7,35,26,10,38,37,41,31,21,46,17,8,40,24,30,28,16]),function(e,t,n,s,o,a,c,l,u,h,d,f,g,p,m,v,y,_,C,w,E,b){"use strict";function S(...e){return String(e.reduce((e,t)=>e|t,0))}function x(e,t){const n=(e||[]).filter(e=>e.statisticName===t)[0];return n?n.value:0}function P(e,t){return e.files.filter(e=>e.assetType===t)[0]?{uri:`${e.assetUri}/${t}`,fallbackUri:`${e.fallbackAssetUri}/${t}`}:null}function k(e,t){const n=e.properties?e.properties.filter(e=>e.key===t):[],i=n.length>0&&n[0].value;return i?i.split(",").map(e=>l.adoptToGalleryExtensionId(e)):[]}function I(e){const t=e.properties?e.properties.filter(e=>e.key===R.Engine):[];return t.length>0&&t[0].value||""}function A(t,n,i,r,s){const o={manifest:P(n,L.Manifest),
readme:P(n,L.Details),changelog:P(n,L.Changelog),license:P(n,L.License),repository:function(e){if(e.properties){const t=e.properties.filter(e=>e.key===L.Repository),n=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?"),i=t.filter(e=>n.test(e.value))[0];return i?{uri:i.value,fallbackUri:i.value}:null}return P(e,L.Repository)}(n),download:function(e){return{uri:`${e.fallbackAssetUri}/${L.VSIX}?redirect=true`,fallbackUri:`${e.fallbackAssetUri}/${L.VSIX}`}}(n),icon:function(t){const n=P(t,L.Icon);if(n)return n;const i=e.toUrl("./media/defaultIcon.png");return{uri:i,fallbackUri:i}}(n),coreTranslations:function(e){return e.files.filter(e=>0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")).reduce((t,n)=>(t[n.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length)]=P(e,n.assetType),t),{})}(n)};return{identifier:{id:l.getGalleryExtensionId(t.publisher.publisherName,t.extensionName),uuid:t.extensionId},name:t.extensionName,version:n.version,date:n.lastUpdated,
displayName:t.displayName,publisherId:t.publisher.publisherId,publisher:t.publisher.publisherName,publisherDisplayName:t.publisher.displayName,description:t.shortDescription||"",installCount:x(t.statistics,"install")+x(t.statistics,"updateCount"),rating:x(t.statistics,"averagerating"),ratingCount:x(t.statistics,"ratingcount"),assets:o,properties:{dependencies:k(n,R.Dependency),extensionPack:k(n,R.ExtensionPack),engine:I(n),localizedLanguages:function(e){const t=e.properties?e.properties.filter(e=>e.key===R.LocalizedLanguages):[],n=t.length>0&&t[0].value||"";return n?n.split(","):[]}(n)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+i,searchText:r.searchText,querySource:s},preview:function(e){return-1!==e.indexOf("preview")}(t.flags)}}function O(e){const t=s.join(e.userDataPath,"machineid");return y.readFile(t,"utf8").then(e=>C.isUUID(e)?e:null,()=>null).then(e=>{if(!e){e=C.generateUuid();try{_.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":`VSCode ${g.default.version}`,
"User-Agent":`VSCode ${g.default.version}`,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0});var D;!function(e){e[e.None=0]="None",e[e.IncludeVersions=1]="IncludeVersions",e[e.IncludeFiles=2]="IncludeFiles",e[e.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",e[e.IncludeSharedAccounts=8]="IncludeSharedAccounts",e[e.IncludeVersionProperties=16]="IncludeVersionProperties",e[e.ExcludeNonValidated=32]="ExcludeNonValidated",e[e.IncludeInstallationTargets=64]="IncludeInstallationTargets",e[e.IncludeAssetUri=128]="IncludeAssetUri",e[e.IncludeStatistics=256]="IncludeStatistics",e[e.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",e[e.Unpublished=4096]="Unpublished"}(D||(D={}));var T;!function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(T||(T={}));const L={
Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},R={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages"},j={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:D.None,criteria:[],assetTypes:[]};class M{constructor(e=j){this.state=e}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}withPage(e,t=this.state.pageSize){
return new M(u.assign({},this.state,{pageNumber:e,pageSize:t}))}withFilter(e,...t){const n=[...this.state.criteria,...t.map(t=>({filterType:e,value:t}))];return new M(u.assign({},this.state,{criteria:n}))}withSortBy(e){return new M(u.assign({},this.state,{sortBy:e}))}withSortOrder(e){return new M(u.assign({},this.state,{sortOrder:e}))}withFlags(...e){return new M(u.assign({},this.state,{flags:e.reduce((e,t)=>e|t,0)}))}withAssetTypes(...e){return new M(u.assign({},this.state,{assetTypes:e}))}get raw(){const{criteria:e,pageNumber:t,pageSize:n,sortBy:i,sortOrder:r,flags:s,assetTypes:o}=this.state;return{filters:[{criteria:e,pageNumber:t,pageSize:n,sortBy:i,sortOrder:r}],assetTypes:o,flags:s}}get searchText(){const e=this.state.criteria.filter(e=>e.filterType===T.SearchText)[0];return e&&e.value?e.value:""}}let U=class e{constructor(e,t,n,i){this.requestService=e,this.logService=t,this.environmentService=n,this.telemetryService=i;const r=p.default.extensionsGallery;this.extensionsGalleryUrl=r&&r.serviceUrl,
this.extensionsControlUrl=r&&r.controlUrl,this.commonHeadersPromise=O(this.environmentService)}api(e=""){return`${this.extensionsGalleryUrl}${e}`}isEnabled(){return!!this.extensionsGalleryUrl}getCompatibleExtension(e,t){const n=c.isIExtensionIdentifier(e)?null:e;if(n&&n.properties.engine&&m.isEngineValid(n.properties.engine))return Promise.resolve(n);const{id:i,uuid:r}=n?n.identifier:e;let s=(new M).withFlags(D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties,D.ExcludeNonValidated).withPage(1,1).withFilter(T.Target,"Microsoft.VisualStudio.Code").withFilter(T.ExcludeWithFlags,S(D.Unpublished));return s=r?s.withFilter(T.ExtensionId,r):s.withFilter(T.ExtensionName,i),this.queryGallery(s,E.CancellationToken.None).then(({galleryExtensions:e})=>{const[n]=e;if(!n||!n.versions.length)return null;if(t){const e=n.versions.filter(e=>e.version===t)[0];if(e){const t=A(n,e,0,s);if(t.properties.engine&&m.isEngineValid(t.properties.engine))return t}return null}
return this.getLastValidExtensionVersion(n,n.versions).then(e=>e?A(n,e,0,s):null)})}query(e,t){const n=E.CancellationToken.isCancellationToken(e)?{}:e,i=E.CancellationToken.isCancellationToken(e)?e:t;if(!this.isEnabled())return Promise.reject(new Error("No extension gallery service configured."));const r=n.names?"ids":n.text?"text":"all";let s=n.text||"";const o=u.getOrDefault(n,e=>e.pageSize,50);this.telemetryService.publicLog("galleryService:query",{type:r,text:s});let c=(new M).withFlags(D.IncludeLatestVersionOnly,D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties).withPage(1,o).withFilter(T.Target,"Microsoft.VisualStudio.Code").withFilter(T.ExcludeWithFlags,S(D.Unpublished));return s?((s=(s=(s=s.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,n)=>(c=c.withFilter(T.Category,n||t),""))).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,n)=>(c=c.withFilter(T.Tag,n||t),""))).trim())&&(s=s.length<200?s:s.substring(0,200),c=c.withFilter(T.SearchText,s)),
c=c.withSortBy(0)):c=n.ids?c.withFilter(T.ExtensionId,...n.ids):n.names?c.withFilter(T.ExtensionName,...n.names):c.withSortBy(4),"number"==typeof n.sortBy&&(c=c.withSortBy(n.sortBy)),"number"==typeof n.sortOrder&&(c=c.withSortOrder(n.sortOrder)),this.queryGallery(c,i).then(({galleryExtensions:e,total:t})=>{return{firstPage:e.map((e,t)=>A(e,e.versions[0],t,c,n.source)),total:t,pageSize:c.pageSize,getPage:(e,t)=>{if(t.isCancellationRequested)return Promise.reject(a.canceled());const i=c.withPage(e+1);return this.queryGallery(i,t).then(({galleryExtensions:e})=>e.map((e,t)=>A(e,e.versions[0],t,i,n.source)))}}})}queryGallery(e,t){return this.isEnabled()?this.commonHeadersPromise.then(n=>{const i=JSON.stringify(e.raw),r=u.assign({},n,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":i.length});return this.requestService.request({type:"POST",url:this.api("/extensionquery"),data:i,headers:r
},t).then(e=>e.res.statusCode&&e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:f.asJson(e).then(e=>{if(e){const t=e.results[0],n=t.extensions,i=t.resultMetadata&&t.resultMetadata.filter(e=>"ResultCount"===e.metadataType)[0];return{galleryExtensions:n,total:i&&i.metadataItems.filter(e=>"TotalCount"===e.name)[0].count||0}}return{galleryExtensions:[],total:0}}))}):Promise.reject(new Error("No extension gallery service configured."))}reportStatistic(e,t,n,i){return this.isEnabled()?this.commonHeadersPromise.then(r=>{const s=Object.assign({},r,{Accept:"*/*;api-version=4.0-preview.1"});return this.requestService.request({type:"POST",url:this.api(`/publishers/${e}/extensions/${t}/${n}/stats?statType=${i}`),headers:s},E.CancellationToken.None).then(void 0,()=>void 0)}):Promise.resolve(void 0)}download(e,t){this.logService.trace("ExtensionGalleryService#download",e.identifier.id)
;const i=s.join(n.tmpdir(),C.generateUuid()),r=l.getGalleryExtensionTelemetryData(e),o=(new Date).getTime(),a=1===t?"install":2===t?"update":"",c=a?{uri:`${e.assets.download.uri}&${a}=true`,fallbackUri:`${e.assets.download.fallbackUri}?${a}=true`}:e.assets.download;return this.getAsset(c).then(e=>f.download(i,e)).then(()=>(e=>this.telemetryService.publicLog("galleryService:downloadVSIX",u.assign(r,{duration:e})))((new Date).getTime()-o)).then(()=>i)}getReadme(e,t){return e.assets.readme?this.getAsset(e.assets.readme,{},t).then(e=>f.asText(e)).then(e=>e||""):Promise.resolve("")}getManifest(e,t){return e.assets.manifest?this.getAsset(e.assets.manifest,{},t).then(f.asText).then(JSON.parse):Promise.resolve(null)}getCoreTranslation(e,t){const n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(f.asText).then(JSON.parse):Promise.resolve(null)}getChangelog(e,t){return e.assets.changelog?this.getAsset(e.assets.changelog,{},t).then(e=>f.asText(e)).then(e=>e||""):Promise.resolve("")}
loadAllDependencies(e,t){return this.getDependenciesReccursively(e.map(e=>e.id),[],t)}getAllVersions(e,t){let n=(new M).withFlags(D.IncludeVersions,D.IncludeFiles,D.IncludeVersionProperties,D.ExcludeNonValidated).withPage(1,1).withFilter(T.Target,"Microsoft.VisualStudio.Code").withFilter(T.ExcludeWithFlags,S(D.Unpublished));return n=e.identifier.uuid?n.withFilter(T.ExtensionId,e.identifier.uuid):n.withFilter(T.ExtensionName,e.identifier.id),this.queryGallery(n,E.CancellationToken.None).then(({galleryExtensions:e})=>e.length?t?Promise.all(e[0].versions.map(e=>this.getEngine(e).then(t=>m.isEngineValid(t)?e:null))).then(e=>e.filter(e=>!!e).map(e=>({version:e.version,date:e.lastUpdated}))):e[0].versions.map(e=>({version:e.version,date:e.lastUpdated})):[])}loadDependencies(e,t){if(!e||0===e.length)return Promise.resolve([])
;let n=(new M).withFlags(D.IncludeLatestVersionOnly,D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties).withPage(1,e.length).withFilter(T.Target,"Microsoft.VisualStudio.Code").withFilter(T.ExcludeWithFlags,S(D.Unpublished)).withAssetTypes(L.Icon,L.License,L.Details,L.Manifest,L.VSIX).withFilter(T.ExtensionName,...e);return this.queryGallery(n,t).then(e=>{const t=[],i=[];for(let r=0;r<e.galleryExtensions.length;r++){const s=e.galleryExtensions[r];-1===i.indexOf(s.extensionId)&&(t.push(A(s,s.versions[0],r,n,"dependencies")),i.push(s.extensionId))}return t})}getDependenciesReccursively(t,n,i){return t&&t.length&&(t=n.length?t.filter(t=>!e.hasExtensionByName(n,t)):t).length?this.loadDependencies(t,i).then(t=>{const r=new Set;for(const e of t)e.properties.dependencies&&e.properties.dependencies.forEach(e=>r.add(e));n=o.distinct(n.concat(t),e=>e.identifier.uuid);const s=[];return r.forEach(t=>!e.hasExtensionByName(n,t)&&s.push(t)),this.getDependenciesReccursively(s,n,i)
}):Promise.resolve(n)}getAsset(e,t={},n=E.CancellationToken.None){return this.commonHeadersPromise.then(i=>{const r=u.assign({},i,t.headers||{});t=u.assign({},t,{type:"GET"},{headers:r});const s=e.uri,o=e.fallbackUri,c=u.assign({},t,{url:s});return this.requestService.request(c,n).then(e=>200===e.res.statusCode?Promise.resolve(e):f.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`)))).then(void 0,e=>{if(a.isPromiseCanceledError(e))return Promise.reject(e);const i=a.getErrorMessage(e);this.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!0,message:i}),this.telemetryService.publicLog("galleryService:cdnFallback",{url:s,message:i});const r=u.assign({},t,{url:o});return this.requestService.request(r,n).then(void 0,e=>{if(a.isPromiseCanceledError(e))return Promise.reject(e);const t=a.getErrorMessage(e);return this.telemetryService.publicLog("galleryService:requestError",{url:o,cdn:!1,message:t}),Promise.reject(e)})})})}
getLastValidExtensionVersion(e,t){const n=this.getLastValidExtensionVersionFromProperties(e,t);return n||this.getLastValidExtensionVersionReccursively(e,t)}getLastValidExtensionVersionFromProperties(e,t){for(const e of t){const t=I(e);if(!t)return null;if(m.isEngineValid(t))return Promise.resolve(e)}return null}getEngine(e){const t=I(e);if(t)return Promise.resolve(t);const n=P(e,L.Manifest);if(!n)return Promise.reject("Manifest was not found");return this.getAsset(n,{headers:{"Accept-Encoding":"gzip"}}).then(e=>f.asJson(e)).then(e=>e?e.engines.vscode:Promise.reject("Error while reading manifest"))}getLastValidExtensionVersionReccursively(e,t){if(!t.length)return Promise.resolve(null);const n=t[0];return this.getEngine(n).then(i=>m.isEngineValid(i)?(n.properties=n.properties||[],n.properties.push({key:R.Engine,value:i}),n):this.getLastValidExtensionVersionReccursively(e,t.slice(1)))}static hasExtensionByName(e,t){for(const n of e)if(`${n.publisher}.${n.name}`===t)return!0;return!1}getExtensionsReport(){
return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl},E.CancellationToken.None).then(e=>200!==e.res.statusCode?Promise.reject(new Error("Could not get extensions report.")):f.asJson(e).then(e=>{const t=new Map;if(e)for(const n of e.malicious){const e=t.get(n)||{id:{id:n},malicious:!0,slow:!1};e.malicious=!0,t.set(n,e)}return Promise.resolve(w.values(t))})):Promise.resolve([]):Promise.reject(new Error("No extension gallery service configured."))}};U=i([r(0,h.IRequestService),r(1,b.ILogService),r(2,v.IEnvironmentService),r(3,d.ITelemetryService)],U),t.ExtensionGalleryService=U,t.resolveMarketplaceHeaders=O}),define(e[94],t([0,1,10,41,84,19,16]),function(e,t,n,s,o,a,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class{constructor(e,t){this.logService=t,this.disposables=[],this.configure(e.getValue()),e.onDidChangeConfiguration(()=>this.configure(e.getValue()),this,this.disposables)}configure(e){
this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=!(!e.http||!e.http.proxyStrictSSL),this.authorization=e.http&&e.http.proxyAuthorization}request(e,t,i=s.request){this.logService.trace("RequestService#request",e.url);const{proxyUrl:r,strictSSL:a}=this;return(e.agent?Promise.resolve(e.agent):Promise.resolve(o.getProxyAgent(e.url||"",{proxyUrl:r,strictSSL:a}))).then(r=>(e.agent=r,e.strictSSL=a,this.authorization&&(e.headers=n.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),i(e,t)))}};l=i([r(0,a.IConfigurationService),r(1,c.ILogService)],l),t.RequestService=l}),define(e[81],t([0,1,98,94,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.RequestService{request(e,n){return super.request(e,n,t.xhrRequest)}}t.RequestService=s,t.xhrRequest=((e,t)=>{const i=new XMLHttpRequest;return new Promise((s,o)=>{i.open(e.type||"GET",e.url||"",!0,e.user,e.password),function(e,t){if(t.headers)e:for(let n in t.headers){switch(n){case"User-Agent":
case"Accept-Encoding":case"Content-Length":continue e}e.setRequestHeader(n,t.headers[n])}}(i,e),i.responseType="arraybuffer",i.onerror=(e=>o(new Error(i.statusText&&"XHR failed: "+i.statusText))),i.onload=(e=>{s({res:{statusCode:i.status,headers:function(e){const t=Object.create(null);for(const n of e.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(n){const e=n.indexOf(":");t[n.substr(0,e).trim().toLowerCase()]=n.substr(e+1).trim()}return t}(i)},stream:new class extends n.Readable{constructor(e){super(),this._buffer=Buffer.from(new Uint8Array(e)),this._offset=0,this._length=this._buffer.length}_read(e){this._offset<this._length?(this.push(this._buffer.slice(this._offset,this._offset+e)),this._offset+=e):this.push(null)}}(i.response)})}),i.ontimeout=(t=>o(new Error(`XHR timeout: ${e.timeout}ms`))),e.timeout&&(i.timeout=e.timeout),i.send(e.data),t.onCancellationRequested(()=>{i.abort(),o(r.canceled())})})})}),
define(e[136],t([0,1,22,5,21,31,56,44,48,90,17,102,75,35,126,57,19,112,38,81,37,116,119,120,115,117,121,123,125,96,16,95,105,49,93,82,47,3,118,45,33,101,100,86,85,43]),function(e,t,i,r,s,o,a,c,l,u,h,d,f,g,p,m,v,y,_,C,w,E,b,S,x,P,k,I,A,O,D,T,L,R,j,M,U,F,N,z,B,W,$,q,V,H){"use strict";function G(e){!function(e){n(this,void 0,void 0,function*(){const t=yield new Promise(e=>{A.ipcRenderer.once("handshake:hey there",(t,n)=>e(n)),A.ipcRenderer.send("handshake:hello")});!function(e,t,n){const i=new c.ServiceCollection,r=[],a=()=>F.dispose(r);process.once("exit",a),A.ipcRenderer.once("handshake:goodbye",a),r.push(e);const G=new d.EnvironmentService(t.args,process.execPath),Q=new B.StaticRouter(e=>"main"===e),X=new T.LogLevelSetterChannelClient(e.getChannel("loglevel",Q)),Y=new T.FollowerLogService(X,O.createSpdLogService("sharedprocess",t.logLevel,G.logsPath));r.push(Y),Y.info("main",JSON.stringify(n)),i.set(h.IEnvironmentService,G),i.set(D.ILogService,Y),
i.set(v.IConfigurationService,new l.SyncDescriptor(y.ConfigurationService)),i.set(_.IRequestService,new l.SyncDescriptor(C.RequestService)),i.set(z.IDownloadService,new l.SyncDescriptor(N.DownloadService));const Z=new J(e,Q);i.set(H.IMainProcessService,Z);const ee=new I.WindowsService(Z);i.set(k.IWindowsService,ee);const te=new k.ActiveWindowManager(ee),ne=new B.StaticRouter(e=>te.getActiveClientId().then(t=>e===t)),ie=e.getChannel("dialog",ne);i.set(U.IDialogService,new M.DialogChannelClient(ie));const re=new u.InstantiationService(i);re.invokeFunction(i=>{const a=new c.ServiceCollection,u=i.get(h.IEnvironmentService),{appRoot:d,extensionsPath:v,extensionDevelopmentLocationURI:y,isBuilt:_,installSourcePath:C}=u,k=new T.FollowerLogService(X,O.createSpdLogService("telemetry",t.logLevel,u.logsPath));k.info("The below are logs for every telemetry event sent from VS Code once the log level is set to trace."),k.info("===========================================================");let I=E.NullAppender
;if(y||u.args["disable-telemetry"]||!s.default.enableTelemetry)a.set(w.ITelemetryService,E.NullTelemetryService);else{s.default.aiConfig&&s.default.aiConfig.asimovKey&&_&&(I=new P.AppInsightsAppender(K,null,s.default.aiConfig.asimovKey,k),r.push(I));const e={appender:E.combinedAppender(I,new E.LogAppender(Y)),commonProperties:b.resolveCommonProperties(s.default.commit,o.default.version,n.machineId,C),piiPaths:[d,v]};a.set(w.ITelemetryService,new l.SyncDescriptor(x.TelemetryService,[e]))}e.registerChannel("telemetryAppender",new S.TelemetryAppenderChannel(I)),a.set(g.IExtensionManagementService,new l.SyncDescriptor(p.ExtensionManagementService,[!1])),a.set(g.IExtensionGalleryService,new l.SyncDescriptor(m.ExtensionGalleryService)),a.set(R.ILocalizationsService,new l.SyncDescriptor(L.LocalizationsService));const A=re.createChild(a);A.invokeFunction(t=>{const n=t.get(g.IExtensionManagementService),i=new f.ExtensionManagementChannel(n,()=>null);e.registerChannel("extensions",i)
;const s=t.get(R.ILocalizationsService),o=new j.LocalizationsChannel(s);e.registerChannel("localizations",o),n.removeDeprecatedExtensions(),s.update(),r.push(F.combinedDisposable([A.createInstance(W.NodeCachedDataCleaner),A.createInstance($.LanguagePackCachedDataCleaner),A.createInstance(q.StorageDataCleaner),A.createInstance(V.LogsDataCleaner)])),r.push(n)})})}(yield function(e){function t(n){return a.serve(e).then(null,s=>!n||r.isWindows||"EADDRINUSE"!==s.code?Promise.reject(s):a.connect(e,"").then(e=>(e.dispose(),Promise.reject(new Error("There is an instance already running."))),n=>{try{i.unlinkSync(e)}catch(e){return Promise.reject(new Error("Error deleting the shared ipc hook."))}return t(!1)}))}return t(!0)}(t.sharedIPCHandle),t,e),A.ipcRenderer.send("handshake:im ready")})}(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.startup=G;const K="monacoworkbench";class J{constructor(e,t){this.server=e,this.mainRouter=t}getChannel(e){return this.server.getChannel(e,this.mainRouter)}registerChannel(e,t){
this.server.registerChannel(e,t)}}})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/51b0b28134d51361cf996d2f0a1c698247aeabd8/core/vs\code\electron-browser\sharedProcess\sharedProcessMain.js.map
