UNPKG

code-server

Version:

Run VS Code on a remote server.

26 lines (18 loc) • 148 kB
"use strict";/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/var ee=function(e,t){return ee=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])},ee(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");ee(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,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(l=e[o])&&(s=(i<3?l(s):i>3?l(t,r,s):l(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 l(N){if(N!==void 0&&typeof N!="function")throw new TypeError("Function expected");return N}for(var o=n.kind,c=o==="getter"?"get":o==="setter"?"set":"value",a=!t&&e?n.static?e:e.prototype:null,u=t||(a?Object.getOwnPropertyDescriptor(a,n.name):{}),f,h=!1,m=r.length-1;m>=0;m--){var v={};for(var y in n)v[y]=y==="access"?{}:n[y];for(var y in n.access)v.access[y]=n.access[y];v.addInitializer=function(N){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(l(N||null))};var g=(0,r[m])(o==="accessor"?{get:u.get,set:u.set}:u[c],v);if(o==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(f=l(g.get))&&(u.get=f),(f=l(g.set))&&(u.set=f),(f=l(g.init))&&i.unshift(f)}else(f=l(g))&&(o==="field"?i.unshift(f):u[c]=f)}a&&Object.defineProperty(a,n.name,u),h=!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(l){l(s)})}return new(r||(r=Promise))(function(s,l){function o(u){try{a(n.next(u))}catch(f){l(f)}}function c(u){try{a(n.throw(u))}catch(f){l(f)}}function a(u){u.done?s(u.value):i(u.value).then(o,c)}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,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(a){return function(u){return c([a,u])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=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(u){a=[6,u],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=[],l;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){l={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(l)throw l.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],l=0,o=s.length;l<o;l++,i++)n[i]=s[l];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={},o("next"),o("throw"),o("return",l),i[Symbol.asyncIterator]=function(){return this},i;function l(m){return function(v){return Promise.resolve(v).then(m,f)}}function o(m,v){n[m]&&(i[m]=function(y){return new Promise(function(g,N){s.push([m,y,g,N])>1||c(m,y)})},v&&(i[m]=v(i[m])))}function c(m,v){try{a(n[m](v))}catch(y){h(s[0][3],y)}}function a(m){m.value instanceof __await?Promise.resolve(m.value.v).then(u,f):h(s[0][2],m)}function u(m){c("next",m)}function f(m){c("throw",m)}function h(m,v){m(v),s.shift(),s.length&&c(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(l){return(r=!r)?{value:__await(e[i](l)),done:!1}:s?s(l):l}: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(l){return new Promise(function(o,c){l=e[s](l),i(o,c,l.done,l.value)})}}function i(s,l,o,c){Promise.resolve(c).then(function(a){s({value:a,done:o})},l)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Kt=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 Kt(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 Qt=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 Qt(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};var Jt=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?ne.isErrorNoTelemetry(e)?new ne(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)}},Zt=new Jt;function S1(e){Gt(e)||Zt.onUnexpectedError(e)}function te(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:ne.isErrorNoTelemetry(e),cause:n?te(n):void 0,code:e.code}}return e}var re="Canceled";function Gt(e){return e instanceof Xt?!0:e instanceof Error&&e.name===re&&e.message===re}var Xt=class extends Error{constructor(){super(re),this.name=this.message}},ne=class Se extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Se)return t;const r=new Se;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Te;function Yt(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 L2=class{static{Te=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[Te]="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()}};function er(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 tr(e,t,r=0,n=e.length){let i=r,s=n;for(;i<s;){const l=Math.floor((i+s)/2);t(e[l])?i=l+1:s=l}return i-1}var $2=class Ut{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(Ut.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=tr(this.e,t,this.c);return this.c=r+1,r===-1?void 0:this.e[r]}},ie;(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})(ie||(ie={}));function rr(e,t){return(r,n)=>t(e(r),e(n))}var nr=(e,t)=>e-t,A2=class J1{static{this.empty=new J1(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 J1(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new J1(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||ie.isGreaterThan(t(i,r)))&&(n=!1,r=i),!0)),r}},De,Ie,Me,ir=class{constructor(e,t){this.uri=e,this.value=t}};function sr(e){return Array.isArray(e)}var je=class $1{static{this.c=t=>t.toString()}constructor(t,r){if(this[De]="ResourceMap",t instanceof $1)this.d=new Map(t.d),this.e=r??$1.c;else if(sr(t)){this.d=new Map,this.e=r??$1.c;for(const[n,i]of t)this.set(n,i)}else this.d=new Map,this.e=t??$1.c}set(t,r){return this.d.set(this.e(t),new ir(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]}*[(De=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},E2=class{constructor(e,t){this[Ie]="ResourceSet",!e||typeof e=="function"?this.c=new je(e):(this.c=new je(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()}[(Ie=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Ue;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(Ue||(Ue={}));var or=class{constructor(){this[Me]="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}[(Me=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)}},lr=class extends or{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))}},ar=class extends lr{constructor(e,t=1){super(e,t)}r(e){this.h(e)}set(e,t){return super.set(e,t),this.q(),this}},cr=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 ur(e){return!!e&&typeof e[Symbol.iterator]=="function"}var se;(function(e){function t(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(C){yield C}e.single=i;function s(C){return t(C)?C:i(C)}e.wrap=s;function l(C){return C||r}e.from=l;function*o(C){for(let $=C.length-1;$>=0;$--)yield C[$]}e.reverse=o;function c(C){return!C||C[Symbol.iterator]().next().done===!0}e.isEmpty=c;function a(C){return C[Symbol.iterator]().next().value}e.first=a;function u(C,$){let P=0;for(const k of C)if($(k,P++))return!0;return!1}e.some=u;function f(C,$){for(const P of C)if($(P))return P}e.find=f;function*h(C,$){for(const P of C)$(P)&&(yield P)}e.filter=h;function*m(C,$){let P=0;for(const k of C)yield $(k,P++)}e.map=m;function*v(C,$){let P=0;for(const k of C)yield*$(k,P++)}e.flatMap=v;function*y(...C){for(const $ of C)ur($)?yield*$:yield $}e.concat=y;function g(C,$,P){let k=P;for(const j of C)k=$(k,j);return k}e.reduce=g;function N(C){let $=0;for(const P of C)$++;return $}e.length=N;function*A(C,$,P=C.length){for($<-C.length&&($=0),$<0&&($+=C.length),P<0?P+=C.length:P>C.length&&(P=C.length);$<P;$++)yield C[$]}e.slice=A;function _(C,$=Number.POSITIVE_INFINITY){const P=[];if($===0)return[P,C];const k=C[Symbol.iterator]();for(let j=0;j<$;j++){const G=k.next();if(G.done)return[P,e.empty()];P.push(G.value)}return[P,{[Symbol.iterator](){return k}}]}e.consume=_;async function Q(C){const $=[];for await(const P of C)$.push(P);return Promise.resolve($)}e.asyncToArray=Q})(se||(se={}));var fr=!1,m1=null,x2=class qt{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:qt.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 c=new Map,a=[...this.b.values()].filter(f=>f.source!==null&&!this.f(f,c).isSingleton);if(a.length===0)return;const u=new Set(a.map(f=>f.value));if(n=a.filter(f=>!(f.parent&&u.has(f.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(c){function a(f,h){for(;f.length>0&&h.some(m=>typeof m=="string"?m===f[0]:f[0].match(m));)f.shift()}const u=c.source.split(` `).map(f=>f.trim().replace("at ","")).filter(f=>f!=="");return a(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}const s=new cr;for(const c of n){const a=i(c);for(let u=0;u<=a.length;u++)s.add(a.slice(0,u).join(` `),c)}n.sort(rr(c=>c.idx,nr));let l="",o=0;for(const c of n.slice(0,t)){o++;const a=i(c),u=[];for(let f=0;f<a.length;f++){let h=a[f];h=`(shared with ${s.get(a.slice(0,f+1).join(` `)).size}/${n.length} leaks) at ${h}`;const v=s.get(a.slice(0,f).join(` `)),y=Yt([...v].map(g=>i(g)[f]),g=>g);delete y[a[f]];for(const[g,N]of Object.entries(y))u.unshift(` - stacktraces of ${N.length} other leaks continue with ${g}`);u.unshift(h)}l+=` ==================== Leaking disposable ${o}/${n.length}: ${c.value.constructor.name} ==================== ${u.join(` `)} ============================================================ `}return n.length>t&&(l+=` ... and ${n.length-t} more leaking disposables `),{leaks:n,details:l}}};function hr(e){m1=e}if(fr){const e="__is_disposable_tracked__";hr(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!==y1.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==y1.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function oe(e){return m1?.trackDisposable(e),e}function le(e){m1?.markAsDisposed(e)}function ae(e,t){m1?.setParent(e,t)}function dr(e,t){if(m1)for(const r of e)m1.setParent(r,t)}function qe(e){if(se.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 mr(...e){const t=Fe(()=>qe(e));return dr(e,t),t}function Fe(e){const t=oe({dispose:er(()=>{le(t),e()})});return t}var ce=class Ft{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,oe(this)}dispose(){this.g||(le(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{qe(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 ae(t,this),this.g?Ft.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),ae(t,null))}},y1=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new ce,oe(this),ae(this.q,this)}dispose(){le(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},N2=class Z1{static{this.Undefined=new Z1(void 0)}constructor(t){this.element=t,this.next=Z1.Undefined,this.prev=Z1.Undefined}},vr=globalThis.performance&&typeof globalThis.performance.now=="function",gr=class Wt{static create(t){return new Wt(t)}constructor(t){this.c=vr&&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}},We=!1,pr=!1,O1;(function(e){e.None=()=>y1.None;function t(b){if(pr){const{onDidAddListener:d}=b,w=ue.create();let p=0;b.onDidAddListener=()=>{++p===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),w.print()),d?.()}}}function r(b,d){return m(b,()=>{},0,void 0,!0,void 0,d)}e.defer=r;function n(b){return(d,w=null,p)=>{let L=!1,x;return x=b(R=>{if(!L)return x?x.dispose():L=!0,d.call(w,R)},null,p),L&&x.dispose(),x}}e.once=n;function i(b,d){return e.once(e.filter(b,d))}e.onceIf=i;function s(b,d,w){return f((p,L=null,x)=>b(R=>p.call(L,d(R)),null,x),w)}e.map=s;function l(b,d,w){return f((p,L=null,x)=>b(R=>{d(R),p.call(L,R)},null,x),w)}e.forEach=l;function o(b,d,w){return f((p,L=null,x)=>b(R=>d(R)&&p.call(L,R),null,x),w)}e.filter=o;function c(b){return b}e.signal=c;function a(...b){return(d,w=null,p)=>{const L=mr(...b.map(x=>x(R=>d.call(w,R))));return h(L,p)}}e.any=a;function u(b,d,w,p){let L=w;return s(b,x=>(L=d(L,x),L),p)}e.reduce=u;function f(b,d){let w;const p={onWillAddFirstListener(){w=b(L.fire,L)},onDidRemoveLastListener(){w?.dispose()}};d||t(p);const L=new X(p);return d?.add(L),L.event}function h(b,d){return d instanceof Array?d.push(b):d&&d.add(b),b}function m(b,d,w=100,p=!1,L=!1,x,R){let U,z,d1,P1=0,b1;const Re={leakWarningThreshold:x,onWillAddFirstListener(){U=b(Ht=>{P1++,z=d(z,Ht),p&&!d1&&(_1.fire(z),z=void 0),b1=()=>{const Vt=z;z=void 0,d1=void 0,(!p||P1>1)&&_1.fire(Vt),P1=0},typeof w=="number"?(clearTimeout(d1),d1=setTimeout(b1,w)):d1===void 0&&(d1=0,queueMicrotask(b1))})},onWillRemoveListener(){L&&P1>0&&b1?.()},onDidRemoveLastListener(){b1=void 0,U.dispose()}};R||t(Re);const _1=new X(Re);return R?.add(_1),_1.event}e.debounce=m;function v(b,d=0,w){return e.debounce(b,(p,L)=>p?(p.push(L),p):[L],d,void 0,!0,void 0,w)}e.accumulate=v;function y(b,d=(p,L)=>p===L,w){let p=!0,L;return o(b,x=>{const R=p||!d(x,L);return p=!1,L=x,R},w)}e.latch=y;function g(b,d,w){return[e.filter(b,d,w),e.filter(b,p=>!d(p),w)]}e.split=g;function N(b,d=!1,w=[],p){let L=w.slice(),x=b(z=>{L?L.push(z):U.fire(z)});p&&p.add(x);const R=()=>{L?.forEach(z=>U.fire(z)),L=null},U=new X({onWillAddFirstListener(){x||(x=b(z=>U.fire(z)),p&&p.add(x))},onDidAddFirstListener(){L&&(d?setTimeout(R):R())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return p&&p.add(U),U.event}e.buffer=N;function A(b,d){return(p,L,x)=>{const R=d(new Q);return b(function(U){const z=R.evaluate(U);z!==_&&p.call(L,z)},void 0,x)}}e.chain=A;const _=Symbol("HaltChainable");class Q{constructor(){this.f=[]}map(d){return this.f.push(d),this}forEach(d){return this.f.push(w=>(d(w),w)),this}filter(d){return this.f.push(w=>d(w)?w:_),this}reduce(d,w){let p=w;return this.f.push(L=>(p=d(p,L),p)),this}latch(d=(w,p)=>w===p){let w=!0,p;return this.f.push(L=>{const x=w||!d(L,p);return w=!1,p=L,x?L:_}),this}evaluate(d){for(const w of this.f)if(d=w(d),d===_)break;return d}}function C(b,d,w=p=>p){const p=(...U)=>R.fire(w(...U)),L=()=>b.on(d,p),x=()=>b.removeListener(d,p),R=new X({onWillAddFirstListener:L,onDidRemoveLastListener:x});return R.event}e.fromNodeEventEmitter=C;function $(b,d,w=p=>p){const p=(...U)=>R.fire(w(...U)),L=()=>b.addEventListener(d,p),x=()=>b.removeEventListener(d,p),R=new X({onWillAddFirstListener:L,onDidRemoveLastListener:x});return R.event}e.fromDOMEventEmitter=$;function P(b,d){return new Promise(w=>n(b)(w,null,d))}e.toPromise=P;function k(b){const d=new X;return b.then(w=>{d.fire(w)},()=>{d.fire(void 0)}).finally(()=>{d.dispose()}),d.event}e.fromPromise=k;function j(b,d){return b(w=>d.fire(w))}e.forward=j;function G(b,d,w){return d(w),b(p=>d(p))}e.runAndSubscribe=G;class c1{constructor(d,w){this._observable=d,this.f=0,this.g=!1;const p={onWillAddFirstListener:()=>{d.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{d.removeObserver(this)}};w||t(p),this.emitter=new X(p),w&&w.add(this.emitter)}beginUpdate(d){this.f++}handlePossibleChange(d){}handleChange(d,w){this.g=!0}endUpdate(d){this.f--,this.f===0&&(this._observable.reportChanges(),this.g&&(this.g=!1,this.emitter.fire(this._observable.get())))}}function N1(b,d){return new c1(b,d).emitter.event}e.fromObservable=N1;function Y1(b){return(d,w,p)=>{let L=0,x=!1;const R={beginUpdate(){L++},endUpdate(){L--,L===0&&(b.reportChanges(),x&&(x=!1,d.call(w)))},handlePossibleChange(){},handleChange(){x=!0}};b.addObserver(R),b.reportChanges();const U={dispose(){b.removeObserver(R)}};return p instanceof ce?p.add(U):Array.isArray(p)&&p.push(U),U}}e.fromObservableLight=Y1})(O1||(O1={}));var wr=class Oe{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}_${Oe.f++}`,Oe.all.add(this)}start(t){this.g=new gr,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}}},ze=-1,br=class zt{static{this.f=1}constructor(t,r,n=(zt.f++).toString(16).padStart(3,"0")){this.j=t,this.threshold=r,this.name=n,this.h=0}dispose(){this.g?.clear()}check(t,r){const n=this.threshold;if(n<=0||r<n)return;this.g||(this.g=new Map);const i=this.g.get(t.value)||0;if(this.g.set(t.value,i+1),this.h-=1,this.h<=0){this.h=n*.5;const[s,l]=this.getMostFrequentStack(),o=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${l}):`;console.warn(o),console.warn(s);const c=new yr(o,s);this.j(c)}return()=>{const s=this.g.get(t.value)||0;this.g.set(t.value,s-1)}}getMostFrequentStack(){if(!this.g)return;let t,r=0;for(const[n,i]of this.g)(!t||r<i)&&(t=[n,i],r=i);return t}},ue=class Bt{static create(){const t=new Error;return new Bt(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}},yr=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Cr=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Lr=0,k1=class{constructor(e){this.value=e,this.id=Lr++}},$r=2,Ar=(e,t)=>{if(e instanceof k1)t(e);else for(let r=0;r<e.length;r++){const n=e[r];n&&t(n)}},X=class{constructor(e){this.z=0,this.f=e,this.g=ze>0||this.f?.leakWarningThreshold?new br(e?.onListenerError??S1,this.f?.leakWarningThreshold??ze):void 0,this.j=this.f?._profName?new wr(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(We){const e=this.u;queueMicrotask(()=>{Ar(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 o=`[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`;console.warn(o);const c=this.g.getMostFrequentStack()??["UNKNOWN stack",-1],a=new Cr(`${o}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0]);return(this.f?.onListenerError||S1)(a),y1.None}if(this.m)return y1.None;t&&(e=e.bind(t));const n=new k1(e);let i,s;this.g&&this.z>=Math.ceil(this.g.threshold*.2)&&(n.stack=ue.create(),i=this.g.check(n.stack,this.z+1)),We&&(n.stack=s??ue.create()),this.u?this.u instanceof k1?(this.w??=new Er,this.u=[this.u,n]):this.u.push(n):(this.f?.onWillAddFirstListener?.(this),this.u=n,this.f?.onDidAddFirstListener?.(this)),this.f?.onDidAddListener?.(this),this.z++;const l=Fe(()=>{i?.(),this.A(n)});return r instanceof ce?r.add(l):Array.isArray(r)&&r.push(l),l},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 n=this.w.current===this;if(this.z*$r<=t.length){let i=0;for(let s=0;s<t.length;s++)t[s]?t[i++]=t[s]:n&&i<this.w.end&&(this.w.end--,i<this.w.i&&this.w.i--);t.length=i}}B(e,t){if(!e)return;const r=this.f?.onListenerError||S1;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}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 k1)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}},Er=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}};function Be(){return globalThis._VSCODE_NLS_LANGUAGE}var P2=Be()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0,v1="en",R1=!1,T1=!1,C1=!1,xr=!1,He=!1,fe=!1,Nr=!1,Pr=!1,_r=!1,Sr=!1,D1=void 0,I1=v1,Ve=v1,Or=void 0,t1=void 0,r1=globalThis,V=void 0;typeof r1.vscode<"u"&&typeof r1.vscode.process<"u"?V=r1.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(V=process);var Ke=typeof V?.versions?.electron=="string",kr=Ke&&V?.type==="renderer";if(typeof V=="object"){R1=V.platform==="win32",T1=V.platform==="darwin",C1=V.platform==="linux",xr=C1&&!!V.env.SNAP&&!!V.env.SNAP_REVISION,Nr=Ke,_r=!!V.env.CI||!!V.env.BUILD_ARTIFACTSTAGINGDIRECTORY,D1=v1,I1=v1;const e=V.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);D1=t.userLocale,Ve=t.osLocale,I1=t.resolvedLanguage||v1,Or=t.languagePack?.translationsConfigFile}catch{}He=!0}else typeof navigator=="object"&&!kr?(t1=navigator.userAgent,R1=t1.indexOf("Windows")>=0,T1=t1.indexOf("Macintosh")>=0,Pr=(t1.indexOf("Macintosh")>=0||t1.indexOf("iPad")>=0||t1.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C1=t1.indexOf("Linux")>=0,Sr=t1?.indexOf("Mobi")>=0,fe=!0,I1=Be()||v1,D1=navigator.language.toLowerCase(),Ve=D1):console.error("Unable to resolve platform.");var Qe;(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(Qe||(Qe={}));var he=0;T1?he=1:R1?he=3:C1&&(he=2);var g1=R1,Rr=T1,Je=C1,Tr=He,Ze=fe,Dr=fe&&typeof r1.importScripts=="function",Ir=Dr?r1.origin:void 0,Y=t1,o1=I1,Ge;(function(e){function t(){return o1}e.value=t;function r(){return o1.length===2?o1==="en":o1.length>=3?o1[0]==="e"&&o1[1]==="n"&&o1[2]==="-":!1}e.isDefaultVariant=r;function n(){return o1==="en"}e.isDefault=n})(Ge||(Ge={}));var Mr=typeof r1.postMessage=="function"&&!r1.importScripts,jr=(()=>{if(Mr){const e=[];r1.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}),r1.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Xe;(function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"})(Xe||(Xe={}));var Ur=!!(Y&&Y.indexOf("Chrome")>=0),_2=!!(Y&&Y.indexOf("Firefox")>=0),S2=!!(!Ur&&Y&&Y.indexOf("Safari")>=0),O2=!!(Y&&Y.indexOf("Edg/")>=0),k2=!!(Y&&Y.indexOf("Android")>=0),Ye=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),M1;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof j1?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:O1.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ye})})(M1||(M1={}));var j1=class{constructor(){this.a=!1,this.b=null}cancel(){this.a||(this.a=!0,this.b&&(this.b.fire(void 0),this.dispose()))}get isCancellationRequested(){return this.a}get onCancellationRequested(){return this.a?Ye:(this.b||(this.b=new X),this.b.event)}dispose(){this.b&&(this.b.dispose(),this.b=null)}},qr=class{constructor(e){this.f=void 0,this.g=void 0,this.g=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this.f||(this.f=new j1),this.f}cancel(){this.f?this.f instanceof j1&&this.f.cancel():this.f=M1.Cancelled}dispose(e=!1){e&&this.cancel(),this.g?.dispose(),this.f?this.f instanceof j1&&this.f.dispose():this.f=M1.None}};function Fr(e){return e}var Wr=class{constructor(e,t){this.a=void 0,this.b=void 0,typeof e=="function"?(this.c=e,this.d=Fr):(this.c=t,this.d=e.getCacheKey)}get(e){const t=this.d(e);return this.b!==t&&(this.b=t,this.a=this.c(e)),this.a}},de=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}};function me(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function zr(e,t){if(!e||!t)return e;const r=t.length;if(r===0||e.length===0)return e;let n=0;for(;e.indexOf(t,n)===n;)n=n+r;return e.substring(n)}function Br(e,t,r={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=me(e)),r.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e=e+"\\b"));let n="";return r.global&&(n+="g"),r.matchCase||(n+="i"),r.multiline&&(n+="m"),r.unicode&&(n+="u"),new RegExp(e,n)}function Hr(e,t){return e<t?-1:e>t?1:0}function Vr(e,t,r=0,n=e.length,i=0,s=t.length){for(;r<n&&i<s;r++,i++){const c=e.charCodeAt(r),a=t.charCodeAt(i);if(c<a)return-1;if(c>a)return 1}const l=n-r,o=s-i;return l<o?-1:l>o?1:0}function et(e,t,r=0,n=e.length,i=0,s=t.length){for(;r<n&&i<s;r++,i++){let c=e.charCodeAt(r),a=t.charCodeAt(i);if(c===a)continue;if(c>=128||a>=128)return Vr(e.toLowerCase(),t.toLowerCase(),r,n,i,s);tt(c)&&(c-=32),tt(a)&&(a-=32);const u=c-a;if(u!==0)return u}const l=n-r,o=s-i;return l<o?-1:l>o?1:0}function tt(e){return e>=97&&e<=122}function rt(e){return e>=65&&e<=90}function Kr(e,t){return e.length===t.length&&et(e,t)===0}function Qr(e,t){const r=t.length;return t.length>e.length?!1:et(e,t,0,r)===0}var Jr=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,Zr=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,Gr=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,R2=new RegExp("(?:"+[Jr.source,Zr.source,Gr.source].join("|")+")","g"),T2="\uFEFF",nt;(function(e){e[e.Other=0]="Other",e[e.Prepend=1]="Prepend",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.Control=4]="Control",e[e.Extend=5]="Extend",e[e.Regional_Indicator=6]="Regional_Indicator",e[e.SpacingMark=7]="SpacingMark",e[e.L=8]="L",e[e.V=9]="V",e[e.T=10]="T",e[e.LV=11]="LV",e[e.LVT=12]="LVT",e[e.ZWJ=13]="ZWJ",e[e.Extended_Pictographic=14]="Extended_Pictographic"})(nt||(nt={}));var D2=class A1{static{this.c=null}static getInstance(){return A1.c||(A1.c=new A1),A1.c}constructor(){this.d=Xr()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;const r=this.d,n=r.length/3;let i=1;for(;i<=n;)if(t<r[3*i])i=2*i;else if(t>r[3*i+1])i=2*i+1;else return r[3*i+2];return 0}};function Xr(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441