UNPKG

code-server

Version:

Run VS Code on a remote server.

24 lines (16 loc) • 142 kB
"use strict";/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/var V1=function(e,t){return V1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},V1(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");V1(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,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}export function __decorate(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}export function __param(e,t){return function(r,n){t(r,n,e)}}export function __esDecorate(e,t,r,n,i,s){function o(q){if(q!==void 0&&typeof q!="function")throw new TypeError("Function expected");return q}for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",a=!t&&e?n.static?e:e.prototype:null,f=t||(a?Object.getOwnPropertyDescriptor(a,n.name):{}),c,m=!1,w=r.length-1;w>=0;w--){var C={};for(var x in n)C[x]=x==="access"?{}:n[x];for(var x in n.access)C.access[x]=n.access[x];C.addInitializer=function(q){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(q||null))};var P=(0,r[w])(l==="accessor"?{get:f.get,set:f.set}:f[u],C);if(l==="accessor"){if(P===void 0)continue;if(P===null||typeof P!="object")throw new TypeError("Object expected");(c=o(P.get))&&(f.get=c),(c=o(P.set))&&(f.set=c),(c=o(P.init))&&i.unshift(c)}else(c=o(P))&&(l==="field"?i.unshift(c):f[u]=c)}a&&Object.defineProperty(a,n.name,f),m=!0}export function __runInitializers(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?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,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(f){try{a(n.next(f))}catch(c){o(c)}}function u(f){try{a(n.throw(f))}catch(c){o(c)}}function a(f){f.done?s(f.value):i(f.value).then(l,u)}a((n=n.apply(e,t||[])).next())})}export function __generator(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(f){return u([a,f])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=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],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],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 n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}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 n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],o=0,l=s.length;o<l;o++,i++)n[i]=s[o];return n}export function __spreadArray(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||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 n=r.apply(e,t||[]),i,s=[];return i={},l("next"),l("throw"),l("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(w){return function(C){return Promise.resolve(C).then(w,c)}}function l(w,C){n[w]&&(i[w]=function(x){return new Promise(function(P,q){s.push([w,x,P,q])>1||u(w,x)})},C&&(i[w]=C(i[w])))}function u(w,C){try{a(n[w](C))}catch(x){m(s[0][3],x)}}function a(w){w.value instanceof __await?Promise.resolve(w.value.v).then(f,c):m(s[0][2],w)}function f(w){u("next",w)}function c(w){u("throw",w)}function m(w,C){w(C),s.shift(),s.length&&u(s[0][0],s[0][1])}}export function __asyncDelegator(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{value:__await(e[i](o)),done:!1}:s?s(o):o}:s}}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={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(l,u){o=e[s](o),i(l,u,o.done,o.value)})}}function i(s,o,l,u){Promise.resolve(u).then(function(a){s({value:a,done:l})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var $t=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 $t(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}export function __classPrivateFieldSet(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.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 n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Et=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};export function __disposeResources(e){function t(n){e.error=e.hasError?new Et(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return t(s),r()})}catch(s){t(s)}}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};function me(){return globalThis._VSCODE_NLS_LANGUAGE}var Or=me()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0,c1="en",$1=!1,E1=!1,v1=!1,_t=!1,ve=!1,H1=!1,xt=!1,St=!1,Pt=!1,Ot=!1,_1=void 0,x1=c1,ge=c1,kt=void 0,Q=void 0,X=globalThis,V=void 0;typeof X.vscode<"u"&&typeof X.vscode.process<"u"?V=X.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(V=process);var be=typeof V?.versions?.electron=="string",Rt=be&&V?.type==="renderer";if(typeof V=="object"){$1=V.platform==="win32",E1=V.platform==="darwin",v1=V.platform==="linux",_t=v1&&!!V.env.SNAP&&!!V.env.SNAP_REVISION,xt=be,Pt=!!V.env.CI||!!V.env.BUILD_ARTIFACTSTAGINGDIRECTORY,_1=c1,x1=c1;const e=V.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);_1=t.userLocale,ge=t.osLocale,x1=t.resolvedLanguage||c1,kt=t.languagePack?.translationsConfigFile}catch{}ve=!0}else typeof navigator=="object"&&!Rt?(Q=navigator.userAgent,$1=Q.indexOf("Windows")>=0,E1=Q.indexOf("Macintosh")>=0,St=(Q.indexOf("Macintosh")>=0||Q.indexOf("iPad")>=0||Q.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,v1=Q.indexOf("Linux")>=0,Ot=Q?.indexOf("Mobi")>=0,H1=!0,x1=me()||c1,_1=navigator.language.toLowerCase(),ge=_1):console.error("Unable to resolve platform.");var pe;(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(pe||(pe={}));var B1=0;E1?B1=1:$1?B1=3:v1&&(B1=2);var i1=$1,Mt=E1,Tt=v1,jt=ve,we=H1,It=H1&&typeof X.importScripts=="function",Ut=It?X.origin:void 0,J=Q,r1=x1,ye;(function(e){function t(){return r1}e.value=t;function r(){return r1.length===2?r1==="en":r1.length>=3?r1[0]==="e"&&r1[1]==="n"&&r1[2]==="-":!1}e.isDefaultVariant=r;function n(){return r1==="en"}e.isDefault=n})(ye||(ye={}));var qt=typeof X.postMessage=="function"&&!X.importScripts,Dt=(()=>{if(qt){const e=[];X.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){const s=e[n];if(s.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),s.callback();return}}});let t=0;return r=>{const n=++t;e.push({id:n,callback:r}),X.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Ce;(function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"})(Ce||(Ce={}));var zt=!!(J&&J.indexOf("Chrome")>=0),kr=!!(J&&J.indexOf("Firefox")>=0),Rr=!!(!zt&&J&&J.indexOf("Safari")>=0),Mr=!!(J&&J.indexOf("Edg/")>=0),Tr=!!(J&&J.indexOf("Android")>=0),s1,K1=globalThis.vscode;if(typeof K1<"u"&&typeof K1.process<"u"){const e=K1.process;s1={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?s1={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:s1={get platform(){return i1?"win32":Mt?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var S1=s1.cwd,Wt=s1.env,Ft=s1.platform,jr=s1.arch,Vt=65,Ht=97,Bt=90,Kt=122,o1=46,U=47,W=92,G=58,Jt=63,Le=class extends Error{constructor(e,t,r){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const i=e.indexOf(".")!==-1?"property":"argument";let s=`The "${e}" ${i} ${n} of type ${t}`;s+=`. Received type ${typeof r}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function Zt(e,t){if(e===null||typeof e!="object")throw new Le(t,"Object",e)}function k(e,t){if(typeof e!="string")throw new Le(t,"string",e)}var F=Ft==="win32";function y(e){return e===U||e===W}function J1(e){return e===U}function Y(e){return e>=Vt&&e<=Bt||e>=Ht&&e<=Kt}function P1(e,t,r,n){let i="",s=0,o=-1,l=0,u=0;for(let a=0;a<=e.length;++a){if(a<e.length)u=e.charCodeAt(a);else{if(n(u))break;u=U}if(n(u)){if(!(o===a-1||l===1))if(l===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==o1||i.charCodeAt(i.length-2)!==o1){if(i.length>2){const f=i.lastIndexOf(r);f===-1?(i="",s=0):(i=i.slice(0,f),s=i.length-1-i.lastIndexOf(r)),o=a,l=0;continue}else if(i.length!==0){i="",s=0,o=a,l=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(o+1,a)}`:i=e.slice(o+1,a),s=a-o-1;o=a,l=0}else u===o1&&l!==-1?++l:l=-1}return i}function Qt(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Ae(e,t){Zt(t,"pathObject");const r=t.dir||t.root,n=t.base||`${t.name||""}${Qt(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}var R={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],k(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=S1():(s=Wt[`=${t}`]||S1(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===W)&&(s=`${t}\\`));const o=s.length;let l=0,u="",a=!1;const f=s.charCodeAt(0);if(o===1)y(f)&&(l=1,a=!0);else if(y(f))if(a=!0,y(s.charCodeAt(1))){let c=2,m=c;for(;c<o&&!y(s.charCodeAt(c));)c++;if(c<o&&c!==m){const w=s.slice(m,c);for(m=c;c<o&&y(s.charCodeAt(c));)c++;if(c<o&&c!==m){for(m=c;c<o&&!y(s.charCodeAt(c));)c++;(c===o||c!==m)&&(u=`\\\\${w}\\${s.slice(m,c)}`,l=c)}}}else l=1;else Y(f)&&s.charCodeAt(1)===G&&(u=s.slice(0,2),l=2,o>2&&y(s.charCodeAt(2))&&(a=!0,l=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=a,a&&t.length>0)break}return r=P1(r,!n,"\\",y),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){k(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return J1(s)?"\\":e;if(y(s))if(i=!0,y(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!y(e.charCodeAt(l));)l++;if(l<t&&l!==u){const a=e.slice(u,l);for(u=l;l<t&&y(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!y(e.charCodeAt(l));)l++;if(l===t)return`\\\\${a}\\${e.slice(u)}\\`;l!==u&&(n=`\\\\${a}\\${e.slice(u,l)}`,r=l)}}}else r=1;else Y(s)&&e.charCodeAt(1)===G&&(n=e.slice(0,2),r=2,t>2&&y(e.charCodeAt(2))&&(i=!0,r=3));let o=r<t?P1(e.slice(r),!i,"\\",y):"";if(o.length===0&&!i&&(o="."),o.length>0&&y(e.charCodeAt(t-1))&&(o+="\\"),!i&&n===void 0&&e.includes(":")){if(o.length>=2&&Y(o.charCodeAt(0))&&o.charCodeAt(1)===G)return`.\\${o}`;let l=e.indexOf(":");do if(l===t-1||y(e.charCodeAt(l+1)))return`.\\${o}`;while((l=e.indexOf(":",l+1))!==-1)}return n===void 0?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){k(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return y(r)||t>2&&Y(r)&&e.charCodeAt(1)===G&&y(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const o=e[s];k(o,"path"),o.length>0&&(t===void 0?t=r=o:t+=`\\${o}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&y(r.charCodeAt(0))){++i;const s=r.length;s>1&&y(r.charCodeAt(1))&&(++i,s>2&&(y(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&y(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return R.normalize(t)},relative(e,t){if(k(e,"from"),k(t,"to"),e===t)return"";const r=R.resolve(e),n=R.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";if(r.length!==e.length||n.length!==t.length){const C=r.split("\\"),x=n.split("\\");C[C.length-1]===""&&C.pop(),x[x.length-1]===""&&x.pop();const P=C.length,q=x.length,t1=P<q?P:q;let j;for(j=0;j<t1&&C[j].toLowerCase()===x[j].toLowerCase();j++);return j===0?n:j===t1?q>t1?x.slice(j).join("\\"):P>t1?"..\\".repeat(P-1-j)+"..":"":"..\\".repeat(P-j)+x.slice(j).join("\\")}let i=0;for(;i<e.length&&e.charCodeAt(i)===W;)i++;let s=e.length;for(;s-1>i&&e.charCodeAt(s-1)===W;)s--;const o=s-i;let l=0;for(;l<t.length&&t.charCodeAt(l)===W;)l++;let u=t.length;for(;u-1>l&&t.charCodeAt(u-1)===W;)u--;const a=u-l,f=o<a?o:a;let c=-1,m=0;for(;m<f;m++){const C=e.charCodeAt(i+m);if(C!==t.charCodeAt(l+m))break;C===W&&(c=m)}if(m!==f){if(c===-1)return n}else{if(a>f){if(t.charCodeAt(l+m)===W)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}o>f&&(e.charCodeAt(i+m)===W?c=m:m===2&&(c=3)),c===-1&&(c=0)}let w="";for(m=i+c+1;m<=s;++m)(m===s||e.charCodeAt(m)===W)&&(w+=w.length===0?"..":"\\..");return l+=c,w.length>0?`${w}${n.slice(l,u)}`:(n.charCodeAt(l)===W&&++l,n.slice(l,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=R.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===W){if(t.charCodeAt(1)===W){const r=t.charCodeAt(2);if(r!==Jt&&r!==o1)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Y(t.charCodeAt(0))&&t.charCodeAt(1)===G&&t.charCodeAt(2)===W)return`\\\\?\\${t}`;return t},dirname(e){k(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return y(i)?e:".";if(y(i)){if(r=n=1,y(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!y(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&y(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!y(e.charCodeAt(l));)l++;if(l===t)return e;l!==u&&(r=n=l+1)}}}}else Y(i)&&e.charCodeAt(1)===G&&(r=t>2&&y(e.charCodeAt(2))?3:2,n=r);let s=-1,o=!0;for(let l=t-1;l>=n;--l)if(y(e.charCodeAt(l))){if(!o){s=l;break}}else o=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&k(t,"suffix"),k(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Y(e.charCodeAt(0))&&e.charCodeAt(1)===G&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(y(u)){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(y(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){k(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===G&&Y(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){const u=e.charCodeAt(l);if(y(u)){if(!s){n=l+1;break}continue}i===-1&&(s=!1,i=l+1),u===o1?r===-1?r=l:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:Ae.bind(null,"\\"),parse(e){k(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return y(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(y(i)){if(n=1,y(e.charCodeAt(1))){let c=2,m=c;for(;c<r&&!y(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&y(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&!y(e.charCodeAt(c));)c++;c===r?n=c:c!==m&&(n=c+1)}}}}else if(Y(i)&&e.charCodeAt(1)===G){if(r<=2)return t.root=t.dir=e,t;if(n=2,y(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,o=n,l=-1,u=!0,a=e.length-1,f=0;for(;a>=n;--a){if(i=e.charCodeAt(a),y(i)){if(!u){o=a+1;break}continue}l===-1&&(u=!1,l=a+1),i===o1?s===-1?s=a:f!==1&&(f=1):s!==-1&&(f=-1)}return l!==-1&&(s===-1||f===0||f===1&&s===l-1&&s===o+1?t.base=t.name=e.slice(o,l):(t.name=e.slice(o,s),t.base=e.slice(o,l),t.ext=e.slice(s,l))),o>0&&o!==n?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Xt=(()=>{if(F){const e=/\\/g;return()=>{const t=S1().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>S1()})(),E={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=0&&!r;n--){const i=e[n];k(i,`paths[${n}]`),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===U)}if(!r){const n=Xt();t=`${n}/${t}`,r=n.charCodeAt(0)===U}return t=P1(t,!r,"/",J1),r?`/${t}`:t.length>0?t:"."},normalize(e){if(k(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===U,r=e.charCodeAt(e.length-1)===U;return e=P1(e,!t,"/",J1),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return k(e,"path"),e.length>0&&e.charCodeAt(0)===U},join(...e){if(e.length===0)return".";const t=[];for(let r=0;r<e.length;++r){const n=e[r];k(n,"path"),n.length>0&&t.push(n)}return t.length===0?".":E.normalize(t.join("/"))},relative(e,t){if(k(e,"from"),k(t,"to"),e===t||(e=E.resolve(e),t=E.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,o=t.length-s,l=i<o?i:o;let u=-1,a=0;for(;a<l;a++){const c=e.charCodeAt(r+a);if(c!==t.charCodeAt(s+a))break;c===U&&(u=a)}if(a===l)if(o>l){if(t.charCodeAt(s+a)===U)return t.slice(s+a+1);if(a===0)return t.slice(s+a)}else i>l&&(e.charCodeAt(r+a)===U?u=a:a===0&&(u=0));let f="";for(a=r+u+1;a<=n;++a)(a===n||e.charCodeAt(a)===U)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(k(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===U;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===U){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&k(t,"suffix"),k(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===U){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===U){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){k(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const l=e[o];if(l==="/"){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),l==="."?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:Ae.bind(null,"/"),parse(e){k(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===U;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,o=-1,l=!0,u=e.length-1,a=0;for(;u>=n;--u){const f=e.charCodeAt(u);if(f===U){if(!l){s=u+1;break}continue}o===-1&&(l=!1,o=u+1),f===o1?i===-1?i=u:a!==1&&(a=1):i!==-1&&(a=-1)}if(o!==-1){const f=s===0&&r?1:s;i===-1||a===0||a===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(f,o):(t.name=e.slice(f,i),t.base=e.slice(f,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};E.win32=R.win32=R,E.posix=R.posix=E;var Gt=F?R.normalize:E.normalize,Ir=F?R.isAbsolute:E.isAbsolute,Yt=F?R.join:E.join,e2=F?R.resolve:E.resolve,t2=F?R.relative:E.relative,r2=F?R.dirname:E.dirname,Ur=F?R.basename:E.basename,qr=F?R.extname:E.extname,Dr=F?R.format:E.format,zr=F?R.parse:E.parse,Wr=F?R.toNamespacedPath:E.toNamespacedPath,O1=F?R.sep:E.sep,Fr=F?R.delimiter:E.delimiter,n2=/^\w[\w\d+.-]*$/,i2=/^\//,s2=/^\/\//;function o2(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!n2.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!i2.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(s2.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 ("//")')}}function l2(e,t){return!e&&!t?"file":e}function a2(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==K&&(t=K+t):t=K;break}return t}var S="",K="/",u2=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,H=class q1{static isUri(t){return t instanceof q1?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,r,n,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||S,this.authority=t.authority||S,this.path=t.path||S,this.query=t.query||S,this.fragment=t.fragment||S):(this.scheme=l2(t,o),this.authority=r||S,this.path=a2(this.scheme,n||S),this.query=i||S,this.fragment=s||S,o2(this,o))}get fsPath(){return k1(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:o}=t;return r===void 0?r=this.scheme:r===null&&(r=S),n===void 0?n=this.authority:n===null&&(n=S),i===void 0?i=this.path:i===null&&(i=S),s===void 0?s=this.query:s===null&&(s=S),o===void 0?o=this.fragment:o===null&&(o=S),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new f1(r,n,i,s,o)}static parse(t,r=!1){const n=u2.exec(t);return n?new f1(n[2]||S,R1(n[4]||S),R1(n[5]||S),R1(n[7]||S),R1(n[9]||S),r):new f1(S,S,S,S,S)}static file(t){let r=S;if(i1&&(t=t.replace(/\\/g,K)),t[0]===K&&t[1]===K){const n=t.indexOf(K,2);n===-1?(r=t.substring(2),t=K):(r=t.substring(2,n),t=t.substring(n)||K)}return new f1("file",r,t,S,S)}static from(t,r){return new f1(t.scheme,t.authority,t.path,t.query,t.fragment,r)}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return i1&&t.scheme==="file"?n=q1.file(R.join(k1(t,!0),...r)).path:n=E.join(t.path,...r),t.with({path:n})}toString(t=!1){return Z1(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof q1)return t;{const r=new f1(t);return r._formatted=t.external??null,r._fsPath=t._sep===Ne?t.fsPath??null:null,r}}else return t}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}},Ne=i1?1:void 0,f1=class extends H{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=k1(this,!1)),this._fsPath}toString(e=!1){return e?Z1(this,!0):(this._formatted||(this._formatted=Z1(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ne),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}},$e={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Ee(e,t,r){let n,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||r&&o===91||r&&o===93||r&&o===58)i!==-1&&(n+=encodeURIComponent(e.substring(i,s)),i=-1),n!==void 0&&(n+=e.charAt(s));else{n===void 0&&(n=e.substr(0,s));const l=$e[o];l!==void 0?(i!==-1&&(n+=encodeURIComponent(e.substring(i,s)),i=-1),n+=l):i===-1&&(i=s)}}return i!==-1&&(n+=encodeURIComponent(e.substring(i))),n!==void 0?n:e}function c2(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=$e[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function k1(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,i1&&(r=r.replace(/\//g,"\\")),r}function Z1(e,t){const r=t?c2:Ee;let n="",{scheme:i,authority:s,path:o,query:l,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=K,n+=K),s){let a=s.indexOf("@");if(a!==-1){const f=s.substr(0,a);s=s.substr(a+1),a=f.lastIndexOf(":"),a===-1?n+=r(f,!1,!1):(n+=r(f.substr(0,a),!1,!1),n+=":",n+=r(f.substr(a+1),!1,!0)),n+="@"}s=s.toLowerCase(),a=s.lastIndexOf(":"),a===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,a),!1,!0),n+=s.substr(a))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const a=o.charCodeAt(1);a>=65&&a<=90&&(o=`/${String.fromCharCode(a+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const a=o.charCodeAt(0);a>=65&&a<=90&&(o=`${String.fromCharCode(a+32)}:${o.substr(2)}`)}n+=r(o,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=t?u:Ee(u,!1,!1)),n}function _e(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+_e(e.substr(3)):e}}var xe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R1(e){return e.match(xe)?e.replace(xe,t=>_e(t)):e}var Se;function f2(e,t){const r=Object.create(null);for(const n of e){const i=t(n);let s=r[i];s||(s=r[i]=[]),s.push(n)}return r}var Vr=class{static{Se=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[Se]="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()}},h2=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?G1.isErrorNoTelemetry(e)?new G1(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)}},d2=new h2;function M1(e){m2(e)||d2.onUnexpectedError(e)}function Q1(e){if(e instanceof Error){const{name:t,message:r,cause:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:i,noTelemetry:G1.isErrorNoTelemetry(e),cause:n?Q1(n):void 0,code:e.code}}return e}var X1="Canceled";function m2(e){return e instanceof v2?!0:e instanceof Error&&e.name===X1&&e.message===X1}var v2=class extends Error{constructor(){super(X1),this.name=this.message}},G1=class ce extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof ce)return t;const r=new ce;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function g2(e,t){const r=this;let n=!1,i;return function(){if(n)return i;if(n=!0,t)try{i=e.apply(r,arguments)}finally{t()}else i=e.apply(r,arguments);return i}}function b2(e,t,r=0,n=e.length){let i=r,s=n;for(;i<s;){const o=Math.floor((i+s)/2);t(e[o])?i=o+1:s=o}return i-1}var Hr=class mt{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(mt.assertInvariants){if(this.d){for(const n of this.e)if(this.d(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const r=b2(this.e,t,this.c);return this.c=r+1,r===-1?void 0:this.e[r]}},Y1;(function(e){function t(s){return s<0}e.isLessThan=t;function r(s){return s<=0}e.isLessThanOrEqual=r;function n(s){return s>0}e.isGreaterThan=n;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Y1||(Y1={}));function p2(e,t){return(r,n)=>t(e(r),e(n))}var w2=(e,t)=>e-t,Br=class D1{static{this.empty=new D1(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 D1(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new D1(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(i=>((n||Y1.isGreaterThan(t(i,r)))&&(n=!1,r=i),!0)),r}},Pe,Oe,ke,y2=class{constructor(e,t){this.uri=e,this.value=t}};function C2(e){return Array.isArray(e)}var Re=class p1{static{this.c=t=>t.toString()}constructor(t,r){if(this[Pe]="ResourceMap",t instanceof p1)this.d=new Map(t.d),this.e=r??p1.c;else if(C2(t)){this.d=new Map,this.e=r??p1.c;for(const[n,i]of t)this.set(n,i)}else this.d=new Map,this.e=t??p1.c}set(t,r){return this.d.set(this.e(t),new y2(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[n,i]of this.d)t(i.value,i.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]}*[(Pe=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},Kr=class{constructor(e,t){this[Oe]="ResourceSet",!e||typeof e=="function"?this.c=new Re(e):(this.c=new Re(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,n)=>e.call(t,n,n,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(Oe=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Me;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(Me||(Me={}));var Jr=class{constructor(){this[ke]="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 n=this.c.get(e);if(n)n.value=t,r!==0&&this.n(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case 0:this.l(n);break;case 1:this.k(n);break;case 2:this.l(n);break;default:this.l(n);break}this.c.set(e,n),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 n=this.d;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this.g!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}[(ke=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,n=e.previous;e===this.e?(n.next=void 0,this.e=n):(r.previous=n,n.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,n=e.previous;e===this.d?(r.previous=void 0,this.d=r):(r.previous=n,n.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)}},L2=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 A2(e){return!!e&&typeof e[Symbol.iterator]=="function"}var T1;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return t(p)?p:i(p)}e.wrap=s;function o(p){return p||r}e.from=o;function*l(p){for(let A=p.length-1;A>=0;A--)yield p[A]}e.reverse=l;function u(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=u;function a(p){return p[Symbol.iterator]().next().value}e.first=a;function f(p,A){let _=0;for(const z of p)if(A(z,_++))return!0;return!1}e.some=f;function c(p,A){for(const _ of p)if(A(_))return _}e.find=c;function*m(p,A){for(const _ of p)A(_)&&(yield _)}e.filter=m;function*w(p,A){let _=0;for(const z of p)yield A(z,_++)}e.map=w;function*C(p,A){let _=0;for(const z of p)yield*A(z,_++)}e.flatMap=C;function*x(...p){for(const A of p)A2(A)?yield*A:yield A}e.concat=x;function P(p,A,_){let z=_;for(const a1 of p)z=A(z,a1);return z}e.reduce=P;function q(p){let A=0;for(const _ of p)A++;return A}e.length=q;function*t1(p,A,_=p.length){for(A<-p.length&&(A=0),A<0&&(A+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);A<_;A++)yield p[A]}e.slice=t1;function j(p,A=Number.POSITIVE_INFINITY){const _=[];if(A===0)return[_,p];const z=p[Symbol.iterator]();for(let a1=0;a1<A;a1++){const L1=z.next();if(L1.done)return[_,e.empty()];_.push(L1.value)}return[_,{[Symbol.iterator](){return z}}]}e.consume=j;async function F1(p){const A=[];for await(const _ of p)A.push(_);return Promise.resolve(A)}e.asyncToArray=F1})(T1||(T1={}));var N2=!1,h1=null,Zr=class vt{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:vt.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 n=this.c(t);n.parent=r}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,r){const n=r.get(t);if(n)return n;const i=t.parent?this.f(this.c(t.parent),r):t;return r.set(t,i),i}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,n])=>n.source!==null&&!this.f(n,t).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{const u=new Map,a=[...this.b.values()].filter(c=>c.source!==null&&!this.f(c,u).isSingleton);if(a.length===0)return;const f=new Set(a.map(c=>c.value));if(n=a.filter(c=>!(c.parent&&f.has(c.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(u){function a(c,m){for(;c.length>0&&m.some(w=>typeof w=="string"?w===c[0]:c[0].match(w));)c.shift()}const f=u.source.split(` `).map(c=>c.trim().replace("at ","")).filter(c=>c!=="");return a(f,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),f.reverse()}const s=new L2;for(const u of n){const a=i(u);for(let f=0;f<=a.length;f++)s.add(a.slice(0,f).join(` `),u)}n.sort(p2(u=>u.idx,w2));let o="",l=0;for(const u of n.slice(0,t)){l++;const a=i(u),f=[];for(let c=0;c<a.length;c++){let m=a[c];m=`(shared with ${s.get(a.slice(0,c+1).join(` `)).size}/${n.length} leaks) at ${m}`;const C=s.get(a.slice(0,c).join(` `)),x=f2([...C].map(P=>i(P)[c]),P=>P);delete x[a[c]];for(const[P,q]of Object.entries(x))f.unshift(` - stacktraces of ${q.length} other leaks continue with ${P}`);f.unshift(m)}o+=` ==================== Leaking disposable ${l}/${n.length}: ${u.value.constructor.name} ==================== ${f.join(` `)} ============================================================ `}return n.length>t&&(o+=` ... and ${n.length-t} more leaking disposables `),{leaks:n,details:o}}};function $2(e){h1=e}if(N2){const e="__is_disposable_tracked__";$2(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!==g1.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==g1.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function ee(e){return h1?.trackDisposable(e),e}function te(e){h1?.markAsDisposed(e)}function re(e,t){h1?.setParent(e,t)}function E2(e,t){if(h1)for(const r of e)h1.setParent(r,t)}function Te(e){if(T1.is(e)){const t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}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 _2(...e){const t=je(()=>Te(e));return E2(e,t),t}function je(e){const t=ee({dispose:g2(()=>{te(t),e()})});return t}var ne=class gt{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,ee(this)}dispose(){this.g||(te(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{Te(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 re(t,this),this.g?gt.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),re(t,null))}},g1=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new ne,ee(this),re(this.q,this)}dispose(){te(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},O=class z1{static{this.Undefined=new z1(void 0)}constructor(t){this.element=t,this.next=z1.Undefined,this.prev=z1.Undefined}},x2=class{constructor(){this.a=O.Undefined,this.b=O.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===O.Undefined}clear(){let e=this.a;for(;e!==O.Undefined;){const t=e.next;e.prev=O.Undefined,e.next=O.Undefined,e=t}this.a=O.Undefined,this.b=O.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const r=new O(e);if(this.a===O.Undefined)this.a=r,this.b=r;else if(t){const i=this.b;this.b=r,r.prev=i,i.next=r}else{const i=this.a;this.a=r,r.next=i,i.prev=r}this.c+=1;let n=!1;return()=>{n||(n=!0,this.e(r))}}shift(){if(this.a!==O.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==O.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==O.Undefined&&e.next!==O.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===O.Undefined&&e.next===O.Undefined?(this.a=O.Undefined,this.b=O.Undefined):e.next===O.Undefined?(this.b=this.b.prev,this.b.next=O.Undefined):e.prev===O.Undefined&&(this.a=this.a.next,this.a.prev=O.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==O.Undefined;)yield e.element,e=e.next}},S2=globalThis.performance&&typeof globalThis.performance.now=="function",P2=class bt{static create(t){return new bt(t)}constructor(t){this.c=S2&&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}},Ie=!1,O2=!1,j1;(function(e){e.None=()=>g1.None;function t(g){if(O2){const{onDidAddListener:h}=g,v=ie.create();let d=0;g.onDidAddListener=()=>{++d===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),v.print()),h?.()}}}function r(g,h){return w(g,()=>{},0,void 0,!0,void 0,h)}e.defer=r;function n(g){return(h,v=null,d)=>{let b=!1,L;return L=g($=>{if(!b)return L?L.dispose():b=!0,h.call(v,$)},null,d),b&&L.dispose(),L}}e.once=n;function i(g,h){return e.once(e.filter(g,h))}e.onceIf=i;function s(g,h,v){return c((d,b=null,L)=>g($=>d.call(b,h($)),null,L),v)}e.map=s;function o(g,h,v){return c((d,b=null,L)=>g($=>{h($),d.call(b,$)},null,L),v)}e.forEach=o;function l(g,h,v){return c((d,b=null,L)=>g($=>h($)&&d.call(b,$),null,L),v)}e.filter=l;function u(g){return g}e.signal=u;function a(...g){return(h,v=null,d)=>{const b=_2(...g.map(L=>L($=>h.call(v,$))));return m(b,d)}}e.any=a;function f(g,h,v,d){let b=v;return s(g,L=>(b=h(b,L),b),d)}e.reduce=f;function c(g,h){let v;const d={onWillAddFirstListener(){v=g(b.fire,b)},onDidRemoveLastListener(){v?.dispose()}};h||t(d);const b=new Z(d);return h?.add(b),b.event}function m(g,h){return h instanceof Array?h.push(g):h&&h.add(g),g}function w(g,h,v=100,d=!1,b=!1,L,$){let I,D,u1,A1=0,m1;const de={leakWarningThreshold:L,onWillAddFirstListener(){I=g(At=>{A1++,D=h(D,At),d&&!u1&&(N1.fire(D),D=void 0),m1=()=>{const Nt=D;D=void 0,u1=void 0,(!d||A1>1)&&N1.fire(Nt),A1=0},typeof v=="number"?(clearTimeout(u1),u1=setTimeout(m1,v)):u1===void 0&&(u1=0,queueMicrotask(m1))})},onWillRemoveListener(){b&&A1>0&&m1?.()},onDidRemoveLastListener(){m1=void 0,I.dispose()}};$||t(de);const N1=new Z(de);return $?.add(N1),N1.event}e.debounce=w;function C(g,h=0,v){return e.debounce(g,(d,b)=>d?(d.push(b),d):[b],h,void 0,!0,void 0,v)}e.accumulate=C;function x(g,h=(d,b)=>d===b,v){let d=!0,b;return l(g,L=>{const $=d||!h(L,b);return d=!1,b=L,$},v)}e.latch=x;function P(g,h,v){return[e.filter(g,h,v),e.filter(g,d=>!h(d),v)]}e.split=P;function q(g,h=!1,v=[],d){let b=v.slice(),L=g(D=>{b?b.push(D):I.fire(D)});d&&d.add(L);const $=()=>{b?.forEach(D=>I.fire(D)),b=null},I=new Z({onWillAddFirstListener(){L||(L=g(D=>I.fire(D)),d&&d.add(L))},onDidAddFirstListener(){b&&(h?setTimeout($):$())},onDidRemoveLastListener(){L&&L.dispose(),L=null}});return d&&d.add(I),I.event}e.buffer=q;function t1(g,h){return(d,b,L)=>{const $=h(new F1);return g(function(I){const D=$.evaluate(I);D!==j&&d.call(b,D)},void 0,L)}}e.chain=t1;const j=Symbol("HaltChainable");class F1{constructor(){this.f=[]}map(h){return this.f.push(h),this}forEach(h){return this.f.push(v=>(h(v),v)),this}filter(h){return this.f.push(v=>h(v)?v:j),this}reduce(h,v){let d=v;return this.f.push(b=>(d=h(d,b),d)),this}latch(h=(v,d)=>v===d){let v=!0,d;return this.f.push(b=>{const L=v||!h(b,d);return v=!1,d=b,L?b:j}),this}evaluate(h){for(const v of this.f)if(h=v(h),h===j)break;return h}}function p(g,h,v=d=>d){const d=(...I)=>$.fire(v(...I)),b=()=>g.on(h,d),L=()=>g.removeListener(h,d),$=new Z({onWillAddFirstListener:b,onDidRemoveLastListener:L});return $.event}e.fromNodeEventEmitter=p;function A(g,h,v=d=>d){const d=(...I)=>$.fire(v(...I)),b=()=>g.addEventListener(h,d),L=()=>g.removeEventListener(h,d),$=new Z({onWillAddFirstListener:b,onDidRemoveLastListener:L});return $.event}e.fromDOMEventEmitter=A;function _(g,h){return new Promise(v=>n(g)(v,null,h))}e.toPromise=_;function z(g){const h=new Z;return g.then(v=>{h.fire(v)},()=