UNPKG

code-server

Version:

Run VS Code on a remote server.

26 lines (18 loc) • 1.24 MB
"use strict";/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/var ip=function(e,t){return ip=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},ip(e,t)};export function __extends(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ip(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}export var __assign=function(){return __assign=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}export function __decorate(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}export function __param(e,t){return function(r,i){t(r,i,e)}}export function __esDecorate(e,t,r,i,s,n){function o(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var a=i.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?i.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,i.name):{}),h,f=!1,p=r.length-1;p>=0;p--){var m={};for(var w in i)m[w]=w==="access"?{}:i[w];for(var w in i.access)m.access[w]=i.access[w];m.addInitializer=function(S){if(f)throw new TypeError("Cannot add initializers after decoration has completed");n.push(o(S||null))};var E=(0,r[p])(a==="accessor"?{get:u.get,set:u.set}:u[c],m);if(a==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(h=o(E.get))&&(u.get=h),(h=o(E.set))&&(u.set=h),(h=o(E.init))&&s.unshift(h)}else(h=o(E))&&(a==="field"?s.unshift(h):u[c]=h)}l&&Object.defineProperty(l,i.name,u),f=!0}export function __runInitializers(e,t,r){for(var i=arguments.length>2,s=0;s<t.length;s++)r=i?t[s].call(e,r):t[s].call(e);return i?r:void 0}export function __propKey(e){return typeof e=="symbol"?e:"".concat(e)}export function __setFunctionName(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}export function __metadata(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}export function __awaiter(e,t,r,i){function s(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(i.next(u))}catch(h){o(h)}}function c(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):s(u.value).then(a,c)}l((i=i.apply(e,t||[])).next())})}export function __generator(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(i=1,s&&(n=l[0]&2?s.return:l[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,l[1])).done)return n;switch(s=0,n&&(l=[l[0]&2,n.value]),l[0]){case 0:case 1:n=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,s=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){r.label=l[1];break}if(l[0]===6&&r.label<n[1]){r.label=n[1],n=l;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(l);break}n[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],s=0}finally{i=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,r,i){i===void 0&&(i=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,s)}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]};export function __exportStar(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&__createBinding(t,e,r)}export function __values(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}export function __read(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),s,n=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)n.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return n}export function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}export function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),s=0,t=0;t<r;t++)for(var n=arguments[t],o=0,a=n.length;o<a;o++,s++)i[s]=n[o];return i}export function __spreadArray(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,n;i<s;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}export function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}export function __asyncGenerator(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),s,n=[];return s={},a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(p){return function(m){return Promise.resolve(m).then(p,h)}}function a(p,m){i[p]&&(s[p]=function(w){return new Promise(function(E,S){n.push([p,w,E,S])>1||c(p,w)})},m&&(s[p]=m(s[p])))}function c(p,m){try{l(i[p](m))}catch(w){f(n[0][3],w)}}function l(p){p.value instanceof __await?Promise.resolve(p.value.v).then(u,h):f(n[0][2],p)}function u(p){c("next",p)}function h(p){c("throw",p)}function f(p,m){p(m),n.shift(),n.length&&c(n[0][0],n[0][1])}}export function __asyncDelegator(e){var t,r;return t={},i("next"),i("throw",function(s){throw s}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(s,n){t[s]=e[s]?function(o){return(r=!r)?{value:__await(e[s](o)),done:!1}:n?n(o):o}:n}}export function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(n){r[n]=e[n]&&function(o){return new Promise(function(a,c){o=e[n](o),s(a,c,o.done,o.value)})}}function s(n,o,a,c){Promise.resolve(c).then(function(l){n({value:l,done:a})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var y3=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};export function __importStar(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return y3(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)}export function __classPrivateFieldSet(e,t,r,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r}export function __classPrivateFieldIn(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}export function __addDisposableResource(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(s=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(n){return Promise.reject(n)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}var E3=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};export function __disposeResources(e){function t(i){e.error=e.hasError?new E3(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}function r(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(r,function(n){return t(n),r()})}catch(n){t(n)}}if(e.hasError)throw e.error}return r()}export default{__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__createBinding,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__addDisposableResource,__disposeResources};var nr=class{constructor(e){this.d=e,this.a=!1}get hasValue(){return this.a}get value(){if(!this.a)try{this.b=this.d()}catch(e){this.c=e}finally{this.a=!0}if(this.c)throw this.c;return this.b}get rawValue(){return this.b}},x3=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?_s.isErrorNoTelemetry(e)?new _s(e.message+` `+e.stack):new Error(e.message+` `+e.stack):e},0)}}addListener(e){return this.b.push(e),()=>{this.d(e)}}c(e){this.b.forEach(t=>{t(e)})}d(e){this.b.splice(this.b.indexOf(e),1)}setUnexpectedErrorHandler(e){this.a=e}getUnexpectedErrorHandler(){return this.a}onUnexpectedError(e){this.a(e),this.c(e)}onUnexpectedExternalError(e){this.a(e)}},Na=new x3;function sp(e){Na.setUnexpectedErrorHandler(e)}function Kl(e){Na.onUnexpectedError(e)}function _t(e){js(e)||Na.onUnexpectedError(e)}function Iw(e){js(e)||Na.onUnexpectedExternalError(e)}function ro(e){if(e instanceof Error){const{name:t,message:r,cause:i}=e,s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:s,noTelemetry:_s.isErrorNoTelemetry(e),cause:i?ro(i):void 0,code:e.code}}return e}function Dw(e){let t;return e.noTelemetry?t=new _s:(t=new Error,t.name=e.name),t.message=e.message,t.stack=e.stack,e.code&&(t.code=e.code),e.cause&&(t.cause=Dw(e.cause)),t}var eu="Canceled";function js(e){return e instanceof Ci?!0:e instanceof Error&&e.name===eu&&e.message===eu}var Ci=class extends Error{constructor(){super(eu),this.name=this.message}};function Pw(){const e=new Error(eu);return e.name=e.message,e}function xe(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function np(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}var Bs=class extends TypeError{constructor(e){super(e?`${e} is read-only and cannot be changed`:"Cannot change read-only property")}},k3=class extends Error{constructor(e){super("NotImplemented"),e&&(this.message=e)}},op=class extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}},_s=class ew extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof ew)return t;const r=new ew;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Ii=class Zx extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Zx.prototype)}};function S3(e,t,r=0,i=e.length){let s=r,n=i;for(;s<n;){const o=Math.floor((s+n)/2);t(e[o])?s=o+1:n=o}return s-1}var eM=class Kx{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(Kx.assertInvariants){if(this.d){for(const i of this.e)if(this.d(i)&&!t(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const r=S3(this.e,t,this.c);return this.c=r+1,r===-1?void 0:this.e[r]}};function li(e,t,r=(i,s)=>i===s){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;i++)if(!r(e[i],t[i]))return!1;return!0}function $3(e,t){const r=[];let i;for(const s of e.slice(0).sort(t))!i||t(i[0],s)!==0?(i=[s],r.push(i)):i.push(s);return r}function Aw(e,t,r){const i=[];function s(a,c,l){if(c===0&&l.length===0)return;const u=i[i.length-1];u&&u.start+u.deleteCount===a?(u.deleteCount+=c,u.toInsert.push(...l)):i.push({start:a,deleteCount:c,toInsert:l})}let n=0,o=0;for(;;){if(n===e.length){s(n,0,t.slice(o));break}if(o===t.length){s(n,e.length-n,[]);break}const a=e[n],c=t[o],l=r(a,c);l===0?(n+=1,o+=1):l<0?(s(n,1,[]),n+=1):l>0&&(s(n,0,[c]),o+=1)}return i}function C3(e,t,r){const i=Aw(e,t,r),s=[],n=[];for(const o of i)s.push(...e.slice(o.start,o.start+o.deleteCount)),n.push(...o.toInsert);return{removed:s,added:n}}function yt(e){return e.filter(t=>!!t)}function I3(e){let t=0;for(let r=0;r<e.length;r++)e[r]&&(e[t]=e[r],t+=1);e.length=t}function ap(e){return!Array.isArray(e)||e.length===0}function io(e){return Array.isArray(e)&&e.length>0}function so(e,t=r=>r){const r=new Set;return e.filter(i=>{const s=t(i);return r.has(s)?!1:(r.add(s),!0)})}function Tw(e,t){let r;if(typeof t=="number"){let i=t;r=()=>{const s=Math.sin(i++)*179426549;return s-Math.floor(s)}}else r=Math.random;for(let i=e.length-1;i>0;i-=1){const s=Math.floor(r()*(i+1)),n=e[i];e[i]=e[s],e[s]=n}}function cp(e,t){return Array.isArray(e)?e.map(t):t(e)}function Ur(e){return Array.isArray(e)?e:[e]}var lp;(function(e){function t(n){return n<0}e.isLessThan=t;function r(n){return n<=0}e.isLessThanOrEqual=r;function i(n){return n>0}e.isGreaterThan=i;function s(n){return n===0}e.isNeitherLessOrGreaterThan=s,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(lp||(lp={}));function D3(e,t){return(r,i)=>t(e(r),e(i))}var P3=(e,t)=>e-t,tM=class Bf{static{this.empty=new Bf(t=>{})}constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){const t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Bf(r=>this.iterate(i=>t(i)?r(i):!0))}map(t){return new Bf(r=>this.iterate(i=>r(t(i))))}some(t){let r=!1;return this.iterate(i=>(r=t(i),!r)),r}findFirst(t){let r;return this.iterate(i=>t(i)?(r=i,!1):!0),r}findLast(t){let r;return this.iterate(i=>(t(i)&&(r=i),!0)),r}findLastMaxBy(t){let r,i=!0;return this.iterate(s=>((i||lp.isGreaterThan(t(s,r)))&&(i=!1,r=s),!0)),r}},Rw;function Lw(e,t){const r=Object.create(null);for(const i of e){const s=t(i);let n=r[s];n||(n=r[s]=[]),n.push(i)}return r}function A3(e,t){const r=[],i=[];for(const s of e)t.has(s)||r.push(s);for(const s of t)e.has(s)||i.push(s);return{removed:r,added:i}}var rM=class{static{Rw=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[Rw]="SetWithKey";for(const r of e)this.add(r)}get size(){return this.a.size}add(e){const t=this.b(e);return this.a.set(t,e),this}delete(e){return this.a.delete(this.b(e))}has(e){return this.a.has(this.b(e))}*entries(){for(const e of this.a.values())yield[e,e]}keys(){return this.values()}*values(){for(const e of this.a.values())yield e}clear(){this.a.clear()}forEach(e,t){this.a.forEach(r=>e.call(t,r,r,this))}[Symbol.iterator](){return this.values()}},Nw,Fw,Mw;function T3(e,t,r){let i=e.get(t);return i===void 0&&(i=r,e.set(t,i)),i}var R3=class{constructor(e,t){this.uri=e,this.value=t}};function L3(e){return Array.isArray(e)}var Lt=class Bl{static{this.c=t=>t.toString()}constructor(t,r){if(this[Nw]="ResourceMap",t instanceof Bl)this.d=new Map(t.d),this.e=r??Bl.c;else if(L3(t)){this.d=new Map,this.e=r??Bl.c;for(const[i,s]of t)this.set(i,s)}else this.d=new Map,this.e=t??Bl.c}set(t,r){return this.d.set(this.e(t),new R3(t,r)),this}get(t){return this.d.get(this.e(t))?.value}has(t){return this.d.has(this.e(t))}get size(){return this.d.size}clear(){this.d.clear()}delete(t){return this.d.delete(this.e(t))}forEach(t,r){typeof r<"u"&&(t=t.bind(r));for(const[i,s]of this.d)t(s.value,s.uri,this)}*values(){for(const t of this.d.values())yield t.value}*keys(){for(const t of this.d.values())yield t.uri}*entries(){for(const t of this.d.values())yield[t.uri,t.value]}*[(Nw=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},Ow=class{constructor(e,t){this[Fw]="ResourceSet",!e||typeof e=="function"?this.c=new Lt(e):(this.c=new Lt(t),e.forEach(this.add,this))}get size(){return this.c.size}add(e){return this.c.set(e,e),this}clear(){this.c.clear()}delete(e){return this.c.delete(e)}forEach(e,t){this.c.forEach((r,i)=>e.call(t,i,i,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(Fw=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Uw;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(Uw||(Uw={}));var N3=class{constructor(){this[Mw]="LinkedMap",this.c=new Map,this.d=void 0,this.e=void 0,this.f=0,this.g=0}clear(){this.c.clear(),this.d=void 0,this.e=void 0,this.f=0,this.g++}isEmpty(){return!this.d&&!this.e}get size(){return this.f}get first(){return this.d?.value}get last(){return this.e?.value}has(e){return this.c.has(e)}get(e,t=0){const r=this.c.get(e);if(r)return t!==0&&this.n(r,t),r.value}set(e,t,r=0){let i=this.c.get(e);if(i)i.value=t,r!==0&&this.n(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case 0:this.l(i);break;case 1:this.k(i);break;case 2:this.l(i);break;default:this.l(i);break}this.c.set(e,i),this.f++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this.c.get(e);if(t)return this.c.delete(e),this.m(t),this.f--,t.value}shift(){if(!this.d&&!this.e)return;if(!this.d||!this.e)throw new Error("Invalid list");const e=this.d;return this.c.delete(e.key),this.m(e),this.f--,e.value}forEach(e,t){const r=this.g;let i=this.d;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this.g!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this.g;let r=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const e=this,t=this.g;let r=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this.g;let r=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(Mw=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}h(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.d,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.next,r--;this.d=t,this.f=r,t&&(t.previous=void 0),this.g++}j(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.e,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.previous,r--;this.e=t,this.f=r,t&&(t.next=void 0),this.g++}k(e){if(!this.d&&!this.e)this.e=e;else if(this.d)e.next=this.d,this.d.previous=e;else throw new Error("Invalid list");this.d=e,this.g++}l(e){if(!this.d&&!this.e)this.d=e;else if(this.e)e.previous=this.e,this.e.next=e;else throw new Error("Invalid list");this.e=e,this.g++}m(e){if(e===this.d&&e===this.e)this.d=void 0,this.e=void 0;else if(e===this.d){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this.d=e.next}else if(e===this.e){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this.e=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this.g++}n(e,t){if(!this.d||!this.e)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this.d)return;const r=e.next,i=e.previous;e===this.e?(i.next=void 0,this.e=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this.d,this.d.previous=e,this.d=e,this.g++}else if(t===2){if(e===this.e)return;const r=e.next,i=e.previous;e===this.d?(r.previous=void 0,this.d=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this.e,this.e.next=e,this.e=e,this.g++}}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}},F3=class extends N3{constructor(e,t=1){super(),this.o=e,this.p=Math.min(Math.max(0,t),1)}get limit(){return this.o}set limit(e){this.o=e,this.q()}get ratio(){return this.p}set ratio(e){this.p=Math.min(Math.max(0,e),1),this.q()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}q(){this.size>this.o&&this.r(Math.round(this.o*this.p))}},up=class extends F3{constructor(e,t=1){super(e,t)}r(e){this.h(e)}set(e,t){return super.set(e,t),this.q(),this}},Hw=class{constructor(){this.c=new Map}add(e,t){let r=this.c.get(e);r||(r=new Set,this.c.set(e,r)),r.add(t)}delete(e,t){const r=this.c.get(e);r&&(r.delete(t),r.size===0&&this.c.delete(e))}forEach(e,t){const r=this.c.get(e);r&&r.forEach(t)}get(e){const t=this.c.get(e);return t||new Set}};function hp(e,t){const r=this;let i=!1,s;return function(){if(i)return s;if(i=!0,t)try{s=e.apply(r,arguments)}finally{t()}else s=e.apply(r,arguments);return s}}function Kt(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function dp(e,t="Unreachable"){throw new Error(t)}function M3(e,t="unexpected state"){if(!e)throw typeof t=="string"?new Ii(`Assertion Failed: ${t}`):t}function jw(e){if(!e()){debugger;e(),_t(new Ii("Assertion Failed"))}}function Ne(e){return typeof e=="string"}function O3(e){return Array.isArray(e)&&e.every(t=>Ne(t))}function Et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function U3(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e=="object"&&e instanceof t}function Ws(e){return typeof e=="number"&&!isNaN(e)}function H3(e){return!!e&&typeof e[Symbol.iterator]=="function"}function Fa(e){return typeof e>"u"}function Hr(e){return!or(e)}function or(e){return Fa(e)||e===null}function Bw(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function no(e){return M3(e!=null,"Argument is `undefined` or `null`."),e}var j3=Object.prototype.hasOwnProperty;function _w(e){if(!Et(e))return!1;for(const t in e)if(j3.call(e,t))return!1;return!0}function B3(e){return typeof e=="function"}function _3(e,t){if(Ne(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(B3(t)){try{if(e instanceof t)return}catch{}if(!or(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var ar;(function(e){function t(R){return R&&typeof R=="object"&&typeof R[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function i(){return r}e.empty=i;function*s(R){yield R}e.single=s;function n(R){return t(R)?R:s(R)}e.wrap=n;function o(R){return R||r}e.from=o;function*a(R){for(let H=R.length-1;H>=0;H--)yield R[H]}e.reverse=a;function c(R){return!R||R[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(R){return R[Symbol.iterator]().next().value}e.first=l;function u(R,H){let Y=0;for(const Z of R)if(H(Z,Y++))return!0;return!1}e.some=u;function h(R,H){for(const Y of R)if(H(Y))return Y}e.find=h;function*f(R,H){for(const Y of R)H(Y)&&(yield Y)}e.filter=f;function*p(R,H){let Y=0;for(const Z of R)yield H(Z,Y++)}e.map=p;function*m(R,H){let Y=0;for(const Z of R)yield*H(Z,Y++)}e.flatMap=m;function*w(...R){for(const H of R)H3(H)?yield*H:yield H}e.concat=w;function E(R,H,Y){let Z=Y;for(const Q of R)Z=H(Z,Q);return Z}e.reduce=E;function S(R){let H=0;for(const Y of R)H++;return H}e.length=S;function*$(R,H,Y=R.length){for(H<-R.length&&(H=0),H<0&&(H+=R.length),Y<0?Y+=R.length:Y>R.length&&(Y=R.length);H<Y;H++)yield R[H]}e.slice=$;function D(R,H=Number.POSITIVE_INFINITY){const Y=[];if(H===0)return[Y,R];const Z=R[Symbol.iterator]();for(let Q=0;Q<H;Q++){const oe=Z.next();if(oe.done)return[Y,e.empty()];Y.push(oe.value)}return[Y,{[Symbol.iterator](){return Z}}]}e.consume=D;async function q(R){const H=[];for await(const Y of R)H.push(Y);return Promise.resolve(H)}e.asyncToArray=q})(ar||(ar={}));var W3=!1,oo=null,iM=class ek{constructor(){this.b=new Map}static{this.a=0}c(t){let r=this.b.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:ek.a++},this.b.set(t,r)),r}trackDisposable(t){const r=this.c(t);r.source||(r.source=new Error().stack)}setParent(t,r){const i=this.c(t);i.parent=r}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,r){const i=r.get(t);if(i)return i;const s=t.parent?this.f(this.c(t.parent),r):t;return r.set(t,s),s}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,i])=>i.source!==null&&!this.f(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,r){let i;if(r)i=r;else{const c=new Map,l=[...this.b.values()].filter(h=>h.source!==null&&!this.f(h,c).isSingleton);if(l.length===0)return;const u=new Set(l.map(h=>h.value));if(i=l.filter(h=>!(h.parent&&u.has(h.parent))),i.length===0)throw new Error("There are cyclic diposable chains!")}if(!i)return;function s(c){function l(h,f){for(;h.length>0&&f.some(p=>typeof p=="string"?p===h[0]:h[0].match(p));)h.shift()}const u=c.source.split(` `).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return l(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}const n=new Hw;for(const c of i){const l=s(c);for(let u=0;u<=l.length;u++)n.add(l.slice(0,u).join(` `),c)}i.sort(D3(c=>c.idx,P3));let o="",a=0;for(const c of i.slice(0,t)){a++;const l=s(c),u=[];for(let h=0;h<l.length;h++){let f=l[h];f=`(shared with ${n.get(l.slice(0,h+1).join(` `)).size}/${i.length} leaks) at ${f}`;const m=n.get(l.slice(0,h).join(` `)),w=Lw([...m].map(E=>s(E)[h]),E=>E);delete w[l[h]];for(const[E,S]of Object.entries(w))u.unshift(` - stacktraces of ${S.length} other leaks continue with ${E}`);u.unshift(f)}o+=` ==================== Leaking disposable ${a}/${i.length}: ${c.value.constructor.name} ==================== ${u.join(` `)} ============================================================ `}return i.length>t&&(o+=` ... and ${i.length-t} more leaking disposables `),{leaks:i,details:o}}};function z3(e){oo=e}if(W3){const e="__is_disposable_tracked__";z3(new class{trackDisposable(t){const r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==ue.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==ue.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function ao(e){return oo?.trackDisposable(e),e}function co(e){oo?.markAsDisposed(e)}function Ma(e,t){oo?.setParent(e,t)}function V3(e,t){if(oo)for(const r of e)oo.setParent(r,t)}function q3(e){return typeof e=="object"&&e!==null&&typeof e.dispose=="function"&&e.dispose.length===0}function as(e){if(ar.is(e)){const t=[];for(const r of e)if(r)try{r.dispose()}catch(i){t.push(i)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Ww(...e){const t=le(()=>as(e));return V3(e,t),t}function le(e){const t=ao({dispose:hp(()=>{co(t),e()})});return t}var de=class tk{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,ao(this)}dispose(){this.g||(co(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{as(this.f)}finally{this.f.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Ma(t,this),this.g?tk.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this.f.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this.f.delete(t),t.dispose()}}deleteAndLeak(t){t&&this.f.has(t)&&(this.f.delete(t),Ma(t,null))}},ue=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new de,ao(this),Ma(this.q,this)}dispose(){co(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},zs=class{constructor(){this.b=!1,ao(this)}get value(){return this.b?void 0:this.a}set value(e){this.b||e===this.a||(this.a?.dispose(),e&&Ma(e,this),this.a=e)}clear(){this.value=void 0}dispose(){this.b=!0,co(this),this.a?.dispose(),this.a=void 0}clearAndLeak(){const e=this.a;return this.a=void 0,e&&Ma(e,null),e}},tu=class{constructor(){this.a=new Map,this.b=!1,ao(this)}dispose(){co(this),this.b=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this.a.size)try{as(this.a.values())}finally{this.a.clear()}}has(e){return this.a.has(e)}get size(){return this.a.size}get(e){return this.a.get(e)}set(e,t,r=!1){this.b&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),r||this.a.get(e)?.dispose(),this.a.set(e,t)}deleteAndDispose(e){this.a.get(e)?.dispose(),this.a.delete(e)}deleteAndLeak(e){const t=this.a.get(e);return this.a.delete(e),t}keys(){return this.a.keys()}values(){return this.a.values()}[Symbol.iterator](){return this.a[Symbol.iterator]()}},ru=typeof Buffer<"u",G3=new nr(()=>new Uint8Array(256)),fp,pp,Se=class Wr{static alloc(t){return ru?new Wr(Buffer.allocUnsafe(t)):new Wr(new Uint8Array(t))}static wrap(t){return ru&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new Wr(t)}static fromString(t,r){return!(r?.dontUseNodeBuffer||!1)&&ru?new Wr(Buffer.from(t)):(fp||(fp=new TextEncoder),new Wr(fp.encode(t)))}static fromByteArray(t){const r=Wr.alloc(t.length);for(let i=0,s=t.length;i<s;i++)r.buffer[i]=t[i];return r}static concat(t,r){if(typeof r>"u"){r=0;for(let n=0,o=t.length;n<o;n++)r+=t[n].byteLength}const i=Wr.alloc(r);let s=0;for(let n=0,o=t.length;n<o;n++){const a=t[n];i.set(a,s),s+=a.byteLength}return i}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}clone(){const t=Wr.alloc(this.byteLength);return t.set(this),t}toString(){return ru?this.buffer.toString():(pp||(pp=new TextDecoder),pp.decode(this.buffer))}slice(t,r){return new Wr(this.buffer.subarray(t,r))}set(t,r){if(t instanceof Wr)this.buffer.set(t.buffer,r);else if(t instanceof Uint8Array)this.buffer.set(t,r);else if(t instanceof ArrayBuffer)this.buffer.set(new Uint8Array(t),r);else if(ArrayBuffer.isView(t))this.buffer.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r);else throw new Error("Unknown argument 'array'")}readUInt32BE(t){return iu(this.buffer,t)}writeUInt32BE(t,r){su(this.buffer,t,r)}readUInt32LE(t){return Y3(this.buffer,t)}writeUInt32LE(t,r){Z3(this.buffer,t,r)}readUInt8(t){return K3(this.buffer,t)}writeUInt8(t,r){eS(this.buffer,t,r)}indexOf(t,r=0){return J3(this.buffer,t instanceof Wr?t.buffer:t,r)}equals(t){return this===t?!0:this.byteLength!==t.byteLength?!1:this.buffer.every((r,i)=>r===t.buffer[i])}};function J3(e,t,r=0){const i=t.byteLength,s=e.byteLength;if(i===0)return 0;if(i===1)return e.indexOf(t[0]);if(i>s-r)return-1;const n=G3.value;n.fill(t.length);for(let l=0;l<t.length;l++)n[t[l]]=t.length-l-1;let o=r+t.length-1,a=o,c=-1;for(;o<s;)if(e[o]===t[a]){if(a===0){c=o;break}o--,a--}else o+=Math.max(t.length-a,n[e[o]]),a=t.length-1;return c}function X3(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function Q3(e,t,r){e[r+0]=t&255,t=t>>>8,e[r+1]=t&255}function iu(e,t){return e[t]*2**24+e[t+1]*2**16+e[t+2]*2**8+e[t+3]}function su(e,t,r){e[r+3]=t,t=t>>>8,e[r+2]=t,t=t>>>8,e[r+1]=t,t=t>>>8,e[r]=t}function Y3(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0|e[t+2]<<16>>>0|e[t+3]<<24>>>0}function Z3(e,t,r){e[r+0]=t&255,t=t>>>8,e[r+1]=t&255,t=t>>>8,e[r+2]=t&255,t=t>>>8,e[r+3]=t&255}function K3(e,t){return e[t]}function eS(e,t,r){e[r]=t}function nu(e){let t=0,r=0,i=0;const s=new Uint8Array(Math.floor(e.length/4*3)),n=a=>{switch(r){case 3:s[i++]=t|a,r=0;break;case 2:s[i++]=t|a>>>2,t=a<<6,r=3;break;case 1:s[i++]=t|a>>>4,t=a<<4,r=2;break;default:t=a<<2,r=1}};for(let a=0;a<e.length;a++){const c=e.charCodeAt(a);if(c>=65&&c<=90)n(c-65);else if(c>=97&&c<=122)n(c-97+26);else if(c>=48&&c<=57)n(c-48+52);else if(c===43||c===45)n(62);else if(c===47||c===95)n(63);else{if(c===61)break;throw new SyntaxError(`Unexpected base64 character ${e[a]}`)}}const o=i;for(;r>0;)n(0);return Se.wrap(s).slice(0,o)}var tS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function gp({buffer:e},t=!0,r=!1){const i=r?rS:tS;let s="";const n=e.byteLength%3;let o=0;for(;o<e.byteLength-n;o+=3){const a=e[o+0],c=e[o+1],l=e[o+2];s+=i[a>>>2],s+=i[(a<<4|c>>>4)&63],s+=i[(c<<2|l>>>6)&63],s+=i[l&63]}if(n===1){const a=e[o+0];s+=i[a>>>2],s+=i[a<<4&63],t&&(s+="==")}else if(n===2){const a=e[o+0],c=e[o+1];s+=i[a>>>2],s+=i[(a<<4|c>>>4)&63],s+=i[c<<2&63],t&&(s+="=")}return s}var ft=class _f{static{this.Undefined=new _f(void 0)}constructor(t){this.element=t,this.next=_f.Undefined,this.prev=_f.Undefined}},Oa=class{constructor(){this.a=ft.Undefined,this.b=ft.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===ft.Undefined}clear(){let e=this.a;for(;e!==ft.Undefined;){const t=e.next;e.prev=ft.Undefined,e.next=ft.Undefined,e=t}this.a=ft.Undefined,this.b=ft.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const r=new ft(e);if(this.a===ft.Undefined)this.a=r,this.b=r;else if(t){const s=this.b;this.b=r,r.prev=s,s.next=r}else{const s=this.a;this.a=r,r.next=s,s.prev=r}this.c+=1;let i=!1;return()=>{i||(i=!0,this.e(r))}}shift(){if(this.a!==ft.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==ft.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==ft.Undefined&&e.next!==ft.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ft.Undefined&&e.next===ft.Undefined?(this.a=ft.Undefined,this.b=ft.Undefined):e.next===ft.Undefined?(this.b=this.b.prev,this.b.next=ft.Undefined):e.prev===ft.Undefined&&(this.a=this.a.next,this.a.prev=ft.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==ft.Undefined;)yield e.element,e=e.next}},iS=globalThis.performance&&typeof globalThis.performance.now=="function",Vs=class rk{static create(t){return new rk(t)}constructor(t){this.c=iS&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this.a=this.c(),this.b=-1}stop(){this.b=this.c()}reset(){this.a=this.c(),this.b=-1}elapsed(){return this.b!==-1?this.b-this.a:this.c()-this.a}},zw=!1,sS=!1,pt;(function(e){e.None=()=>ue.None;function t(j){if(sS){const{onDidAddListener:U}=j,X=mp.create();let z=0;j.onDidAddListener=()=>{++z===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),X.print()),U?.()}}}function r(j,U){return p(j,()=>{},0,void 0,!0,void 0,U)}e.defer=r;function i(j){return(U,X=null,z)=>{let J=!1,pe;return pe=j(Ie=>{if(!J)return pe?pe.dispose():J=!0,U.call(X,Ie)},null,z),J&&pe.dispose(),pe}}e.once=i;function s(j,U){return e.once(e.filter(j,U))}e.onceIf=s;function n(j,U,X){return h((z,J=null,pe)=>j(Ie=>z.call(J,U(Ie)),null,pe),X)}e.map=n;function o(j,U,X){return h((z,J=null,pe)=>j(Ie=>{U(Ie),z.call(J,Ie)},null,pe),X)}e.forEach=o;function a(j,U,X){return h((z,J=null,pe)=>j(Ie=>U(Ie)&&z.call(J,Ie),null,pe),X)}e.filter=a;function c(j){return j}e.signal=c;function l(...j){return(U,X=null,z)=>{const J=Ww(...j.map(pe=>pe(Ie=>U.call(X,Ie))));return f(J,z)}}e.any=l;function u(j,U,X,z){let J=X;return n(j,pe=>(J=U(J,pe),J),z)}e.reduce=u;function h(j,U){let X;const z={onWillAddFirstListener(){X=j(J.fire,J)},onDidRemoveLastListener(){X?.dispose()}};U||t(z);const J=new I(z);return U?.add(J),J.event}function f(j,U){return U instanceof Array?U.push(j):U&&U.add(j),j}function p(j,U,X=100,z=!1,J=!1,pe,Ie){let be,ze,Pt,ct=0,Mt;const Yt={leakWarningThreshold:pe,onWillAddFirstListener(){be=j(Si=>{ct++,ze=U(ze,Si),z&&!Pt&&(et.fire(ze),ze=void 0),Mt=()=>{const Zn=ze;ze=void 0,Pt=void 0,(!z||ct>1)&&et.fire(Zn),ct=0},typeof X=="number"?(clearTimeout(Pt),Pt=setTimeout(Mt,X)):Pt===void 0&&(Pt=0,queueMicrotask(Mt))})},onWillRemoveListener(){J&&ct>0&&Mt?.()},onDidRemoveLastListener(){Mt=void 0,be.dispose()}};Ie||t(Yt);const et=new I(Yt);return Ie?.add(et),et.event}e.debounce=p;function m(j,U=0,X){return e.debounce(j,(z,J)=>z?(z.push(J),z):[J],U,void 0,!0,void 0,X)}e.accumulate=m;function w(j,U=(z,J)=>z===J,X){let z=!0,J;return a(j,pe=>{const Ie=z||!U(pe,J);return z=!1,J=pe,Ie},X)}e.latch=w;function E(j,U,X){return[e.filter(j,U,X),e.filter(j,z=>!U(z),X)]}e.split=E;function S(j,U=!1,X=[],z){let J=X.slice(),pe=j(ze=>{J?J.push(ze):be.fire(ze)});z&&z.add(pe);const Ie=()=>{J?.forEach(ze=>be.fire(ze)),J=null},be=new I({onWillAddFirstListener(){pe||(pe=j(ze=>be.fire(ze)),z&&z.add(pe))},onDidAddFirstListener(){J&&(U?setTimeout(Ie):Ie())},onDidRemoveLastListener(){pe&&pe.dispose(),pe=null}});return z&&z.add(be),be.event}e.buffer=S;function $(j,U){return(z,J,pe)=>{const Ie=U(new q);return j(function(be){const ze=Ie.evaluate(be);ze!==D&&z.call(J,ze)},void 0,pe)}}e.chain=$;const D=Symbol("HaltChainable");class q{constructor(){this.f=[]}map(U){return this.f.push(U),this}forEach(U){return this.f.push(X=>(U(X),X)),this}filter(U){return this.f.push(X=>U(X)?X:D),this}reduce(U,X){let z=X;return this.f.push(J=>(z=U(z,J),z)),this}latch(U=(X,z)=>X===z){let X=!0,z;return this.f.push(J=>{const pe=X||!U(J,z);return X=!1,z=J,pe?J:D}),this}evaluate(U){for(const X of this.f)if(U=X(U),U===D)break;return U}}function R(j,U,X=z=>z){const z=(...be)=>Ie.fire(X(...be)),J=()=>j.on(U,z),pe=()=>j.removeListener(U,z),Ie=new I({onWillAddFirstListener:J,onDidRemoveLastListener:pe});return Ie.event}e.fromNodeEventEmitter=R;function H(j,U,X=z=>z){const z=(...be)=>Ie.fire(X(...be)),J=()=>j.addEventListener(U,z),pe=()=>j.removeEventListener(U,z),Ie=new I({onWillAddFirstListener:J,onDidRemoveLastListener:pe});return Ie.event}e.fromDOMEventEmitter=H;function Y(j,U){return new Promise(X=>i(j)(X,null,U))}e.toPromise=Y;function Z(j){const U=new I;return j.then(X=>{U.fire(X)},()=>{U.fire(void 0)}).finally(()=>{U.dispose()}),U.event}e.fromPromise=Z;function Q(j,U){return j(X=>U.fire(X))}e.forward=Q;function oe(j,U,X){return U(X),j(z=>U(z))}e.runAndSubscribe=oe;class je{constructor(U,X){this._observable=U,this.f=0,this.g=!1;const z={onWillAddFirstListener:()=>{U.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{U.removeObserver(this)}};X||t(z),this.emitter=new I(z),X&&X.add(this.emitter)}beginUpdate(U){this.f++}handlePossibleChange(U){}handleChange(U,X){this.g=!0}endUpdate(U){this.f--,this.f===0&&(this._observable.reportChanges(),this.g&&(this.g=!1,this.emitter.fire(this._observable.get())))}}function ke(j,U){return new je(j,U).emitter.event}e.fromObservable=ke;function lt(j){return(U,X,z)=>{let J=0,pe=!1;const Ie={beginUpdate(){J++},endUpdate(){J--,J===0&&(j.reportChanges(),pe&&(pe=!1,U.call(X)))},handlePossibleChange(){},handleChange(){pe=!0}};j.addObserver(Ie),j.reportChanges();const be={dispose(){j.removeObserver(Ie)}};return z instanceof de?z.add(be):Array.isArray(z)&&z.push(be),be}}e.fromObservableLight=lt})(pt||(pt={}));var nS=class tw{static{this.all=new Set}static{this.f=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${tw.f++}`,tw.all.add(this)}start(t){this.g=new Vs,this.listenerCount=t}stop(){if(this.g){const t=this.g.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this.g=void 0}}},Vw=-1,oS=class ik{static{this.f=1}constructor(t,r,i=(ik.f++).toString(16).padStart(3,"0")){this.j=t,this.threshold=r,this.name=i,this.h=0}dispose(){this.g?.clear()}check(t,r){const i=this.threshold;if(i<=0||r<i)return;this.g||(this.g=new Map);const s=this.g.get(t.value)||0;if(this.g.set(t.value,s+1),this.h-=1,this.h<=0){this.h=i*.5;const[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);const c=new aS(a,n);this.j(c)}return()=>{const n=this.g.get(t.value)||0;this.g.set(t.value,n-1)}}getMostFrequentStack(){if(!this.g)return;let t,r=0;for(const[i,s]of this.g)(!t||r<s)&&(t=[i,s],r=s);return t}},mp=class sk{static create(){const t=new Error;return new sk(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}},aS=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},cS=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},lS=0,ou=class{constructor(e){this.value=e,this.id=lS++}},uS=2,qw=(e,t)=>{if(e instanceof ou)t(e);else for(let r=0;r<e.length;r++){const i=e[r];i&&t(i)}},I=class{constructor(e){this.z=0,this.f=e,this.g=Vw>0||this.f?.leakWarningThreshold?new oS(e?.onListenerError??_t,this.f?.leakWarningThreshold??Vw):void 0,this.j=this.f?._profName?new nS(this.f._profName):void 0,this.w=this.f?.deliveryQueue}dispose(){if(!this.m){if(this.m=!0,this.w?.current===this&&this.w.reset(),this.u){if(zw){const e=this.u;queueMicrotask(()=>{qw(e,t=>t.stack?.print())})}this.u=void 0,this.z=0}this.f?.onDidRemoveLastListener?.(),this.g?.dispose()}}get event(){return this.q??=(e,t,r)=>{if(this.g&&this.z>this.g.threshold**2){const a=`[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`;console.warn(a);const c=this.g.getMostFrequentStack()??["UNKNOWN stack",-1],l=new cS(`${a}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0]);return(this.f?.onListenerError||_t)(l),ue.None}if(this.m)return ue.None;t&&(e=e.bind(t));const i=new ou(e);let s,n;this.g&&this.z>=Math.ceil(this.g.threshold*.2)&&(i.stack=mp.create(),s=this.g.check(i.stack,this.z+1)),zw&&(i.stack=n??mp.create()),this.u?this.u instanceof ou?(this.w??=new hS,this.u=[this.u,i]):this.u.push(i):(this.f?.onWillAddFirstListener?.(this),this.u=i,this.f?.onDidAddFirstListener?.(this)),this.f?.onDidAddListener?.(this),this.z++;const o=le(()=>{s?.(),this.A(i)});return r instanceof de?r.add(o):Array.isArray(r)&&r.push(o),o},this.q}A(e){if(this.f?.onWillRemoveListener?.(this),!this.u)return;if(this.z===1){this.u=void 0,this.f?.onDidRemoveLastListener?.(this),this.z=0;return}const t=this.u,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this.m),console.log("size?",this.z),console.log("arr?",JSON.stringify(this.u)),new Error("Attempted to dispose unknown listener");this.z--,t[r]=void 0;const i=this.w.current===this;if(this.z*uS<=t.length){let s=0;for(let n=0;n<t.length;n++)t[n]?t[s++]=t[n]:i&&s<this.w.end&&(this.w.end--,s<this.w.i&&this.w.i--);t.length=s}}B(e,t){if(!e)return;const r=this.f?.onListenerError||_t;if(!r){e.value(t);return}try{e.value(t)}catch(i){r(i)}}C(e){const t=e.current.u;for(;e.i<e.end;)this.B(t[e.i++],e.value);e.reset()}fire(e){if(this.w?.current&&(this.C(this.w),this.j?.stop()),this.j?.start(this.z),this.u)if(this.u instanceof ou)this.B(this.u,e);else{const t=this.w;t.enqueue(this,e,this.u.length),this.C(t)}this.j?.stop()}hasListeners(){return this.z>0}},hS=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Ua=class extends I{async fireAsync(e,t,r){if(this.u)for(this.h||(this.h=new Oa),qw(this.u,i=>this.h.push([i.value,e]));this.h.size>0&&!t.isCancellationRequested;){const[i,s]=this.h.shift(),n=[],o={...s,token:t,waitUntil:a=>{if(Object.isFrozen(n))throw new Error("waitUntil can NOT be called asynchronous");r&&(a=r(a,i)),n.push(a)}};try{i(o)}catch(a){_t(a);continue}Object.freeze(n),await Promise.allSettled(n).then(a=>{for(const c of a)c.status==="rejected"&&_t(c.reason)})}}},dS=class extends I{get isPaused(){return this.h!==0}constructor(e){super(e),this.h=0,this.s=new Oa,this.t=e?.merge}pause(){this.h++}resume(){if(this.h!==0&&--this.h===0)if(this.t){if(this.s.size>0){const e=Array.from(this.s);this.s.clear(),super.fire(this.t(e))}}else for(;!this.h&&this.s.size!==0;)super.fire(this.s.shift())}fire(e){this.z&&(this.h!==0?this.s.push(e):super.fire(e))}},fS=class extends dS{constructor(e){super(e),this.k=e.delay??100}fire(e){this.o||(this.pause(),this.o=setTimeout(()=>{this.o=void 0,this.resume()},this.k)),super.fire(e)}},Ha;(function(e){e[e.Desktop=1]="Desktop",e[e.Web=2]="Web"})(Ha||(Ha={}));var Gw;(function(e){e[e.VersionMismatch=55]="VersionMismatch",e[e.UnexpectedError=81]="UnexpectedError"})(Gw||(Gw={}));var Jw;(function(e){e[e.Initialized=0]="Initialized",e[e.Ready=1]="Ready",e[e.Terminate=2]="Terminate"})(Jw||(Jw={}));function Xw(e){const t=Se.alloc(1);switch(e){case 0:t.writeUInt8(1,0);break;case 1:t.writeUInt8(2,0);break;case 2:t.writeUInt8(3,0);break}return t}function pS(e,t){if(e.byteLength!==1)return!1;switch(e.readUInt8(0)){case 1:return t===0;case 2:return t===1;case 3:return t===2;default:return!1}}var Qw;(function(e){e.Start="START_NATIVE_LOG",e.End="END_NATIVE_LOG"})(Qw||(Qw={}));function vp(e){const t=[];typeof e=="number"&&t.push("code/timeOrigin",e);function r(s,n){t.push(s,n?.startTime??Date.now())}function i(){const s=[];for(let n=0;n<t.length;n+=2)s.push({name:t[n],startTime:t[n+1]});return s}return{mark:r,getMarks:i}}function gS(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?vp():{mark(e,t){performance.mark(e,t)},getMarks(){let e=performance.timeOrigin;typeof e!="number"&&(e=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const t=[{name:"code/timeOrigin",startTime:Math.round(e)}];for(const r of performance.getEntriesByType("mark"))t.push({name:r.name,startTime:Math.round(e+r.startTime)});return t}};if(typeof process=="object"){const e=performance?.timeOrigin;return vp(e)}else return console.trace("perf-util loaded in UNKNOWN environment"),vp()}function mS(e){return e.MonacoPerformanceMarks||(e.MonacoPerformanceMarks=gS()),e.MonacoPerformanceMarks}var Yw=mS(globalThis),Ar=Yw.mark,vS=Yw.getMarks;function wS(){return globalThis._VSCODE_NLS_MESSAGES}function Zw(){return globalThis._VSCODE_NLS_LANGUAGE}var bS=Zw()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function au(e,t){let r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,(i,s)=>{const n=s[0],o=t[n];let a=i;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),bS&&(r="\uFF3B"+r.replace(/[aouei]/g,"$&$&")+"\uFF3D"),r}function d(e,t,...r){return au(typeof e=="number"?Kw(e,t):t,r)}function Kw(e,t){const r=wS()?.[e];if(typeof r!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return r}function wp(e,t,...r){let i;typeof e=="number"?i=Kw(e,t):i=t;const s=au(i,r);return{value:s,original:t===i?s:au(t,r)}}var cs="en",ja=!1,Ba=!1,_a=!1,yS=!1,eb=!1,bp=!1,ES=!1,tb=!1,rb=!1,xS=!1,cu=void 0,lu=cs,ib=cs,kS=void 0,Di=void 0,Pi=globalThis,Tr=void 0;typeof Pi.vscode<"u"&&typeof Pi.vscode.process<"u"?Tr=Pi.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Tr=process);var sb=typeof Tr?.versions?.electron=="string",SS=sb&&Tr?.type==="renderer";if(typeof Tr=="object"){ja=Tr.platform==="win32",Ba=Tr.platform==="darwin",_a=Tr.platform==="linux",yS=_a&&!!Tr.env.SNAP&&!!Tr.env.SNAP_REVISION,ES=sb,rb=!!Tr.env.CI||!!Tr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,cu=cs,lu=cs;const e=Tr.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);cu=t.userLocale,ib=t.osLocale,lu=t.resolvedLanguage||cs,kS=t.languagePack?.translationsConfigFile}catch{}eb=!0}else typeof navigator=="object"&&!SS?(Di=navigator.userAgent,ja=Di.indexOf("Windows")>=0,Ba=Di.indexOf("Macintosh")>=0,tb=(Di.indexOf("Macintosh")>=0||Di.indexOf("iPad")>=0||Di.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_a=Di.indexOf("Linux")>=0,xS=Di?.indexOf("Mobi")>=0,bp=!0,lu=Zw()||cs,cu=navigator.language.toLowerCase(),ib=cu):console.error("Unable to resolve platform.");var nb;(function(e){e[e.W