var f0=Object.defineProperty;var h0=(it,qe,Fe)=>qe in it?f0(it,qe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):it[qe]=Fe;var ke=(it,qe,Fe)=>(h0(it,typeof qe!="symbol"?qe+"":qe,Fe),Fe);(function(){var lo,uo,co,fo;"use strict";class it{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?xt.isErrorNoTelemetry(t)?new xt(t.message+` `+t.stack):new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const qe=new it;function Fe(e){ho(e)||qe.onUnexpectedError(e)}function er(e){if(e instanceof Error){const{name:t,message:n,cause:r}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:xt.isErrorNoTelemetry(e),cause:r?er(r):void 0,code:e.code}}return e}const tr="Canceled";function ho(e){return e instanceof xi?!0:e instanceof Error&&e.name===tr&&e.message===tr}class xi extends Error{constructor(){super(tr),this.name=this.message}}class xt extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof xt)return t;const n=new xt;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}}class le extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,le.prototype)}}function mo(e,t){const n=this;let r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}function go(e,t="Unreachable"){throw new Error(t)}function po(e,t="unexpected state"){if(!e)throw typeof t=="string"?new le(`Assertion Failed: ${t}`):t}function bn(e){if(!e()){debugger;e(),Fe(new le("Assertion Failed"))}}function yi(e,t){let n=0;for(;n=0;S--)yield v[S]}e.reverse=o;function u(v){return!v||v[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(v){return v[Symbol.iterator]().next().value}e.first=l;function h(v,S){let M=0;for(const D of v)if(S(D,M++))return!0;return!1}e.some=h;function f(v,S){let M=0;for(const D of v)if(!S(D,M++))return!1;return!0}e.every=f;function d(v,S){for(const M of v)if(S(M))return M}e.find=d;function*g(v,S){for(const M of v)S(M)&&(yield M)}e.filter=g;function*m(v,S){let M=0;for(const D of v)yield S(D,M++)}e.map=m;function*p(v,S){let M=0;for(const D of v)yield*S(D,M++)}e.flatMap=p;function*w(...v){for(const S of v)wo(S)?yield*S:yield S}e.concat=w;function x(v,S,M){let D=M;for(const T of v)D=S(D,T);return D}e.reduce=x;function L(v){let S=0;for(const M of v)S++;return S}e.length=L;function*b(v,S,M=v.length){for(S<-v.length&&(S=0),S<0&&(S+=v.length),M<0?M+=v.length:M>v.length&&(M=v.length);S1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function xo(...e){return xn(()=>Li(e))}function xn(e){const t=nr({dispose:mo(()=>{rr(t),e()})});return t}const zn=class{constructor(){this._toDispose=new Set,this._isDisposed=!1,nr(this)}dispose(){this._isDisposed||(rr(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Li(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===st.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return vi(t,this),this._isDisposed?zn.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(!!t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}};let Gt=zn;(()=>{zn.DISABLE_DISPOSED_WARNING=!1})();const bi=class{constructor(){this._store=new Gt,nr(this),vi(this._store,this)}dispose(){rr(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};let st=bi;(()=>{bi.None=Object.freeze({dispose(){}})})();const qt=class{constructor(t){this.element=t,this.next=qt.Undefined,this.prev=qt.Undefined}};let Y=qt;(()=>{qt.Undefined=new qt(void 0)})();class yo{constructor(){this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Y.Undefined}clear(){let t=this._first;for(;t!==Y.Undefined;){const n=t.next;t.prev=Y.Undefined,t.next=Y.Undefined,t=n}this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new Y(t);if(this._first===Y.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==Y.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==Y.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==Y.Undefined&&t.next!==Y.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===Y.Undefined&&t.next===Y.Undefined?(this._first=Y.Undefined,this._last=Y.Undefined):t.next===Y.Undefined?(this._last=this._last.prev,this._last.next=Y.Undefined):t.prev===Y.Undefined&&(this._first=this._first.next,this._first.prev=Y.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==Y.Undefined;)yield t.element,t=t.next}}const vo=globalThis.performance.now.bind(globalThis.performance);class yn{static create(t){return new yn(t)}constructor(t){this._now=t===!1?Date.now:vo,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var vn;(function(e){e.None=()=>st.None;function t(y,k){return d(y,()=>{},0,void 0,!0,void 0,k)}e.defer=t;function n(y){return(k,P=null,I)=>{let F=!1,V;return V=y($=>{if(!F)return V?V.dispose():F=!0,k.call(P,$)},null,I),F&&V.dispose(),V}}e.once=n;function r(y,k){return e.once(e.filter(y,k))}e.onceIf=r;function i(y,k,P){return h((I,F=null,V)=>y($=>I.call(F,k($)),null,V),P)}e.map=i;function s(y,k,P){return h((I,F=null,V)=>y($=>{k($),I.call(F,$)},null,V),P)}e.forEach=s;function a(y,k,P){return h((I,F=null,V)=>y($=>k($)&&I.call(F,$),null,V),P)}e.filter=a;function o(y){return y}e.signal=o;function u(...y){return(k,P=null,I)=>{const F=xo(...y.map(V=>V($=>k.call(P,$))));return f(F,I)}}e.any=u;function l(y,k,P,I){let F=P;return i(y,V=>(F=k(F,V),F),I)}e.reduce=l;function h(y,k){let P;const I={onWillAddFirstListener(){P=y(F.fire,F)},onDidRemoveLastListener(){P==null||P.dispose()}},F=new Re(I);return k==null||k.add(F),F.event}function f(y,k){return k instanceof Array?k.push(y):k&&k.add(y),y}function d(y,k,P=100,I=!1,F=!1,V,$){let X,z,Ae,Yn=0,wt;const l0={leakWarningThreshold:V,onWillAddFirstListener(){X=y(u0=>{Yn++,z=k(z,u0),I&&!Ae&&(Kn.fire(z),z=void 0),wt=()=>{const c0=z;z=void 0,Ae=void 0,(!I||Yn>1)&&Kn.fire(c0),Yn=0},typeof P=="number"?(Ae&&clearTimeout(Ae),Ae=setTimeout(wt,P)):Ae===void 0&&(Ae=null,queueMicrotask(wt))})},onWillRemoveListener(){F&&Yn>0&&(wt==null||wt())},onDidRemoveLastListener(){wt=void 0,X.dispose()}},Kn=new Re(l0);return $==null||$.add(Kn),Kn.event}e.debounce=d;function g(y,k=0,P){return e.debounce(y,(I,F)=>I?(I.push(F),I):[F],k,void 0,!0,void 0,P)}e.accumulate=g;function m(y,k=(I,F)=>I===F,P){let I=!0,F;return a(y,V=>{const $=I||!k(V,F);return I=!1,F=V,$},P)}e.latch=m;function p(y,k,P){return[e.filter(y,k,P),e.filter(y,I=>!k(I),P)]}e.split=p;function w(y,k=!1,P=[],I){let F=P.slice(),V=y(z=>{F?F.push(z):X.fire(z)});I&&I.add(V);const $=()=>{F==null||F.forEach(z=>X.fire(z)),F=null},X=new Re({onWillAddFirstListener(){V||(V=y(z=>X.fire(z)),I&&I.add(V))},onDidAddFirstListener(){F&&(k?setTimeout($):$())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return I&&I.add(X),X.event}e.buffer=w;function x(y,k){return(I,F,V)=>{const $=k(new b);return y(function(X){const z=$.evaluate(X);z!==L&&I.call(F,z)},void 0,V)}}e.chain=x;const L=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(P=>(k(P),P)),this}filter(k){return this.steps.push(P=>k(P)?P:L),this}reduce(k,P){let I=P;return this.steps.push(F=>(I=k(I,F),I)),this}latch(k=(P,I)=>P===I){let P=!0,I;return this.steps.push(F=>{const V=P||!k(F,I);return P=!1,I=F,V?F:L}),this}evaluate(k){for(const P of this.steps)if(k=P(k),k===L)break;return k}}function _(y,k,P=I=>I){const I=(...X)=>$.fire(P(...X)),F=()=>y.on(k,I),V=()=>y.removeListener(k,I),$=new Re({onWillAddFirstListener:F,onDidRemoveLastListener:V});return $.event}e.fromNodeEventEmitter=_;function N(y,k,P=I=>I){const I=(...X)=>$.fire(P(...X)),F=()=>y.addEventListener(k,I),V=()=>y.removeEventListener(k,I),$=new Re({onWillAddFirstListener:F,onDidRemoveLastListener:V});return $.event}e.fromDOMEventEmitter=N;function A(y,k){let P;const I=new Promise((F,V)=>{const $=n(y)(F,null,k);P=()=>$.dispose()});return I.cancel=P,I}e.toPromise=A;function v(y,k){return y(P=>k.fire(P))}e.forward=v;function S(y,k,P){return k(P),y(I=>k(I))}e.runAndSubscribe=S;class M{constructor(k,P){this._observable=k,this._counter=0,this._hasChanged=!1;const I={onWillAddFirstListener:()=>{k.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{k.removeObserver(this)}};this.emitter=new Re(I),P&&P.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,P){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(y,k){return new M(y,k).emitter.event}e.fromObservable=D;function T(y){return(k,P,I)=>{let F=0,V=!1;const $={beginUpdate(){F++},endUpdate(){F--,F===0&&(y.reportChanges(),V&&(V=!1,k.call(P)))},handlePossibleChange(){},handleChange(){V=!0}};y.addObserver($),y.reportChanges();const X={dispose(){y.removeObserver($)}};return I instanceof Gt?I.add(X):Array.isArray(I)&&I.push(X),X}}e.fromObservableLight=T})(vn||(vn={}));const jt=class{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${jt._idPool++}`,jt.all.add(this)}start(t){this._stopWatch=new yn,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};let ir=jt;(()=>{jt.all=new Set})(),(()=>{jt._idPool=0})();let Lo=-1;const Gn=class{constructor(t,n,r=(Gn._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,i]of this._stacks)(!t||n{Gn._idPool=1})();class ar{static create(){var n;const t=new Error;return new ar((n=t.stack)!=null?n:"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class _o extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}}class No extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}}class or{constructor(t){this.value=t}}const So=2;class Re{constructor(t){var n,r,i,s,a,o;this._size=0,this._options=t,this._leakageMon=(n=this._options)!=null&&n.leakWarningThreshold?new sr((r=t==null?void 0:t.onListenerError)!=null?r:Fe,(s=(i=this._options)==null?void 0:i.leakWarningThreshold)!=null?s:Lo):void 0,this._perfMon=(a=this._options)!=null&&a._profName?new ir(this._options._profName):void 0,this._deliveryQueue=(o=this._options)==null?void 0:o.deliveryQueue}dispose(){var t,n,r,i;this._disposed||(this._disposed=!0,((t=this._deliveryQueue)==null?void 0:t.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(n=this._options)==null?void 0:n.onDidRemoveLastListener)==null||r.call(n),(i=this._leakageMon)==null||i.dispose())}get event(){var t;return(t=this._event)!=null||(this._event=(n,r,i)=>{var u,l,h,f,d,g,m,p,w;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const x=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(x);const L=(u=this._leakageMon.getMostFrequentStack())!=null?u:["UNKNOWN stack",-1],b=new No(`${x}. HINT: Stack shows most frequent listener (${L[1]}-times)`,L[0]);return(((l=this._options)==null?void 0:l.onListenerError)||Fe)(b),st.None}if(this._disposed)return st.None;r&&(n=n.bind(r));const s=new or(n);let a;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=ar.create(),a=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof or?((m=this._deliveryQueue)!=null||(this._deliveryQueue=new Ao),this._listeners=[this._listeners,s]):this._listeners.push(s):((f=(h=this._options)==null?void 0:h.onWillAddFirstListener)==null||f.call(h,this),this._listeners=s,(g=(d=this._options)==null?void 0:d.onDidAddFirstListener)==null||g.call(d,this)),(w=(p=this._options)==null?void 0:p.onDidAddListener)==null||w.call(p,this),this._size++;const o=xn(()=>{a==null||a(),this._removeListener(s)});return i instanceof Gt?i.add(o):Array.isArray(i)&&i.push(o),o}),this._event}_removeListener(t){var s,a,o,u;if((a=(s=this._options)==null?void 0:s.onWillRemoveListener)==null||a.call(s,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(u=(o=this._options)==null?void 0:o.onDidRemoveLastListener)==null||u.call(o,this),this._size=0;return}const n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*So<=n.length){let l=0;for(let h=0;h0}}class Ao{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function ko(){return globalThis._VSCODE_NLS_MESSAGES}function _i(){return globalThis._VSCODE_NLS_LANGUAGE}const Ro=_i()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Ni(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=t[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),Ro&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function U(e,t,...n){return Ni(typeof e=="number"?Eo(e,t):t,n)}function Eo(e,t){var r;const n=(r=ko())==null?void 0:r[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}const yt="en";let lr=!1,ur=!1,cr=!1,Ln,fr=yt,Si=yt,Mo,Ee;const at=globalThis;let se;typeof at.vscode<"u"&&typeof at.vscode.process<"u"?se=at.vscode.process:typeof process<"u"&&typeof((lo=process==null?void 0:process.versions)==null?void 0:lo.node)=="string"&&(se=process);const To=typeof((uo=se==null?void 0:se.versions)==null?void 0:uo.electron)=="string"&&(se==null?void 0:se.type)==="renderer";if(typeof se=="object"){lr=se.platform==="win32",ur=se.platform==="darwin",cr=se.platform==="linux",cr&&!!se.env.SNAP&&se.env.SNAP_REVISION,!!se.env.CI||!!se.env.BUILD_ARTIFACTSTAGINGDIRECTORY||se.env.GITHUB_WORKSPACE,Ln=yt,fr=yt;const e=se.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);Ln=t.userLocale,Si=t.osLocale,fr=t.resolvedLanguage||yt,Mo=(co=t.languagePack)==null?void 0:co.translationsConfigFile}catch{}}else typeof navigator=="object"&&!To?(Ee=navigator.userAgent,lr=Ee.indexOf("Windows")>=0,ur=Ee.indexOf("Macintosh")>=0,(Ee.indexOf("Macintosh")>=0||Ee.indexOf("iPad")>=0||Ee.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,cr=Ee.indexOf("Linux")>=0,(Ee==null?void 0:Ee.indexOf("Mobi"))>=0,fr=_i()||yt,Ln=navigator.language.toLowerCase(),Si=Ln):console.error("Unable to resolve platform.");const Jt=lr,Po=ur,Ve=Ee,Co=typeof at.postMessage=="function"&&!at.importScripts;(()=>{if(Co){const e=[];at.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{const r=++t;e.push({id:r,callback:n}),at.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();const Io=!!(Ve&&Ve.indexOf("Chrome")>=0);Ve&&Ve.indexOf("Firefox")>=0,!Io&&Ve&&Ve.indexOf("Safari")>=0,Ve&&Ve.indexOf("Edg/")>=0,Ve&&Ve.indexOf("Android")>=0;function Fo(e){return e}class Vo{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=Fo):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){const n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}}var ot;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Running=1]="Running",e[e.Completed=2]="Completed"})(ot||(ot={}));class hr{constructor(t){this.executor=t,this._state=ot.Uninitialized}get value(){if(this._state===ot.Uninitialized){this._state=ot.Running;try{this._value=this.executor()}catch(t){this._error=t}finally{this._state=ot.Completed}}else if(this._state===ot.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Do(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Oo(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}function Bo(e){return e.split(/\r\n|\r|\n/)}function Uo(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Ai(e){return e>=65&&e<=90}function qo(e,t){const n=Math.min(e.length,t.length);let r;for(r=0;rn[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};let Ri=mt;(()=>{mt._INSTANCE=null})();function Go(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}const $e=class{static getInstance(t){return $e.cache.get(Array.from(t))}static getLocales(){return $e._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};let Xt=$e;(()=>{$e.ambiguousCharacterData=new hr(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))})(),(()=>{$e.cache=new Vo({getCacheKey:JSON.stringify},t=>{function n(h){const f=new Map;for(let d=0;d!h.startsWith("_")&&h in s);a.length===0&&(a=["_default"]);let o;for(const h of a){const f=n(s[h]);o=i(o,f)}const u=n(s._common),l=r(u,o);return new $e(l)})})(),(()=>{$e._locales=new hr(()=>Object.keys($e.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))})();const Wt=class{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static getData(){return this._data||(this._data=new Set([...Object.values(Wt.getRawData())].flat())),this._data}static isInvisibleCharacter(t){return Wt.getData().has(t)}static get codePoints(){return Wt.getData()}};let Qt=Wt;(()=>{Wt._data=void 0})();const mr="default",Jo="$initialize";class Xo{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class Ei{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}}class Qo{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class Zo{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class Yo{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class Ko{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new Xo(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null;const s=new Re({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new Qo(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Yo(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(Ti(s)?i[s]=a=>this.listen(t,s,a):Mi(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await(n==null?void 0:n()),this.sendMessage(t,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){const n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(i=>{this._send(new Ei(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=er(i.detail)),this._send(new Ei(this._workerId,n,void 0,er(i)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new Zo(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){const n=[];if(t.type===0)for(let r=0;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===mr&&n===Jo)return this.initialize(r[0]);const i=t===mr?this.requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));if(typeof i[n]!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i[n].apply(i,r))}catch(s){return Promise.reject(s)}}_handleEvent(t,n,r){const i=t===mr?this.requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(Ti(n)){const s=i[n].call(i,r);if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return s}if(Mi(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){const n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t){this._protocol.setWorkerId(t)}}let Pi=!1;function tl(e){if(Pi)throw new Error("WebWorker already initialized!");Pi=!0;const t=new el(n=>globalThis.postMessage(n),n=>e(n));return globalThis.onmessage=n=>{t.onmessage(n.data)},t}class Qe{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}const Ci=typeof Buffer<"u";new hr(()=>new Uint8Array(256));let gr;class pr{static wrap(t){return Ci&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new pr(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}toString(){return Ci?this.buffer.toString():(gr||(gr=new TextDecoder),gr.decode(this.buffer))}}const Ii="0123456789abcdef";function nl({buffer:e}){let t="";for(let n=0;n>>4],t+=Ii[r&15]}return t}function Fi(e,t){return(t<<5)-t+e|0}function rl(e,t){t=Fi(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function Zt(e,t=32){return e instanceof ArrayBuffer?nl(pr.wrap(new Uint8Array(e))):(e>>>0).toString(16).padStart(t/4,"0")}const Jn=class{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){const n=t.length;if(n===0)return;const r=this._buff;let i=this._buffLen,s=this._leftoverHighSurrogate,a,o;for(s!==0?(a=s,o=-1,s=0):(a=t.charCodeAt(0),o=0);;){let u=a;if(_n(a))if(o+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64+0],t[1]=t[64+1],t[2]=t[64+2]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Zt(this._h0)+Zt(this._h1)+Zt(this._h2)+Zt(this._h3)+Zt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));const t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){const t=Jn._bigBlock32,n=this._buffDV;for(let f=0;f<64;f+=4)t.setUint32(f,n.getUint32(f,!1),!1);for(let f=64;f<320;f+=4)t.setUint32(f,br(t.getUint32(f-12,!1)^t.getUint32(f-32,!1)^t.getUint32(f-56,!1)^t.getUint32(f-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,a=this._h3,o=this._h4,u,l,h;for(let f=0;f<80;f++)f<20?(u=i&s|~i&a,l=1518500249):f<40?(u=i^s^a,l=1859775393):f<60?(u=i&s|i&a|s&a,l=2400959708):(u=i^s^a,l=3395469782),h=br(r,5)+u+o+l+t.getUint32(f*4,!1)&4294967295,o=a,a=s,s=br(i,30),i=r,r=h;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+o&4294967295}};let Vi=Jn;(()=>{Jn._bigBlock32=new DataView(new ArrayBuffer(320))})();class Di{constructor(t){this.source=t}getElements(){const t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new Qe(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Ze{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=Ze._getElements(t),[o,u,l]=Ze._getElements(n);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Ze._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let f;return r<=i?(vt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new Qe(t,0,r,i-r+1)]):t<=n?(vt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Qe(t,n-t+1,r,0)]):(vt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),vt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,n,r,i,a,o,s),l=a[0],h=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,r,h,s);let d=[];return s[0]?d=[new Qe(l+1,n-(l+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(l+1,n,h+1,i,s),this.ConcatenateChanges(f,d)}return[new Qe(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,o,u,l,h,f,d,g,m,p,w,x,L){let b=null,_=null,N=new Oi,A=n,v=r,S=g[0]-w[0]-i,M=-1073741824,D=this.m_forwardHistory.length-1;do{const T=S+t;T===A||T=0&&(l=this.m_forwardHistory[D],t=l[0],A=1,v=l.length-1)}while(--D>=-1);if(b=N.getReverseChanges(),L[0]){let T=g[0]+1,y=w[0]+1;if(b!==null&&b.length>0){const k=b[b.length-1];T=Math.max(T,k.getOriginalEnd()),y=Math.max(y,k.getModifiedEnd())}_=[new Qe(T,d-T+1,y,p-y+1)]}else{N=new Oi,A=a,v=o,S=g[0]-w[0]-u,M=1073741824,D=x?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const T=S+s;T===A||T=h[T+1]?(f=h[T+1]-1,m=f-S-u,f>M&&N.MarkNextChange(),M=f+1,N.AddOriginalElement(f+1,m+1),S=T+1-s):(f=h[T-1],m=f-S-u,f>M&&N.MarkNextChange(),M=f,N.AddModifiedElement(f+1,m+1),S=T-1-s),D>=0&&(h=this.m_reverseHistory[D],s=h[0],A=1,v=h.length-1)}while(--D>=-1);_=N.getChanges()}return this.ConcatenateChanges(b,_)}ComputeRecursionPoint(t,n,r,i,s,a,o){let u=0,l=0,h=0,f=0,d=0,g=0;t--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=n-t+(i-r),p=m+1,w=new Int32Array(p),x=new Int32Array(p),L=i-r,b=n-t,_=t-r,N=n-i,v=(b-L)%2===0;w[L]=t,x[b]=n,o[0]=!1;for(let S=1;S<=m/2+1;S++){let M=0,D=0;h=this.ClipDiagonalBound(L-S,S,L,p),f=this.ClipDiagonalBound(L+S,S,L,p);for(let y=h;y<=f;y+=2){y===h||yM+D&&(M=u,D=l),!v&&Math.abs(y-b)<=S-1&&u>=x[y])return s[0]=u,a[0]=l,k<=x[y]&&1447>0&&S<=1447+1?this.WALKTRACE(L,h,f,_,b,d,g,N,w,x,u,n,s,l,i,a,v,o):null}const T=(M-t+(D-r)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(M,T))return o[0]=!0,s[0]=M,a[0]=D,T>0&&1447>0&&S<=1447+1?this.WALKTRACE(L,h,f,_,b,d,g,N,w,x,u,n,s,l,i,a,v,o):(t++,r++,[new Qe(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(b-S,S,b,p),g=this.ClipDiagonalBound(b+S,S,b,p);for(let y=d;y<=g;y+=2){y===d||y=x[y+1]?u=x[y+1]-1:u=x[y-1],l=u-(y-b)-N;const k=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(x[y]=u,v&&Math.abs(y-L)<=S&&u<=w[y])return s[0]=u,a[0]=l,k>=w[y]&&1447>0&&S<=1447+1?this.WALKTRACE(L,h,f,_,b,d,g,N,w,x,u,n,s,l,i,a,v,o):null}if(S<=1447){let y=new Int32Array(f-h+2);y[0]=L-h+1,Lt.Copy2(w,h,y,1,f-h+1),this.m_forwardHistory.push(y),y=new Int32Array(g-d+2),y[0]=b-d+1,Lt.Copy2(x,d,y,1,g-d+1),this.m_reverseHistory.push(y)}}return this.WALKTRACE(L,h,f,_,b,d,g,N,w,x,u,n,s,l,i,a,v,o)}PrettifyChanges(t){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,s=0;if(n>0){const f=t[n-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){const d=r.originalStart-f,g=r.modifiedStart-f;if(dl&&(l=p,u=f)}r.originalStart-=u,r.modifiedStart-=u;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&g>u&&(u=g,l=f,h=d)}return u>0?[l,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const s=this._OriginalRegionIsBoundary(t,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return Lt.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],Lt.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return Lt.Copy(t,0,i,0,t.length),Lt.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(vt.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),vt.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new Qe(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return O.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return O.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return O.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return O.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return O.plusRange(this,t)}static plusRange(t,n){let r,i,s,a;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new O(r,i,s,a)}intersectRanges(t){return O.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn;const o=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,h=n.endColumn;return rl?(s=l,a=h):s===l&&(a=Math.min(a,h)),r>s||r===s&&i>a?null:new O(r,i,s,a)}equalsRange(t){return O.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return O.getEndPosition(this)}static getEndPosition(t){return new G(t.endLineNumber,t.endColumn)}getStartPosition(){return O.getStartPosition(this)}static getStartPosition(t){return new G(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new O(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new O(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return O.collapseToStart(this)}static collapseToStart(t){return new O(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return O.collapseToEnd(this)}static collapseToEnd(t){return new O(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new O(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,n=t){return new O(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new O(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}}function Bi(e){return e<0?0:e>255?255:e|0}function _t(e){return e<0?0:e>4294967295?4294967295:e|0}class wr{constructor(t){const n=Bi(t);this._defaultValue=n,this._asciiMap=wr._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=Bi(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class sl{constructor(t,n,r){const i=new Uint8Array(t*n);for(let s=0,a=t*n;sn&&(n=u),o>r&&(r=o),l>r&&(r=l)}n++,r++;const i=new sl(r,n,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,n)}}let xr=null;function ol(){return xr===null&&(xr=new al([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),xr}let Yt=null;function ll(){if(Yt===null){Yt=new wr(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026|`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),u=n.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(t,n=ol()){const r=ll(),i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,h=0,f=0,d=1,g=!1,m=!1,p=!1,w=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}};let yr=Xn;(()=>{Xn.INSTANCE=new Xn})();const Ui=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Sn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof An?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:vn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ui})})(Sn||(Sn={}));class An{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ui:(this._emitter||(this._emitter=new Re),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class cl{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new An),this._token}cancel(){this._token?this._token instanceof An&&this._token.cancel():this._token=Sn.Cancelled}dispose(t=!1){var n;t&&this.cancel(),(n=this._parentListener)==null||n.dispose(),this._token?this._token instanceof An&&this._token.dispose():this._token=Sn.None}}class vr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const kn=new vr,Lr=new vr,_r=new vr,fl=new Array(230),hl=Object.create(null),dl=Object.create(null);(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(const i of t){const[s,a,o,u,l,h,f,d,g]=i;if(r[a]||(r[a]=!0,hl[o]=a,dl[o.toLowerCase()]=a),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${o}`);kn.define(u,l),Lr.define(u,d||l),_r.define(u,g||d||l)}h&&(fl[h]=u)}})();var $i;(function(e){function t(o){return kn.keyCodeToStr(o)}e.toString=t;function n(o){return kn.strToKeyCode(o)}e.fromString=n;function r(o){return Lr.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return _r.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function s(o){return Lr.strToKeyCode(o)||_r.strToKeyCode(o)}e.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return kn.keyCodeToStr(o)}e.toElectronAccelerator=a})($i||($i={}));function ml(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}let Nt;const Nr=globalThis.vscode;if(typeof Nr<"u"&&typeof Nr.process<"u"){const e=Nr.process;Nt={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof((fo=process==null?void 0:process.versions)==null?void 0:fo.node)=="string"?Nt={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Nt={get platform(){return Jt?"win32":Po?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const Rn=Nt.cwd,gl=Nt.env,pl=Nt.platform,bl=65,wl=97,xl=90,yl=122,lt=46,ae=47,de=92,We=58,vl=63;class qi extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function Ll(e,t){if(e===null||typeof e!="object")throw new qi(t,"Object",e)}function te(e,t){if(typeof e!="string")throw new qi(t,"string",e)}const Ye=pl==="win32";function q(e){return e===ae||e===de}function Sr(e){return e===ae}function He(e){return e>=bl&&e<=xl||e>=wl&&e<=yl}function En(e,t,n,r){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l2){const h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===lt&&o!==-1?++o:o=-1}return i}function _l(e){return e?`${e[0]==="."?"":"."}${e}`:""}function ji(e,t){Ll(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${_l(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const fe={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],te(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=Rn():(s=gl[`=${t}`]||Rn(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===de)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const h=s.charCodeAt(0);if(a===1)q(h)&&(o=1,l=!0);else if(q(h))if(l=!0,q(s.charCodeAt(1))){let f=2,d=f;for(;f2&&q(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=l,l&&t.length>0)break}return n=En(n,!r,"\\",q),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){te(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const s=e.charCodeAt(0);if(t===1)return Sr(s)?"\\":e;if(q(s))if(i=!0,q(e.charCodeAt(1))){let o=2,u=o;for(;o2&&q(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&q(e.charCodeAt(t-1))&&(a+="\\"),!i&&r===void 0&&e.includes(":")){if(a.length>=2&&He(a.charCodeAt(0))&&a.charCodeAt(1)===We)return`.\\${a}`;let o=e.indexOf(":");do if(o===t-1||q(e.charCodeAt(o+1)))return`.\\${a}`;while((o=e.indexOf(":",o+1))!==-1)}return r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){te(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return q(n)||t>2&&He(n)&&e.charCodeAt(1)===We&&q(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=a:t+=`\\${a}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&q(n.charCodeAt(0))){++i;const s=n.length;s>1&&q(n.charCodeAt(1))&&(++i,s>2&&(q(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return fe.normalize(t)},relative(e,t){if(te(e,"from"),te(t,"to"),e===t)return"";const n=fe.resolve(e),r=fe.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";if(n.length!==e.length||r.length!==t.length){const m=n.split("\\"),p=r.split("\\");m[m.length-1]===""&&m.pop(),p[p.length-1]===""&&p.pop();const w=m.length,x=p.length,L=wL?p.slice(b).join("\\"):w>L?"..\\".repeat(w-1-b)+"..":"":"..\\".repeat(w-b)+p.slice(b).join("\\")}let i=0;for(;ii&&e.charCodeAt(s-1)===de;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(u-1)===de;)u--;const l=u-o,h=ah){if(t.charCodeAt(o+d)===de)return r.slice(o+d+1);if(d===2)return r.slice(o+d)}a>h&&(e.charCodeAt(i+d)===de?f=d:d===2&&(f=3)),f===-1&&(f=0)}let g="";for(d=i+f+1;d<=s;++d)(d===s||e.charCodeAt(d)===de)&&(g+=g.length===0?"..":"\\..");return o+=f,g.length>0?`${g}${r.slice(o,u)}`:(r.charCodeAt(o)===de&&++o,r.slice(o,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=fe.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===de){if(t.charCodeAt(1)===de){const n=t.charCodeAt(2);if(n!==vl&&n!==lt)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(He(t.charCodeAt(0))&&t.charCodeAt(1)===We&&t.charCodeAt(2)===de)return`\\\\?\\${t}`;return t},dirname(e){te(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return q(i)?e:".";if(q(i)){if(n=r=1,q(e.charCodeAt(1))){let o=2,u=o;for(;o2&&q(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=t-1;o>=r;--o)if(q(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&te(t,"suffix"),te(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&He(e.charCodeAt(0))&&e.charCodeAt(1)===We&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=n;--s){const u=e.charCodeAt(s);if(q(u)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(q(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){te(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===We&&He(e.charCodeAt(0))&&(t=r=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(q(u)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===lt?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:ji.bind(null,"\\"),parse(e){te(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return q(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(q(i)){if(r=1,q(e.charCodeAt(1))){let f=2,d=f;for(;f0&&(t.root=e.slice(0,r));let s=-1,a=r,o=-1,u=!0,l=e.length-1,h=0;for(;l>=r;--l){if(i=e.charCodeAt(l),q(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===lt?s===-1?s=l:h!==1&&(h=1):s!==-1&&(h=-1)}return o!==-1&&(s===-1||h===0||h===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==r?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Nl=(()=>{if(Ye){const e=/\\/g;return()=>{const t=Rn().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Rn()})(),me={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=0&&!n;r--){const i=e[r];te(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===ae)}if(!n){const r=Nl();t=`${r}/${t}`,n=r.charCodeAt(0)===ae}return t=En(t,!n,"/",Sr),n?`/${t}`:t.length>0?t:"."},normalize(e){if(te(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ae,n=e.charCodeAt(e.length-1)===ae;return e=En(e,!t,"/",Sr),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return te(e,"path"),e.length>0&&e.charCodeAt(0)===ae},join(...e){if(e.length===0)return".";const t=[];for(let n=0;n0&&t.push(r)}return t.length===0?".":me.normalize(t.join("/"))},relative(e,t){if(te(e,"from"),te(t,"to"),e===t||(e=me.resolve(e),t=me.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,s=1,a=t.length-s,o=io){if(t.charCodeAt(s+l)===ae)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(n+l)===ae?u=l:l===0&&(u=0));let h="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===ae)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(te(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ae;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ae){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&te(t,"suffix"),te(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===ae){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===ae){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){te(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e[a];if(o==="/"){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o==="."?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:ji.bind(null,"/"),parse(e){te(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===ae;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=r;--u){const h=e.charCodeAt(u);if(h===ae){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),h===lt?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const h=s===0&&n?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(h,a):(t.name=e.slice(h,i),t.base=e.slice(h,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};me.win32=fe.win32=fe,me.posix=fe.posix=me,Ye?fe.normalize:me.normalize,Ye?fe.resolve:me.resolve,Ye?fe.relative:me.relative,Ye?fe.dirname:me.dirname,Ye?fe.basename:me.basename,Ye?fe.extname:me.extname,Ye?fe.sep:me.sep;const Sl=/^\w[\w\d+.-]*$/,Al=/^\//,kl=/^\/\//;function Rl(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&&!Sl.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Al.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(kl.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 El(e,t){return!e&&!t?"file":e}function Ml(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Me&&(t=Me+t):t=Me;break}return t}const Z="",Me="/",Tl=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ut{static isUri(t){return t instanceof ut?!0:!t||typeof t!="object"?!1: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"}constructor(t,n,r,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Z,this.authority=t.authority||Z,this.path=t.path||Z,this.query=t.query||Z,this.fragment=t.fragment||Z):(this.scheme=El(t,a),this.authority=n||Z,this.path=Ml(this.scheme,r||Z),this.query=i||Z,this.fragment=s||Z,Rl(this,a))}get fsPath(){return Ar(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=t;return n===void 0?n=this.scheme:n===null&&(n=Z),r===void 0?r=this.authority:r===null&&(r=Z),i===void 0?i=this.path:i===null&&(i=Z),s===void 0?s=this.query:s===null&&(s=Z),a===void 0?a=this.fragment:a===null&&(a=Z),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new St(n,r,i,s,a)}static parse(t,n=!1){const r=Tl.exec(t);return r?new St(r[2]||Z,Mn(r[4]||Z),Mn(r[5]||Z),Mn(r[7]||Z),Mn(r[9]||Z),n):new St(Z,Z,Z,Z,Z)}static file(t){let n=Z;if(Jt&&(t=t.replace(/\\/g,Me)),t[0]===Me&&t[1]===Me){const r=t.indexOf(Me,2);r===-1?(n=t.substring(2),t=Me):(n=t.substring(2,r),t=t.substring(r)||Me)}return new St("file",n,t,Z,Z)}static from(t,n){return new St(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Jt&&t.scheme==="file"?r=ut.file(fe.join(Ar(t,!0),...n)).path:r=me.join(t.path,...n),t.with({path:r})}toString(t=!1){return kr(this,t)}toJSON(){return this}static revive(t){var n,r;if(t){if(t instanceof ut)return t;{const i=new St(t);return i._formatted=(n=t.external)!=null?n:null,i._fsPath=t._sep===Wi&&(r=t.fsPath)!=null?r:null,i}}else return t}}const Wi=Jt?1:void 0;class St extends ut{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ar(this,!1)),this._fsPath}toString(t=!1){return t?kr(this,!0):(this._formatted||(this._formatted=kr(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Wi),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Hi={[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 zi(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));const o=Hi[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function Pl(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${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?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Jt&&(n=n.replace(/\//g,"\\")),n}function kr(e,t){const n=t?Pl:zi;let r="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Me,r+=Me),s){let l=s.indexOf("@");if(l!==-1){const h=s.substr(0,l);s=s.substr(l+1),l=h.lastIndexOf(":"),l===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,l),!1,!1),r+=":",r+=n(h.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),u&&(r+="#",r+=t?u:zi(u,!1,!1)),r}function Gi(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Gi(e.substr(3)):e}}const Ji=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Mn(e){return e.match(Ji)?e.replace(Ji,t=>Gi(t)):e}class pe extends O{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return pe.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new pe(this.startLineNumber,this.startColumn,t,n):new pe(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new G(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new G(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new pe(t,n,this.endLineNumber,this.endColumn):new pe(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new pe(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new pe(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new pe(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new pe(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){var i;(i=this._factories.get(t))==null||i.dispose();const r=new Vl(this,t,n);return this._factories.set(t,r),xn(()=>{const s=this._factories.get(t);!s||s!==r||(this._factories.delete(t),s.dispose())})}async getOrCreate(t){const n=this.get(t);if(n)return n;const r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;const r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Vl extends st{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}}class Dl{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Qi;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Qi||(Qi={}));var Zi;(function(e){const t=new Map;t.set(0,B.symbolMethod),t.set(1,B.symbolFunction),t.set(2,B.symbolConstructor),t.set(3,B.symbolField),t.set(4,B.symbolVariable),t.set(5,B.symbolClass),t.set(6,B.symbolStruct),t.set(7,B.symbolInterface),t.set(8,B.symbolModule),t.set(9,B.symbolProperty),t.set(10,B.symbolEvent),t.set(11,B.symbolOperator),t.set(12,B.symbolUnit),t.set(13,B.symbolValue),t.set(15,B.symbolEnum),t.set(14,B.symbolConstant),t.set(15,B.symbolEnum),t.set(16,B.symbolEnumMember),t.set(17,B.symbolKeyword),t.set(28,B.symbolSnippet),t.set(18,B.symbolText),t.set(19,B.symbolColor),t.set(20,B.symbolFile),t.set(21,B.symbolReference),t.set(22,B.symbolCustomColor),t.set(23,B.symbolFolder),t.set(24,B.symbolTypeParameter),t.set(25,B.account),t.set(26,B.issues),t.set(27,B.tools);function n(a){let o=t.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=B.symbolProperty),o}e.toIcon=n;function r(a){switch(a){case 0:return U(721,"Method");case 1:return U(722,"Function");case 2:return U(723,"Constructor");case 3:return U(724,"Field");case 4:return U(725,"Variable");case 5:return U(726,"Class");case 6:return U(727,"Struct");case 7:return U(728,"Interface");case 8:return U(729,"Module");case 9:return U(730,"Property");case 10:return U(731,"Event");case 11:return U(732,"Operator");case 12:return U(733,"Unit");case 13:return U(734,"Value");case 14:return U(735,"Constant");case 15:return U(736,"Enum");case 16:return U(737,"Enum Member");case 17:return U(738,"Keyword");case 18:return U(739,"Text");case 19:return U(740,"Color");case 20:return U(741,"File");case 21:return U(742,"Reference");case 22:return U(743,"Custom Color");case 23:return U(744,"Folder");case 24:return U(745,"Type Parameter");case 25:return U(746,"User");case 26:return U(747,"Issue");case 27:return U(748,"Tool");case 28:return U(749,"Snippet");default:return""}}e.toLabel=r;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(a,o){let u=i.get(a);return typeof u>"u"&&!o&&(u=9),u}e.fromString=s})(Zi||(Zi={}));var Yi;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Yi||(Yi={}));var Ki;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(Ki||(Ki={}));var es;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(es||(es={}));var ts;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(ts||(ts={}));var ns;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(ns||(ns={}));var rs;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(rs||(rs={})),17+"",U(750,"array"),16+"",U(751,"boolean"),4+"",U(752,"class"),13+"",U(753,"constant"),8+"",U(754,"constructor"),9+"",U(755,"enumeration"),21+"",U(756,"enumeration member"),23+"",U(757,"event"),7+"",U(758,"field"),0+"",U(759,"file"),11+"",U(760,"function"),10+"",U(761,"interface"),19+"",U(762,"key"),5+"",U(763,"method"),1+"",U(764,"module"),2+"",U(765,"namespace"),20+"",U(766,"null"),15+"",U(767,"number"),18+"",U(768,"object"),24+"",U(769,"operator"),3+"",U(770,"package"),6+"",U(771,"property"),14+"",U(772,"string"),22+"",U(773,"struct"),25+"",U(774,"type parameter"),12+"",U(775,"variable");var is;(function(e){const t=new Map;t.set(0,B.symbolFile),t.set(1,B.symbolModule),t.set(2,B.symbolNamespace),t.set(3,B.symbolPackage),t.set(4,B.symbolClass),t.set(5,B.symbolMethod),t.set(6,B.symbolProperty),t.set(7,B.symbolField),t.set(8,B.symbolConstructor),t.set(9,B.symbolEnum),t.set(10,B.symbolInterface),t.set(11,B.symbolFunction),t.set(12,B.symbolVariable),t.set(13,B.symbolConstant),t.set(14,B.symbolString),t.set(15,B.symbolNumber),t.set(16,B.symbolBoolean),t.set(17,B.symbolArray),t.set(18,B.symbolObject),t.set(19,B.symbolKey),t.set(20,B.symbolNull),t.set(21,B.symbolEnumMember),t.set(22,B.symbolStruct),t.set(23,B.symbolEvent),t.set(24,B.symbolOperator),t.set(25,B.symbolTypeParameter);function n(s){let a=t.get(s);return a||(console.info("No codicon found for SymbolKind "+s),a=B.symbolProperty),a}e.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let a=r.get(s);return a===void 0&&(console.info("No completion kind found for SymbolKind "+s),a=20),a}e.toCompletionKind=i})(is||(is={}));const Ne=class{static fromValue(t){switch(t){case"comment":return Ne.Comment;case"imports":return Ne.Imports;case"region":return Ne.Region}return new Ne(t)}constructor(t){this.value=t}};let ss=Ne;(()=>{Ne.Comment=new Ne("comment")})(),(()=>{Ne.Imports=new Ne("imports")})(),(()=>{Ne.Region=new Ne("region")})();var as;(function(e){e[e.AIGenerated=1]="AIGenerated"})(as||(as={}));var os;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(os||(os={}));var ls;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(ls||(ls={}));var us;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(us||(us={})),new Fl;var cs;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(cs||(cs={}));var fs;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(fs||(fs={}));var hs;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(hs||(hs={}));var ds;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Tool=27]="Tool",e[e.Snippet=28]="Snippet"})(ds||(ds={}));var ms;(function(e){e[e.Deprecated=1]="Deprecated"})(ms||(ms={}));var gs;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(gs||(gs={}));var ps;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(ps||(ps={}));var bs;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(bs||(bs={}));var ws;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ws||(ws={}));var xs;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(xs||(xs={}));var ys;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(ys||(ys={}));var vs;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.allowOverflow=4]="allowOverflow",e[e.allowVariableLineHeights=5]="allowVariableLineHeights",e[e.allowVariableFonts=6]="allowVariableFonts",e[e.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",e[e.ariaLabel=8]="ariaLabel",e[e.ariaRequired=9]="ariaRequired",e[e.autoClosingBrackets=10]="autoClosingBrackets",e[e.autoClosingComments=11]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=13]="autoClosingDelete",e[e.autoClosingOvertype=14]="autoClosingOvertype",e[e.autoClosingQuotes=15]="autoClosingQuotes",e[e.autoIndent=16]="autoIndent",e[e.autoIndentOnPaste=17]="autoIndentOnPaste",e[e.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",e[e.automaticLayout=19]="automaticLayout",e[e.autoSurround=20]="autoSurround",e[e.bracketPairColorization=21]="bracketPairColorization",e[e.guides=22]="guides",e[e.codeLens=23]="codeLens",e[e.codeLensFontFamily=24]="codeLensFontFamily",e[e.codeLensFontSize=25]="codeLensFontSize",e[e.colorDecorators=26]="colorDecorators",e[e.colorDecoratorsLimit=27]="colorDecoratorsLimit",e[e.columnSelection=28]="columnSelection",e[e.comments=29]="comments",e[e.contextmenu=30]="contextmenu",e[e.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",e[e.cursorBlinking=32]="cursorBlinking",e[e.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",e[e.cursorStyle=34]="cursorStyle",e[e.cursorSurroundingLines=35]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",e[e.cursorWidth=37]="cursorWidth",e[e.cursorHeight=38]="cursorHeight",e[e.disableLayerHinting=39]="disableLayerHinting",e[e.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",e[e.domReadOnly=41]="domReadOnly",e[e.dragAndDrop=42]="dragAndDrop",e[e.dropIntoEditor=43]="dropIntoEditor",e[e.editContext=44]="editContext",e[e.emptySelectionClipboard=45]="emptySelectionClipboard",e[e.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",e[e.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",e[e.extraEditorClassName=48]="extraEditorClassName",e[e.fastScrollSensitivity=49]="fastScrollSensitivity",e[e.find=50]="find",e[e.fixedOverflowWidgets=51]="fixedOverflowWidgets",e[e.folding=52]="folding",e[e.foldingStrategy=53]="foldingStrategy",e[e.foldingHighlight=54]="foldingHighlight",e[e.foldingImportsByDefault=55]="foldingImportsByDefault",e[e.foldingMaximumRegions=56]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=58]="fontFamily",e[e.fontInfo=59]="fontInfo",e[e.fontLigatures=60]="fontLigatures",e[e.fontSize=61]="fontSize",e[e.fontWeight=62]="fontWeight",e[e.fontVariations=63]="fontVariations",e[e.formatOnPaste=64]="formatOnPaste",e[e.formatOnType=65]="formatOnType",e[e.glyphMargin=66]="glyphMargin",e[e.gotoLocation=67]="gotoLocation",e[e.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",e[e.hover=69]="hover",e[e.inDiffEditor=70]="inDiffEditor",e[e.inlineSuggest=71]="inlineSuggest",e[e.letterSpacing=72]="letterSpacing",e[e.lightbulb=73]="lightbulb",e[e.lineDecorationsWidth=74]="lineDecorationsWidth",e[e.lineHeight=75]="lineHeight",e[e.lineNumbers=76]="lineNumbers",e[e.lineNumbersMinChars=77]="lineNumbersMinChars",e[e.linkedEditing=78]="linkedEditing",e[e.links=79]="links",e[e.matchBrackets=80]="matchBrackets",e[e.minimap=81]="minimap",e[e.mouseStyle=82]="mouseStyle",e[e.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=84]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",e[e.multiCursorModifier=86]="multiCursorModifier",e[e.multiCursorPaste=87]="multiCursorPaste",e[e.multiCursorLimit=88]="multiCursorLimit",e[e.occurrencesHighlight=89]="occurrencesHighlight",e[e.occurrencesHighlightDelay=90]="occurrencesHighlightDelay",e[e.overtypeCursorStyle=91]="overtypeCursorStyle",e[e.overtypeOnPaste=92]="overtypeOnPaste",e[e.overviewRulerBorder=93]="overviewRulerBorder",e[e.overviewRulerLanes=94]="overviewRulerLanes",e[e.padding=95]="padding",e[e.pasteAs=96]="pasteAs",e[e.parameterHints=97]="parameterHints",e[e.peekWidgetDefaultFocus=98]="peekWidgetDefaultFocus",e[e.placeholder=99]="placeholder",e[e.definitionLinkOpensInPeek=100]="definitionLinkOpensInPeek",e[e.quickSuggestions=101]="quickSuggestions",e[e.quickSuggestionsDelay=102]="quickSuggestionsDelay",e[e.readOnly=103]="readOnly",e[e.readOnlyMessage=104]="readOnlyMessage",e[e.renameOnType=105]="renameOnType",e[e.renderRichScreenReaderContent=106]="renderRichScreenReaderContent",e[e.renderControlCharacters=107]="renderControlCharacters",e[e.renderFinalNewline=108]="renderFinalNewline",e[e.renderLineHighlight=109]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=110]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=111]="renderValidationDecorations",e[e.renderWhitespace=112]="renderWhitespace",e[e.revealHorizontalRightPadding=113]="revealHorizontalRightPadding",e[e.roundedSelection=114]="roundedSelection",e[e.rulers=115]="rulers",e[e.scrollbar=116]="scrollbar",e[e.scrollBeyondLastColumn=117]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=118]="scrollBeyondLastLine",e[e.scrollPredominantAxis=119]="scrollPredominantAxis",e[e.selectionClipboard=120]="selectionClipboard",e[e.selectionHighlight=121]="selectionHighlight",e[e.selectionHighlightMaxLength=122]="selectionHighlightMaxLength",e[e.selectionHighlightMultiline=123]="selectionHighlightMultiline",e[e.selectOnLineNumbers=124]="selectOnLineNumbers",e[e.showFoldingControls=125]="showFoldingControls",e[e.showUnused=126]="showUnused",e[e.snippetSuggestions=127]="snippetSuggestions",e[e.smartSelect=128]="smartSelect",e[e.smoothScrolling=129]="smoothScrolling",e[e.stickyScroll=130]="stickyScroll",e[e.stickyTabStops=131]="stickyTabStops",e[e.stopRenderingLineAfter=132]="stopRenderingLineAfter",e[e.suggest=133]="suggest",e[e.suggestFontSize=134]="suggestFontSize",e[e.suggestLineHeight=135]="suggestLineHeight",e[e.suggestOnTriggerCharacters=136]="suggestOnTriggerCharacters",e[e.suggestSelection=137]="suggestSelection",e[e.tabCompletion=138]="tabCompletion",e[e.tabIndex=139]="tabIndex",e[e.trimWhitespaceOnDelete=140]="trimWhitespaceOnDelete",e[e.unicodeHighlighting=141]="unicodeHighlighting",e[e.unusualLineTerminators=142]="unusualLineTerminators",e[e.useShadowDOM=143]="useShadowDOM",e[e.useTabStops=144]="useTabStops",e[e.wordBreak=145]="wordBreak",e[e.wordSegmenterLocales=146]="wordSegmenterLocales",e[e.wordSeparators=147]="wordSeparators",e[e.wordWrap=148]="wordWrap",e[e.wordWrapBreakAfterCharacters=149]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=150]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=151]="wordWrapColumn",e[e.wordWrapOverride1=152]="wordWrapOverride1",e[e.wordWrapOverride2=153]="wordWrapOverride2",e[e.wrappingIndent=154]="wrappingIndent",e[e.wrappingStrategy=155]="wrappingStrategy",e[e.showDeprecated=156]="showDeprecated",e[e.inertialScroll=157]="inertialScroll",e[e.inlayHints=158]="inlayHints",e[e.wrapOnEscapedLineFeeds=159]="wrapOnEscapedLineFeeds",e[e.effectiveCursorStyle=160]="effectiveCursorStyle",e[e.editorClassName=161]="editorClassName",e[e.pixelRatio=162]="pixelRatio",e[e.tabFocusMode=163]="tabFocusMode",e[e.layoutInfo=164]="layoutInfo",e[e.wrappingInfo=165]="wrappingInfo",e[e.defaultColorDecorators=166]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=167]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=168]="inlineCompletionsAccessibilityVerbose",e[e.effectiveEditContext=169]="effectiveEditContext",e[e.scrollOnMiddleClick=170]="scrollOnMiddleClick",e[e.effectiveAllowVariableFonts=171]="effectiveAllowVariableFonts"})(vs||(vs={}));var Ls;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Ls||(Ls={}));var _s;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(_s||(_s={}));var Ns;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Ns||(Ns={}));var Ss;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Ss||(Ss={}));var As;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(As||(As={}));var ks;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(ks||(ks={}));var Rs;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Rs||(Rs={}));var Es;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(Es||(Es={}));var Ms;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(Ms||(Ms={}));var Ts;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Ts||(Ts={}));var Rr;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Rr||(Rr={}));var Er;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Er||(Er={}));var Mr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Mr||(Mr={}));var Ps;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Ps||(Ps={}));var Cs;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Cs||(Cs={}));var Is;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Is||(Is={}));var Fs;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Fs||(Fs={}));var Vs;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Vs||(Vs={}));var Ds;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(Ds||(Ds={}));var Os;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Os||(Os={}));var Bs;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(Bs||(Bs={}));var Us;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(Us||(Us={}));var $s;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})($s||($s={}));var qs;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(qs||(qs={}));var js;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(js||(js={}));var Ws;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Ws||(Ws={}));var Tr;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Tr||(Tr={}));var Hs;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(Hs||(Hs={}));var zs;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(zs||(zs={}));var Gs;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(Gs||(Gs={}));var Js;(function(e){e[e.Deprecated=1]="Deprecated"})(Js||(Js={}));var Xs;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Xs||(Xs={}));var Qs;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(Qs||(Qs={}));var Zs;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Zs||(Zs={}));var Ys;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Ys||(Ys={}));var Ks;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Ks||(Ks={}));const Ht=class{static chord(t,n){return ml(t,n)}};let Pr=Ht;(()=>{Ht.CtrlCmd=2048})(),(()=>{Ht.Shift=1024})(),(()=>{Ht.Alt=512})(),(()=>{Ht.WinCtrl=256})();function Ol(){return{editor:void 0,languages:void 0,CancellationTokenSource:cl,Emitter:Re,KeyCode:Rr,KeyMod:Pr,Position:G,Range:O,Selection:pe,SelectionDirection:Tr,MarkerSeverity:Er,MarkerTag:Mr,Uri:ut,Token:Dl}}var e1,t1;class Bl{constructor(t,n){this.uri=t,this.value=n}}function Ul(e){return Array.isArray(e)}const gt=class{constructor(t,n){if(this[e1]="ResourceMap",t instanceof gt)this.map=new Map(t.map),this.toKey=n!=null?n:gt.defaultToKey;else if(Ul(t)){this.map=new Map,this.toKey=n!=null?n:gt.defaultToKey;for(const[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t!=null?t:gt.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new Bl(t,n)),this}get(t){var n;return(n=this.map.get(this.toKey(t)))==null?void 0:n.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(const[r,i]of this.map)t(i.value,i.uri,this)}*values(){for(const t of this.map.values())yield t.value}*keys(){for(const t of this.map.values())yield t.uri}*entries(){for(const t of this.map.values())yield[t.uri,t.value]}*[(e1=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.map)yield[t.uri,t.value]}};let n1=gt;(()=>{gt.defaultToKey=t=>t.toString()})();class $l{constructor(){this[t1]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)==null?void 0:t.value}get last(){var t;return(t=this._tail)==null?void 0:t.value}has(t){return this._map.has(t)}get(t,n=0){const r=this._map.get(t);if(!!r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const n=this._map.get(t);if(!!n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){const r=this._state;let i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(t1=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;const r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;const r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(const[n,r]of t)this.set(n,r)}}class ql extends $l{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class jl extends ql{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}}class Wl{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){const r=this.map.get(t);!r||(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){const r=this.map.get(t);!r||r.forEach(n)}}new jl(10);var r1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(r1||(r1={}));var i1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(i1||(i1={}));var s1;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(s1||(s1={}));var a1;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(a1||(a1={}));function Hl(e){if(!e||e.length===0)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(i===110||i===114||i===87)return!0}}return!1}function zl(e,t,n,r,i){if(r===0)return!0;const s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r);if(e.get(a)!==0)return!0}return!1}function Gl(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r+i-1);if(e.get(a)!==0)return!0}return!1}function Jl(e,t,n,r,i){return zl(e,t,n,r,i)&&Gl(e,t,n,r,i)}class Xl{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const n=t.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Wo(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Jl(this._wordSeparators,t,n,i,s))return r}while(r);return null}}const Ql="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Zl(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of Ql)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const o1=Zl();function l1(e){let t=o1;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const u1=new yo;u1.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Cr(e,t,n,r,i){if(t=l1(t),i||(i=wn.first(u1)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Cr(e,t,n,r,i)}const s=Date.now(),a=e-1-r;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const h=a-i.windowSize*l;t.lastIndex=Math.max(0,h);const f=Yl(t,n,a,o);if(!f&&u||(u=f,h<=0))break;o=h}if(u){const l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Yl(e,t,n,r){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class Kl{static computeUnicodeHighlights(t,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),a=new c1(n),o=a.getCandidateCodePoints();let u;o==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${eu(Array.from(o))}`,"g");const l=new Xl(null,u),h=[];let f=!1,d,g=0,m=0,p=0;e:for(let w=i,x=s;w<=x;w++){const L=t.getLineContent(w),b=L.length;l.reset(0);do if(d=l.next(L),d){let _=d.index,N=d.index+d[0].length;if(_>0){const M=L.charCodeAt(_-1);_n(M)&&_--}if(N+1=M){f=!0;break e}h.push(new O(w,_+1,w,N+1))}}while(d)}return{ranges:h,hasMore:f,ambiguousCharacterCount:g,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(t,n){const r=new c1(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=t.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=Xt.getLocales().filter(u=>!Xt.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function eu(e,t){return`[${Do(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class c1{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=Xt.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of Qt.codePoints)f1(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(const n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){const r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),u=zo(a);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(o)&&!Qt.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!f1(t)&&Qt.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function f1(e){return e===" "||e===` `||e===" "}class Tn{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class tu{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}function nu(e,t,n=(r,i)=>r===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ir||(Ir={}));function Kt(e,t){return(n,r)=>t(e(n),e(r))}const en=(e,t)=>e-t;function ou(e){return(t,n)=>-e(t,n)}const zt=class{constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new zt(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new zt(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||Ir.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};let h1=zt;(()=>{zt.empty=new zt(t=>{})})();class j{static fromTo(t,n){return new j(t,n)}static addRange(t,n){let r=0;for(;rn))return new j(t,n)}static ofLength(t){return new j(0,t)}static ofStartAndLength(t,n){return new j(t,t+n)}static emptyAt(t){return new j(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new le(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new j(this.start+t,this.endExclusive+t)}deltaStart(t){return new j(this.start+t,this.endExclusive)}deltaEnd(t){return new j(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;n{Qn.assertInvariants=!1})();const Se=class{static ofLength(t,n){return new Se(t,t+n)}static fromRangeInclusive(t){return new Se(t.startLineNumber,t.endLineNumber+1)}static joinMany(t){if(t.length===0)return[];let n=new De(t[0].slice());for(let r=1;rn)throw new le(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&t{Se.compareByStart=Kt(t=>t.startLineNumber,en)})();class De{constructor(t=[]){this._normalizedRanges=t}get ranges(){return this._normalizedRanges}addRange(t){if(t.length===0)return;const n=Fr(this._normalizedRanges,i=>i.endLineNumberExclusive>=t.startLineNumber),r=kt(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){const n=At(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=At(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new H(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new De(n)}subtractFrom(t){const n=Fr(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=kt(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new De([t]);const i=[];let s=t.startLineNumber;for(let a=n;as&&i.push(new H(s,o.startLineNumber)),s=o.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}}const Ie=class{static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new Ie(0,n.column-t.column):new Ie(n.lineNumber-t.lineNumber,n.column-1)}static fromPosition(t){return new Ie(t.lineNumber-1,t.column-1)}static ofRange(t){return Ie.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const i of t)i===` `?(n++,r=0):r++;return new Ie(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new Ie(this.lineCount,this.columnCount+t.columnCount):new Ie(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new O(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new O(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new O(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return H.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new G(t.lineNumber,t.column+this.columnCount):new G(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};let tn=Ie;(()=>{Ie.zero=new Ie(0,0)})();class uu{getOffsetRange(t){return new j(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return O.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new Rt.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new Rt.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){const n=t.replacements.map(r=>this.getTextReplacement(r));return new Rt.deps.TextEdit(n)}}const wi=class{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};let Rt=wi;(()=>{wi._deps=void 0})();class cu extends uu{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){const n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new G(1,1);const n=this.textLength.lineCount+1;if(t.lineNumber>n){const i=this.getLineLength(n);return new G(n,i+1)}if(t.column<1)return new G(t.lineNumber,1);const r=this.getLineLength(t.lineNumber);return t.column-1>r?new G(t.lineNumber,r+1):t}getPosition(t){const n=kt(this.lineStartOffsetByLineIdx,s=>s<=t),r=n+1,i=t-this.lineStartOffsetByLineIdx[n]+1;return new G(r,i)}get textLength(){const t=this.lineStartOffsetByLineIdx.length-1;return new Rt.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}}class fu{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new G(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new O(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new cu(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new O(t,1,t,Number.MAX_SAFE_INTEGER))}}class hu extends fu{constructor(t,n){po(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let r=t.startLineNumber+1;rt[n-1],t.length)}}class Ke{static joinReplacements(t,n){if(t.length===0)throw new le;if(t.length===1)return t[0];const r=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition();let s="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}}class ye{static inverse(t,n,r){const i=[];let s=1,a=1;for(const u of t){const l=new ye(new H(s,u.original.startLineNumber),new H(a,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}const o=new ye(new H(s,n+1),new H(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(t,n,r){const i=[];for(const s of t){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new ye(a,o))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ye(this.modified,this.original)}join(t){return new ye(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new ve(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new le("not a valid diff");return new ve(new O(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new O(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ve(new O(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new O(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(d1(this.original.endLineNumberExclusive,t)&&d1(this.modified.endLineNumberExclusive,n))return new ve(new O(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new O(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ve(O.fromPositions(new G(this.original.startLineNumber,1),Et(new G(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),O.fromPositions(new G(this.modified.startLineNumber,1),Et(new G(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ve(O.fromPositions(Et(new G(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Et(new G(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),O.fromPositions(Et(new G(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Et(new G(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new le}}function Et(e,t){if(e.lineNumber<1)return new G(1,1);if(e.lineNumber>t.length)return new G(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new G(e.lineNumber,n.length+1):e}function d1(e,t){return e>=1&&e<=t.length}class ze extends ye{static fromRangeMappings(t){const n=H.join(t.map(i=>H.fromRangeInclusive(i.originalRange))),r=H.join(t.map(i=>H.fromRangeInclusive(i.modifiedRange)));return new ze(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){var t;return new ze(this.modified,this.original,(t=this.innerChanges)==null?void 0:t.map(n=>n.flip()))}withInnerChangesFromLineRanges(){return new ze(this.original,this.modified,[this.toRangeMapping()])}}class ve{static fromEdit(t){const n=t.getNewRanges();return t.replacements.map((i,s)=>new ve(i.range,n[s]))}static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new ve(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new Ke(this.originalRange,n)}}function m1(e,t,n,r=!1){const i=[];for(const s of ru(e.map(a=>du(a,t,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new ze(a.original.join(o.original),a.modified.join(o.modified),s.map(u=>u.innerChanges[0])))}return bn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:yi(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new H(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new H(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new ze(s,a,[e])}const mu=3;class gu{computeDiff(t,n,r){var u;const s=new wu(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const l of s.changes){let h;l.originalEndLineNumber===0?h=new H(l.originalStartLineNumber+1,l.originalStartLineNumber+1):h=new H(l.originalStartLineNumber,l.originalEndLineNumber+1);let f;l.modifiedEndLineNumber===0?f=new H(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):f=new H(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let d=new ze(h,f,(u=l.charChanges)==null?void 0:u.map(g=>new ve(new O(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn),new O(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===d.modified.startLineNumber||o.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new ze(o.original.join(d.original),o.modified.join(d.modified),o.innerChanges&&d.innerChanges?o.innerChanges.concat(d.innerChanges):void 0),a.pop()),a.push(d),o=d}return bn(()=>yi(a,(l,h)=>h.original.startLineNumber-l.original.endLineNumberExclusive===h.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}}class Mt{constructor(t,n,r,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){const i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1),o=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new Mt(i,s,a,o,u,l,h,f)}}function bu(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const g=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),m=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(g.getElements().length>0&&m.getElements().length>0){let p=g1(g,m,s,!0).changes;o&&(p=bu(p)),d=[];for(let w=0,x=p.length;w1&&p>1;){const w=d.charCodeAt(m-2),x=g.charCodeAt(p-2);if(w!==x)break;m--,p--}(m>1||p>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,p)}{let m=Dr(d,1),p=Dr(g,1);const w=d.length+1,x=g.length+1;for(;m!0;const t=Date.now();return()=>Date.now()-t{r.push(K.fromOffsetPairs(i?i.getEndExclusives():Je.zero,s?s.getStarts():new Je(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new K(new j(t.offset1,n.offset1),new j(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new le("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new K(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new K(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new K(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new K(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new K(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new K(n,r)}getStarts(){return new Je(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Je(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const pt=class{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new pt(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}};let Je=pt;(()=>{pt.zero=new pt(0,0)})(),(()=>{pt.max=new pt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)})();const Zn=class{isValid(){return!0}};let rn=Zn;(()=>{Zn.instance=new Zn})();class xu{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new le("timeout must be positive")}isValid(){return!(Date.now()-this.startTime{gn.chrKeys=new Map})();class yu{compute(t,n,r=rn.instance,i){if(t.length===0||n.length===0)return Ge.trivial(t,n);const s=new Or(t.length,n.length),a=new Or(t.length,n.length),o=new Or(t.length,n.length);for(let m=0;m0&&p>0&&a.get(m-1,p-1)===3&&(L+=o.get(m-1,p-1)),L+=i?i(m,p):1):L=-1;const b=Math.max(w,x,L);if(b===L){const _=m>0&&p>0?o.get(m-1,p-1):0;o.set(m,p,_+1),a.set(m,p,3)}else b===w?(o.set(m,p,0),a.set(m,p,1)):b===x&&(o.set(m,p,0),a.set(m,p,2));s.set(m,p,b)}const u=[];let l=t.length,h=n.length;function f(m,p){(m+1!==l||p+1!==h)&&u.push(new K(new j(m+1,l),new j(p+1,h))),l=m,h=p}let d=t.length-1,g=n.length-1;for(;d>=0&&g>=0;)a.get(d,g)===3?(f(d,g),d--,g--):a.get(d,g)===1?d--:g--;return f(-1,-1),u.reverse(),new Ge(u,!1)}}class w1{compute(t,n,r=rn.instance){if(t.length===0||n.length===0)return Ge.trivial(t,n);const i=t,s=n;function a(p,w){for(;pi.length||_>s.length)continue;const N=a(b,_);u.set(h,N);const A=b===x?l.get(h+1):l.get(h-1);if(l.set(h,N!==b?new x1(A,b,_,N-b):A),u.get(h)===i.length&&u.get(h)-h===s.length)break e}}let f=l.get(h);const d=[];let g=i.length,m=s.length;for(;;){const p=f?f.x+f.length:0,w=f?f.y+f.length:0;if((p!==g||w!==m)&&d.push(new K(new j(p,g),new j(w,m))),!f)break;g=f.x,m=f.y,f=f.prev}return d.reverse(),new Ge(d,!1)}}class x1{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}}class vu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}}class Lu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}}class Fn{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const l=s.trimStart();o=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let l=0;lString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=L1(t>0?this.elements[t-1]:-1),r=L1(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new G(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){const n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?O.fromPositions(r,r):O.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!Tt(this.elements[t]))return;let n=t;for(;n>0&&Tt(this.elements[n-1]);)n--;let r=t;for(;r=this.elements.length||!Tt(this.elements[t]))return;let n=t;for(;n>0&&Tt(this.elements[n-1])&&!y1(this.elements[n]);)n--;let r=t;for(;ra<=t.start))!=null?i:0,r=(s=lu(this.firstElementOffsetByLineIdx,a=>t.endExclusive<=a))!=null?s:this.elements.length;return new j(n,r)}}function Tt(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function y1(e){return e>=65&&e<=90}const _u={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:30,[6]:3,[7]:10,[8]:10};function v1(e){return _u[e]}function L1(e){return e===10?8:e===13?7:Br(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Nu(e,t,n,r,i,s){let{moves:a,excludedChanges:o}=Au(e,t,n,s);if(!s.isValid())return[];const u=e.filter(h=>!o.has(h)),l=ku(u,r,i,t,n,s);return au(a,l),a=Ru(a),a=a.filter(h=>{const f=h.original.toOffsetRange().slice(t).map(g=>g.trim());return f.join(` `).length>=15&&Su(f,g=>g.length>=2)>=2}),a=Eu(e,a),a}function Su(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Au(e,t,n,r){const i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new In(u.original,t,u)),a=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new In(u.modified,n,u))),o=new Set;for(const u of s){let l=-1,h;for(const f of a){const d=u.computeSimilarity(f);d>l&&(l=d,h=f)}if(l>.9&&h&&(a.delete(h),i.push(new ye(u.range,h.range)),o.add(u.source),o.add(h.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function ku(e,t,n,r,i,s){const a=[],o=new Wl;for(const d of e)for(let g=d.original.startLineNumber;gd.modified.startLineNumber,en));for(const d of e){let g=[];for(let m=d.modified.startLineNumber;m{for(const _ of g)if(_.originalLineRange.endLineNumberExclusive+1===L.endLineNumberExclusive&&_.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){_.originalLineRange=new H(_.originalLineRange.startLineNumber,L.endLineNumberExclusive),_.modifiedLineRange=new H(_.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),x.push(_);return}const b={modifiedLineRange:w,originalLineRange:L};u.push(b),x.push(b)}),g=x}if(!s.isValid())return[]}u.sort(ou(Kt(d=>d.modifiedLineRange.length,en)));const l=new De,h=new De;for(const d of u){const g=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,m=l.subtractFrom(d.modifiedLineRange),p=h.subtractFrom(d.originalLineRange).getWithDelta(g),w=m.getIntersection(p);for(const x of w.ranges){if(x.length<3)continue;const L=x,b=x.delta(-g);a.push(new ye(b,L)),l.addRange(L),h.addRange(b)}}a.sort(Kt(d=>d.original.startLineNumber,en));const f=new Pn(e);for(let d=0;dA.original.startLineNumber<=g.original.startLineNumber),p=At(e,A=>A.modified.startLineNumber<=g.modified.startLineNumber),w=Math.max(g.original.startLineNumber-m.original.startLineNumber,g.modified.startLineNumber-p.modified.startLineNumber),x=f.findLastMonotonous(A=>A.original.startLineNumberA.modified.startLineNumberr.length||v>i.length||l.contains(v)||h.contains(A)||!_1(r[A-1],i[v-1],s))break}_>0&&(h.addRange(new H(g.original.startLineNumber-_,g.original.startLineNumber)),l.addRange(new H(g.modified.startLineNumber-_,g.modified.startLineNumber)));let N;for(N=0;Nr.length||v>i.length||l.contains(v)||h.contains(A)||!_1(r[A-1],i[v-1],s))break}N>0&&(h.addRange(new H(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+N)),l.addRange(new H(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+N))),(_>0||N>0)&&(a[d]=new ye(new H(g.original.startLineNumber-_,g.original.endLineNumberExclusive+N),new H(g.modified.startLineNumber-_,g.modified.endLineNumberExclusive+N)))}return a}function _1(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new w1().compute(new Fn([e],new O(1,1,1,e.length),!1),new Fn([t],new O(1,1,1,t.length),!1),n);let s=0;const a=K.invert(i.diffs,e.length);for(const h of a)h.seq1Range.forEach(f=>{Br(e.charCodeAt(f))||s++});function o(h){let f=0;for(let d=0;dt.length?e:t);return s/u>.6&&u>10}function Ru(e){if(e.length===0)return e;e.sort(Kt(n=>n.original.startLineNumber,en));const t=[e[0]];for(let n=1;n=0&&a>=0&&s+a<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function Eu(e,t){const n=new Pn(e);return t=t.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(l))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function Mu(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&e.seq2Range.start-a>=i.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;e.seq1Range.start+ol&&(l=m,u=h)}return e.delta(u)}function Tu(e,t,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new K(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function k1(e,t,n,r,i=!1){const s=K.invert(n,e.length),a=[];let o=new Je(0,0);function u(h,f){if(h.offset10;){const L=s[0];if(!(L.seq1Range.intersects(m.seq1Range)||L.seq2Range.intersects(m.seq2Range)))break;const _=r(e,L.seq1Range.start),N=r(t,L.seq2Range.start),A=new K(_,N),v=A.intersect(L);if(w+=v.seq1Range.length,x+=v.seq2Range.length,m=m.join(A),m.seq1Range.endExclusive>=L.seq1Range.endExclusive)s.shift();else break}(i&&w+x0;){const h=s.shift();h.seq1Range.isEmpty||(u(h.getStarts(),h),u(h.getEndExclusives().delta(-1),h))}return Pu(n,a)}function Pu(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Cu(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||g.seq1Range.length+g.seq2Range.length>5)};const u=r[o],l=a[a.length-1];h(l,u)?(s=!0,a[a.length-1]=a[a.length-1].join(u)):a.push(u)}r=a}while(i++<10&&s);return r}function Iu(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let u=1;u5||p.length>500)return!1;const x=e.getText(p).trim();if(x.length>20||x.split(/\r\n|\r|\n/).length>1)return!1;const L=e.countLinesIn(g.seq1Range),b=g.seq1Range.length,_=t.countLinesIn(g.seq2Range),N=g.seq2Range.length,A=e.countLinesIn(m.seq1Range),v=m.seq1Range.length,S=t.countLinesIn(m.seq2Range),M=m.seq2Range.length,D=2*40+50;function T(y){return Math.min(y,D)}return Math.pow(Math.pow(T(L*40+b),1.5)+Math.pow(T(_*40+N),1.5),1.5)+Math.pow(Math.pow(T(A*40+v),1.5)+Math.pow(T(S*40+M),1.5),1.5)>(D**1.5)**1.5*1.3};const l=r[u],h=o[o.length-1];f(h,l)?(s=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(i++<10&&s);const a=[];return su(r,(o,u,l)=>{let h=u;function f(x){return x.length>0&&x.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}const d=e.extendToFullLines(u.seq1Range),g=e.getText(new j(d.start,u.seq1Range.start));f(g)&&(h=h.deltaStart(-g.length));const m=e.getText(new j(u.seq1Range.endExclusive,d.endExclusive));f(m)&&(h=h.deltaEnd(m.length));const p=K.fromOffsetPairs(o?o.getEndExclusives():Je.zero,l?l.getStarts():Je.max),w=h.intersect(p);a.length>0&&w.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(w):a.push(w)}),a}class R1{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){const n=t===0?0:E1(this.lines[t-1]),r=t===this.lines.length?0:E1(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` `)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}}function E1(e){let t=0;for(;tv===S))return new Tn([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Tn([new ze(new H(1,t.length+1),new H(1,n.length+1),[new ve(new O(1,1,t.length,t[t.length-1].length+1),new O(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?rn.instance:new xu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(v){let S=a.get(v);return S===void 0&&(S=a.size,a.set(v,S)),S}const u=t.map(v=>o(v.trim())),l=n.map(v=>o(v.trim())),h=new R1(u,t),f=new R1(l,n),d=(()=>h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,i,(v,S)=>t[v]===n[S]?n[S].length===0?.1:1+Math.log(1+n[S].length):.99):this.myersDiffingAlgorithm.compute(h,f,i))();let g=d.diffs,m=d.hitTimeout;g=N1(h,f,g),g=Cu(h,f,g);const p=[],w=v=>{if(!!s)for(let S=0;Sv.seq1Range.start-x===v.seq2Range.start-L);const S=v.seq1Range.start-x;w(S),x=v.seq1Range.endExclusive,L=v.seq2Range.endExclusive;const M=this.refineDiff(t,n,v,i,s,r);M.hitTimeout&&(m=!0);for(const D of M.mappings)p.push(D)}w(t.length-x);const b=new Cn(t),_=new Cn(n),N=m1(p,b,_);let A=[];return r.computeMoves&&(A=this.computeMoves(N,t,n,u,l,i,s,r)),bn(()=>{function v(M,D){if(M.lineNumber<1||M.lineNumber>D.length)return!1;const T=D[M.lineNumber-1];return!(M.column<1||M.column>T.length+1)}function S(M,D){return!(M.startLineNumber<1||M.startLineNumber>D.length+1||M.endLineNumberExclusive<1||M.endLineNumberExclusive>D.length+1)}for(const M of N){if(!M.innerChanges)return!1;for(const D of M.innerChanges)if(!(v(D.modifiedRange.getStartPosition(),n)&&v(D.modifiedRange.getEndPosition(),n)&&v(D.originalRange.getStartPosition(),t)&&v(D.originalRange.getEndPosition(),t)))return!1;if(!S(M.modified,n)||!S(M.original,t))return!1}return!0}),new Tn(N,A,m)}computeMoves(t,n,r,i,s,a,o,u){return Nu(t,n,r,i,s,a).map(f=>{const d=this.refineDiff(n,r,new K(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,o,u),g=m1(d.mappings,new Cn(n),new Cn(r),!0);return new tu(f,g)})}refineDiff(t,n,r,i,s,a){const u=Vu(r).toRangeMapping2(t,n),l=new Fn(t,u.originalRange,s),h=new Fn(n,u.modifiedRange,s),f=l.length+h.length<500?this.dynamicProgrammingDiffing.compute(l,h,i):this.myersDiffingAlgorithm.compute(l,h,i);let d=f.diffs;return d=N1(l,h,d),d=k1(l,h,d,(m,p)=>m.findWordContaining(p)),a.extendToSubwords&&(d=k1(l,h,d,(m,p)=>m.findSubWordContaining(p),!0)),d=Tu(l,h,d),d=Iu(l,h,d),{mappings:d.map(m=>new ve(l.translateRange(m.seq1Range),h.translateRange(m.seq2Range))),hitTimeout:f.hitTimeout}}}function Vu(e){return new ye(new H(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new H(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const M1={getLegacy:()=>new gu,getDefault:()=>new Fu};function et(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class R{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=et(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}}class Le{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=et(Math.max(Math.min(1,n),0),3),this.l=et(Math.max(Math.min(1,r),0),3),this.a=et(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let u=0,l=0;const h=(o+a)/2,f=a-o;if(f>0){switch(l=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),a){case n:u=(r-i)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:i,a:s}=t;let a,o,u;if(r===0)a=o=u=i;else{const l=i<.5?i*(1+r):i+r-i*r,h=2*i-l;a=Le._hue2rgb(h,l,n+1/3),o=Le._hue2rgb(h,l,n),u=Le._hue2rgb(h,l,n-1/3)}return new R(Math.round(a*255),Math.round(o*255),Math.round(u*255),s)}}class Pt{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=et(Math.max(Math.min(1,n),0),3),this.v=et(Math.max(Math.min(1,r),0),3),this.a=et(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,u=s===0?0:o/s;let l;return o===0?l=0:s===n?l=((r-i)/o%6+6)%6:s===r?l=(i-n)/o+2:l=(n-r)/o+4,new Pt(Math.round(l*60),u,s,t.a)}static toRGBA(t){const{h:n,s:r,v:i,a:s}=t,a=i*r,o=a*(1-Math.abs(n/60%2-1)),u=i-a;let[l,h,f]=[0,0,0];return n<60?(l=a,h=o):n<120?(l=o,h=a):n<180?(h=a,f=o):n<240?(h=o,f=a):n<300?(l=o,f=a):n<=360&&(l=a,f=o),l=Math.round((l+u)*255),h=Math.round((h+u)*255),f=Math.round((f+u)*255),new R(l,h,f,s)}}const Q=class{static fromHex(t){return Q.Format.CSS.parseHex(t)||Q.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Le.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Pt.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof R)this.rgba=t;else if(t instanceof Le)this._hsla=t,this.rgba=Le.toRGBA(t);else if(t instanceof Pt)this._hsva=t,this.rgba=Pt.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&R.equals(this.rgba,t.rgba)&&Le.equals(this.hsla,t.hsla)&&Pt.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=Q._relativeLuminanceForComponent(this.rgba.r),n=Q._relativeLuminanceForComponent(this.rgba.g),r=Q._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return et(i,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(t,n,r){if(t.isLighterThan(n))return t;r=r||.5;const i=t.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,t.lighten(r)}static getDarkerColor(t,n,r){if(t.isDarkerThan(n))return t;r=r||.5;const i=t.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,t.darken(r)}};let Ct=Q;(()=>{Q.white=new Q(new R(255,255,255,1))})(),(()=>{Q.black=new Q(new R(0,0,0,1))})(),(()=>{Q.red=new Q(new R(255,0,0,1))})(),(()=>{Q.blue=new Q(new R(0,0,255,1))})(),(()=>{Q.green=new Q(new R(0,255,0,1))})(),(()=>{Q.cyan=new Q(new R(0,255,255,1))})(),(()=>{Q.lightgrey=new Q(new R(211,211,211,1))})(),(()=>{Q.transparent=new Q(new R(0,0,0,0))})(),function(e){(function(t){(function(n){function r(p){return p.rgba.a===1?`rgb(${p.rgba.r}, ${p.rgba.g}, ${p.rgba.b})`:e.Format.CSS.formatRGBA(p)}n.formatRGB=r;function i(p){return`rgba(${p.rgba.r}, ${p.rgba.g}, ${p.rgba.b}, ${+p.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(p){return p.hsla.a===1?`hsl(${p.hsla.h}, ${Math.round(p.hsla.s*100)}%, ${Math.round(p.hsla.l*100)}%)`:e.Format.CSS.formatHSLA(p)}n.formatHSL=s;function a(p){return`hsla(${p.hsla.h}, ${Math.round(p.hsla.s*100)}%, ${Math.round(p.hsla.l*100)}%, ${p.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(p){const w=p.toString(16);return w.length!==2?"0"+w:w}function u(p){return`#${o(p.rgba.r)}${o(p.rgba.g)}${o(p.rgba.b)}`}n.formatHex=u;function l(p,w=!1){return w&&p.rgba.a===1?e.Format.CSS.formatHex(p):`#${o(p.rgba.r)}${o(p.rgba.g)}${o(p.rgba.b)}${o(Math.round(p.rgba.a*255))}`}n.formatHexA=l;function h(p){return p.isOpaque()?e.Format.CSS.formatHex(p):e.Format.CSS.formatRGBA(p)}n.format=h;function f(p){var w,x,L,b,_,N,A,v,S,M,D,T,y,k;if(p==="transparent")return e.transparent;if(p.startsWith("#"))return g(p);if(p.startsWith("rgba(")){const P=p.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!P)throw new Error("Invalid color format "+p);const I=parseInt((x=(w=P.groups)==null?void 0:w.r)!=null?x:"0"),F=parseInt((b=(L=P.groups)==null?void 0:L.g)!=null?b:"0"),V=parseInt((N=(_=P.groups)==null?void 0:_.b)!=null?N:"0"),$=parseFloat((v=(A=P.groups)==null?void 0:A.a)!=null?v:"0");return new e(new R(I,F,V,$))}if(p.startsWith("rgb(")){const P=p.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!P)throw new Error("Invalid color format "+p);const I=parseInt((M=(S=P.groups)==null?void 0:S.r)!=null?M:"0"),F=parseInt((T=(D=P.groups)==null?void 0:D.g)!=null?T:"0"),V=parseInt((k=(y=P.groups)==null?void 0:y.b)!=null?k:"0");return new e(new R(I,F,V))}return d(p)}n.parse=f;function d(p){switch(p){case"aliceblue":return new e(new R(240,248,255,1));case"antiquewhite":return new e(new R(250,235,215,1));case"aqua":return new e(new R(0,255,255,1));case"aquamarine":return new e(new R(127,255,212,1));case"azure":return new e(new R(240,255,255,1));case"beige":return new e(new R(245,245,220,1));case"bisque":return new e(new R(255,228,196,1));case"black":return new e(new R(0,0,0,1));case"blanchedalmond":return new e(new R(255,235,205,1));case"blue":return new e(new R(0,0,255,1));case"blueviolet":return new e(new R(138,43,226,1));case"brown":return new e(new R(165,42,42,1));case"burlywood":return new e(new R(222,184,135,1));case"cadetblue":return new e(new R(95,158,160,1));case"chartreuse":return new e(new R(127,255,0,1));case"chocolate":return new e(new R(210,105,30,1));case"coral":return new e(new R(255,127,80,1));case"cornflowerblue":return new e(new R(100,149,237,1));case"cornsilk":return new e(new R(255,248,220,1));case"crimson":return new e(new R(220,20,60,1));case"cyan":return new e(new R(0,255,255,1));case"darkblue":return new e(new R(0,0,139,1));case"darkcyan":return new e(new R(0,139,139,1));case"darkgoldenrod":return new e(new R(184,134,11,1));case"darkgray":return new e(new R(169,169,169,1));case"darkgreen":return new e(new R(0,100,0,1));case"darkgrey":return new e(new R(169,169,169,1));case"darkkhaki":return new e(new R(189,183,107,1));case"darkmagenta":return new e(new R(139,0,139,1));case"darkolivegreen":return new e(new R(85,107,47,1));case"darkorange":return new e(new R(255,140,0,1));case"darkorchid":return new e(new R(153,50,204,1));case"darkred":return new e(new R(139,0,0,1));case"darksalmon":return new e(new R(233,150,122,1));case"darkseagreen":return new e(new R(143,188,143,1));case"darkslateblue":return new e(new R(72,61,139,1));case"darkslategray":return new e(new R(47,79,79,1));case"darkslategrey":return new e(new R(47,79,79,1));case"darkturquoise":return new e(new R(0,206,209,1));case"darkviolet":return new e(new R(148,0,211,1));case"deeppink":return new e(new R(255,20,147,1));case"deepskyblue":return new e(new R(0,191,255,1));case"dimgray":return new e(new R(105,105,105,1));case"dimgrey":return new e(new R(105,105,105,1));case"dodgerblue":return new e(new R(30,144,255,1));case"firebrick":return new e(new R(178,34,34,1));case"floralwhite":return new e(new R(255,250,240,1));case"forestgreen":return new e(new R(34,139,34,1));case"fuchsia":return new e(new R(255,0,255,1));case"gainsboro":return new e(new R(220,220,220,1));case"ghostwhite":return new e(new R(248,248,255,1));case"gold":return new e(new R(255,215,0,1));case"goldenrod":return new e(new R(218,165,32,1));case"gray":return new e(new R(128,128,128,1));case"green":return new e(new R(0,128,0,1));case"greenyellow":return new e(new R(173,255,47,1));case"grey":return new e(new R(128,128,128,1));case"honeydew":return new e(new R(240,255,240,1));case"hotpink":return new e(new R(255,105,180,1));case"indianred":return new e(new R(205,92,92,1));case"indigo":return new e(new R(75,0,130,1));case"ivory":return new e(new R(255,255,240,1));case"khaki":return new e(new R(240,230,140,1));case"lavender":return new e(new R(230,230,250,1));case"lavenderblush":return new e(new R(255,240,245,1));case"lawngreen":return new e(new R(124,252,0,1));case"lemonchiffon":return new e(new R(255,250,205,1));case"lightblue":return new e(new R(173,216,230,1));case"lightcoral":return new e(new R(240,128,128,1));case"lightcyan":return new e(new R(224,255,255,1));case"lightgoldenrodyellow":return new e(new R(250,250,210,1));case"lightgray":return new e(new R(211,211,211,1));case"lightgreen":return new e(new R(144,238,144,1));case"lightgrey":return new e(new R(211,211,211,1));case"lightpink":return new e(new R(255,182,193,1));case"lightsalmon":return new e(new R(255,160,122,1));case"lightseagreen":return new e(new R(32,178,170,1));case"lightskyblue":return new e(new R(135,206,250,1));case"lightslategray":return new e(new R(119,136,153,1));case"lightslategrey":return new e(new R(119,136,153,1));case"lightsteelblue":return new e(new R(176,196,222,1));case"lightyellow":return new e(new R(255,255,224,1));case"lime":return new e(new R(0,255,0,1));case"limegreen":return new e(new R(50,205,50,1));case"linen":return new e(new R(250,240,230,1));case"magenta":return new e(new R(255,0,255,1));case"maroon":return new e(new R(128,0,0,1));case"mediumaquamarine":return new e(new R(102,205,170,1));case"mediumblue":return new e(new R(0,0,205,1));case"mediumorchid":return new e(new R(186,85,211,1));case"mediumpurple":return new e(new R(147,112,219,1));case"mediumseagreen":return new e(new R(60,179,113,1));case"mediumslateblue":return new e(new R(123,104,238,1));case"mediumspringgreen":return new e(new R(0,250,154,1));case"mediumturquoise":return new e(new R(72,209,204,1));case"mediumvioletred":return new e(new R(199,21,133,1));case"midnightblue":return new e(new R(25,25,112,1));case"mintcream":return new e(new R(245,255,250,1));case"mistyrose":return new e(new R(255,228,225,1));case"moccasin":return new e(new R(255,228,181,1));case"navajowhite":return new e(new R(255,222,173,1));case"navy":return new e(new R(0,0,128,1));case"oldlace":return new e(new R(253,245,230,1));case"olive":return new e(new R(128,128,0,1));case"olivedrab":return new e(new R(107,142,35,1));case"orange":return new e(new R(255,165,0,1));case"orangered":return new e(new R(255,69,0,1));case"orchid":return new e(new R(218,112,214,1));case"palegoldenrod":return new e(new R(238,232,170,1));case"palegreen":return new e(new R(152,251,152,1));case"paleturquoise":return new e(new R(175,238,238,1));case"palevioletred":return new e(new R(219,112,147,1));case"papayawhip":return new e(new R(255,239,213,1));case"peachpuff":return new e(new R(255,218,185,1));case"peru":return new e(new R(205,133,63,1));case"pink":return new e(new R(255,192,203,1));case"plum":return new e(new R(221,160,221,1));case"powderblue":return new e(new R(176,224,230,1));case"purple":return new e(new R(128,0,128,1));case"rebeccapurple":return new e(new R(102,51,153,1));case"red":return new e(new R(255,0,0,1));case"rosybrown":return new e(new R(188,143,143,1));case"royalblue":return new e(new R(65,105,225,1));case"saddlebrown":return new e(new R(139,69,19,1));case"salmon":return new e(new R(250,128,114,1));case"sandybrown":return new e(new R(244,164,96,1));case"seagreen":return new e(new R(46,139,87,1));case"seashell":return new e(new R(255,245,238,1));case"sienna":return new e(new R(160,82,45,1));case"silver":return new e(new R(192,192,192,1));case"skyblue":return new e(new R(135,206,235,1));case"slateblue":return new e(new R(106,90,205,1));case"slategray":return new e(new R(112,128,144,1));case"slategrey":return new e(new R(112,128,144,1));case"snow":return new e(new R(255,250,250,1));case"springgreen":return new e(new R(0,255,127,1));case"steelblue":return new e(new R(70,130,180,1));case"tan":return new e(new R(210,180,140,1));case"teal":return new e(new R(0,128,128,1));case"thistle":return new e(new R(216,191,216,1));case"tomato":return new e(new R(255,99,71,1));case"turquoise":return new e(new R(64,224,208,1));case"violet":return new e(new R(238,130,238,1));case"wheat":return new e(new R(245,222,179,1));case"white":return new e(new R(255,255,255,1));case"whitesmoke":return new e(new R(245,245,245,1));case"yellow":return new e(new R(255,255,0,1));case"yellowgreen":return new e(new R(154,205,50,1));default:return null}}function g(p){const w=p.length;if(w===0||p.charCodeAt(0)!==35)return null;if(w===7){const x=16*m(p.charCodeAt(1))+m(p.charCodeAt(2)),L=16*m(p.charCodeAt(3))+m(p.charCodeAt(4)),b=16*m(p.charCodeAt(5))+m(p.charCodeAt(6));return new e(new R(x,L,b,1))}if(w===9){const x=16*m(p.charCodeAt(1))+m(p.charCodeAt(2)),L=16*m(p.charCodeAt(3))+m(p.charCodeAt(4)),b=16*m(p.charCodeAt(5))+m(p.charCodeAt(6)),_=16*m(p.charCodeAt(7))+m(p.charCodeAt(8));return new e(new R(x,L,b,_/255))}if(w===4){const x=m(p.charCodeAt(1)),L=m(p.charCodeAt(2)),b=m(p.charCodeAt(3));return new e(new R(16*x+x,16*L+L,16*b+b))}if(w===5){const x=m(p.charCodeAt(1)),L=m(p.charCodeAt(2)),b=m(p.charCodeAt(3)),_=m(p.charCodeAt(4));return new e(new R(16*x+x,16*L+L,16*b+b,(16*_+_)/255))}return null}n.parseHex=g;function m(p){switch(p){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(t.CSS||(t.CSS={}))})(e.Format||(e.Format={}))}(Ct||(Ct={}));function T1(e){const t=[];for(const n of e){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&t.push(r)}return t}function Ur(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function sn(e,t){const n=t.index,r=t[0].length;if(n===void 0)return;const i=e.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Du(e,t){if(!e)return;const n=Ct.Format.CSS.parseHex(t);if(!!n)return{range:e,color:Ur(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function P1(e,t,n){if(!e||t.length!==1)return;const i=t[0].values(),s=T1(i);return{range:e,color:Ur(s[0],s[1],s[2],n?s[3]:1)}}function C1(e,t,n){if(!e||t.length!==1)return;const i=t[0].values(),s=T1(i),a=new Ct(new Le(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:Ur(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function an(e,t){return typeof e=="string"?[...e.matchAll(t)]:e.findMatches(t)}function Ou(e){const t=[],n=new RegExp(`\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|^(#)([A-Fa-f0-9]{3})\\b|^(#)([A-Fa-f0-9]{4})\\b|^(#)([A-Fa-f0-9]{6})\\b|^(#)([A-Fa-f0-9]{8})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{3})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{4})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{6})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{8})\\b`,"gm"),r=an(e,n);if(r.length>0)for(const i of r){const s=i.filter(l=>l!==void 0),a=s[1],o=s[2];if(!o)continue;let u;if(a==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=P1(sn(e,i),an(o,l),!1)}else if(a==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=P1(sn(e,i),an(o,l),!0)}else if(a==="hsl"){const l=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=C1(sn(e,i),an(o,l),!1)}else if(a==="hsla"){const l=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;u=C1(sn(e,i),an(o,l),!0)}else a==="#"&&(u=Du(sn(e,i),a+o));u&&t.push(u)}return t}function Bu(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Ou(e)}const Uu=/^-+|-+$/g,I1=100,$u=5;function qu(e,t){var r;let n=[];if(t.findRegionSectionHeaders&&((r=t.foldingRules)==null?void 0:r.markers)){const i=ju(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const i=Wu(e,t);n=n.concat(i)}return n}function ju(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const s=e.getLineContent(i),a=s.match(t.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const u={range:o,...Hu(s.substring(a[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function Wu(e,t){var a,o,u,l;const n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||t.markSectionHeaderRegex.trim()==="")return n;const i=Hl(t.markSectionHeaderRegex),s=new RegExp(t.markSectionHeaderRegex,`gdm${i?"s":""}`);if(Oo(s))return n;for(let h=1;h<=r;h+=I1-$u){const f=Math.min(h+I1-1,r),d=[];for(let p=h;p<=f;p++)d.push(e.getLineContent(p));const g=d.join(` `);s.lastIndex=0;let m;for(;(m=s.exec(g))!==null;){const p=g.substring(0,m.index),w=(p.match(/\n/g)||[]).length,x=h+w,L=m[0].split(` `),b=L.length,_=x+b-1,N=p.lastIndexOf(` `)+1,A=m.index-N+1,v=L[L.length-1],S=b===1?A+m[0].length:v.length+1,M={startLineNumber:x,startColumn:A,endLineNumber:_,endColumn:S},D=(o=((a=m.groups)!=null?a:{}).label)!=null?o:"",T=((l=((u=m.groups)!=null?u:{}).separator)!=null?l:"")!=="",y={range:M,text:D,hasSeparatorLine:T,shouldBeInComments:!0};(y.text||y.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber{this.completeCallback=t,this.errorCallback=n})}complete(t){return new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new xi)}}var F1;(function(e){async function t(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}e.withAsyncBody=n})(F1||(F1={}));const he=class{static fromArray(t){return new he(n=>{n.emitMany(t)})}static fromPromise(t){return new he(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new he(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new he(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new Re,queueMicrotask(async()=>{const r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t{var n;return(n=this._onReturn)==null||n.call(this),{done:!0,value:void 0}}}}static map(t,n){return new he(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return he.map(this,t)}static filter(t,n){return new he(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return he.filter(this,t)}static coalesce(t){return he.filter(t,n=>!!n)}coalesce(){return he.coalesce(this)}static async toPromise(t){const n=[];for await(const r of t)n.push(r);return n}toPromise(){return he.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};let V1=he;(()=>{he.EMPTY=he.fromArray([])})();class Gu{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new le("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{const t=new zu;return this._unsatisfiedConsumers.push(t),t.p}}}const ge=class{constructor(t,n){this._onReturn=n,this._producerConsumer=new Gu,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>{var r;return(r=this._onReturn)==null||r.call(this),Promise.resolve({done:!0,value:void 0})},throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=t({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(t){return new ge(n=>{n.emitMany(t)})}static fromPromise(t){return new ge(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new ge(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new ge(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(t,n){return new ge(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return ge.map(this,t)}static coalesce(t){return ge.filter(t,n=>!!n)}coalesce(){return ge.coalesce(this)}static filter(t,n){return new ge(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return ge.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};let D1=ge;(()=>{ge.EMPTY=ge.fromArray([])})();class Ju{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=_t(t);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=_t(t),n=_t(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;const s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=_t(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],t=s)n=i+1;else break;return new Xu(i,t-a)}}class Xu{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class Qu{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new G(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new Yu(ut.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){!this._models[t]||delete this._models[t]}}class Yu extends Qu{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}}const bt=class{constructor(t=null){this._foreignModule=t,this._workerTextModelSyncServer=new Zu}dispose(){}async $ping(){return"pong"}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?Kl.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?qu(r,n):[]}async $computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:bt.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?M1.getDefault():M1.getLegacy(),a=t.getLinesContent(),o=n.getLinesContent(),u=s.computeDiff(a,o,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function h(f){return f.map(d=>{var g;return[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,(g=d.innerChanges)==null?void 0:g.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])]})}return{identical:l,quitEarly:u.hitTimeout,changes:h(u.changes),moves:u.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,h(f.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=t.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}async $computeMoreMinimalEdits(t,n,r){const i=this._getModel(t);if(!i)return n;const s=[];let a;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return O.compareRangesUsingStarts(u.range,l.range);const h=u.range?0:1,f=l.range?0:1;return h-f});let o=0;for(let u=1;ubt._diffLimit){s.push({range:u,text:l});continue}const d=il(f,l,r),g=i.offsetAt(O.lift(u).getStartPosition());for(const m of d){const p=i.positionAt(g+m.originalStart),w=i.positionAt(g+m.originalStart+m.originalLength),x={text:l.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:w.lineNumber,endColumn:w.column}};i.getValueInRange(x.range)!==x.text&&s.push(x)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){const n=this._getModel(t);return n?ul(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?Bu(n):null}async $textualSuggest(t,n,r,i){const s=new yn,a=new RegExp(r,i),o=new Set;e:for(const u of t){const l=this._getModel(u);if(!!l){for(const h of l.words(a))if(!(h===n||!isNaN(Number(h)))&&(o.add(h),o.size>bt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){const s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let u=n.startLineNumber;u{bt._diffLimit=1e5})(),(()=>{bt._suggestionsLimit=1e4})(),typeof importScripts=="function"&&(globalThis.monaco=Ol());const pn=class{static getChannel(t){return t.getChannel(pn.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(pn.CHANNEL_NAME,n)}};let qr=pn;(()=>{pn.CHANNEL_NAME="editorWorkerHost"})();function Ku(e){let t;const n=tl(r=>{const i=qr.getChannel(r),a={host:new Proxy({},{get(o,u,l){if(u!=="then"){if(typeof u!="string")throw new Error("Not supported");return(...h)=>i.$fhr(u,h)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return t=e(a),new $r(t)});return t}function ec(e){self.onmessage=t=>{Ku(n=>e(n,t.data))}}function jr(e,t=!1){const n=e.length;let r=0,i="",s=0,a=16,o=0,u=0,l=0,h=0,f=0;function d(b,_){let N=0,A=0;for(;N=48&&v<=57)A=A*16+v-48;else if(v>=65&&v<=70)A=A*16+v-65+10;else if(v>=97&&v<=102)A=A*16+v-97+10;else break;r++,N++}return N=n){b+=e.substring(_,r),f=2;break}const N=e.charCodeAt(r);if(N===34){b+=e.substring(_,r),r++;break}if(N===92){if(b+=e.substring(_,r),r++,r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` `;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const v=d(4,!0);v>=0?b+=String.fromCharCode(v):f=4;break;default:f=5}_=r;continue}if(N>=0&&N<=31)if(on(N)){b+=e.substring(_,r),f=2;break}else f=6;r++}return b}function w(){if(i="",f=0,s=r,u=o,h=l,r>=n)return s=n,a=17;let b=e.charCodeAt(r);if(Wr(b)){do r++,i+=String.fromCharCode(b),b=e.charCodeAt(r);while(Wr(b));return a=15}if(on(b))return r++,i+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,i+=` `),o++,l=r,a=14;switch(b){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=p(),a=10;case 47:const _=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&b<=15);return b}return{setPosition:g,getPosition:()=>r,scan:t?L:w,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function Wr(e){return e===32||e===9}function on(e){return e===10||e===13}function It(e){return e>=48&&e<=57}var O1;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(O1||(O1={}));const _e=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Ft=200,B1={" ":{"\n":new Array(Ft).fill(0).map((e,t)=>` `+" ".repeat(t)),"\r":new Array(Ft).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Ft).fill(0).map((e,t)=>`\r `+" ".repeat(t))}," ":{"\n":new Array(Ft).fill(0).map((e,t)=>` `+" ".repeat(t)),"\r":new Array(Ft).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Ft).fill(0).map((e,t)=>`\r `+" ".repeat(t))}},tc=[` `,"\r",`\r `];function nc(e,t,n){var N;let r,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!U1(e,s-1);)s--;let A=o;for(;A1)return Vt(u,h)+Vt(d,r+f);const A=d.length*(r+f);return!l||A>B1[g][u].length?u+Vt(d,r+f):A<=0?u:B1[g][u][A]}function x(){let A=m.scan();for(h=0;A===15||A===14;)A===14&&n.keepLines?h+=1:A===14&&(h=1),A=m.scan();return p=A===16||m.getTokenError()!==0,A}const L=[];function b(A,v,S){!p&&(!t||va)&&e.substring(v,S)!==A&&L.push({offset:v,length:S-v,content:A})}let _=x();if(n.keepLines&&h>0&&b(Vt(u,h),0,0),_!==17){let A=m.getTokenOffset()+s,v=d.length*r<20&&n.insertSpaces?_e[d.length*r]:Vt(d,r);b(v,s,A)}for(;_!==17;){let A=m.getTokenOffset()+m.getTokenLength()+s,v=x(),S="",M=!1;for(;h===0&&(v===12||v===13);){let T=m.getTokenOffset()+s;b(_e[1],A,T),A=m.getTokenOffset()+m.getTokenLength()+s,M=v===12,S=M?w():"",v=x()}if(v===2)_!==1&&f--,n.keepLines&&h>0||!n.keepLines&&_!==1?S=w():n.keepLines&&(S=_e[1]);else if(v===4)_!==3&&f--,n.keepLines&&h>0||!n.keepLines&&_!==3?S=w():n.keepLines&&(S=_e[1]);else{switch(_){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?S=w():S=_e[1];break;case 5:n.keepLines&&h>0||!n.keepLines?S=w():S=_e[1];break;case 12:S=w();break;case 13:h>0?S=w():M||(S=_e[1]);break;case 6:n.keepLines&&h>0?S=w():M||(S=_e[1]);break;case 10:n.keepLines&&h>0?S=w():v===6&&!M&&(S="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?S=w():(v===12||v===13)&&!M?S=_e[1]:v!==5&&v!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(v===12||v===13)&&(S=w())}v===17&&(n.keepLines&&h>0?S=w():S=n.insertFinalNewline?u:"");const D=m.getTokenOffset()+s;b(S,A,D),_=v}return L}function Vt(e,t){let n="";for(let r=0;r{const u={};a(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const u=[];a(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(u,l,h)=>{t.push({error:u,offset:l,length:h})}},n),i[0]}function $1(e){if(!e.parent||!e.parent.children)return[];const t=$1(e.parent);if(e.parent.type==="property"){const n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){const n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Hr(e){switch(e.type){case"array":return e.children.map(Hr);case"object":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=Hr(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function ac(e,t,n=!1){return t>=e.offset&&ty(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(y){return y?()=>y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function o(y){return y?k=>y(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(y){return y?k=>y(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const l=a(t.onObjectBegin),h=u(t.onObjectProperty),f=s(t.onObjectEnd),d=a(t.onArrayBegin),g=s(t.onArrayEnd),m=u(t.onLiteralValue),p=o(t.onSeparator),w=s(t.onComment),x=o(t.onError),L=n&&n.disallowComments,b=n&&n.allowTrailingComma;function _(){for(;;){const y=r.scan();switch(r.getTokenError()){case 4:N(14);break;case 5:N(15);break;case 3:N(13);break;case 1:L||N(11);break;case 2:N(12);break;case 6:N(16);break}switch(y){case 12:case 13:L?N(10):w();break;case 16:N(1);break;case 15:case 14:break;default:return y}}}function N(y,k=[],P=[]){if(x(y),k.length+P.length>0){let I=r.getToken();for(;I!==17;){if(k.indexOf(I)!==-1){_();break}else if(P.indexOf(I)!==-1)break;I=_()}}}function A(y){const k=r.getTokenValue();return y?m(k):(h(k),i.push(k)),_(),!0}function v(){switch(r.getToken()){case 11:const y=r.getTokenValue();let k=Number(y);isNaN(k)&&(N(2),k=0),m(k);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return _(),!0}function S(){return r.getToken()!==10?(N(3,[],[2,5]),!1):(A(!1),r.getToken()===6?(p(":"),_(),T()||N(4,[],[2,5])):N(5,[],[2,5]),i.pop(),!0)}function M(){l(),_();let y=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(y||N(4,[],[]),p(","),_(),r.getToken()===2&&b)break}else y&&N(6,[],[]);S()||N(4,[],[2,5]),y=!0}return f(),r.getToken()!==2?N(7,[2],[]):_(),!0}function D(){d(),_();let y=!0,k=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||N(4,[],[]),p(","),_(),r.getToken()===4&&b)break}else k&&N(6,[],[]);y?(i.push(0),y=!1):i[i.length-1]++,T()||N(4,[],[4,5]),k=!0}return g(),y||i.pop(),r.getToken()!==4?N(8,[4],[]):_(),!0}function T(){switch(r.getToken()){case 3:return D();case 1:return M();case 10:return A(!0);default:return v()}}return _(),r.getToken()===17?n.allowEmptyContent?!0:(N(4,[],[]),!1):T()?(r.getToken()!==17&&N(9,[],[]),!0):(N(4,[],[]),!1)}const ct=jr;var j1;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(j1||(j1={}));var W1;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(W1||(W1={}));const lc=sc,uc=q1,cc=$1,fc=Hr;var H1;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(H1||(H1={}));function hc(e,t,n){return nc(e,t,n)}function Dt(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0?e.lastIndexOf(t)===n:n===0?e===t:!1}function Dn(e){let t="";dc(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function G1(e){let t=0;for(let n=0;n0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return E.defined(i)&&E.string(i.title)&&E.string(i.command)}e.is=n})(Bt||(Bt={}));var Be;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const a=s;return E.objectLiteral(a)&&E.string(a.newText)&&W.is(a.range)}e.is=i})(Be||(Be={}));var Xr;(function(e){function t(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){const i=r;return E.objectLiteral(i)&&E.string(i.label)&&(E.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(E.string(i.description)||i.description===void 0)}e.is=n})(Xr||(Xr={}));var Ut;(function(e){function t(n){const r=n;return E.string(r)}e.is=t})(Ut||(Ut={}));var na;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){const a=s;return Be.is(a)&&(Xr.is(a.annotationId)||Ut.is(a.annotationId))}e.is=i})(na||(na={}));var Qr;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return E.defined(i)&&ti.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(Qr||(Qr={}));var Zr;(function(e){function t(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&E.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||E.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||E.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ut.is(i.annotationId))}e.is=n})(Zr||(Zr={}));var Yr;(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&E.string(i.oldUri)&&E.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||E.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||E.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ut.is(i.annotationId))}e.is=n})(Yr||(Yr={}));var Kr;(function(e){function t(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&E.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||E.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||E.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ut.is(i.annotationId))}e.is=n})(Kr||(Kr={}));var ei;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>E.string(i.kind)?Zr.is(i)||Yr.is(i)||Kr.is(i):Qr.is(i)))}e.is=t})(ei||(ei={}));var ra;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return E.defined(i)&&E.string(i.uri)}e.is=n})(ra||(ra={}));var ia;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return E.defined(i)&&E.string(i.uri)&&E.integer(i.version)}e.is=n})(ia||(ia={}));var ti;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return E.defined(i)&&E.string(i.uri)&&(i.version===null||E.integer(i.version))}e.is=n})(ti||(ti={}));var sa;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return E.defined(i)&&E.string(i.uri)&&E.string(i.languageId)&&E.integer(i.version)&&E.string(i.text)}e.is=n})(sa||(sa={}));var ft;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(ft||(ft={}));var cn;(function(e){function t(n){const r=n;return E.objectLiteral(n)&&ft.is(r.kind)&&E.string(r.value)}e.is=t})(cn||(cn={}));var we;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(we||(we={}));var re;(function(e){e.PlainText=1,e.Snippet=2})(re||(re={}));var aa;(function(e){e.Deprecated=1})(aa||(aa={}));var oa;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&E.string(i.newText)&&W.is(i.insert)&&W.is(i.replace)}e.is=n})(oa||(oa={}));var la;(function(e){e.asIs=1,e.adjustIndentation=2})(la||(la={}));var ua;(function(e){function t(n){const r=n;return r&&(E.string(r.detail)||r.detail===void 0)&&(E.string(r.description)||r.description===void 0)}e.is=t})(ua||(ua={}));var ni;(function(e){function t(n){return{label:n}}e.create=t})(ni||(ni={}));var ca;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ca||(ca={}));var Bn;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return E.string(i)||E.objectLiteral(i)&&E.string(i.language)&&E.string(i.value)}e.is=n})(Bn||(Bn={}));var fa;(function(e){function t(n){let r=n;return!!r&&E.objectLiteral(r)&&(cn.is(r.contents)||Bn.is(r.contents)||E.typedArray(r.contents,Bn.is))&&(n.range===void 0||W.is(n.range))}e.is=t})(fa||(fa={}));var ha;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ha||(ha={}));var da;(function(e){function t(n,r,...i){let s={label:n};return E.defined(r)&&(s.documentation=r),E.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(da||(da={}));var ma;(function(e){e.Text=1,e.Read=2,e.Write=3})(ma||(ma={}));var ga;(function(e){function t(n,r){let i={range:n};return E.number(r)&&(i.kind=r),i}e.create=t})(ga||(ga={}));var Ue;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Ue||(Ue={}));var pa;(function(e){e.Deprecated=1})(pa||(pa={}));var ba;(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(ba||(ba={}));var wa;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(wa||(wa={}));var xa;(function(e){function t(r,i,s,a,o,u){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&E.string(i.name)&&E.number(i.kind)&&W.is(i.range)&&W.is(i.selectionRange)&&(i.detail===void 0||E.string(i.detail))&&(i.deprecated===void 0||E.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(xa||(xa={}));var ya;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ya||(ya={}));var Un;(function(e){e.Invoked=1,e.Automatic=2})(Un||(Un={}));var va;(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return E.defined(i)&&E.typedArray(i.diagnostics,Xe.is)&&(i.only===void 0||E.typedArray(i.only,E.string))&&(i.triggerKind===void 0||i.triggerKind===Un.Invoked||i.triggerKind===Un.Automatic)}e.is=n})(va||(va={}));var La;(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Bt.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&E.string(i.title)&&(i.diagnostics===void 0||E.typedArray(i.diagnostics,Xe.is))&&(i.kind===void 0||E.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Bt.is(i.command))&&(i.isPreferred===void 0||E.boolean(i.isPreferred))&&(i.edit===void 0||ei.is(i.edit))}e.is=n})(La||(La={}));var _a;(function(e){function t(r,i){let s={range:r};return E.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return E.defined(i)&&W.is(i.range)&&(E.undefined(i.command)||Bt.is(i.command))}e.is=n})(_a||(_a={}));var Na;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return E.defined(i)&&E.uinteger(i.tabSize)&&E.boolean(i.insertSpaces)}e.is=n})(Na||(Na={}));var Sa;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return E.defined(i)&&W.is(i.range)&&(E.undefined(i.target)||E.string(i.target))}e.is=n})(Sa||(Sa={}));var $n;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return E.objectLiteral(i)&&W.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})($n||($n={}));var Aa;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Aa||(Aa={}));var ka;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(ka||(ka={}));var Ra;(function(e){function t(n){const r=n;return E.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Ra||(Ra={}));var Ea;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&W.is(i.range)&&E.string(i.text)}e.is=n})(Ea||(Ea={}));var Ma;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&W.is(i.range)&&E.boolean(i.caseSensitiveLookup)&&(E.string(i.variableName)||i.variableName===void 0)}e.is=n})(Ma||(Ma={}));var Ta;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&W.is(i.range)&&(E.string(i.expression)||i.expression===void 0)}e.is=n})(Ta||(Ta={}));var Pa;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return E.defined(i)&&W.is(r.stoppedLocation)}e.is=n})(Pa||(Pa={}));var ri;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(ri||(ri={}));var ii;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return E.objectLiteral(i)&&(i.tooltip===void 0||E.string(i.tooltip)||cn.is(i.tooltip))&&(i.location===void 0||Ot.is(i.location))&&(i.command===void 0||Bt.is(i.command))}e.is=n})(ii||(ii={}));var Ca;(function(e){function t(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){const i=r;return E.objectLiteral(i)&&ee.is(i.position)&&(E.string(i.label)||E.typedArray(i.label,ii.is))&&(i.kind===void 0||ri.is(i.kind))&&i.textEdits===void 0||E.typedArray(i.textEdits,Be.is)&&(i.tooltip===void 0||E.string(i.tooltip)||cn.is(i.tooltip))&&(i.paddingLeft===void 0||E.boolean(i.paddingLeft))&&(i.paddingRight===void 0||E.boolean(i.paddingRight))}e.is=n})(Ca||(Ca={}));var Ia;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(Ia||(Ia={}));var Fa;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(Fa||(Fa={}));var Va;(function(e){function t(n){return{items:n}}e.create=t})(Va||(Va={}));var Da;(function(e){e.Invoked=0,e.Automatic=1})(Da||(Da={}));var Oa;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Oa||(Oa={}));var Ba;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Ba||(Ba={}));var Ua;(function(e){function t(n){const r=n;return E.objectLiteral(r)&&zr.is(r.uri)&&E.string(r.name)}e.is=t})(Ua||(Ua={}));var $a;(function(e){function t(s,a,o,u){return new mc(s,a,o,u)}e.create=t;function n(s){let a=s;return!!(E.defined(a)&&E.string(a.uri)&&(E.undefined(a.languageId)||E.string(a.languageId))&&E.uinteger(a.lineCount)&&E.func(a.getText)&&E.func(a.positionAt)&&E.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),u=i(a,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=o.length;for(let h=u.length-1;h>=0;h--){let f=u[h],d=s.offsetAt(f.range.start),g=s.offsetAt(f.range.end);if(g<=l)o=o.substring(0,d)+f.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=d}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);let h=0,f=0,d=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ee.create(0,t);for(;rt?i=a:r=a+1}let s=r-1;return ee.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,m,p){return t.call(g)==="[object Number]"&&m<=g&&g<=p}e.numberRange=o;function u(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=u;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function h(g){return t.call(g)==="[object Function]"}e.func=h;function f(g){return g!==null&&typeof g=="object"}e.objectLiteral=f;function d(g,m){return Array.isArray(g)&&g.every(m)}e.typedArray=d})(E||(E={}));class fn{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(fn.isIncremental(r)){const i=ja(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),u=Math.max(i.end.line,0);let l=this._lineOffsets;const h=qa(r.text,!1,s);if(u-o===h.length)for(let d=0,g=h.length;dt?i=a:r=a+1}let s=r-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=0;const l=[];for(const h of o){let f=i.offsetAt(h.range.start);if(fu&&l.push(a.substring(u,f)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=r})(Pe||(Pe={}));function si(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);si(r,t),si(i,t);let s=0,a=0,o=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function gc(e){const t=ja(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var J;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"})(J||(J={}));var Ce;(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Ce||(Ce={}));var ai;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ft.Markdown,ft.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(ai||(ai={}));var oi;function C(...e){var a;const t=e[0];let n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){const o=e.slice(1);if(t.length!==o.length+1)throw new Error("expected a string as the first argument to l10n.t");let u=t[0];for(let l=1;l0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=(a=t.args)!=null?a:{};const s=oi==null?void 0:oi[n];return s?typeof s=="string"?qn(s,i):s.comment?qn(s.message,i):qn(r,i):qn(r,i)}var pc=/{([^}]+)}/g;function qn(e,t){return Object.keys(t).length===0?e:e.replace(pc,(n,r)=>{var i;return(i=t[r])!=null?i:n})}const bc={"color-hex":{errorMessage:C("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:C("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:C("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:C("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:C("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:C("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:C("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:C("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class ht{constructor(t,n,r=0){this.offset=n,this.length=r,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class wc extends ht{constructor(t,n){super(t,n),this.type="null",this.value=null}}class Wa extends ht{constructor(t,n,r){super(t,r),this.type="boolean",this.value=n}}class xc extends ht{constructor(t,n){super(t,n),this.type="array",this.items=[]}get children(){return this.items}}class yc extends ht{constructor(t,n){super(t,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class li extends ht{constructor(t,n,r){super(t,n,r),this.type="string",this.value=""}}class vc extends ht{constructor(t,n,r){super(t,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class Lc extends ht{constructor(t,n){super(t,n),this.type="object",this.properties=[]}get children(){return this.properties}}function xe(e){return Oe(e)?e?{}:{not:{}}:e}var Ha;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Ha||(Ha={}));const _c={"http://json-schema.org/draft-03/schema#":Ce.v3,"http://json-schema.org/draft-04/schema#":Ce.v4,"http://json-schema.org/draft-06/schema#":Ce.v6,"http://json-schema.org/draft-07/schema#":Ce.v7,"https://json-schema.org/draft/2019-09/schema":Ce.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ce.v2020_12};class za{constructor(t){this.schemaDraft=t}}class ui{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||Ga(t,this.focusOffset))&&t!==this.exclude}newSub(){return new ui(-1,this.exclude)}}class hn{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}}hn.instance=new hn;class ce{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(const n of this.problems)n.code===J.EnumValueMismatch&&(n.message=C("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(t){const n=this.hasProblems();return n!==t.hasProblems()?n?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}}function Nc(e,t=[]){return new Ja(e,t,[])}function dt(e){return fc(e)}function ci(e){return cc(e)}function Ga(e,t,n=!1){return t>=e.offset&&t{let i=t(r);const s=r.children;if(Array.isArray(s))for(let a=0;a{var u;const o=W.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return Xe.create(o,a.message,(u=a.severity)!=null?u:r,a.code)})}}getMatchingSchemas(t,n=-1,r){if(this.root&&t){const i=new ui(n,r),s=Xa(t),a=new za(s);return oe(this.root,t,new ce,i,a),i.schemas}return[]}}function Xa(e,t=Ce.v2020_12){var r;let n=e.$schema;return n&&(r=_c[n])!=null?r:t}function oe(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return oe(e.valueNode,t,n,r,i);const s=e;switch(a(),s.type){case"object":h(s);break;case"array":l(s);break;case"string":u(s);break;case"number":o(s);break}r.add({node:s,schema:t});function a(){var L;function f(b){return s.type===b||b==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(f)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||C("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(f(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||C('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const b of t.allOf){const _=new ce,N=r.newSub();oe(s,xe(b),_,N,i),n.merge(_),r.merge(N)}const d=xe(t.not);if(d){const b=new ce,_=r.newSub();oe(s,d,b,_,i),b.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||C("Matches a schema that is not allowed.")});for(const N of _.schemas)N.inverted=!N.inverted,r.add(N)}const g=(b,_)=>{const N=[];let A;for(const v of b){const S=xe(v),M=new ce,D=r.newSub();if(oe(s,S,M,D,i),M.hasProblems()||N.push(S),!A)A={schema:S,validationResult:M,matchingSchemas:D};else if(!_&&!M.hasProblems()&&!A.validationResult.hasProblems())A.matchingSchemas.merge(D),A.validationResult.propertiesMatches+=M.propertiesMatches,A.validationResult.propertiesValueMatches+=M.propertiesValueMatches,A.validationResult.mergeProcessedProperties(M);else{const T=M.compare(A.validationResult);T>0?A={schema:S,validationResult:M,matchingSchemas:D}:T===0&&(A.matchingSchemas.merge(D),A.validationResult.mergeEnumValues(M))}}return N.length>1&&_&&n.problems.push({location:{offset:s.offset,length:1},message:C("Matches multiple schemas when only one must validate.")}),A&&(n.merge(A.validationResult),r.merge(A.matchingSchemas)),N.length};Array.isArray(t.anyOf)&&g(t.anyOf,!1),Array.isArray(t.oneOf)&&g(t.oneOf,!0);const m=b=>{const _=new ce,N=r.newSub();oe(s,xe(b),_,N,i),n.merge(_),r.merge(N)},p=(b,_,N)=>{const A=xe(b),v=new ce,S=r.newSub();oe(s,A,v,S,i),r.merge(S),n.mergeProcessedProperties(v),v.hasProblems()?N&&m(N):_&&m(_)},w=xe(t.if);if(w&&p(w,xe(t.then),xe(t.else)),Array.isArray(t.enum)){const b=dt(s);let _=!1;for(const N of t.enum)if(Dt(b,N)){_=!0;break}n.enumValues=t.enum,n.enumValueMatch=_,_||n.problems.push({location:{offset:s.offset,length:s.length},code:J.EnumValueMismatch,message:t.errorMessage||C("Value is not accepted. Valid values: {0}.",t.enum.map(N=>JSON.stringify(N)).join(", "))})}if(Te(t.const)){const b=dt(s);Dt(b,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:J.EnumValueMismatch,message:t.errorMessage||C("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let x=t.deprecationMessage;if(x||t.deprecated){x=x||C("Value is deprecated");let b=((L=s.parent)==null?void 0:L.type)==="property"?s.parent:s;n.problems.push({location:{offset:b.offset,length:b.length},severity:be.Warning,message:x,code:J.Deprecated})}}function o(f){const d=f.value;function g(_){var A;const N=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(_.toString());return N&&{value:Number(N[1]+(N[2]||"")),multiplier:(((A=N[2])==null?void 0:A.length)||0)-(parseInt(N[3])||0)}}if(ue(t.multipleOf)){let _=-1;if(Number.isInteger(t.multipleOf))_=d%t.multipleOf;else{let N=g(t.multipleOf),A=g(d);if(N&&A){const v=10**Math.abs(A.multiplier-N.multiplier);A.multiplier=x&&n.problems.push({location:{offset:f.offset,length:f.length},message:C("Value is above the exclusive maximum of {0}.",x)});const L=p(t.minimum,t.exclusiveMinimum);ue(L)&&db&&n.problems.push({location:{offset:f.offset,length:f.length},message:C("Value is above the maximum of {0}.",b)})}function u(f){if(ue(t.minLength)&&G1(f.value)t.maxLength&&n.problems.push({location:{offset:f.offset,length:f.length},message:C("String is longer than the maximum length of {0}.",t.maxLength)}),z1(t.pattern)){const d=Dn(t.pattern);d!=null&&d.test(f.value)||n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||C('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let g;if(!f.value)g=C("URI expected.");else{const m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);m?!m[2]&&t.format==="uri"&&(g=C("URI with a scheme is expected.")):g=C("URI is expected.")}g&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||C("String is not a URI: {0}",g)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const d=bc[t.format];(!f.value||!d.pattern.exec(f.value))&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||d.errorMessage})}}function l(f){let d,g;i.schemaDraft>=Ce.v2020_12?(d=t.prefixItems,g=Array.isArray(t.items)?void 0:t.items):(d=Array.isArray(t.items)?t.items:void 0,g=Array.isArray(t.items)?t.additionalItems:t.items);let m=0;if(d!==void 0){const x=Math.min(d.length,f.items.length);for(;m=Ce.v2020_12&&n.processedProperties.add(String(L)))}x===0&&!ue(t.minContains)&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||C("Array does not contain required item.")}),ue(t.minContains)&&xt.maxContains&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||C("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const w=t.unevaluatedItems;if(w!==void 0)for(let x=0;xt.maxItems&&n.problems.push({location:{offset:f.offset,length:f.length},message:C("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let L=function(){for(let b=0;b{g.delete(b),n.processedProperties.add(b)};if(t.properties)for(const b of Object.keys(t.properties)){m(b);const _=t.properties[b],N=d[b];if(N)if(Oe(_))if(_)n.propertiesMatches++,n.propertiesValueMatches++;else{const A=N.parent;n.problems.push({location:{offset:A.keyNode.offset,length:A.keyNode.length},message:t.errorMessage||C("Property {0} is not allowed.",b)})}else{const A=new ce;oe(N,_,A,r,i),n.mergePropertyMatch(A)}}if(t.patternProperties)for(const b of Object.keys(t.patternProperties)){const _=Dn(b);if(_){const N=[];for(const A of g)if(_.test(A)){N.push(A);const v=d[A];if(v){const S=t.patternProperties[b];if(Oe(S))if(S)n.propertiesMatches++,n.propertiesValueMatches++;else{const M=v.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||C("Property {0} is not allowed.",A)})}else{const M=new ce;oe(v,S,M,r,i),n.mergePropertyMatch(M)}}}N.forEach(m)}}const p=t.additionalProperties;if(p!==void 0)for(const b of g){m(b);const _=d[b];if(_){if(p===!1){const N=_.parent;n.problems.push({location:{offset:N.keyNode.offset,length:N.keyNode.length},message:t.errorMessage||C("Property {0} is not allowed.",b)})}else if(p!==!0){const N=new ce;oe(_,p,N,r,i),n.mergePropertyMatch(N)}}}const w=t.unevaluatedProperties;if(w!==void 0){const b=[];for(const _ of g)if(!n.processedProperties.has(_)){b.push(_);const N=d[_];if(N){if(w===!1){const A=N.parent;n.problems.push({location:{offset:A.keyNode.offset,length:A.keyNode.length},message:t.errorMessage||C("Property {0} is not allowed.",_)})}else if(w!==!0){const A=new ce;oe(N,w,A,r,i),n.mergePropertyMatch(A)}}}b.forEach(m)}if(ue(t.maxProperties)&&f.properties.length>t.maxProperties&&n.problems.push({location:{offset:f.offset,length:f.length},message:C("Object has more properties than limit of {0}.",t.maxProperties)}),ue(t.minProperties)&&f.properties.length0){for(T--;T>0&&/\s/.test(i.charAt(T));)T--;y=T+1}if(u(A,v,T,y),S&&f(S,!1),M.length+D.length>0){let k=s.getToken();for(;k!==17;){if(M.indexOf(k)!==-1){o();break}else if(D.indexOf(k)!==-1)break;k=o()}}return S}function h(){switch(s.getTokenError()){case 4:return l(C("Invalid unicode sequence in string."),J.InvalidUnicode),!0;case 5:return l(C("Invalid escape character in string."),J.InvalidEscapeCharacter),!0;case 3:return l(C("Unexpected end of number."),J.UnexpectedEndOfNumber),!0;case 1:return l(C("Unexpected end of comment."),J.UnexpectedEndOfComment),!0;case 2:return l(C("Unexpected end of string."),J.UnexpectedEndOfString),!0;case 6:return l(C("Invalid characters in string. Control characters must be escaped."),J.InvalidCharacter),!0}return!1}function f(A,v){return A.length=s.getTokenOffset()+s.getTokenLength()-A.offset,v&&o(),A}function d(A){if(s.getToken()!==3)return;const v=new xc(A,s.getTokenOffset());o();let S=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){S||l(C("Value expected"),J.ValueExpected);const D=s.getTokenOffset();if(o(),s.getToken()===4){S&&u(C("Trailing comma"),J.TrailingComma,D,D+1);continue}}else S&&l(C("Expected comma"),J.CommaExpected);const M=b(v);M?v.items.push(M):l(C("Value expected"),J.ValueExpected,void 0,[],[4,5]),S=!0}return s.getToken()!==4?l(C("Expected comma or closing bracket"),J.CommaOrCloseBacketExpected,v):f(v,!0)}const g=new li(void 0,0,0);function m(A,v){const S=new vc(A,s.getTokenOffset(),g);let M=w(S);if(!M)if(s.getToken()===16){l(C("Property keys must be doublequoted"),J.PropertyKeysMustBeDoublequoted);const T=new li(S,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),M=T,o()}else return;if(S.keyNode=M,M.value!=="//"){const T=v[M.value];T?(u(C("Duplicate object key"),J.DuplicateKey,S.keyNode.offset,S.keyNode.offset+S.keyNode.length,be.Warning),tt(T)&&u(C("Duplicate object key"),J.DuplicateKey,T.keyNode.offset,T.keyNode.offset+T.keyNode.length,be.Warning),v[M.value]=!0):v[M.value]=S}if(s.getToken()===6)S.colonOffset=s.getTokenOffset(),o();else if(l(C("Colon expected"),J.ColonExpected),s.getToken()===10&&e.positionAt(M.offset+M.length).line=0;n--){const r=this.contributions[n].resolveCompletion;if(r){const i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){const i={items:[],isIncomplete:!1},s=t.getText(),a=t.offsetAt(n);let o=r.getNodeFromOffset(a,!0);if(this.isInComment(t,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){const d=s[a-1];(o.type==="object"&&d==="}"||o.type==="array"&&d==="]")&&(o=o.parent)}const u=this.getCurrentWord(t,a);let l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=W.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{let d=a-u.length;d>0&&s[d-1]==='"'&&d--,l=W.create(t.positionAt(d),n)}const h=new Map,f={add:d=>{let g=d.label;const m=h.get(g);if(m)m.documentation||(m.documentation=d.documentation),m.detail||(m.detail=d.detail),m.labelDetails||(m.labelDetails=d.labelDetails);else{if(g=g.replace(/[\n]/g,"\u21B5"),g.length>60){const p=g.substr(0,57).trim()+"...";h.has(p)||(g=p)}d.textEdit=Be.replace(l,d.insertText),d.label=g,h.set(g,d),i.items.push(d)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:d=>{console.error(d)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(d=>{const g=[];let m=!0,p="",w;if(o&&o.type==="string"){const L=o.parent;L&&L.type==="property"&&L.keyNode===o&&(m=!L.valueNode,w=L,p=s.substr(o.offset+1,o.length-2),L&&(o=L.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(N=>{(!w||w!==N)&&h.set(N.keyNode.value,ni.create("__"))});let b="";m&&(b=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),d?this.getPropertyCompletions(d,r,o,m,b,f):this.getSchemaLessPropertyCompletions(r,o,p,f);const _=ci(o);this.contributions.forEach(N=>{const A=N.collectPropertyCompletions(t.uri,_,u,m,b==="",f);A&&g.push(A)}),!d&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(f.add({kind:we.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,b),insertTextFormat:re.Snippet,documentation:""}),f.setAsIncomplete())}const x={};return d?this.getValueCompletions(d,r,o,a,t,f,x):this.getSchemaLessValueCompletions(r,o,a,t,f),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,t,f,g),this.promiseConstructor.all(g).then(()=>{if(f.getNumberOfProposals()===0){let L=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(L=o.offset+o.length);const b=this.evaluateSeparatorAfter(t,L);this.addFillerValueCompletions(x,b,f)}return i})})}getPropertyCompletions(t,n,r,i,s,a){n.getMatchingSchemas(t.schema,r.offset).forEach(u=>{if(u.node===r&&!u.inverted){const l=u.schema.properties;l&&Object.keys(l).forEach(f=>{const d=l[f];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){const g={kind:we.Property,label:f,insertText:this.getInsertTextForProperty(f,d,i,s),insertTextFormat:re.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.suggestSortText!==void 0&&(g.sortText=d.suggestSortText),g.insertText&&ln(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});const h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){const f=(d,g=void 0)=>{const m={kind:we.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:re.Snippet,filterText:this.getFilterTextForValue(d),documentation:g||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(m.sortText=h.suggestSortText),m.insertText&&ln(m.insertText,`$1${s}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(m)};if(h.enum)for(let d=0;d{a.properties.forEach(o=>{const u=o.keyNode.value;i.add({kind:we.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:re.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(n.parent)if(n.parent.type==="property"){const a=n.parent.keyNode.value;t.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:we.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:re.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,s){let a=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(a=n.offset+n.length,n=n.parent),!n){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:re.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:re.Snippet,documentation:""});return}const o=this.evaluateSeparatorAfter(i,a),u=l=>{l.parent&&!Ga(l.parent,r,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,i),insertText:this.getInsertTextForMatchingNode(l,i,o),insertTextFormat:re.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(n.type==="property"&&r>(n.colonOffset||0)){const l=n.valueNode;if(l&&(r>l.offset+l.length||l.type==="object"||l.type==="array"))return;const h=n.keyNode.value;t.visit(f=>(f.type==="property"&&f.keyNode.value===h&&f.valueNode&&u(f.valueNode),!0)),h==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){const l=n.parent.keyNode.value;t.visit(h=>(h.type==="property"&&h.keyNode.value===l&&h.valueNode&&h.valueNode.type==="array"&&h.valueNode.items.forEach(u),!0))}else n.items.forEach(u)}getValueCompletions(t,n,r,i,s,a,o){let u=i,l,h;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(u=r.offset+r.length,h=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(r.type==="property"&&i>(r.colonOffset||0)){const f=r.valueNode;if(f&&i>f.offset+f.length)return;l=r.keyNode.value,r=r.parent}if(r&&(l!==void 0||r.type==="array")){const f=this.evaluateSeparatorAfter(s,u),d=n.getMatchingSchemas(t.schema,r.offset,h);for(const g of d)if(g.node===r&&!g.inverted&&g.schema){if(r.type==="array"&&g.schema.items){let m=a;if(g.schema.uniqueItems){const p=new Set;r.children.forEach(w=>{w.type!=="array"&&w.type!=="object"&&p.add(this.getLabelForValue(dt(w)))}),m={...a,add(w){p.has(w.label)||a.add(w)}}}if(Array.isArray(g.schema.items)){const p=this.findItemAtOffset(r,s,i);p{const u=o.collectDefaultCompletions(i.uri,s);u&&a.push(u)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){const o=n.keyNode.value,u=n.valueNode;if((!u||r<=u.offset+u.length)&&n.parent){const l=ci(n.parent);this.contributions.forEach(h=>{const f=h.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}}addSchemaValueCompletions(t,n,r,i){typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)))}addDefaultValueCompletions(t,n,r,i=0){let s=!1;if(Te(t.default)){let a=t.type,o=t.default;for(let l=i;l>0;l--)o=[o],a="array";const u={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:re.Snippet};this.doesSupportsLabelDetails()?u.labelDetails={description:C("Default value")}:u.detail=C("Default value"),r.add(u),s=!0}Array.isArray(t.examples)&&t.examples.forEach(a=>{let o=t.type,u=a;for(let l=i;l>0;l--)u=[u],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,n),insertTextFormat:re.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(a=>{let o=t.type,u=a.body,l=a.label,h,f;if(Te(u)){t.type;for(let d=i;d>0;d--)u=[u];h=this.getInsertTextForSnippetValue(u,n),f=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else if(typeof a.bodyText=="string"){let d="",g="",m="";for(let p=i;p>0;p--)d=d+m+`[ `,g=g+` `+m+"]",m+=" ",o="array";h=d+m+a.bodyText.split(` `).join(` `+m)+g+n,l=l||h,f=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:re.Snippet,filterText:f}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(Te(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:re.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;in[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:re.Snippet,detail:C("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:re.Snippet,detail:C("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:re.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:re.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:we.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:re.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){const r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return fi(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){const n=t;t=n.length>0?n[0]:void 0}if(!t)return we.Value;switch(t){case"string":return we.Value;case"object":return we.Module;case"property":return we.Property;default:return we.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:const i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){const s=this.getInsertTextForValue(t,"");if(!r)return s;const a=s+": ";let o,u=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){const l=n.defaultSnippets[0].body;Te(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),u+=n.enum.length),Te(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),u++),Te(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),u++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),u+=n.examples.length),u===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.items&&(l="array")),l){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+i}getCurrentWord(t,n){let r=n-1;const i=t.getText();for(;r>=0&&` \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){const r=ct(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){const i=ct(n.getText(),!0),s=t.items;for(let a=s.length-1;a>=0;a--){const o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(t,n,r){const i=ct(t.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()s.offset+1&&i({contents:h,range:o}),l=ci(s);for(let h=this.contributions.length-1;h>=0;h--){const d=this.contributions[h].getInfoContribution(t.uri,l);if(d)return d.then(g=>u(g))}return this.schemaService.getSchemaForResource(t.uri,r).then(h=>{if(h&&s){const f=r.getMatchingSchemas(h.schema,s.offset);let d,g,m,p;f.every(x=>{if(x.node===s&&!x.inverted&&x.schema&&(d=d||x.schema.title,g=g||x.schema.markdownDescription||hi(x.schema.description),x.schema.enum)){const L=x.schema.enum.indexOf(dt(s));x.schema.markdownEnumDescriptions?m=x.schema.markdownEnumDescriptions[L]:x.schema.enumDescriptions&&(m=hi(x.schema.enumDescriptions[L])),m&&(p=x.schema.enum[L],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});let w="";return d&&(w=hi(d)),g&&(w.length>0&&(w+=` `),w+=g),m&&(w.length>0&&(w+=` `),w+=`\`${Rc(p)}\`: ${m}`),u([w])}return null})}}function hi(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function Rc(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}class Ec{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:be.Error)}doValidation(t,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);const s=[],a={},o=l=>{const h=l.range.start.line+" "+l.range.start.character+" "+l.message;a[h]||(a[h]=!0,s.push(l))},u=l=>{let h=r!=null&&r.trailingCommas?jn(r.trailingCommas):be.Error,f=r!=null&&r.comments?jn(r.comments):this.commentSeverity,d=r!=null&&r.schemaValidation?jn(r.schemaValidation):be.Warning,g=r!=null&&r.schemaRequest?jn(r.schemaRequest):be.Warning;if(l){const m=(p,w)=>{if(n.root&&g){const x=n.root,L=x.type==="object"?x.properties[0]:void 0;if(L&&L.keyNode.value==="$schema"){const b=L.valueNode||L,_=W.create(t.positionAt(b.offset),t.positionAt(b.offset+b.length));o(Xe.create(_,p,g,w))}else{const b=W.create(t.positionAt(x.offset),t.positionAt(x.offset+1));o(Xe.create(b,p,g,w))}}};if(l.errors.length)m(l.errors[0],J.SchemaResolveError);else if(d){for(const w of l.warnings)m(w,J.SchemaUnsupportedFeature);const p=n.validate(t,l.schema,d,r==null?void 0:r.schemaDraft);p&&p.forEach(o)}Qa(l.schema)&&(f=void 0),Za(l.schema)&&(h=void 0)}for(const m of n.syntaxErrors){if(m.code===J.TrailingComma){if(typeof h!="number")continue;m.severity=h}o(m)}if(typeof f=="number"){const m=C("Comments are not permitted in JSON.");n.comments.forEach(p=>{o(Xe.create(p,m,f,J.CommentNotPermitted))})}return s};if(i){const l=i.id||"schemaservice://untitled/"+Mc++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(f=>u(f))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(l=>u(l))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}}let Mc=0;function Qa(e){if(e&&typeof e=="object"){if(Oe(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const n=Qa(t);if(Oe(n))return n}}}function Za(e){if(e&&typeof e=="object"){if(Oe(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(Oe(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const n of e.allOf){const r=Za(n);if(Oe(r))return r}}}function jn(e){switch(e){case"error":return be.Error;case"warning":return be.Warning;case"ignore":return}}const Ya=48,Tc=57,Pc=65,Wn=97,Cc=102;function ne(e){return e=Wn&&e<=Cc?e-Wn+10:0)}function Ic(e){if(e[0]==="#")switch(e.length){case 4:return{red:ne(e.charCodeAt(1))*17/255,green:ne(e.charCodeAt(2))*17/255,blue:ne(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ne(e.charCodeAt(1))*17/255,green:ne(e.charCodeAt(2))*17/255,blue:ne(e.charCodeAt(3))*17/255,alpha:ne(e.charCodeAt(4))*17/255};case 7:return{red:(ne(e.charCodeAt(1))*16+ne(e.charCodeAt(2)))/255,green:(ne(e.charCodeAt(3))*16+ne(e.charCodeAt(4)))/255,blue:(ne(e.charCodeAt(5))*16+ne(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ne(e.charCodeAt(1))*16+ne(e.charCodeAt(2)))/255,green:(ne(e.charCodeAt(3))*16+ne(e.charCodeAt(4)))/255,blue:(ne(e.charCodeAt(5))*16+ne(e.charCodeAt(6)))/255,alpha:(ne(e.charCodeAt(7))*16+ne(e.charCodeAt(8)))/255}}}class Fc{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||ln(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const d=[];for(const g of i.items)if(g.type==="object"){for(const m of g.properties)if(m.keyNode.value==="key"&&m.valueNode){const p=Ot.create(t.uri,nt(t,g));if(d.push({name:Ka(m.valueNode),kind:Ue.Function,location:p}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),d}}return d}const o=[{node:i,containerName:""}];let u=0,l=!1;const h=[],f=(d,g)=>{d.type==="array"?d.items.forEach(m=>{m&&o.push({node:m,containerName:g})}):d.type==="object"&&d.properties.forEach(m=>{const p=m.valueNode;if(p)if(s>0){s--;const w=Ot.create(t.uri,nt(t,m)),x=g?g+"."+m.keyNode.value:m.keyNode.value;h.push({name:this.getKeyLabel(m),kind:this.getSymbolKind(p.type),location:w,containerName:g}),o.push({node:p,containerName:x})}else l=!0})};for(;u{d.type==="array"?d.items.forEach((m,p)=>{if(m)if(s>0){s--;const w=nt(t,m),x=w,b={name:String(p),kind:this.getSymbolKind(m.type),range:w,selectionRange:x,children:[]};g.push(b),u.push({result:b.children,node:m})}else h=!0}):d.type==="object"&&d.properties.forEach(m=>{const p=m.valueNode;if(p)if(s>0){s--;const w=nt(t,m),x=nt(t,m.keyNode),L=[],b={name:this.getKeyLabel(m),kind:this.getSymbolKind(p.type),range:w,selectionRange:x,children:L,detail:this.getDetail(p)};g.push(b),u.push({result:L,node:p})}else h=!0})};for(;l{const s=[];if(i){let a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE;const o=n.getMatchingSchemas(i.schema),u={};for(const l of o)if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){const h=String(l.node.offset);if(!u[h]){const f=Ic(dt(l.node));if(f){const d=nt(t,l.node);s.push({color:f,range:d})}if(u[h]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,n,r,i){const s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),u=Math.round(r.blue*255);function l(f){const d=f.toString(16);return d.length!==2?"0"+d:d}let h;return r.alpha===1?h=`#${l(a)}${l(o)}${l(u)}`:h=`#${l(a)}${l(o)}${l(u)}${l(Math.round(r.alpha*255))}`,s.push({label:h,textEdit:Be.replace(i,JSON.stringify(h))}),s}}function nt(e,t){return W.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Ka(e){return dt(e)||C("")}const di={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Vc={id:C("A unique identifier for the schema."),$schema:C("The schema to verify this document against."),title:C("A descriptive title of the element."),description:C("A long description of the element. Used in hover menus and suggestions."),default:C("A default value. Used by suggestions."),multipleOf:C("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:C("The maximum numerical value, inclusive by default."),exclusiveMaximum:C("Makes the maximum property exclusive."),minimum:C("The minimum numerical value, inclusive by default."),exclusiveMinimum:C("Makes the minimum property exclusive."),maxLength:C("The maximum length of a string."),minLength:C("The minimum length of a string."),pattern:C("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:C("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:C("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:C("The maximum number of items that can be inside an array. Inclusive."),minItems:C("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:C("If all of the items in the array must be unique. Defaults to false."),maxProperties:C("The maximum number of properties an object can have. Inclusive."),minProperties:C("The minimum number of properties an object can have. Inclusive."),required:C("An array of strings that lists the names of all properties required on this object."),additionalProperties:C("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:C("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:C("A map of property names to schemas for each property."),patternProperties:C("A map of regular expressions on property names to schemas for matching properties."),dependencies:C("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:C("The set of literal values that are valid."),type:C("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:C("Describes the format expected for the value."),allOf:C("An array of schemas, all of which must match."),anyOf:C("An array of schemas, where at least one must match."),oneOf:C("An array of schemas, exactly one of which must match."),not:C("A schema which must not match."),$id:C("A unique identifier for the schema."),$ref:C("Reference a definition hosted on any location."),$comment:C("Comments from schema authors to readers or maintainers of the schema."),readOnly:C("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:C("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:C('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:C("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:C("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:C("Describes the media type of a string property."),contentEncoding:C("Describes the content encoding of a string property."),if:C('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:C('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:C('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in di.schemas){const t=di.schemas[e];for(const n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});const i=Vc[n];i&&(r.description=i)}}var eo;(()=>{var e={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,l){for(var h,f="",d=0,g=-1,m=0,p=0;p<=u.length;++p){if(p2){var w=f.lastIndexOf("/");if(w!==f.length-1){w===-1?(f="",d=0):d=(f=f.slice(0,w)).length-1-f.lastIndexOf("/"),g=p,m=0;continue}}else if(f.length===2||f.length===1){f="",d=0,g=p,m=0;continue}}l&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+u.slice(g+1,p):f=u.slice(g+1,p),d=p-g-1;g=p,m=0}else h===46&&m!==-1?++m:m=-1}return f}var o={resolve:function(){for(var u,l="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),s(d),d.length!==0&&(l=d+"/"+l,h=d.charCodeAt(0)===47)}return l=a(l,!h),h?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(u){if(s(u),u.length===0)return".";var l=u.charCodeAt(0)===47,h=u.charCodeAt(u.length-1)===47;return(u=a(u,!l)).length!==0||l||(u="."),u.length>0&&h&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l0&&(u===void 0?u=h:u+="/"+h)}return u===void 0?".":o.normalize(u)},relative:function(u,l){if(s(u),s(l),u===l||(u=o.resolve(u))===(l=o.resolve(l)))return"";for(var h=1;hp){if(l.charCodeAt(g+x)===47)return l.slice(g+x+1);if(x===0)return l.slice(g+x)}else d>p&&(u.charCodeAt(h+x)===47?w=x:x===0&&(w=0));break}var L=u.charCodeAt(h+x);if(L!==l.charCodeAt(g+x))break;L===47&&(w=x)}var b="";for(x=h+w+1;x<=f;++x)x!==f&&u.charCodeAt(x)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(g+w):(g+=w,l.charCodeAt(g)===47&&++g,l.slice(g))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var l=u.charCodeAt(0),h=l===47,f=-1,d=!0,g=u.length-1;g>=1;--g)if((l=u.charCodeAt(g))===47){if(!d){f=g;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":u.slice(0,f)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(u);var h,f=0,d=-1,g=!0;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var m=l.length-1,p=-1;for(h=u.length-1;h>=0;--h){var w=u.charCodeAt(h);if(w===47){if(!g){f=h+1;break}}else p===-1&&(g=!1,p=h+1),m>=0&&(w===l.charCodeAt(m)?--m==-1&&(d=h):(m=-1,d=p))}return f===d?d=p:d===-1&&(d=u.length),u.slice(f,d)}for(h=u.length-1;h>=0;--h)if(u.charCodeAt(h)===47){if(!g){f=h+1;break}}else d===-1&&(g=!1,d=h+1);return d===-1?"":u.slice(f,d)},extname:function(u){s(u);for(var l=-1,h=0,f=-1,d=!0,g=0,m=u.length-1;m>=0;--m){var p=u.charCodeAt(m);if(p!==47)f===-1&&(d=!1,f=m+1),p===46?l===-1?l=m:g!==1&&(g=1):l!==-1&&(g=-1);else if(!d){h=m+1;break}}return l===-1||f===-1||g===0||g===1&&l===f-1&&l===h+1?"":u.slice(l,f)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(l,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d}(0,u)},parse:function(u){s(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var h,f=u.charCodeAt(0),d=f===47;d?(l.root="/",h=1):h=0;for(var g=-1,m=0,p=-1,w=!0,x=u.length-1,L=0;x>=h;--x)if((f=u.charCodeAt(x))!==47)p===-1&&(w=!1,p=x+1),f===46?g===-1?g=x:L!==1&&(L=1):g!==-1&&(L=-1);else if(!w){m=x+1;break}return g===-1||p===-1||L===0||L===1&&g===p-1&&g===m+1?p!==-1&&(l.base=l.name=m===0&&d?u.slice(1,p):u.slice(m,p)):(m===0&&d?(l.name=u.slice(1,g),l.base=u.slice(1,p)):(l.name=u.slice(m,g),l.base=u.slice(m,p)),l.ext=u.slice(g,p)),m>0?l.dir=u.slice(0,m-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>D}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function u(T,y){if(!T.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${T.authority}", path: "${T.path}", query: "${T.query}", fragment: "${T.fragment}"}`);if(T.scheme&&!s.test(T.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(T.path){if(T.authority){if(!a.test(T.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(o.test(T.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(y,k,P,I,F,V=!1){ke(this,"scheme");ke(this,"authority");ke(this,"path");ke(this,"query");ke(this,"fragment");typeof y=="object"?(this.scheme=y.scheme||l,this.authority=y.authority||l,this.path=y.path||l,this.query=y.query||l,this.fragment=y.fragment||l):(this.scheme=function($,X){return $||X?$:"file"}(y,V),this.authority=k||l,this.path=function($,X){switch($){case"https":case"http":case"file":X?X[0]!==h&&(X=h+X):X=h}return X}(this.scheme,P||l),this.query=I||l,this.fragment=F||l,u(this,V))}static isUri(y){return y instanceof d||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}get fsPath(){return L(this,!1)}with(y){if(!y)return this;let{scheme:k,authority:P,path:I,query:F,fragment:V}=y;return k===void 0?k=this.scheme:k===null&&(k=l),P===void 0?P=this.authority:P===null&&(P=l),I===void 0?I=this.path:I===null&&(I=l),F===void 0?F=this.query:F===null&&(F=l),V===void 0?V=this.fragment:V===null&&(V=l),k===this.scheme&&P===this.authority&&I===this.path&&F===this.query&&V===this.fragment?this:new m(k,P,I,F,V)}static parse(y,k=!1){const P=f.exec(y);return P?new m(P[2]||l,A(P[4]||l),A(P[5]||l),A(P[7]||l),A(P[9]||l),k):new m(l,l,l,l,l)}static file(y){let k=l;if(i&&(y=y.replace(/\\/g,h)),y[0]===h&&y[1]===h){const P=y.indexOf(h,2);P===-1?(k=y.substring(2),y=h):(k=y.substring(2,P),y=y.substring(P)||h)}return new m("file",k,y,l,l)}static from(y){const k=new m(y.scheme,y.authority,y.path,y.query,y.fragment);return u(k,!0),k}toString(y=!1){return b(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof d)return y;{const k=new m(y);return k._formatted=y.external,k._fsPath=y._sep===g?y.fsPath:null,k}}return y}}const g=i?1:void 0;class m extends d{constructor(){super(...arguments);ke(this,"_formatted",null);ke(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=L(this,!1)),this._fsPath}toString(k=!1){return k?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=g),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function w(T,y,k){let P,I=-1;for(let F=0;F=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||y&&V===47||k&&V===91||k&&V===93||k&&V===58)I!==-1&&(P+=encodeURIComponent(T.substring(I,F)),I=-1),P!==void 0&&(P+=T.charAt(F));else{P===void 0&&(P=T.substr(0,F));const $=p[V];$!==void 0?(I!==-1&&(P+=encodeURIComponent(T.substring(I,F)),I=-1),P+=$):I===-1&&(I=F)}}return I!==-1&&(P+=encodeURIComponent(T.substring(I))),P!==void 0?P:T}function x(T){let y;for(let k=0;k1&&T.scheme==="file"?`//${T.authority}${T.path}`:T.path.charCodeAt(0)===47&&(T.path.charCodeAt(1)>=65&&T.path.charCodeAt(1)<=90||T.path.charCodeAt(1)>=97&&T.path.charCodeAt(1)<=122)&&T.path.charCodeAt(2)===58?y?T.path.substr(1):T.path[1].toLowerCase()+T.path.substr(2):T.path,i&&(k=k.replace(/\//g,"\\")),k}function b(T,y){const k=y?x:w;let P="",{scheme:I,authority:F,path:V,query:$,fragment:X}=T;if(I&&(P+=I,P+=":"),(F||I==="file")&&(P+=h,P+=h),F){let z=F.indexOf("@");if(z!==-1){const Ae=F.substr(0,z);F=F.substr(z+1),z=Ae.lastIndexOf(":"),z===-1?P+=k(Ae,!1,!1):(P+=k(Ae.substr(0,z),!1,!1),P+=":",P+=k(Ae.substr(z+1),!1,!0)),P+="@"}F=F.toLowerCase(),z=F.lastIndexOf(":"),z===-1?P+=k(F,!1,!0):(P+=k(F.substr(0,z),!1,!0),P+=F.substr(z))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58){const z=V.charCodeAt(1);z>=65&&z<=90&&(V=`/${String.fromCharCode(z+32)}:${V.substr(3)}`)}else if(V.length>=2&&V.charCodeAt(1)===58){const z=V.charCodeAt(0);z>=65&&z<=90&&(V=`${String.fromCharCode(z+32)}:${V.substr(2)}`)}P+=k(V,!0,!1)}return $&&(P+="?",P+=k($,!1,!1)),X&&(P+="#",P+=y?X:w(X,!1,!1)),P}function _(T){try{return decodeURIComponent(T)}catch{return T.length>3?T.substr(0,3)+_(T.substr(3)):T}}const N=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function A(T){return T.match(N)?T.replace(N,y=>_(y)):T}var v=n(470);const S=v.posix||v,M="/";var D;(function(T){T.joinPath=function(y,...k){return y.with({path:S.join(y.path,...k)})},T.resolvePath=function(y,...k){let P=y.path,I=!1;P[0]!==M&&(P=M+P,I=!0);let F=S.resolve(P,...k);return I&&F[0]===M&&!y.authority&&(F=F.substring(1)),y.with({path:F})},T.dirname=function(y){if(y.path.length===0||y.path===M)return y;let k=S.dirname(y.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),y.with({path:k})},T.basename=function(y){return S.basename(y.path)},T.extname=function(y){return S.extname(y.path)}})(D||(D={}))})(),eo=r})();const{URI:$t,Utils:m0}=eo;function Dc(e,t){if(typeof e!="string")throw new TypeError("Expected a string");const n=String(e);let r="";const i=t?!!t.extended:!1,s=t?!!t.globstar:!1;let a=!1;const o=t&&typeof t.flags=="string"?t.flags:"";let u;for(let l=0,h=n.length;l1&&(f==="/"||f===void 0||f==="{"||f===",")&&(g==="/"||g===void 0||g===","||g==="}")?(g==="/"?l++:f==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=u}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}const Oc="!",Bc="/";class Uc{constructor(t,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let i of t){const s=i[0]!==Oc;s||(i=i.substring(1)),i.length>0&&(i[0]===Bc&&(i=i.substring(1)),this.globWrappers.push({regexp:Dc("**/"+i,{extended:!0,globstar:!0}),include:s}))}n&&(n=no(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let n=!1;for(const{regexp:r,include:i}of this.globWrappers)r.test(t)&&(n=i);return n}getURIs(){return this.uris}}class $c{constructor(t,n,r){this.service=t,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new dn(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){const t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}}class dn{constructor(t,n=[]){this.schema=t,this.errors=n}}class to{constructor(t,n=[],r=[],i){this.schema=t,this.errors=n,this.warnings=r,this.schemaDraft=i}getSection(t){const n=this.getSectionRecursive(t,this.schema);if(n)return xe(n)}getSectionRecursive(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;const r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(const i of Object.keys(n.patternProperties)){const s=Dn(i);if(s!=null&&s.test(r))return this.getSectionRecursive(t,n.patternProperties[i])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){const i=parseInt(r,10);if(!isNaN(i)&&n.items[i])return this.getSectionRecursive(t,n.items[i])}else if(n.items)return this.getSectionRecursive(t,n.items)}}}}class qc{constructor(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(n=>{const r=$t.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let n=!1;t=rt(t);const r=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;r.length;){const s=r.pop();for(let a=0;a{if(!n){const a=C("Unable to load schema from '{0}': No content.",mn(t));return new dn({},[a])}const r=[];n.charCodeAt(0)===65279&&(r.push(C("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",mn(t))),n=n.trimStart());let i={};const s=[];return i=lc(n,s),s.length&&r.push(C("Unable to parse content from '{0}': Parse error at offset {1}.",mn(t),s[0].offset)),new dn(i,r)},n=>{let r=n.toString();const i=n.toString().split("Error: ");return i.length>1&&(r=i[1]),ln(r,".")&&(r=r.substr(0,r.length-1)),new dn({},[C("Unable to load schema from '{0}': {1}.",mn(t),r)])})}resolveSchemaContent(t,n){const r=t.errors.slice(0),i=t.schema;let s=i.$schema?rt(i.$schema):void 0;if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new to({},[C("Draft-03 schemas are not supported.")],[],s));let a=new Set;const o=this.contextService,u=(p,w)=>{w=decodeURIComponent(w);let x=p;return w[0]==="/"&&(w=w.substring(1)),w.split("/").some(L=>(L=L.replace(/~1/g,"/").replace(/~0/g,"~"),x=x[L],!x)),x},l=(p,w,x)=>(w.anchors||(w.anchors=m(p)),w.anchors.get(x)),h=(p,w)=>{for(const x in w)w.hasOwnProperty(x)&&x!=="id"&&x!=="$id"&&(p[x]=w[x])},f=(p,w,x,L)=>{let b;L===void 0||L.length===0?b=w:L.charAt(0)==="/"?b=u(w,L):b=l(w,x,L),b?h(p,b):r.push(C("$ref '{0}' in '{1}' can not be resolved.",L||"",x.uri))},d=(p,w,x,L)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(w)&&(w=o.resolveRelativePath(w,L.uri)),w=rt(w);const b=this.getOrAddSchemaHandle(w);return b.getUnresolvedSchema().then(_=>{if(L.dependencies.add(w),_.errors.length){const N=x?w+"#"+x:w;r.push(C("Problems loading reference '{0}': {1}",N,_.errors[0]))}return f(p,_.schema,b,x),g(p,_.schema,b)})},g=(p,w,x)=>{const L=[];return this.traverseNodes(p,b=>{const _=new Set;for(;b.$ref;){const N=b.$ref,A=N.split("#",2);if(delete b.$ref,A[0].length>0){L.push(d(b,A[0],A[1],x));return}else if(!_.has(N)){const v=A[1];f(b,w,x,v),_.add(N)}}b.$recursiveRef&&a.add("$recursiveRef"),b.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(L)},m=p=>{const w=new Map;return this.traverseNodes(p,x=>{const L=x.$id||x.id,b=z1(L)&&L.charAt(0)==="#"?L.substring(1):x.$anchor;b&&(w.has(b)?r.push(C("Duplicate anchor declaration: '{0}'",b)):w.set(b,x)),x.$recursiveAnchor&&a.add("$recursiveAnchor"),x.$dynamicAnchor&&a.add("$dynamicAnchor")}),w};return g(i,i,n).then(p=>{let w=[];return a.size&&w.push(C("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", "))),new to(i,r,w,s)})}traverseNodes(t,n){if(!t||typeof t!="object")return Promise.resolve(null);const r=new Set,i=(...h)=>{for(const f of h)tt(f)&&u.push(f)},s=(...h)=>{for(const f of h)if(tt(f))for(const d in f){const m=f[d];tt(m)&&u.push(m)}},a=(...h)=>{for(const f of h)if(Array.isArray(f))for(const d of f)tt(d)&&u.push(d)},o=h=>{if(Array.isArray(h))for(const f of h)tt(f)&&u.push(f);else tt(h)&&u.push(h)},u=[t];let l=u.pop();for(;l;)r.has(l)||(r.add(l),n(l),i(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),s(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),a(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=u.pop()}getSchemaFromProperty(t,n){var r,i;if(((r=n.root)==null?void 0:r.type)==="object"){for(const s of n.root.properties)if(s.keyNode.value==="$schema"&&((i=s.valueNode)==null?void 0:i.type)==="string"){let a=s.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(a)&&(a=this.contextService.resolveRelativePath(a,t)),a}}}getAssociatedSchemas(t){const n=Object.create(null),r=[],i=no(t);for(const s of this.filePatternAssociations)if(s.matchesPattern(i))for(const a of s.getURIs())n[a]||(r.push(a),n[a]=!0);return r}getSchemaURIsForResource(t,n){let r=n&&this.getSchemaFromProperty(t,n);return r?[r]:this.getAssociatedSchemas(t)}getSchemaForResource(t,n){if(n){let s=this.getSchemaFromProperty(t,n);if(s){const a=rt(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;const r=this.getAssociatedSchemas(t),i=r.length>0?this.createCombinedSchema(t,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{const r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(s=>({$ref:s}))};return this.addSchemaHandle(r,i)}}getMatchingSchemas(t,n,r){if(r){const i=r.id||"schemaservice://untitled/matchingSchemas/"+jc++;return this.addSchemaHandle(i,r).getResolvedSchema().then(a=>n.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(t.uri,n).then(i=>i?n.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}}let jc=0;function rt(e){try{return $t.parse(e).toString(!0)}catch{return e}}function no(e){try{return $t.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function mn(e){try{const t=$t.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function Wc(e,t){const n=[],r=[],i=[];let s=-1;const a=ct(e.getText(),!1);let o=a.scan();function u(m){n.push(m),r.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{const m=e.positionAt(a.getTokenOffset()).line,p={startLine:m,endLine:m,kind:o===1?"object":"array"};i.push(p);break}case 2:case 4:{const m=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===m){const p=i.pop(),w=e.positionAt(a.getTokenOffset()).line;p&&w>p.startLine+1&&s!==p.startLine&&(p.endLine=w-1,u(p),s=p.startLine)}break}case 13:{const m=e.positionAt(a.getTokenOffset()).line,p=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&m+1=0&&i[x].kind!==un.Region;)x--;if(x>=0){const L=i[x];i.length=x,w>L.startLine&&s!==L.startLine&&(L.endLine=w,u(L),s=L.startLine)}}}break}}o=a.scan()}const l=t&&t.rangeLimit;if(typeof l!="number"||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let m of r)m<30&&(h[m]=(h[m]||0)+1);let f=0,d=0;for(let m=0;ml){d=m;break}f+=p}}const g=[];for(let m=0;m=d&&u<=g&&h.push(i(d,g)),h.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":h.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){const d=a(l.offset+l.length,5);d!==-1&&h.push(i(l.offset,d))}l=l.parent}let f;for(let d=h.length-1;d>=0;d--)f=$n.create(h[d],f);return f||(f=$n.create(W.create(o,o))),f}function i(o,u){return W.create(e.positionAt(o),e.positionAt(u))}const s=ct(e.getText(),!0);function a(o,u){return s.setPosition(o),s.scan()===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function mi(e,t,n){let r;if(n){const s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}const i={tabSize:t?t.tabSize:4,insertSpaces:(t==null?void 0:t.insertSpaces)===!0,insertFinalNewline:(t==null?void 0:t.insertFinalNewline)===!0,eol:` `,keepLines:(t==null?void 0:t.keepLines)===!0};return hc(e.getText(),r,i).map(s=>Be.replace(W.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var ie;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(ie||(ie={}));class Hn{constructor(t,n){this.propertyName=t!=null?t:"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=Gc(this.childrenProperties,t,zc),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}}function zc(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return nr?1:0}function Gc(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(rs)return e.length;let a=0,o=e.length-1;for(;a<=o;){let u=o+a>>1,l=n(t,e[u]);if(l>0)a=u+1;else if(l<0)o=u-1;else return u}return-a-1}function Jc(e,t){const n={...t,keepLines:!1},r=Pe.applyEdits(e,mi(e,n,void 0)),i=Pe.create("test://test.json","json",0,r),s=Xc(i),a=Qc(i,s),o=mi(a,n,void 0),u=Pe.applyEdits(a,o);return[Be.replace(W.create(ee.create(0,0),e.positionAt(e.getText().length)),u)]}function Xc(e){const t=e.getText(),n=ct(t,!1);let r=new Hn,i=r,s=r,a=r,o,u=0,l=0,h,f,d=-1,g=-1,m=0,p=0,w=[],x=!1,L=!1;for(;(o=n.scan())!==17;){if(x===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?a.endLineNumber=b-1:s.endLineNumber=b-1,m=b,x=!1}if(L===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(m=n.getTokenStartLine(),L=!1),n.getTokenStartLine()!==u){for(let b=u;b0;){const i=r.shift(),s=i.propertyTreeArray;let a=i.beginningLineNumber;for(let o=0;o{var i;if(r.type==="property"&&r.keyNode.value==="$ref"&&((i=r.valueNode)==null?void 0:i.type)==="string"){const s=r.valueNode.value,a=Kc(t,s);if(a){const o=e.positionAt(a.offset);n.push({target:`${e.uri}#${o.line+1},${o.character+1}`,range:Yc(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Yc(e,t){return W.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Kc(e,t){const n=e0(t);return n?gi(n,e.root):null}function gi(e,t){if(!t)return null;if(e.length===0)return t;const n=e.shift();if(t&&t.type==="object"){const r=t.properties.find(i=>i.keyNode.value===n);return r?gi(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?gi(e,i):null}return null}function e0(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(t0)}function t0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function n0(e){const t=e.promiseConstructor||Promise,n=new qc(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(di);const r=new Ac(n,e.contributions,t,e.clientCapabilities),i=new kc(n,e.contributions,t),s=new Fc(n),a=new Ec(n,t);return{configure:o=>{var u;n.clearExternalSchemas(),(u=o.schemas)==null||u.forEach(n.registerExternalSchema.bind(n)),a.configure(o)},resetSchema:o=>n.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>Sc(o,{collectComments:!0}),newJSONDocument:(o,u)=>Nc(o,u),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Wc,getSelectionRanges:Hc,findDefinition:()=>Promise.resolve([]),findLinks:Zc,format:(o,u,l)=>mi(o,l,u),sort:(o,u)=>Jc(o,u)}}let ao;typeof fetch<"u"&&(ao=function(e){return fetch(e).then(t=>t.text())});class r0{constructor(t,n){ke(this,"_ctx");ke(this,"_languageService");ke(this,"_languageSettings");ke(this,"_languageId");this._ctx=t,this._languageSettings=n.languageSettings,this._languageId=n.languageId,this._languageService=n0({workspaceContext:{resolveRelativePath:(r,i)=>{const s=i.substr(0,i.lastIndexOf("/")+1);return a0(s,r)}},schemaRequestService:n.enableSchemaRequest?ao:void 0,clientCapabilities:ai.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(t){let n=this._getTextDocument(t);if(n){let r=this._languageService.parseJSONDocument(n);return this._languageService.doValidation(n,r,this._languageSettings)}return Promise.resolve([])}async doComplete(t,n){let r=this._getTextDocument(t);if(!r)return null;let i=this._languageService.parseJSONDocument(r);return this._languageService.doComplete(r,n,i)}async doResolve(t){return this._languageService.doResolve(t)}async doHover(t,n){let r=this._getTextDocument(t);if(!r)return null;let i=this._languageService.parseJSONDocument(r);return this._languageService.doHover(r,n,i)}async format(t,n,r){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.format(i,n,r);return Promise.resolve(s)}async resetSchema(t){return Promise.resolve(this._languageService.resetSchema(t))}async findDocumentSymbols(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.findDocumentSymbols2(n,r);return Promise.resolve(i)}async findDocumentColors(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.findDocumentColors(n,r);return Promise.resolve(i)}async getColorPresentations(t,n,r){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.parseJSONDocument(i),a=this._languageService.getColorPresentations(i,s,n,r);return Promise.resolve(a)}async getFoldingRanges(t,n){let r=this._getTextDocument(t);if(!r)return[];let i=this._languageService.getFoldingRanges(r,n);return Promise.resolve(i)}async getSelectionRanges(t,n){let r=this._getTextDocument(t);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getSelectionRanges(r,n,i);return Promise.resolve(s)}async parseJSONDocument(t){let n=this._getTextDocument(t);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return Promise.resolve(r)}async getMatchingSchemas(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n);return Promise.resolve(this._languageService.getMatchingSchemas(n,r))}_getTextDocument(t){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===t)return Pe.create(t,this._languageId,r.version,r.getValue());return null}}const i0="/".charCodeAt(0),pi=".".charCodeAt(0);function s0(e){return e.charCodeAt(0)===i0}function a0(e,t){if(s0(t)){const n=$t.parse(e),r=t.split("/");return n.with({path:oo(r)}).toString()}return o0(e,t)}function oo(e){const t=[];for(const r of e)r.length===0||r.length===1&&r.charCodeAt(0)===pi||(r.length===2&&r.charCodeAt(0)===pi&&r.charCodeAt(1)===pi?t.pop():t.push(r));e.length>1&&e[e.length-1].length===0&&t.push("");let n=t.join("/");return e[0].length===0&&(n="/"+n),n}function o0(e,...t){const n=$t.parse(e),r=n.path.split("/");for(let i of t)r.push(...i.split("/"));return n.with({path:oo(r)}).toString()}self.onmessage=()=>{ec((e,t)=>new r0(e,t))}})();