(function(){"use strict";class jo{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?dt.isErrorNoTelemetry(t)?new dt(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 mi=new jo;function pi(e){bi(e)||mi.onUnexpectedError(e)}function Jc(e){bi(e)||mi.onUnexpectedExternalError(e)}function vi(e){if(e instanceof Error){const{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:dt.isErrorNoTelemetry(e)}}return e}const gn="Canceled";function bi(e){return e instanceof qo?!0:e instanceof Error&&e.name===gn&&e.message===gn}class qo extends Error{constructor(){super(gn),this.name=this.message}}function Qc(){const e=new Error(gn);return e.name=e.message,e}function Xc(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function Yc(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class Zc extends Error{constructor(t){super("NotSupported"),t&&(this.message=t)}}class dt extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof dt)return t;const n=new dt;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}}class Be extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Be.prototype)}}function Uo(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}}var mn;(function(e){function t(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(b){yield b}e.single=i;function s(b){return t(b)?b:i(b)}e.wrap=s;function a(b){return b||n}e.from=a;function*o(b){for(let w=b.length-1;w>=0;w--)yield b[w]}e.reverse=o;function l(b){return!b||b[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(b){return b[Symbol.iterator]().next().value}e.first=u;function c(b,w){for(const y of b)if(w(y))return!0;return!1}e.some=c;function h(b,w){for(const y of b)if(w(y))return y}e.find=h;function*d(b,w){for(const y of b)w(y)&&(yield y)}e.filter=d;function*g(b,w){let y=0;for(const N of b)yield w(N,y++)}e.map=g;function*p(...b){for(const w of b)yield*w}e.concat=p;function m(b,w,y){let N=y;for(const L of b)N=w(N,L);return N}e.reduce=m;function*v(b,w,y=b.length){for(w<0&&(w+=b.length),y<0?y+=b.length:y>b.length&&(y=b.length);w{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==Ge.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Ge.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Ft(e){return he?.trackDisposable(e),e}function Pt(e){he?.markAsDisposed(e)}function pn(e,t){he?.setParent(e,t)}function $o(e,t){if(he)for(const n of e)he.setParent(n,t)}function Kc(e){return he?.markAsSingleton(e),e}function e0(e){return typeof e.dispose=="function"&&e.dispose.length===0}function Yn(e){if(mn.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Ho(...e){const t=vn(()=>Yn(e));return $o(e,t),t}function vn(e){const t=Ft({dispose:Uo(()=>{Pt(t),e()})});return t}class gt{constructor(){this._toDispose=new Set,this._isDisposed=!1,Ft(this)}dispose(){this._isDisposed||(Pt(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Yn(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return pn(t,this),this._isDisposed?gt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),pn(t,null))}}gt.DISABLE_DISPOSED_WARNING=!1;class Ge{constructor(){this._store=new gt,Ft(this),pn(this._store,this)}dispose(){Pt(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Ge.None=Object.freeze({dispose(){}});class t0{constructor(){this._isDisposed=!1,Ft(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var n;this._isDisposed||t===this._value||((n=this._value)===null||n===void 0||n.dispose(),t&&pn(t,this),this._value=t)}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,Pt(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}}class n0{constructor(t){this._disposable=t,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class r0{constructor(t){this.object=t}dispose(){}}class i0{constructor(){this._store=new Map,this._isDisposed=!1,Ft(this)}dispose(){Pt(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Yn(this._store.values())}finally{this._store.clear()}}get(t){return this._store.get(t)}set(t,n,r=!1){var i;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),r||(i=this._store.get(t))===null||i===void 0||i.dispose(),this._store.set(t,n)}deleteAndDispose(t){var n;(n=this._store.get(t))===null||n===void 0||n.dispose(),this._store.delete(t)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}class Z{constructor(t){this.element=t,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class xi{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let t=this._first;for(;t!==Z.Undefined;){const n=t.next;t.prev=Z.Undefined,t.next=Z.Undefined,t=n}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new Z(t);if(this._first===Z.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!==Z.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==Z.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==Z.Undefined&&t.next!==Z.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===Z.Undefined&&t.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):t.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):t.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==Z.Undefined;)yield t.element,t=t.next}}const Go=globalThis.performance&&typeof globalThis.performance.now=="function";class bn{static create(t){return new bn(t)}constructor(t){this._now=Go&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),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}}const Jo=!1,_i=!1,Qo=!1;var xn;(function(e){e.None=()=>Ge.None;function t(S){if(Qo){const{onDidAddListener:E}=S,P=It.create();let O=0;S.onDidAddListener=()=>{++O===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),P.print()),E?.()}}}function n(S,E){return d(S,()=>{},0,void 0,!0,void 0,E)}e.defer=n;function r(S){return(E,P=null,O)=>{let V=!1,k;return k=S(A=>{if(!V)return k?k.dispose():V=!0,E.call(P,A)},null,O),V&&k.dispose(),k}}e.once=r;function i(S,E,P){return c((O,V=null,k)=>S(A=>O.call(V,E(A)),null,k),P)}e.map=i;function s(S,E,P){return c((O,V=null,k)=>S(A=>{E(A),O.call(V,A)},null,k),P)}e.forEach=s;function a(S,E,P){return c((O,V=null,k)=>S(A=>E(A)&&O.call(V,A),null,k),P)}e.filter=a;function o(S){return S}e.signal=o;function l(...S){return(E,P=null,O)=>{const V=Ho(...S.map(k=>k(A=>E.call(P,A))));return h(V,O)}}e.any=l;function u(S,E,P,O){let V=P;return i(S,k=>(V=E(V,k),V),O)}e.reduce=u;function c(S,E){let P;const O={onWillAddFirstListener(){P=S(V.fire,V)},onDidRemoveLastListener(){P?.dispose()}};E||t(O);const V=new de(O);return E?.add(V),V.event}function h(S,E){return E instanceof Array?E.push(S):E&&E.add(S),S}function d(S,E,P=100,O=!1,V=!1,k,A){let T,I,q,U=0,z;const Ae={leakWarningThreshold:k,onWillAddFirstListener(){T=S(_e=>{U++,I=E(I,_e),O&&!q&&(ie.fire(I),I=void 0),z=()=>{const ot=I;I=void 0,q=void 0,(!O||U>1)&&ie.fire(ot),U=0},typeof P=="number"?(clearTimeout(q),q=setTimeout(z,P)):q===void 0&&(q=0,queueMicrotask(z))})},onWillRemoveListener(){V&&U>0&&z?.()},onDidRemoveLastListener(){z=void 0,T.dispose()}};A||t(Ae);const ie=new de(Ae);return A?.add(ie),ie.event}e.debounce=d;function g(S,E=0,P){return e.debounce(S,(O,V)=>O?(O.push(V),O):[V],E,void 0,!0,void 0,P)}e.accumulate=g;function p(S,E=(O,V)=>O===V,P){let O=!0,V;return a(S,k=>{const A=O||!E(k,V);return O=!1,V=k,A},P)}e.latch=p;function m(S,E,P){return[e.filter(S,E,P),e.filter(S,O=>!E(O),P)]}e.split=m;function v(S,E=!1,P=[],O){let V=P.slice(),k=S(I=>{V?V.push(I):T.fire(I)});O&&O.add(k);const A=()=>{V?.forEach(I=>T.fire(I)),V=null},T=new de({onWillAddFirstListener(){k||(k=S(I=>T.fire(I)),O&&O.add(k))},onDidAddFirstListener(){V&&(E?setTimeout(A):A())},onDidRemoveLastListener(){k&&k.dispose(),k=null}});return O&&O.add(T),T.event}e.buffer=v;function _(S,E){return(O,V,k)=>{const A=E(new b);return S(function(T){const I=A.evaluate(T);I!==x&&O.call(V,I)},void 0,k)}}e.chain=_;const x=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(E){return this.steps.push(E),this}forEach(E){return this.steps.push(P=>(E(P),P)),this}filter(E){return this.steps.push(P=>E(P)?P:x),this}reduce(E,P){let O=P;return this.steps.push(V=>(O=E(O,V),O)),this}latch(E=(P,O)=>P===O){let P=!0,O;return this.steps.push(V=>{const k=P||!E(V,O);return P=!1,O=V,k?V:x}),this}evaluate(E){for(const P of this.steps)if(E=P(E),E===x)break;return E}}function w(S,E,P=O=>O){const O=(...T)=>A.fire(P(...T)),V=()=>S.on(E,O),k=()=>S.removeListener(E,O),A=new de({onWillAddFirstListener:V,onDidRemoveLastListener:k});return A.event}e.fromNodeEventEmitter=w;function y(S,E,P=O=>O){const O=(...T)=>A.fire(P(...T)),V=()=>S.addEventListener(E,O),k=()=>S.removeEventListener(E,O),A=new de({onWillAddFirstListener:V,onDidRemoveLastListener:k});return A.event}e.fromDOMEventEmitter=y;function N(S){return new Promise(E=>r(S)(E))}e.toPromise=N;function L(S){const E=new de;return S.then(P=>{E.fire(P)},()=>{E.fire(void 0)}).finally(()=>{E.dispose()}),E.event}e.fromPromise=L;function C(S,E,P){return E(P),S(O=>E(O))}e.runAndSubscribe=C;class R{constructor(E,P){this._observable=E,this._counter=0,this._hasChanged=!1;const O={onWillAddFirstListener:()=>{E.addObserver(this)},onDidRemoveLastListener:()=>{E.removeObserver(this)}};P||t(O),this.emitter=new de(O),P&&P.add(this.emitter)}beginUpdate(E){this._counter++}handlePossibleChange(E){}handleChange(E,P){this._hasChanged=!0}endUpdate(E){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function F(S,E){return new R(S,E).emitter.event}e.fromObservable=F;function D(S){return(E,P,O)=>{let V=0,k=!1;const A={beginUpdate(){V++},endUpdate(){V--,V===0&&(S.reportChanges(),k&&(k=!1,E.call(P)))},handlePossibleChange(){},handleChange(){k=!0}};S.addObserver(A),S.reportChanges();const T={dispose(){S.removeObserver(A)}};return O instanceof gt?O.add(T):Array.isArray(O)&&O.push(T),T}}e.fromObservableLight=D})(xn||(xn={}));class mt{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${mt._idPool++}`,mt.all.add(this)}start(t){this._stopWatch=new bn,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}}}mt.all=new Set,mt._idPool=0;let yi=-1;class Xo{constructor(t,n=Math.random().toString(18).slice(2,5)){this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)===null||t===void 0||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)}}}class It{static create(){var t;return new It((t=new Error().stack)!==null&&t!==void 0?t:"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class _n{constructor(t){this.value=t}}const Yo=2,Zo=(e,t)=>{if(e instanceof _n)t(e);else for(let n=0;n{typeof e=="string"&&(console.warn("[LEAKING LISTENER] GC'ed a listener that was NOT yet disposed. This is where is was created:"),console.warn(e))}):void 0;class de{constructor(t){var n,r,i,s,a;this._size=0,this._options=t,this._leakageMon=yi>0||!((n=this._options)===null||n===void 0)&&n.leakWarningThreshold?new Xo((i=(r=this._options)===null||r===void 0?void 0:r.leakWarningThreshold)!==null&&i!==void 0?i:yi):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new mt(this._options._profName):void 0,this._deliveryQueue=(a=this._options)===null||a===void 0?void 0:a.deliveryQueue}dispose(){var t,n,r,i;if(!this._disposed){if(this._disposed=!0,((t=this._deliveryQueue)===null||t===void 0?void 0:t.current)===this&&this._deliveryQueue.reset(),this._listeners){if(_i){const s=this._listeners;queueMicrotask(()=>{Zo(s,a=>{var o;return(o=a.stack)===null||o===void 0?void 0:o.print()})})}this._listeners=void 0,this._size=0}(r=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||r===void 0||r.call(n),(i=this._leakageMon)===null||i===void 0||i.dispose()}}get event(){var t;return(t=this._event)!==null&&t!==void 0||(this._event=(n,r,i)=>{var s,a,o,l,u;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),Ge.None;if(this._disposed)return Ge.None;r&&(n=n.bind(r));const c=new _n(n);let h,d;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(c.stack=It.create(),h=this._leakageMon.check(c.stack,this._size+1)),_i&&(c.stack=d??It.create()),this._listeners?this._listeners instanceof _n?((u=this._deliveryQueue)!==null&&u!==void 0||(this._deliveryQueue=new wi),this._listeners=[this._listeners,c]):this._listeners.push(c):((a=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||a===void 0||a.call(s,this),this._listeners=c,(l=(o=this._options)===null||o===void 0?void 0:o.onDidAddFirstListener)===null||l===void 0||l.call(o,this)),this._size++;const g=vn(()=>{Dt?.unregister(g),h?.(),this._removeListener(c)});if(i instanceof gt?i.add(g):Array.isArray(i)&&i.push(g),Dt){const p=new Error().stack.split(` `).slice(2).join(` `).trim();Dt.register(g,p,g)}return g}),this._event}_removeListener(t){var n,r,i,s;if((r=(n=this._options)===null||n===void 0?void 0:n.onWillRemoveListener)===null||r===void 0||r.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||s===void 0||s.call(i,this),this._size=0;return}const a=this._listeners,o=a.indexOf(t);if(o===-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--,a[o]=void 0;const l=this._deliveryQueue.current===this;if(this._size*Yo<=a.length){let u=0;for(let c=0;c0}}const s0=()=>new wi;class wi{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}}class Ko extends de{constructor(t){super(t),this._isPaused=0,this._eventQueue=new xi,this._mergeFn=t?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const t=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(t))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(t){this._size&&(this._isPaused!==0?this._eventQueue.push(t):super.fire(t))}}class a0 extends Ko{constructor(t){var n;super(t),this._delay=(n=t.delay)!==null&&n!==void 0?n:100}fire(t){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(t)}}class o0 extends de{constructor(t){super(t),this._queuedEvents=[],this._mergeFn=t?.merge}fire(t){this.hasListeners()&&(this._queuedEvents.push(t),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(n=>super.fire(n)),this._queuedEvents=[]}))}}class l0{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new de({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(t){const n={event:t,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);const r=()=>{this.hasListeners&&this.unhook(n);const i=this.events.indexOf(n);this.events.splice(i,1)};return toDisposable(createSingleCallFunction(r))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(t=>this.hook(t))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(t=>this.unhook(t))}hook(t){t.listener=t.event(n=>this.emitter.fire(n))}unhook(t){var n;(n=t.listener)===null||n===void 0||n.dispose(),t.listener=null}dispose(){var t;this.emitter.dispose();for(const n of this.events)(t=n.listener)===null||t===void 0||t.dispose();this.events=[]}}class u0{constructor(){this.buffers=[]}wrapEvent(t){return(n,r,i)=>t(s=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>n.call(r,s)):n.call(r,s)},void 0,i)}bufferEvents(t){const n=[];this.buffers.push(n);const r=t();return this.buffers.pop(),n.forEach(i=>i()),r}}class c0{constructor(){this.listening=!1,this.inputEvent=xn.None,this.inputEventListener=Disposable.None,this.emitter=new de({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(t){this.inputEvent=t,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=t(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}function e1(e){if(!e||typeof e!="object"||e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach(([n,r])=>{t[n]=r&&typeof r=="object"?e1(r):r}),t}function f0(e){if(!e||typeof e!="object")return e;const t=[e];for(;t.length>0;){const n=t.shift();Object.freeze(n);for(const r in n)if(Li.call(n,r)){const i=n[r];typeof i=="object"&&!Object.isFrozen(i)&&!isTypedArray(i)&&t.push(i)}}return e}const Li=Object.prototype.hasOwnProperty;function h0(e,t){return Zn(e,t,new Set)}function Zn(e,t,n){if(isUndefinedOrNull(e))return e;const r=t(e);if(typeof r<"u")return r;if(Array.isArray(e)){const i=[];for(const s of e)i.push(Zn(s,t,n));return i}if(isObject(e)){if(n.has(e))throw new Error("Cannot clone recursive data-structure");n.add(e);const i={};for(const s in e)Li.call(e,s)&&(i[s]=Zn(e[s],t,n));return n.delete(e),i}return e}function t1(e,t,n=!0){return isObject(e)?(isObject(t)&&Object.keys(t).forEach(r=>{r in e?n&&(isObject(e[r])&&isObject(t[r])?t1(e[r],t[r],n):e[r]=t[r]):e[r]=t[r]}),e):t}function Kn(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;nfunction(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(const i of e)r[i]=n(i);return r}let Si=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const i1="i-default";function Ot(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}),Si&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function s1(e,t){let n=e[t];return n||(n=e["*"],n)?n:null}function er(e){return e.charAt(e.length-1)==="/"?e:e+"/"}async function Ai(e,t,n){const r=er(e)+er(t)+"vscode/"+er(n),i=await fetch(r);if(i.ok)return await i.json();throw new Error(`${i.status} - ${i.statusText}`)}function tr(e){return function(t,n){const r=Array.prototype.slice.call(arguments,2);return Ot(e[t],r)}}function nr(e){return(t,n,...r)=>({value:Ot(e[t],r),original:Ot(n,r)})}function K(e,t,...n){return Ot(t,n)}function a1(e,t,...n){const r=Ot(t,n);return{value:r,original:r}}function d0(e){}function g0(e){Si=e}function m0(e,t){var n;return{localize:tr(t[e]),localize2:nr(t[e]),getConfiguredDefaultLocale:(n=t.getConfiguredDefaultLocale)!==null&&n!==void 0?n:r=>{}}}function p0(e,t,n,r){var i;const s=(i=r["vs/nls"])!==null&&i!==void 0?i:{};if(!e||e.length===0)return n({localize:K,localize2:a1,getConfiguredDefaultLocale:()=>{var c;return(c=s.availableLanguages)===null||c===void 0?void 0:c["*"]}});const a=s.availableLanguages?s1(s.availableLanguages,e):null,o=a===null||a===i1;let l=".nls";o||(l=l+"."+a);const u=c=>{Array.isArray(c)?(c.localize=tr(c),c.localize2=nr(c)):(c.localize=tr(c[e]),c.localize2=nr(c[e])),c.getConfiguredDefaultLocale=()=>{var h;return(h=s.availableLanguages)===null||h===void 0?void 0:h["*"]},n(c)};typeof s.loadBundle=="function"?s.loadBundle(e,a,(c,h)=>{c?t([e+".nls"],u):u(h)}):s.translationServiceUrl&&!o?(async()=>{var c;try{const h=await Ai(s.translationServiceUrl,a,e);return u(h)}catch(h){if(!a.includes("-"))return console.error(h),t([e+".nls"],u);try{const d=a.split("-")[0],g=await Ai(s.translationServiceUrl,d,e);return(c=s.availableLanguages)!==null&&c!==void 0||(s.availableLanguages={}),s.availableLanguages["*"]=d,u(g)}catch(d){return console.error(d),t([e+".nls"],u)}}})():t([e+l],u,c=>{if(l===".nls"){console.error("Failed trying to load default language strings",c);return}console.error(`Failed to load message bundle for language ${a}. Falling back to the default language:`,c),t([e+".nls"],u)})}var rr,ir;const wn="en";let Ln=!1,Sn=!1,An=!1,o1=!1,l1=!1,Ni=!1,u1=!1,c1=!1,f1=!1,h1=!1,Nn,sr=null,Ci=null,d1=null,Ce;const je=globalThis;let le;typeof je.vscode<"u"&&typeof je.vscode.process<"u"?le=je.vscode.process:typeof process<"u"&&typeof((rr=process==null?void 0:process.versions)===null||rr===void 0?void 0:rr.node)=="string"&&(le=process);const Ei=typeof((ir=le?.versions)===null||ir===void 0?void 0:ir.electron)=="string",g1=Ei&&le?.type==="renderer";if(typeof le=="object"){Ln=le.platform==="win32",Sn=le.platform==="darwin",An=le.platform==="linux",o1=An&&!!le.env.SNAP&&!!le.env.SNAP_REVISION,u1=Ei,f1=!!le.env.CI||!!le.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Nn=wn,sr=wn;const e=le.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];Nn=t.locale,Ci=t.osLocale,sr=n||wn,d1=t._translationsConfigFile}catch{}l1=!0}else typeof navigator=="object"&&!g1?(Ce=navigator.userAgent,Ln=Ce.indexOf("Windows")>=0,Sn=Ce.indexOf("Macintosh")>=0,c1=(Ce.indexOf("Macintosh")>=0||Ce.indexOf("iPad")>=0||Ce.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,An=Ce.indexOf("Linux")>=0,h1=Ce?.indexOf("Mobi")>=0,Ni=!0,Nn=(K({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),void 0)||wn,sr=Nn,Ci=navigator.language):console.error("Unable to resolve platform.");let ar=0;Sn?ar=1:Ln?ar=3:An&&(ar=2);const Vt=Ln,m1=Sn,v0=null,b0=null,x0=null,y0=Ni&&typeof je.importScripts=="function"?je.origin:void 0,w0=null,L0=null,Fe=Ce,S0=null,p1=typeof je.postMessage=="function"&&!je.importScripts,A0=(()=>{if(p1){const e=[];je.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}),je.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),N0=null;let ki=!0,Mi=!1;function C0(){if(!Mi){Mi=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2,ki=new Uint16Array(e.buffer)[0]===513}return ki}const v1=!!(Fe&&Fe.indexOf("Chrome")>=0),E0=!!(Fe&&Fe.indexOf("Firefox")>=0),k0=!!(!v1&&Fe&&Fe.indexOf("Safari")>=0),M0=!!(Fe&&Fe.indexOf("Edg/")>=0),R0=!!(Fe&&Fe.indexOf("Android")>=0);class b1{constructor(t,n=JSON.stringify){this.fn=t,this._computeKey=n,this.lastCache=void 0,this.lastArgKey=void 0}get(t){const n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this.fn(t)),this.lastCache}}class T0{get cachedValues(){return this._map}constructor(t){this.fn=t,this._map=new Map}get(t){if(this._map.has(t))return this._map.get(t);const n=this.fn(t);return this._map.set(t,n),n}}class Ri{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var pt;function F0(e){return!e||typeof e!="string"?!0:e.trim().length===0}const x1=/{(\d+)}/g;function P0(e,...t){return t.length===0?e:e.replace(x1,function(n,r){const i=parseInt(r,10);return isNaN(i)||i<0||i>=t.length?n:t[i]})}function I0(e){return e.replace(/[<>"'&]/g,t=>{switch(t){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return t})}function D0(e){return e.replace(/[<>&]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";default:return t}})}function Ti(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O0(e,t=" "){const n=_1(e,t);return y1(n,t)}function _1(e,t){if(!e||!t)return e;const n=t.length;if(n===0||e.length===0)return e;let r=0;for(;e.indexOf(t,r)===r;)r=r+n;return e.substring(r)}function y1(e,t){if(!e||!t)return e;const n=t.length,r=e.length;if(n===0||r===0)return e;let i=r,s=-1;for(;s=e.lastIndexOf(t,i-1),!(s===-1||s+n!==i);){if(s===0)return"";i=s}return e.substring(0,i)}function V0(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function B0(e){return e.replace(/\*/g,"")}function j0(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Ti(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e=e+"\\b"));let r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),n.unicode&&(r+="u"),new RegExp(e,r)}function q0(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}function w1(e){return e.split(/\r\n|\r|\n/)}function U0(e){var t;const n=[],r=e.split(/(\r\n|\r|\n)/);for(let i=0;i=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function z0(e,t){return et?1:0}function A1(e,t,n=0,r=e.length,i=0,s=t.length){for(;nu)return 1}const a=r-n,o=s-i;return ao?1:0}function $0(e,t){return or(e,t,0,e.length,0,t.length)}function or(e,t,n=0,r=e.length,i=0,s=t.length){for(;n=128||u>=128)return A1(e.toLowerCase(),t.toLowerCase(),n,r,i,s);Fi(l)&&(l-=32),Fi(u)&&(u-=32);const c=l-u;if(c!==0)return c}const a=r-n,o=s-i;return ao?1:0}function H0(e){return e>=48&&e<=57}function Fi(e){return e>=97&&e<=122}function Pi(e){return e>=65&&e<=90}function G0(e,t){return e.length===t.length&&or(e,t)===0}function J0(e,t){const n=t.length;return t.length>e.length?!1:or(e,t,0,n)===0}function Q0(e,t){const n=Math.min(e.length,t.length);let r;for(r=0;r1){const r=e.charCodeAt(t-2);if(Bt(r))return lr(r,n)}return n}class ur{get offset(){return this._offset}constructor(t,n=0){this._str=t,this._len=t.length,this._offset=n}setOffset(t){this._offset=t}prevCodePoint(){const t=N1(this._str,this._offset);return this._offset-=t>=65536?2:1,t}nextCodePoint(){const t=Ii(this._str,this._len,this._offset);return this._offset+=t>=65536?2:1,t}eol(){return this._offset>=this._len}}class Di{get offset(){return this._iterator.offset}constructor(t,n=0){this._iterator=new ur(t,n)}nextGraphemeLength(){const t=Je.getInstance(),n=this._iterator,r=n.offset;let i=t.getGraphemeBreakType(n.nextCodePoint());for(;!n.eol();){const s=n.offset,a=t.getGraphemeBreakType(n.nextCodePoint());if(Oi(i,a)){n.setOffset(s);break}i=a}return n.offset-r}prevGraphemeLength(){const t=Je.getInstance(),n=this._iterator,r=n.offset;let i=t.getGraphemeBreakType(n.prevCodePoint());for(;n.offset>0;){const s=n.offset,a=t.getGraphemeBreakType(n.prevCodePoint());if(Oi(a,i)){n.setOffset(s);break}i=a}return r-n.offset}eol(){return this._iterator.eol()}}function C1(e,t){return new Di(e,t).nextGraphemeLength()}function E1(e,t){return new Di(e,t).prevGraphemeLength()}function Y0(e,t){t>0&&jt(e.charCodeAt(t))&&t--;const n=t+C1(e,t);return[n-E1(e,n),n]}let cr=null;function k1(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Z0(e){return cr||(cr=k1()),cr.test(e)}const M1=/^[\t\n\r\x20-\x7E]*$/;function R1(e){return M1.test(e)}const T1=/[\u2028\u2029]/;function K0(e){return T1.test(e)}function ef(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function F1(e){return e>=127462&&e<=127487||e===8986||e===8987||e===9200||e===9203||e>=9728&&e<=10175||e===11088||e===11093||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const tf="\uFEFF";function nf(e){return!!(e&&e.length>0&&e.charCodeAt(0)===65279)}function rf(e,t=!1){return e?(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e):!1}function sf(e){return e=e%(2*26),e<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function Oi(e,t){return e===0?t!==5&&t!==7:e===2&&t===3?!1:e===4||e===2||e===3||t===4||t===2||t===3?!0:!(e===8&&(t===8||t===9||t===11||t===12)||(e===11||e===9)&&(t===9||t===10)||(e===12||e===10)&&t===10||t===5||t===13||t===7||e===1||e===13&&t===14||e===6&&t===6)}class Je{static getInstance(){return Je._INSTANCE||(Je._INSTANCE=new Je),Je._INSTANCE}constructor(){this._data=P1()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;const n=this._data,r=n.length/3;let i=1;for(;i<=r;)if(tn[3*i+1])i=2*i+1;else return n[3*i+2];return 0}}Je._INSTANCE=null;function P1(){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]")}function af(e,t){if(e===0)return 0;const n=I1(e,t);if(n!==void 0)return n;const r=new ur(t,e);return r.prevCodePoint(),r.offset}function I1(e,t){const n=new ur(t,e);let r=n.prevCodePoint();for(;D1(r)||r===65039||r===8419;){if(n.offset===0)return;r=n.prevCodePoint()}if(!F1(r))return;let i=n.offset;return i>0&&n.prevCodePoint()===8205&&(i=n.offset),i}function D1(e){return 127995<=e&&e<=127999}const of="\xA0";class lt{static getInstance(t){return pt.cache.get(Array.from(t))}static getLocales(){return pt._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())}}pt=lt,lt.ambiguousCharacterData=new Ri(()=>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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}')),lt.cache=new b1(e=>{function t(u){const c=new Map;for(let h=0;h!u.startsWith("_")&&u in i);s.length===0&&(s=["_default"]);let a;for(const u of s){const c=t(i[u]);a=r(a,c)}const o=t(i._common),l=n(o,a);return new pt(l)}),lt._locales=new Ri(()=>Object.keys(pt.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));class Qe{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]")}static getData(){return this._data||(this._data=new Set(Qe.getRawData())),this._data}static isInvisibleCharacter(t){return Qe.getData().has(t)}static get codePoints(){return Qe.getData()}}Qe._data=void 0;const Vi="$initialize";let Bi=!1;function lf(e){isWeb&&(Bi||(Bi=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class O1{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.method=r,this.args=i,this.type=0}}class ji{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}}class V1{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.eventName=r,this.arg=i,this.type=2}}class B1{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class j1{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class qi{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){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new O1(this._workerId,r,t,n))})}listen(t,n){let r=null;const i=new de({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new V1(this._workerId,r,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new j1(this._workerId,r)),r=null}});return i.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_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.method,t.args).then(i=>{this._send(new ji(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=vi(i.detail)),this._send(new ji(this._workerId,n,void 0,vi(i)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.eventName,t.arg)(i=>{this._send(new B1(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{this._protocol.handleMessage(c)},c=>{i?.(c)})),this._protocol=new qi({sendMessage:(c,h)=>{this._worker.postMessage(c,h)},handleMessage:(c,h)=>{if(typeof r[c]!="function")return Promise.reject(new Error("Missing method "+c+" on main thread host."));try{return Promise.resolve(r[c].apply(r,h))}catch(d){return Promise.reject(d)}},handleEvent:(c,h)=>{if(hr(c)){const d=r[c].call(r,h);if(typeof d!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return d}if(fr(c)){const d=r[c];if(typeof d!="function")throw new Error(`Missing event ${c} on main thread host.`);return d}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;const a=globalThis.require;typeof a<"u"&&typeof a.getConfig=="function"?s=a.getConfig():typeof globalThis.requirejs<"u"&&(s=globalThis.requirejs.s.contexts._.config);const o=yn(r);this._onModuleLoaded=this._protocol.sendMessage(Vi,[this._worker.getId(),JSON.parse(JSON.stringify(s)),n,o]);const l=(c,h)=>this._request(c,h),u=(c,h)=>this._protocol.listen(c,h);this._lazyProxy=new Promise((c,h)=>{i=h,this._onModuleLoaded.then(d=>{c(Ui(d,l,u))},d=>{h(d),this._onError("Worker failed to load "+n,d)})})}getProxyObject(){return this._lazyProxy}_request(t,n){return new Promise((r,i)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(t,n).then(r,i)},i)})}_onError(t,n){console.error(t),console.info(n)}}function fr(e){return e[0]==="o"&&e[1]==="n"&&Pi(e.charCodeAt(2))}function hr(e){return/^onDynamic/.test(e)&&Pi(e.charCodeAt(9))}function Ui(e,t,n){const r=a=>function(){const o=Array.prototype.slice.call(arguments,0);return t(a,o)},i=a=>function(o){return n(a,o)},s={};for(const a of e){if(hr(a)){s[a]=i(a);continue}if(fr(a)){s[a]=n(a,void 0);continue}s[a]=r(a)}return s}class Wi{constructor(t,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new qi({sendMessage:(r,i)=>{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===Vi)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(t,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(hr(t)){const r=this._requestHandler[t].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return r}if(fr(t)){const r=this._requestHandler[t];if(typeof r!="function")throw new Error(`Missing event ${t} on request handler.`);return r}throw new Error(`Malformed event name ${t}`)}initialize(t,n,r,i){this._protocol.setWorkerId(t);const o=Ui(i,(l,u)=>this._protocol.sendMessage(l,u),(l,u)=>this._protocol.listen(l,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(yn(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((l,u)=>{const c=globalThis.require;c([r],h=>{if(this._requestHandler=h.create(o),!this._requestHandler){u(new Error("No RequestHandler!"));return}l(yn(this._requestHandler))},u)}))}}function cf(e){return new Wi(e,null)}class Xe{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}}function ff(e){return dr(e,0)}function dr(e,t){switch(typeof e){case"object":return e===null?qe(349,t):Array.isArray(e)?U1(e,t):W1(e,t);case"string":return gr(e,t);case"boolean":return q1(e,t);case"number":return qe(e,t);case"undefined":return qe(937,t);default:return qe(617,t)}}function qe(e,t){return(t<<5)-t+e|0}function q1(e,t){return qe(e?433:863,t)}function gr(e,t){t=qe(149417,t);for(let n=0,r=e.length;ndr(r,n),t)}function W1(e,t){return t=qe(181387,t),Object.keys(e).sort().reduce((n,r)=>(n=gr(r,n),dr(e[r],n)),t)}function mr(e,t,n=32){const r=n-t,i=~((1<>>r)>>>0}function zi(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):z1((e>>>0).toString(16),t/4)}class pr{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),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 l=a;if(Bt(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],t[1]=t[65],t[2]=t[66]),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()),qt(this._h0)+qt(this._h1)+qt(this._h2)+qt(this._h3)+qt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,zi(this._buff,this._buffLen),this._buffLen>56&&(this._step(),zi(this._buff));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=pr._bigBlock32,n=this._buffDV;for(let h=0;h<64;h+=4)t.setUint32(h,n.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)t.setUint32(h,mr(t.getUint32(h-12,!1)^t.getUint32(h-32,!1)^t.getUint32(h-56,!1)^t.getUint32(h-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,a=this._h3,o=this._h4,l,u,c;for(let h=0;h<80;h++)h<20?(l=i&s|~i&a,u=1518500249):h<40?(l=i^s^a,u=1859775393):h<60?(l=i&s|i&a|s&a,u=2400959708):(l=i^s^a,u=3395469782),c=mr(r,5)+l+o+u+t.getUint32(h*4,!1)&4294967295,o=a,a=s,s=mr(i,30),i=r,r=c;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}}pr._bigBlock32=new DataView(new ArrayBuffer(320));class $i{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 Xe(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 Ye{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=Ye._getElements(t),[o,l,u]=Ye._getElements(n);this._hasStrings=a&&u,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,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(Ye._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 h;return r<=i?(vt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),h=[new Xe(t,0,r,i-r+1)]):t<=n?(vt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),h=[new Xe(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"),h=[]),h}const a=[0],o=[0],l=this.ComputeRecursionPoint(t,n,r,i,a,o,s),u=a[0],c=o[0];if(l!==null)return l;if(!s[0]){const h=this.ComputeDiffRecursive(t,u,r,c,s);let d=[];return s[0]?d=[new Xe(u+1,n-(u+1)+1,c+1,i-(c+1)+1)]:d=this.ComputeDiffRecursive(u+1,n,c+1,i,s),this.ConcatenateChanges(h,d)}return[new Xe(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,o,l,u,c,h,d,g,p,m,v,_,x){let b=null,w=null,y=new Hi,N=n,L=r,C=g[0]-v[0]-i,R=-1073741824,F=this.m_forwardHistory.length-1;do{const D=C+t;D===N||D=0&&(u=this.m_forwardHistory[F],t=u[0],N=1,L=u.length-1)}while(--F>=-1);if(b=y.getReverseChanges(),x[0]){let D=g[0]+1,S=v[0]+1;if(b!==null&&b.length>0){const E=b[b.length-1];D=Math.max(D,E.getOriginalEnd()),S=Math.max(S,E.getModifiedEnd())}w=[new Xe(D,d-D+1,S,m-S+1)]}else{y=new Hi,N=a,L=o,C=g[0]-v[0]-l,R=1073741824,F=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const D=C+s;D===N||D=c[D+1]?(h=c[D+1]-1,p=h-C-l,h>R&&y.MarkNextChange(),R=h+1,y.AddOriginalElement(h+1,p+1),C=D+1-s):(h=c[D-1],p=h-C-l,h>R&&y.MarkNextChange(),R=h,y.AddModifiedElement(h+1,p+1),C=D-1-s),F>=0&&(c=this.m_reverseHistory[F],s=c[0],N=1,L=c.length-1)}while(--F>=-1);w=y.getChanges()}return this.ConcatenateChanges(b,w)}ComputeRecursionPoint(t,n,r,i,s,a,o){let l=0,u=0,c=0,h=0,d=0,g=0;t--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=n-t+(i-r),m=p+1,v=new Int32Array(m),_=new Int32Array(m),x=i-r,b=n-t,w=t-r,y=n-i,L=(b-x)%2===0;v[x]=t,_[b]=n,o[0]=!1;for(let C=1;C<=p/2+1;C++){let R=0,F=0;c=this.ClipDiagonalBound(x-C,C,x,m),h=this.ClipDiagonalBound(x+C,C,x,m);for(let S=c;S<=h;S+=2){S===c||SR+F&&(R=l,F=u),!L&&Math.abs(S-b)<=C-1&&l>=_[S])return s[0]=l,a[0]=u,E<=_[S]&&C<=1448?this.WALKTRACE(x,c,h,w,b,d,g,y,v,_,l,n,s,u,i,a,L,o):null}const D=(R-t+(F-r)-C)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,D))return o[0]=!0,s[0]=R,a[0]=F,D>0&&C<=1448?this.WALKTRACE(x,c,h,w,b,d,g,y,v,_,l,n,s,u,i,a,L,o):(t++,r++,[new Xe(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(b-C,C,b,m),g=this.ClipDiagonalBound(b+C,C,b,m);for(let S=d;S<=g;S+=2){S===d||S=_[S+1]?l=_[S+1]-1:l=_[S-1],u=l-(S-b)-y;const E=l;for(;l>t&&u>r&&this.ElementsAreEqual(l,u);)l--,u--;if(_[S]=l,L&&Math.abs(S-x)<=C&&l<=v[S])return s[0]=l,a[0]=u,E>=v[S]&&C<=1448?this.WALKTRACE(x,c,h,w,b,d,g,y,v,_,l,n,s,u,i,a,L,o):null}if(C<=1447){let S=new Int32Array(h-c+2);S[0]=x-c+1,bt.Copy2(v,c,S,1,h-c+1),this.m_forwardHistory.push(S),S=new Int32Array(g-d+2),S[0]=b-d+1,bt.Copy2(_,d,S,1,g-d+1),this.m_reverseHistory.push(S)}}return this.WALKTRACE(x,c,h,w,b,d,g,y,v,_,l,n,s,u,i,a,L,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 h=t[n-1];i=h.originalStart+h.originalLength,s=h.modifiedStart+h.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,u=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let h=1;;h++){const d=r.originalStart-h,g=r.modifiedStart-h;if(du&&(u=m,l=h)}r.originalStart-=l,r.modifiedStart-=l;const c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&g>l&&(l=g,u=h,c=d)}return l>0?[u,c]: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 bt.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],bt.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return bt.Copy(t,0,i,0,t.length),bt.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 Xe(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=J1&&e<=X1||e>=Q1&&e<=Y1}function En(e,t,n,r){let i="",s=0,a=-1,o=0,l=0;for(let u=0;u<=e.length;++u){if(u2){const c=i.lastIndexOf(n);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(n)),a=u,o=0;continue}else if(i.length!==0){i="",s=0,a=u,o=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(a+1,u)}`:i=e.slice(a+1,u),s=u-a-1;a=u,o=0}else l===Ze&&o!==-1?++o:o=-1}return i}function Ji(e,t){K1(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ge={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],ne(s,"path"),s.length===0)continue}else t.length===0?s=Cn():(s=H1[`=${t}`]||Cn(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===me)&&(s=`${t}\\`));const a=s.length;let o=0,l="",u=!1;const c=s.charCodeAt(0);if(a===1)$(c)&&(o=1,u=!0);else if($(c))if(u=!0,$(s.charCodeAt(1))){let h=2,d=h;for(;h2&&$(s.charCodeAt(2))&&(u=!0,o=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(r){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=u,u&&t.length>0)break}return n=En(n,!r,"\\",$),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){ne(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 br(s)?"\\":e;if($(s))if(i=!0,$(e.charCodeAt(1))){let o=2,l=o;for(;o2&&$(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&$(e.charCodeAt(t-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){ne(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return $(n)||t>2&&tt(n)&&e.charCodeAt(1)===Ke&&$(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"&&$(n.charCodeAt(0))){++i;const s=n.length;s>1&&$(n.charCodeAt(1))&&(++i,s>2&&($(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ge.normalize(t)},relative(e,t){if(ne(e,"from"),ne(t,"to"),e===t)return"";const n=ge.resolve(e),r=ge.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===me;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(l-1)===me;)l--;const u=l-o,c=ac){if(t.charCodeAt(o+d)===me)return r.slice(o+d+1);if(d===2)return r.slice(o+d)}a>c&&(e.charCodeAt(i+d)===me?h=d:d===2&&(h=3)),h===-1&&(h=0)}let g="";for(d=i+h+1;d<=s;++d)(d===s||e.charCodeAt(d)===me)&&(g+=g.length===0?"..":"\\..");return o+=h,g.length>0?`${g}${r.slice(o,l)}`:(r.charCodeAt(o)===me&&++o,r.slice(o,l))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=ge.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===me){if(t.charCodeAt(1)===me){const n=t.charCodeAt(2);if(n!==Z1&&n!==Ze)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(tt(t.charCodeAt(0))&&t.charCodeAt(1)===Ke&&t.charCodeAt(2)===me)return`\\\\?\\${t}`;return e},dirname(e){ne(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return $(i)?e:".";if($(i)){if(n=r=1,$(e.charCodeAt(1))){let o=2,l=o;for(;o2&&$(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=t-1;o>=r;--o)if($(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&&ne(t,"ext"),ne(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&tt(e.charCodeAt(0))&&e.charCodeAt(1)===Ke&&(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 l=e.charCodeAt(s);if($(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===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($(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){ne(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===Ke&&tt(e.charCodeAt(0))&&(t=r=2);for(let o=e.length-1;o>=t;--o){const l=e.charCodeAt(o);if($(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===Ze?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){ne(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 $(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if($(i)){if(r=1,$(e.charCodeAt(1))){let h=2,d=h;for(;h0&&(t.root=e.slice(0,r));let s=-1,a=r,o=-1,l=!0,u=e.length-1,c=0;for(;u>=r;--u){if(i=e.charCodeAt(u),$(i)){if(!l){a=u+1;break}continue}o===-1&&(l=!1,o=u+1),i===Ze?s===-1?s=u:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===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},el=(()=>{if(et){const e=/\\/g;return()=>{const t=Cn().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Cn()})(),pe={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:el();ne(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===oe)}return t=En(t,!n,"/",br),n?`/${t}`:t.length>0?t:"."},normalize(e){if(ne(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===oe,n=e.charCodeAt(e.length-1)===oe;return e=En(e,!t,"/",br),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return ne(e,"path"),e.length>0&&e.charCodeAt(0)===oe},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":pe.normalize(t)},relative(e,t){if(ne(e,"from"),ne(t,"to"),e===t||(e=pe.resolve(e),t=pe.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+u)===oe)return t.slice(s+u+1);if(u===0)return t.slice(s+u)}else i>o&&(e.charCodeAt(n+u)===oe?l=u:u===0&&(l=0));let c="";for(u=n+l+1;u<=r;++u)(u===r||e.charCodeAt(u)===oe)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(ne(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===oe;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===oe){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&&ne(t,"ext"),ne(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 l=e.charCodeAt(s);if(l===oe){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===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)===oe){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){ne(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.charCodeAt(a);if(o===oe){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o===Ze?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){ne(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===oe;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=e.length-1,u=0;for(;l>=r;--l){const c=e.charCodeAt(l);if(c===oe){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),c===Ze?i===-1?i=l:u!==1&&(u=1):i!==-1&&(u=-1)}if(a!==-1){const c=s===0&&n?1:s;i===-1||u===0||u===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,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};pe.win32=ge.win32=ge,pe.posix=ge.posix=pe;const hf=et?ge.normalize:pe.normalize,df=et?ge.resolve:pe.resolve,gf=et?ge.relative:pe.relative,mf=et?ge.dirname:pe.dirname,pf=et?ge.basename:pe.basename,vf=et?ge.extname:pe.extname,bf=et?ge.sep:pe.sep,tl=/^\w[\w\d+.-]*$/,nl=/^\//,rl=/^\/\//;function il(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&&!tl.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!nl.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(rl.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 sl(e,t){return!e&&!t?"file":e}function al(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Ee&&(t=Ee+t):t=Ee;break}return t}const ee="",Ee="/",ol=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ut{static isUri(t){return t instanceof ut?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||ee,this.authority=t.authority||ee,this.path=t.path||ee,this.query=t.query||ee,this.fragment=t.fragment||ee):(this.scheme=sl(t,a),this.authority=n||ee,this.path=al(this.scheme,r||ee),this.query=i||ee,this.fragment=s||ee,il(this,a))}get fsPath(){return xr(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=ee),r===void 0?r=this.authority:r===null&&(r=ee),i===void 0?i=this.path:i===null&&(i=ee),s===void 0?s=this.query:s===null&&(s=ee),a===void 0?a=this.fragment:a===null&&(a=ee),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new _t(n,r,i,s,a)}static parse(t,n=!1){const r=ol.exec(t);return r?new _t(r[2]||ee,kn(r[4]||ee),kn(r[5]||ee),kn(r[7]||ee),kn(r[9]||ee),n):new _t(ee,ee,ee,ee,ee)}static file(t){let n=ee;if(Vt&&(t=t.replace(/\\/g,Ee)),t[0]===Ee&&t[1]===Ee){const r=t.indexOf(Ee,2);r===-1?(n=t.substring(2),t=Ee):(n=t.substring(2,r),t=t.substring(r)||Ee)}return new _t("file",n,t,ee,ee)}static from(t,n){return new _t(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 Vt&&t.scheme==="file"?r=ut.file(ge.join(xr(t,!0),...n)).path:r=pe.join(t.path,...n),t.with({path:r})}toString(t=!1){return _r(this,t)}toJSON(){return this}static revive(t){var n,r;if(t){if(t instanceof ut)return t;{const i=new _t(t);return i._formatted=(n=t.external)!==null&&n!==void 0?n:null,i._fsPath=t._sep===Qi&&(r=t.fsPath)!==null&&r!==void 0?r:null,i}}else return t}}const Qi=Vt?1:void 0;class _t extends ut{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=xr(this,!1)),this._fsPath}toString(t=!1){return t?_r(this,!0):(this._formatted||(this._formatted=_r(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Qi),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 Xi={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 Yi(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=Xi[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 ll(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,Vt&&(n=n.replace(/\//g,"\\")),n}function _r(e,t){const n=t?ll:Yi;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Ee,r+=Ee),s){let u=s.indexOf("@");if(u!==-1){const c=s.substr(0,u);s=s.substr(u+1),u=c.lastIndexOf(":"),u===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,u),!1,!1),r+=":",r+=n(c.substr(u+1),!1,!0)),r+="@"}s=s.toLowerCase(),u=s.lastIndexOf(":"),u===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,u),!1,!0),r+=s.substr(u))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const u=a.charCodeAt(1);u>=65&&u<=90&&(a=`/${String.fromCharCode(u+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const u=a.charCodeAt(0);u>=65&&u<=90&&(a=`${String.fromCharCode(u+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=t?l:Yi(l,!1,!1)),r}function Zi(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Zi(e.substr(3)):e}}const Ki=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function kn(e){return e.match(Ki)?e.replace(Ki,t=>Zi(t)):e}class ue{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new ue(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return ue.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return ue.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||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 H.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return H.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 H.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 H.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 H.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 H(r,i,s,a)}intersectRanges(t){return H.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn;const o=n.startLineNumber,l=n.startColumn,u=n.endLineNumber,c=n.endColumn;return ru?(s=u,a=c):s===u&&(a=Math.min(a,c)),r>s||r===s&&i>a?null:new H(r,i,s,a)}equalsRange(t){return H.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 H.getEndPosition(this)}static getEndPosition(t){return new ue(t.endLineNumber,t.endColumn)}getStartPosition(){return H.getStartPosition(this)}static getStartPosition(t){return new ue(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new H(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new H(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return H.collapseToStart(this)}static collapseToStart(t){return new H(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return H.collapseToEnd(this)}static collapseToEnd(t){return new H(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new H(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new H(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new H(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 xf(e,t=0){return e[e.length-(1+t)]}function _f(e){if(e.length===0)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function ul(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;rn(e[r],t))}function cl(e,t){let n=0,r=e-1;for(;n<=r;){const i=(n+r)/2|0,s=t(i);if(s<0)n=i+1;else if(s>0)r=i-1;else return i}return-(n+1)}function es(e,t,n){if(e=e|0,e>=t.length)throw new TypeError("invalid index");const r=t[Math.floor(t.length*Math.random())],i=[],s=[],a=[];for(const o of t){const l=n(o,r);l<0?i.push(o):l>0?s.push(o):a.push(o)}return e!!t)}function Af(e){let t=0;for(let n=0;n0}function Ef(e,t=n=>n){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function kf(e,t){return e.length>0?e[0]:t}function Mf(e,t){let n=typeof t=="number"?e:0;typeof t=="number"?n=e:(n=0,t=e);const r=[];if(n<=t)for(let i=n;it;i--)r.push(i);return r}function Rf(e,t,n){const r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function Tf(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function Ff(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function gl(e,t){for(const n of t)e.push(n)}function Pf(e){return Array.isArray(e)?e:[e]}function ml(e,t,n){const r=ts(e,t),i=e.length,s=n.length;e.length=i+s;for(let a=i-1;a>=r;a--)e[a+s]=e[a];for(let a=0;a0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ut||(Ut={}));function Mn(e,t){return(n,r)=>t(e(n),e(r))}function Df(...e){return(t,n)=>{for(const r of e){const i=r(t,n);if(!Ut.isNeitherLessOrGreaterThan(i))return i}return Ut.neitherLessOrGreaterThan}}const Wt=(e,t)=>e-t,Of=(e,t)=>Wt(e?1:0,t?1:0);function pl(e){return(t,n)=>-e(t,n)}class Vf{constructor(t){this.items=t,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(t){let n=this.firstIdx;for(;n=0&&t(this.items[n]);)n--;const r=n===this.lastIdx?null:this.items.slice(n+1,this.lastIdx+1);return this.lastIdx=n,r}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const t=this.items[this.firstIdx];return this.firstIdx++,t}takeCount(t){const n=this.items.slice(this.firstIdx,this.firstIdx+t);return this.firstIdx+=t,n}}class zt{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||Ut.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}}zt.empty=new zt(e=>{});class yr{constructor(t){this._indexMap=t}static createSortPermutation(t,n){const r=Array.from(t.keys()).sort((i,s)=>n(t[i],t[s]));return new yr(r)}apply(t){return t.map((n,r)=>t[this._indexMap[r]])}inverse(){const t=this._indexMap.slice();for(let n=0;n255?255:e|0}function yt(e){return e<0?0:e>4294967295?4294967295:e|0}class vl{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=yt(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=yt(t),n=yt(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=yt(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 rs(i,t-a)}}class Bf{constructor(t){this._values=t,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(t){return this._ensureValid(),t===0?0:this._prefixSum[t-1]}getIndexOf(t){this._ensureValid();const n=this._indexBySum[t],r=n>0?this._prefixSum[n-1]:0;return new rs(n,t-r)}removeValues(t,n){this._values.splice(t,n),this._invalidate(t)}insertValues(t,n){this._values=arrayInsert(this._values,t,n),this._invalidate(t)}_invalidate(t){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,t-1)}_ensureValid(){if(!this._isValid){for(let t=this._validEndIndex+1,n=this._values.length;t0?this._prefixSum[t-1]:0;this._prefixSum[t]=i+r;for(let s=0;s/?";function _l(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of xl)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const is=_l();function ss(e){let t=is;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 as=new xi;as.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function wr(e,t,n,r,i){if(t=ss(t),i||(i=mn.first(as)),n.length>i.maxLen){let u=e-i.maxLen/2;return u<0?u=0:r+=u,n=n.substring(u,e+i.maxLen/2),wr(e,t,n,r,i)}const s=Date.now(),a=e-1-r;let o=-1,l=null;for(let u=1;!(Date.now()-s>=i.timeBudget);u++){const c=a-i.windowSize*u;t.lastIndex=Math.max(0,c);const h=yl(t,n,a,o);if(!h&&l||(l=h,c<=0))break;o=c}if(l){const u={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return t.lastIndex=0,u}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 $t{constructor(t){const n=ns(t);this._defaultValue=n,this._asciiMap=$t._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=ns(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 jf{constructor(){this._actual=new $t(0)}add(t){this._actual.set(t,1)}has(t){return this._actual.get(t)===1}clear(){return this._actual.clear()}}class wl{constructor(t,n,r){const i=new Uint8Array(t*n);for(let s=0,a=t*n;sn&&(n=l),o>r&&(r=o),u>r&&(r=u)}n++,r++;const i=new wl(r,n,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,n)}}let Lr=null;function Sl(){return Lr===null&&(Lr=new Ll([[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]])),Lr}let Ht=null;function Al(){if(Ht===null){Ht=new $t(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),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(t,n=Sl()){const r=Al(),i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),l=o.length;let u=0,c=0,h=0,d=1,g=!1,p=!1,m=!1,v=!1;for(;u=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Sr.INSTANCE=new Sr;const os=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Tn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Fn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:xn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:os})})(Tn||(Tn={}));class Fn{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?os:(this._emitter||(this._emitter=new de),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 Fn),this._token}cancel(){this._token?this._token instanceof Fn&&this._token.cancel():this._token=Tn.Cancelled}dispose(t=!1){var n;t&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof Fn&&this._token.dispose():this._token=Tn.None}}class Ar{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 Pn=new Ar,Nr=new Ar,Cr=new Ar,El=new Array(230),kl={},Ml=[],Rl=Object.create(null),Tl=Object.create(null),ls=[],Er=[];for(let e=0;e<=193;e++)ls[e]=-1;for(let e=0;e<=132;e++)Er[e]=-1;(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,l,u,c,h,d,g]=i;if(r[a]||(r[a]=!0,Ml[a]=o,Rl[o]=a,Tl[o.toLowerCase()]=a,s&&(ls[a]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(Er[l]=a))),!n[l]){if(n[l]=!0,!u)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);Pn.define(l,u),Nr.define(l,d||u),Cr.define(l,g||d||u)}c&&(El[c]=l),h&&(kl[h]=l)}Er[3]=46})();var us;(function(e){function t(o){return Pn.keyCodeToStr(o)}e.toString=t;function n(o){return Pn.strToKeyCode(o)}e.fromString=n;function r(o){return Nr.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return Cr.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function s(o){return Nr.strToKeyCode(o)||Cr.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 Pn.keyCodeToStr(o)}e.toElectronAccelerator=a})(us||(us={}));function Fl(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class ye extends H{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 ye.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 ye(this.startLineNumber,this.startColumn,t,n):new ye(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new ue(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ue(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new ye(t,n,this.endLineNumber,this.endColumn):new ye(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new ye(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new ye(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new ye(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new ye(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"u"}function Hf(e){return!kr(e)}function kr(e){return Pl(e)||e===null}function Gf(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function Jf(e){if(kr(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function Il(e){return typeof e=="function"}function Qf(e,t){const n=Math.min(e.length,t.length);for(let r=0;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 r;(r=this._factories.get(t))===null||r===void 0||r.dispose();const i=new jl(this,t,n);return this._factories.set(t,i),vn(()=>{const s=this._factories.get(t);!s||s!==i||(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 jl extends Ge{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 ql{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class Yf{constructor(t,n){this.tokens=t,this.endState=n,this._tokenizationResultBrand=void 0}}class Zf{constructor(t,n){this.tokens=t,this.endState=n,this._encodedTokenizationResultBrand=void 0}}var fs;(function(e){const t=new Map;t.set(0,j.symbolMethod),t.set(1,j.symbolFunction),t.set(2,j.symbolConstructor),t.set(3,j.symbolField),t.set(4,j.symbolVariable),t.set(5,j.symbolClass),t.set(6,j.symbolStruct),t.set(7,j.symbolInterface),t.set(8,j.symbolModule),t.set(9,j.symbolProperty),t.set(10,j.symbolEvent),t.set(11,j.symbolOperator),t.set(12,j.symbolUnit),t.set(13,j.symbolValue),t.set(15,j.symbolEnum),t.set(14,j.symbolConstant),t.set(15,j.symbolEnum),t.set(16,j.symbolEnumMember),t.set(17,j.symbolKeyword),t.set(27,j.symbolSnippet),t.set(18,j.symbolText),t.set(19,j.symbolColor),t.set(20,j.symbolFile),t.set(21,j.symbolReference),t.set(22,j.symbolCustomColor),t.set(23,j.symbolFolder),t.set(24,j.symbolTypeParameter),t.set(25,j.account),t.set(26,j.issues);function n(s){let a=t.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=j.symbolProperty),a}e.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,a){let o=r.get(s);return typeof o>"u"&&!a&&(o=9),o}e.fromString=i})(fs||(fs={}));var hs;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(hs||(hs={}));class Kf{constructor(t,n,r,i){this.range=t,this.text=n,this.completionKind=r,this.isSnippetText=i}equals(t){return Range.lift(this.range).equalsRange(t.range)&&this.text===t.text&&this.completionKind===t.completionKind&&this.isSnippetText===t.isSnippetText}}var ds;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(ds||(ds={}));var gs;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(gs||(gs={}));var ms;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(ms||(ms={}));function eh(e){return e&&URI.isUri(e.uri)&&Range.isIRange(e.range)&&(Range.isIRange(e.originSelectionRange)||Range.isIRange(e.targetSelectionRange))}const Ul={17:K("Array","array"),16:K("Boolean","boolean"),4:K("Class","class"),13:K("Constant","constant"),8:K("Constructor","constructor"),9:K("Enum","enumeration"),21:K("EnumMember","enumeration member"),23:K("Event","event"),7:K("Field","field"),0:K("File","file"),11:K("Function","function"),10:K("Interface","interface"),19:K("Key","key"),5:K("Method","method"),1:K("Module","module"),2:K("Namespace","namespace"),20:K("Null","null"),15:K("Number","number"),18:K("Object","object"),24:K("Operator","operator"),3:K("Package","package"),6:K("Property","property"),14:K("String","string"),22:K("Struct","struct"),25:K("TypeParameter","type parameter"),12:K("Variable","variable")};function th(e,t){return localize("symbolAriaLabel","{0} ({1})",e,Ul[t])}var ps;(function(e){const t=new Map;t.set(0,j.symbolFile),t.set(1,j.symbolModule),t.set(2,j.symbolNamespace),t.set(3,j.symbolPackage),t.set(4,j.symbolClass),t.set(5,j.symbolMethod),t.set(6,j.symbolProperty),t.set(7,j.symbolField),t.set(8,j.symbolConstructor),t.set(9,j.symbolEnum),t.set(10,j.symbolInterface),t.set(11,j.symbolFunction),t.set(12,j.symbolVariable),t.set(13,j.symbolConstant),t.set(14,j.symbolString),t.set(15,j.symbolNumber),t.set(16,j.symbolBoolean),t.set(17,j.symbolArray),t.set(18,j.symbolObject),t.set(19,j.symbolKey),t.set(20,j.symbolNull),t.set(21,j.symbolEnumMember),t.set(22,j.symbolStruct),t.set(23,j.symbolEvent),t.set(24,j.symbolOperator),t.set(25,j.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=j.symbolProperty),i}e.toIcon=n})(ps||(ps={}));class nh{}class ke{static fromValue(t){switch(t){case"comment":return ke.Comment;case"imports":return ke.Imports;case"region":return ke.Region}return new ke(t)}constructor(t){this.value=t}}ke.Comment=new ke("comment"),ke.Imports=new ke("imports"),ke.Region=new ke("region");var vs;(function(e){e[e.AIGenerated=1]="AIGenerated"})(vs||(vs={}));var bs;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(bs||(bs={}));var xs;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(xs||(xs={}));class rh{constructor(t){this.createSupport=t,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(t=>{t&&t.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const ih=new Bl;var _s;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(_s||(_s={}));var ys;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(ys||(ys={}));var ws;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(ws||(ws={}));var Ls;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Ls||(Ls={}));var Ss;(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.Snippet=27]="Snippet"})(Ss||(Ss={}));var As;(function(e){e[e.Deprecated=1]="Deprecated"})(As||(As={}));var Ns;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ns||(Ns={}));var Cs;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(Cs||(Cs={}));var Es;(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"})(Es||(Es={}));var ks;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ks||(ks={}));var Ms;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Ms||(Ms={}));var Rs;(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"})(Rs||(Rs={}));var Ts;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=88]="definitionLinkOpensInPeek",e[e.quickSuggestions=89]="quickSuggestions",e[e.quickSuggestionsDelay=90]="quickSuggestionsDelay",e[e.readOnly=91]="readOnly",e[e.readOnlyMessage=92]="readOnlyMessage",e[e.renameOnType=93]="renameOnType",e[e.renderControlCharacters=94]="renderControlCharacters",e[e.renderFinalNewline=95]="renderFinalNewline",e[e.renderLineHighlight=96]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=97]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=98]="renderValidationDecorations",e[e.renderWhitespace=99]="renderWhitespace",e[e.revealHorizontalRightPadding=100]="revealHorizontalRightPadding",e[e.roundedSelection=101]="roundedSelection",e[e.rulers=102]="rulers",e[e.scrollbar=103]="scrollbar",e[e.scrollBeyondLastColumn=104]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=105]="scrollBeyondLastLine",e[e.scrollPredominantAxis=106]="scrollPredominantAxis",e[e.selectionClipboard=107]="selectionClipboard",e[e.selectionHighlight=108]="selectionHighlight",e[e.selectOnLineNumbers=109]="selectOnLineNumbers",e[e.showFoldingControls=110]="showFoldingControls",e[e.showUnused=111]="showUnused",e[e.snippetSuggestions=112]="snippetSuggestions",e[e.smartSelect=113]="smartSelect",e[e.smoothScrolling=114]="smoothScrolling",e[e.stickyScroll=115]="stickyScroll",e[e.stickyTabStops=116]="stickyTabStops",e[e.stopRenderingLineAfter=117]="stopRenderingLineAfter",e[e.suggest=118]="suggest",e[e.suggestFontSize=119]="suggestFontSize",e[e.suggestLineHeight=120]="suggestLineHeight",e[e.suggestOnTriggerCharacters=121]="suggestOnTriggerCharacters",e[e.suggestSelection=122]="suggestSelection",e[e.tabCompletion=123]="tabCompletion",e[e.tabIndex=124]="tabIndex",e[e.unicodeHighlighting=125]="unicodeHighlighting",e[e.unusualLineTerminators=126]="unusualLineTerminators",e[e.useShadowDOM=127]="useShadowDOM",e[e.useTabStops=128]="useTabStops",e[e.wordBreak=129]="wordBreak",e[e.wordSegmenterLocales=130]="wordSegmenterLocales",e[e.wordSeparators=131]="wordSeparators",e[e.wordWrap=132]="wordWrap",e[e.wordWrapBreakAfterCharacters=133]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=134]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=135]="wordWrapColumn",e[e.wordWrapOverride1=136]="wordWrapOverride1",e[e.wordWrapOverride2=137]="wordWrapOverride2",e[e.wrappingIndent=138]="wrappingIndent",e[e.wrappingStrategy=139]="wrappingStrategy",e[e.showDeprecated=140]="showDeprecated",e[e.inlayHints=141]="inlayHints",e[e.editorClassName=142]="editorClassName",e[e.pixelRatio=143]="pixelRatio",e[e.tabFocusMode=144]="tabFocusMode",e[e.layoutInfo=145]="layoutInfo",e[e.wrappingInfo=146]="wrappingInfo",e[e.defaultColorDecorators=147]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=148]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=149]="inlineCompletionsAccessibilityVerbose"})(Ts||(Ts={}));var Fs;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Fs||(Fs={}));var Ps;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Ps||(Ps={}));var Is;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Is||(Is={}));var Ds;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Ds||(Ds={}));var Os;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Os||(Os={}));var Vs;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Vs||(Vs={}));var Bs;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Bs||(Bs={}));var js;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(js||(js={}));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 Tr;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Tr||(Tr={}));var Fr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Fr||(Fr={}));var qs;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(qs||(qs={}));var Us;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Us||(Us={}));var Ws;(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"})(Ws||(Ws={}));var zs;(function(e){e[e.AIGenerated=1]="AIGenerated"})(zs||(zs={}));var $s;(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"})($s||($s={}));var Hs;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Hs||(Hs={}));var Gs;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(Gs||(Gs={}));var Js;(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"})(Js||(Js={}));var Qs;(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"})(Qs||(Qs={}));var Xs;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Xs||(Xs={}));var Ys;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Ys||(Ys={}));var Zs;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Zs||(Zs={}));var Pr;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Pr||(Pr={}));var Ks;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(Ks||(Ks={}));var ea;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(ea||(ea={}));var ta;(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"})(ta||(ta={}));var na;(function(e){e[e.Deprecated=1]="Deprecated"})(na||(na={}));var ra;(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"})(ra||(ra={}));var ia;(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"})(ia||(ia={}));var sa;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(sa||(sa={}));var aa;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(aa||(aa={}));class Gt{static chord(t,n){return Fl(t,n)}}Gt.CtrlCmd=2048,Gt.Shift=1024,Gt.Alt=512,Gt.WinCtrl=256;function Wl(){return{editor:void 0,languages:void 0,CancellationTokenSource:Cl,Emitter:de,KeyCode:Rr,KeyMod:Gt,Position:ue,Range:H,Selection:ye,SelectionDirection:Pr,MarkerSeverity:Tr,MarkerTag:Fr,Uri:ut,Token:ql}}var oa,la;class zl{constructor(t,n){this.uri=t,this.value=n}}function $l(e){return Array.isArray(e)}class wt{constructor(t,n){if(this[oa]="ResourceMap",t instanceof wt)this.map=new Map(t.map),this.toKey=n??wt.defaultToKey;else if($l(t)){this.map=new Map,this.toKey=n??wt.defaultToKey;for(const[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t??wt.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new zl(t,n)),this}get(t){var n;return(n=this.map.get(this.toKey(t)))===null||n===void 0?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]}*[(oa=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.map)yield[t.uri,t.value]}}wt.defaultToKey=e=>e.toString();class Hl{constructor(){this[la]="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||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?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}[(la=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++}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 Gl extends Hl{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}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class sh{constructor(t){if(this._m1=new Map,this._m2=new Map,t)for(const[n,r]of t)this.set(n,r)}clear(){this._m1.clear(),this._m2.clear()}set(t,n){this._m1.set(t,n),this._m2.set(n,t)}get(t){return this._m1.get(t)}getKey(t){return this._m2.get(t)}delete(t){const n=this._m1.get(t);return n===void 0?!1:(this._m1.delete(t),this._m2.delete(n),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class Jl{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)}get(t){const n=this.map.get(t);return n||new Set}}class Ql extends $t{constructor(t,n){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=n,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let r=0,i=t.length;rn)break;r=i}return r}findNextIntlWordAtOrAfterOffset(t,n){for(const r of this._getIntlSegmenterWordsOnLine(t))if(!(r.index=0;let n=null;try{n=strings.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0,unicode:!0})}catch{return null}if(!n)return null;let r=!this.isRegex&&!t;return r&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(r=this.matchCase),new SearchData(n,this.wordSeparators?getMapForWordSeparators(this.wordSeparators,[]):null,r?this.searchString:null)}}function Yl(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 Jt(e,t,n){if(!n)return new FindMatch(e,null);const r=[];for(let i=0,s=t.length;i>0);n[s]>=t?i=s-1:n[s+1]>=t?(r=s,i=s):r=s+1}return r+1}}class mh{static findMatches(t,n,r,i,s){const a=n.parseSearchRequest();return a?a.regex.multiline?this._doFindMatchesMultiline(t,r,new Qt(a.wordSeparators,a.regex),i,s):this._doFindMatchesLineByLine(t,r,a,i,s):[]}static _getMultilineMatchRange(t,n,r,i,s,a){let o,l=0;i?(l=i.findLineFeedCountBeforeOffset(s),o=n+s+l):o=n+s;let u;if(i){const g=i.findLineFeedCountBeforeOffset(s+a.length)-l;u=o+a.length+g}else u=o+a.length;const c=t.getPositionAt(o),h=t.getPositionAt(u);return new Range(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(t,n,r,i,s){const a=t.getOffsetAt(n.getStartPosition()),o=t.getValueInRange(n,1),l=t.getEOL()===`\r `?new da(o):null,u=[];let c=0,h;for(r.reset(0);h=r.next(o);)if(u[c++]=Jt(this._getMultilineMatchRange(t,a,o,l,h.index,h[0]),h,i),c>=s)return u;return u}static _doFindMatchesLineByLine(t,n,r,i,s){const a=[];let o=0;if(n.startLineNumber===n.endLineNumber){const u=t.getLineContent(n.startLineNumber).substring(n.startColumn-1,n.endColumn-1);return o=this._findMatchesInLine(r,u,n.startLineNumber,n.startColumn-1,o,a,i,s),a}const l=t.getLineContent(n.startLineNumber).substring(n.startColumn-1);o=this._findMatchesInLine(r,l,n.startLineNumber,n.startColumn-1,o,a,i,s);for(let u=n.startLineNumber+1;u=l))return s;return s}const c=new Qt(t.wordSeparators,t.regex);let h;c.reset(0);do if(h=c.next(n),h&&(a[s++]=Jt(new Range(r,h.index+1+i,r,h.index+1+h[0].length+i),h,o),s>=l))return s;while(h);return s}static findNextMatch(t,n,r,i){const s=n.parseSearchRequest();if(!s)return null;const a=new Qt(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(t,r,a,i):this._doFindNextMatchLineByLine(t,r,a,i)}static _doFindNextMatchMultiline(t,n,r,i){const s=new Position(n.lineNumber,1),a=t.getOffsetAt(s),o=t.getLineCount(),l=t.getValueInRange(new Range(s.lineNumber,s.column,o,t.getLineMaxColumn(o)),1),u=t.getEOL()===`\r `?new da(l):null;r.reset(n.column-1);const c=r.next(l);return c?Jt(this._getMultilineMatchRange(t,a,l,u,c.index,c[0]),c,i):n.lineNumber!==1||n.column!==1?this._doFindNextMatchMultiline(t,new Position(1,1),r,i):null}static _doFindNextMatchLineByLine(t,n,r,i){const s=t.getLineCount(),a=n.lineNumber,o=t.getLineContent(a),l=this._findFirstMatchInLine(r,o,a,n.column,i);if(l)return l;for(let u=1;u<=s;u++){const c=(a+u-1)%s,h=t.getLineContent(c+1),d=this._findFirstMatchInLine(r,h,c+1,1,i);if(d)return d}return null}static _findFirstMatchInLine(t,n,r,i,s){t.reset(i-1);const a=t.next(n);return a?Jt(new Range(r,a.index+1,r,a.index+1+a[0].length),a,s):null}static findPreviousMatch(t,n,r,i){const s=n.parseSearchRequest();if(!s)return null;const a=new Qt(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(t,r,a,i):this._doFindPreviousMatchLineByLine(t,r,a,i)}static _doFindPreviousMatchMultiline(t,n,r,i){const s=this._doFindMatchesMultiline(t,new Range(1,1,n.lineNumber,n.column),r,i,10*Xl);if(s.length>0)return s[s.length-1];const a=t.getLineCount();return n.lineNumber!==a||n.column!==t.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(t,new Position(a,t.getLineMaxColumn(a)),r,i):null}static _doFindPreviousMatchLineByLine(t,n,r,i){const s=t.getLineCount(),a=n.lineNumber,o=t.getLineContent(a).substring(0,n.column-1),l=this._findLastMatchInLine(r,o,a,i);if(l)return l;for(let u=1;u<=s;u++){const c=(s+a-u-1)%s,h=t.getLineContent(c+1),d=this._findLastMatchInLine(r,h,c+1,i);if(d)return d}return null}static _findLastMatchInLine(t,n,r,i){let s=null,a;for(t.reset(0);a=t.next(n);)s=Jt(new Range(r,a.index+1,r,a.index+1+a[0].length),a,i);return s}}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 Kl(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 ga(e,t,n,r,i){return Zl(e,t,n,r,i)&&Kl(e,t,n,r,i)}class Qt{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){Ii(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||ga(this._wordSeparators,t,n,i,s))return r}while(r);return null}}function ph(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function eu(e,t="Unreachable"){throw new Error(t)}function vh(e){e||onUnexpectedError(new BugIndicatingError("Soft Assertion Failed"))}function In(e){if(!e()){debugger;e(),pi(new Be("Assertion Failed"))}}function ma(e,t){let n=0;for(;n0){const R=x.charCodeAt(w-1);Bt(R)&&w--}if(y+1=1e3){h=!0;break e}c.push(new H(v,w+1,v,y+1))}}while(d)}return{ranges:c,hasMore:h,ambiguousCharacterCount:g,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(t,n){const r=new pa(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=lt.getLocales().filter(l=>!lt.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function nu(e,t){return`[${Ti(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class pa{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=lt.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of Qe.codePoints)va(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),l=R1(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!Qe.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!va(t)&&Qe.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function va(e){return e===" "||e===` `||e===" "}class Dn{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class ru{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}class G{static addRange(t,n){let r=0;for(;rn))return new G(t,n)}static ofLength(t){return new G(0,t)}static ofStartAndLength(t,n){return new G(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Be(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new G(this.start+t,this.endExclusive+t)}deltaStart(t){return new G(this.start+t,this.endExclusive)}deltaEnd(t){return new G(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.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 Be(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Be(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nt.toString()).join(", ")}intersectsStrict(t){let n=0;for(;nt+n.length,0)}}function bh(e,t,n){const r=iu(e,t);if(r!==-1)return e[r]}function iu(e,t,n=e.length-1){for(let r=n;r>=0;r--){const i=e[r];if(t(i))return r}return-1}function Lt(e,t){const n=Xt(e,t);return n===-1?void 0:e[n]}function Xt(e,t,n=0,r=e.length){let i=n,s=r;for(;i0&&(n=i)}return n}function xh(e,t){if(e.length===0)return;let n=e[0];for(let r=1;r=0&&(n=i)}return n}function _h(e,t){return au(e,(n,r)=>-t(n,r))}function yh(e,t){if(e.length===0)return-1;let n=0;for(let r=1;r0&&(n=r)}return n}function wh(e,t){for(const n of e){const r=t(n);if(r!==void 0)return r}}class J{static fromRangeInclusive(t){return new J(t.startLineNumber,t.endLineNumber+1)}static joinMany(t){if(t.length===0)return[];let n=new Pe(t[0].slice());for(let r=1;rn)throw new Be(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=Xt(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=Lt(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=Lt(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 J(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new Pe(n)}subtractFrom(t){const n=Ir(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=Xt(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new Pe([t]);const i=[];let s=t.startLineNumber;for(let a=n;as&&i.push(new J(s,o.startLineNumber)),s=o.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}}class Me{static inverse(t,n,r){const i=[];let s=1,a=1;for(const l of t){const u=new Me(new J(s,l.original.startLineNumber),new J(a,l.modified.startLineNumber));u.modified.isEmpty||i.push(u),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Me(new J(s,n+1),new J(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 Me(a,o))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Me(this.modified,this.original)}join(t){return new Me(this.original.join(t.original),this.modified.join(t.modified))}}class Ue extends Me{static fromRangeMappings(t){const n=J.join(t.map(i=>J.fromRangeInclusive(i.originalRange))),r=J.join(t.map(i=>J.fromRangeInclusive(i.modifiedRange)));return new Ue(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){var t;return new Ue(this.modified,this.original,(t=this.innerChanges)===null||t===void 0?void 0:t.map(n=>n.flip()))}withInnerChangesFromLineRanges(){return new Ue(this.original,this.modified,[new St(this.original.toExclusiveRange(),this.modified.toExclusiveRange())])}}class St{constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new St(this.modifiedRange,this.originalRange)}}const ou=3;class lu{computeDiff(t,n,r){var i;const a=new fu(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let l=null;for(const u of a.changes){let c;u.originalEndLineNumber===0?c=new J(u.originalStartLineNumber+1,u.originalStartLineNumber+1):c=new J(u.originalStartLineNumber,u.originalEndLineNumber+1);let h;u.modifiedEndLineNumber===0?h=new J(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):h=new J(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let d=new Ue(c,h,(i=u.charChanges)===null||i===void 0?void 0:i.map(g=>new St(new H(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn),new H(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===d.modified.startLineNumber||l.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new Ue(l.original.join(d.original),l.modified.join(d.modified),l.innerChanges&&d.innerChanges?l.innerChanges.concat(d.innerChanges):void 0),o.pop()),o.push(d),l=d}return In(()=>ma(o,(u,c)=>c.original.startLineNumber-u.original.endLineNumberExclusive===c.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.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 At{constructor(t,n,r,i,s,a,o,l){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}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),l=r.getStartLineNumber(t.modifiedStart),u=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),h=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new At(i,s,a,o,l,u,c,h)}}function cu(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),p=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(g.getElements().length>0&&p.getElements().length>0){let m=xa(g,p,s,!0).changes;o&&(m=cu(m)),d=[];for(let v=0,_=m.length;v<_;v++)d.push(At.createFromDiffChange(m[v],g,p))}}return new Zt(l,u,c,h,d)}}class fu{constructor(t,n,r){this.shouldComputeCharChanges=r.shouldComputeCharChanges,this.shouldPostProcessCharChanges=r.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=r.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=r.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=n,this.original=new _a(t),this.modified=new _a(n),this.continueLineDiff=ya(r.maxComputationTime),this.continueCharDiff=ya(r.maxComputationTime===0?0:Math.min(r.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const t=xa(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=t.changes,r=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let l=0,u=n.length;l1&&m>1;){const v=d.charCodeAt(p-2),_=g.charCodeAt(m-2);if(v!==_)break;p--,m--}(p>1||m>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,p,a+1,1,m)}{let p=Or(d,1),m=Or(g,1);const v=d.length+1,_=g.length+1;for(;p!0;const t=Date.now();return()=>Date.now()-t{r.push(te.fromOffsetPairs(i?i.getEndExclusives():we.zero,s?s.getStarts():new we(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new te(new G(t.offset1,n.offset1),new G(t.offset2,n.offset2))}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new te(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new te(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new te(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new te(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new te(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 te(n,r)}getStarts(){return new we(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new we(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class we{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new we(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}}we.zero=new we(0,0),we.max=new we(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class Kt{isValid(){return!0}}Kt.instance=new Kt;class hu{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new Be("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&m>0&&a.get(p-1,m-1)===3&&(x+=o.get(p-1,m-1)),x+=i?i(p,m):1):x=-1;const b=Math.max(v,_,x);if(b===x){const w=p>0&&m>0?o.get(p-1,m-1):0;o.set(p,m,w+1),a.set(p,m,3)}else b===v?(o.set(p,m,0),a.set(p,m,1)):b===_&&(o.set(p,m,0),a.set(p,m,2));s.set(p,m,b)}const l=[];let u=t.length,c=n.length;function h(p,m){(p+1!==u||m+1!==c)&&l.push(new te(new G(p+1,u),new G(m+1,c))),u=p,c=m}let d=t.length-1,g=n.length-1;for(;d>=0&&g>=0;)a.get(d,g)===3?(h(d,g),d--,g--):a.get(d,g)===1?d--:g--;return h(-1,-1),l.reverse(),new We(l,!1)}}class wa{compute(t,n,r=Kt.instance){if(t.length===0||n.length===0)return We.trivial(t,n);const i=t,s=n;function a(m,v){for(;mi.length||y>s.length)continue;const N=a(w,y);l.set(c,N);const L=w===x?u.get(c+1):u.get(c-1);if(u.set(c,N!==w?new La(L,w,y,N-w):L),l.get(c)===i.length&&l.get(c)-c===s.length)break e}}let h=u.get(c);const d=[];let g=i.length,p=s.length;for(;;){const m=h?h.x+h.length:0,v=h?h.y+h.length:0;if((m!==g||v!==p)&&d.push(new te(new G(m,g),new G(v,p))),!h)break;g=h.x,p=h.y,h=h.prev}return d.reverse(),new We(d,!1)}}class La{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}}class gu{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 mu{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 On{constructor(t,n,r){this.lines=t,this.considerWhitespaceChanges=r,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let i=!1;n.start>0&&n.endExclusive>=t.length&&(n=new G(n.start-1,n.endExclusive),i=!0),this.lineRange=n,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=Aa(t>0?this.elements[t-1]:-1),r=Aa(tr<=t);return new ue(this.lineRange.start+n+1,t-this.firstCharOffsetByLine[n]+this.additionalOffsetByLine[n]+1)}translateRange(t){return H.fromPositions(this.translateOffset(t.start),this.translateOffset(t.endExclusive))}findWordContaining(t){if(t<0||t>=this.elements.length||!jr(this.elements[t]))return;let n=t;for(;n>0&&jr(this.elements[n-1]);)n--;let r=t;for(;ra<=t.start))!==null&&n!==void 0?n:0,s=(r=su(this.firstCharOffsetByLine,a=>t.endExclusive<=a))!==null&&r!==void 0?r:this.elements.length;return new G(i,s)}}function jr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const pu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Sa(e){return pu[e]}function Aa(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 vu(e,t,n,r,i,s){let{moves:a,excludedChanges:o}=xu(e,t,n,s);if(!s.isValid())return[];const l=e.filter(c=>!o.has(c)),u=_u(l,r,i,t,n,s);return gl(a,u),a=yu(a),a=a.filter(c=>{const h=c.original.toOffsetRange().slice(t).map(g=>g.trim());return h.join(` `).length>=15&&bu(h,g=>g.length>=2)>=2}),a=wu(e,a),a}function bu(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function xu(e,t,n,r){const i=[],s=e.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Nt(l.original,t,l)),a=new Set(e.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Nt(l.modified,n,l))),o=new Set;for(const l of s){let u=-1,c;for(const h of a){const d=l.computeSimilarity(h);d>u&&(u=d,c=h)}if(u>.9&&c&&(a.delete(c),i.push(new Me(l.range,c.range)),o.add(l.source),o.add(c.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function _u(e,t,n,r,i,s){const a=[],o=new Jl;for(const d of e)for(let g=d.original.startLineNumber;gd.modified.startLineNumber,Wt));for(const d of e){let g=[];for(let p=d.modified.startLineNumber;p{for(const w of g)if(w.originalLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){w.originalLineRange=new J(w.originalLineRange.startLineNumber,x.endLineNumberExclusive),w.modifiedLineRange=new J(w.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),_.push(w);return}const b={modifiedLineRange:v,originalLineRange:x};l.push(b),_.push(b)}),g=_}if(!s.isValid())return[]}l.sort(pl(Mn(d=>d.modifiedLineRange.length,Wt)));const u=new Pe,c=new Pe;for(const d of l){const g=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,p=u.subtractFrom(d.modifiedLineRange),m=c.subtractFrom(d.originalLineRange).getWithDelta(g),v=p.getIntersection(m);for(const _ of v.ranges){if(_.length<3)continue;const x=_,b=_.delta(-g);a.push(new Me(b,x)),u.addRange(x),c.addRange(b)}}a.sort(Mn(d=>d.original.startLineNumber,Wt));const h=new Yt(e);for(let d=0;dN.original.startLineNumber<=g.original.startLineNumber),m=Lt(e,N=>N.modified.startLineNumber<=g.modified.startLineNumber),v=Math.max(g.original.startLineNumber-p.original.startLineNumber,g.modified.startLineNumber-m.modified.startLineNumber),_=h.findLastMonotonous(N=>N.original.startLineNumberN.modified.startLineNumberr.length||L>i.length||u.contains(L)||c.contains(N)||!Na(r[N-1],i[L-1],s))break}w>0&&(c.addRange(new J(g.original.startLineNumber-w,g.original.startLineNumber)),u.addRange(new J(g.modified.startLineNumber-w,g.modified.startLineNumber)));let y;for(y=0;yr.length||L>i.length||u.contains(L)||c.contains(N)||!Na(r[N-1],i[L-1],s))break}y>0&&(c.addRange(new J(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+y)),u.addRange(new J(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+y))),(w>0||y>0)&&(a[d]=new Me(new J(g.original.startLineNumber-w,g.original.endLineNumberExclusive+y),new J(g.modified.startLineNumber-w,g.modified.endLineNumberExclusive+y)))}return a}function Na(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new wa().compute(new On([e],new G(0,1),!1),new On([t],new G(0,1),!1),n);let s=0;const a=te.invert(i.diffs,e.length);for(const c of a)c.seq1Range.forEach(h=>{Br(e.charCodeAt(h))||s++});function o(c){let h=0;for(let d=0;dt.length?e:t);return s/l>.6&&l>10}function yu(e){if(e.length===0)return e;e.sort(Mn(n=>n.original.startLineNumber,Wt));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 wu(e,t){const n=new Yt(e);return t=t.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(u))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function Lu(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+ou&&(u=p,l=c)}return e.delta(l)}function Su(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 te(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Au(e,t,n){const r=te.invert(n,e.length),i=[];let s=new we(0,0);function a(l,u){if(l.offset10;){const v=r[0];if(!(v.seq1Range.intersects(d.seq1Range)||v.seq2Range.intersects(d.seq2Range)))break;const x=e.findWordContaining(v.seq1Range.start),b=t.findWordContaining(v.seq2Range.start),w=new te(x,b),y=w.intersect(v);if(p+=y.seq1Range.length,m+=y.seq2Range.length,d=d.join(w),d.seq1Range.endExclusive>=v.seq1Range.endExclusive)r.shift();else break}p+m<(d.seq1Range.length+d.seq2Range.length)*2/3&&i.push(d),s=d.getEndExclusives()}for(;r.length>0;){const l=r.shift();l.seq1Range.isEmpty||(a(l.getStarts(),l),a(l.getEndExclusives().delta(-1),l))}return Nu(n,i)}function Nu(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 l=r[o],u=a[a.length-1];c(u,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);return r}function Eu(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 l=1;l5||m.length>500)return!1;const _=e.getText(m).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;const x=e.countLinesIn(g.seq1Range),b=g.seq1Range.length,w=t.countLinesIn(g.seq2Range),y=g.seq2Range.length,N=e.countLinesIn(p.seq1Range),L=p.seq1Range.length,C=t.countLinesIn(p.seq2Range),R=p.seq2Range.length,F=2*40+50;function D(S){return Math.min(S,F)}return Math.pow(Math.pow(D(x*40+b),1.5)+Math.pow(D(w*40+y),1.5),1.5)+Math.pow(Math.pow(D(N*40+L),1.5)+Math.pow(D(C*40+R),1.5),1.5)>(F**1.5)**1.5*1.3};const u=r[l],c=o[o.length-1];h(c,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);const a=[];return dl(r,(o,l,u)=>{let c=l;function h(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const d=e.extendToFullLines(l.seq1Range),g=e.getText(new G(d.start,l.seq1Range.start));h(g)&&(c=c.deltaStart(-g.length));const p=e.getText(new G(l.seq1Range.endExclusive,d.endExclusive));h(p)&&(c=c.deltaEnd(p.length));const m=te.fromOffsetPairs(o?o.getEndExclusives():we.zero,u?u.getStarts():we.max),v=c.intersect(m);a.length>0&&v.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(v):a.push(v)}),a}class Ma{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:Ra(this.lines[t-1]),r=t===this.lines.length?0:Ra(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 Ra(e){let t=0;for(;ty===N))return new Dn([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Dn([new Ue(new J(1,t.length+1),new J(1,n.length+1),[new St(new H(1,1,t.length,t[0].length+1),new H(1,1,n.length,n[0].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?Kt.instance:new hu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(y){let N=a.get(y);return N===void 0&&(N=a.size,a.set(y,N)),N}const l=t.map(y=>o(y.trim())),u=n.map(y=>o(y.trim())),c=new Ma(l,t),h=new Ma(u,n),d=c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,i,(y,N)=>t[y]===n[N]?n[N].length===0?.1:1+Math.log(1+n[N].length):.99):this.myersDiffingAlgorithm.compute(c,h);let g=d.diffs,p=d.hitTimeout;g=Ca(c,h,g),g=Cu(c,h,g);const m=[],v=y=>{if(s)for(let N=0;Ny.seq1Range.start-_===y.seq2Range.start-x);const N=y.seq1Range.start-_;v(N),_=y.seq1Range.endExclusive,x=y.seq2Range.endExclusive;const L=this.refineDiff(t,n,y,i,s);L.hitTimeout&&(p=!0);for(const C of L.mappings)m.push(C)}v(t.length-_);const b=Ta(m,t,n);let w=[];return r.computeMoves&&(w=this.computeMoves(b,t,n,l,u,i,s)),In(()=>{function y(L,C){if(L.lineNumber<1||L.lineNumber>C.length)return!1;const R=C[L.lineNumber-1];return!(L.column<1||L.column>R.length+1)}function N(L,C){return!(L.startLineNumber<1||L.startLineNumber>C.length+1||L.endLineNumberExclusive<1||L.endLineNumberExclusive>C.length+1)}for(const L of b){if(!L.innerChanges)return!1;for(const C of L.innerChanges)if(!(y(C.modifiedRange.getStartPosition(),n)&&y(C.modifiedRange.getEndPosition(),n)&&y(C.originalRange.getStartPosition(),t)&&y(C.originalRange.getEndPosition(),t)))return!1;if(!N(L.modified,n)||!N(L.original,t))return!1}return!0}),new Dn(b,w,p)}computeMoves(t,n,r,i,s,a,o){return vu(t,n,r,i,s,a).map(c=>{const h=this.refineDiff(n,r,new te(c.original.toOffsetRange(),c.modified.toOffsetRange()),a,o),d=Ta(h.mappings,n,r,!0);return new ru(c,d)})}refineDiff(t,n,r,i,s){const a=new On(t,r.seq1Range,s),o=new On(n,r.seq2Range,s),l=a.length+o.length<500?this.dynamicProgrammingDiffing.compute(a,o,i):this.myersDiffingAlgorithm.compute(a,o,i);let u=l.diffs;return u=Ca(a,o,u),u=Au(a,o,u),u=Su(a,o,u),u=Eu(a,o,u),{mappings:u.map(h=>new St(a.translateRange(h.seq1Range),o.translateRange(h.seq2Range))),hitTimeout:l.hitTimeout}}}function Ta(e,t,n,r=!1){const i=[];for(const s of fl(e.map(a=>Mu(a,t,n)),(a,o)=>a.original.overlapOrTouch(o.original)||a.modified.overlapOrTouch(o.modified))){const a=s[0],o=s[s.length-1];i.push(new Ue(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return In(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:ma(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new J(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new J(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Ue(s,a,[e])}const Fa={getLegacy:()=>new lu,getDefault:()=>new ku};function nt(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class ae{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=nt(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 Ne{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=nt(Math.max(Math.min(1,n),0),3),this.l=nt(Math.max(Math.min(1,r),0),3),this.a=nt(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 l=0,u=0;const c=(o+a)/2,h=a-o;if(h>0){switch(u=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),a){case n:l=(r-i)/h+(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,l;if(r===0)a=o=l=i;else{const u=i<.5?i*(1+r):i+r-i*r,c=2*i-u;a=Ne._hue2rgb(c,u,n+1/3),o=Ne._hue2rgb(c,u,n),l=Ne._hue2rgb(c,u,n-1/3)}return new ae(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Ct{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=nt(Math.max(Math.min(1,n),0),3),this.v=nt(Math.max(Math.min(1,r),0),3),this.a=nt(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,l=s===0?0:o/s;let u;return o===0?u=0:s===n?u=((r-i)/o%6+6)%6:s===r?u=(i-n)/o+2:u=(n-r)/o+4,new Ct(Math.round(u*60),l,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)),l=i-a;let[u,c,h]=[0,0,0];return n<60?(u=a,c=o):n<120?(u=o,c=a):n<180?(c=a,h=o):n<240?(c=o,h=a):n<300?(u=o,h=a):n<=360&&(u=a,h=o),u=Math.round((u+l)*255),c=Math.round((c+l)*255),h=Math.round((h+l)*255),new ae(u,c,h,s)}}class X{static fromHex(t){return X.Format.CSS.parseHex(t)||X.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Ne.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ct.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof ae)this.rgba=t;else if(t instanceof Ne)this._hsla=t,this.rgba=Ne.toRGBA(t);else if(t instanceof Ct)this._hsva=t,this.rgba=Ct.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&ae.equals(this.rgba,t.rgba)&&Ne.equals(this.hsla,t.hsla)&&Ct.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=X._relativeLuminanceForComponent(this.rgba.r),n=X._relativeLuminanceForComponent(this.rgba.g),r=X._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return nt(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 n0)for(const i of r){const s=i.filter(u=>u!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const u=/^\(\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;l=Ia(en(e,i),tn(o,u),!1)}else if(a==="rgba"){const u=/^\(\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;l=Ia(en(e,i),tn(o,u),!0)}else if(a==="hsl"){const u=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=Da(en(e,i),tn(o,u),!1)}else if(a==="hsla"){const u=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=Da(en(e,i),tn(o,u),!0)}else a==="#"&&(l=Ru(en(e,i),a+o));l&&t.push(l)}return t}function Fu(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Tu(e)}const Oa=new RegExp("\\bMARK:\\s*(.*)$","d"),Pu=/^-+|-+$/g;function Iu(e,t){var n;let r=[];if(t.findRegionSectionHeaders&&(!((n=t.foldingRules)===null||n===void 0)&&n.markers)){const i=Du(e,t);r=r.concat(i)}if(t.findMarkSectionHeaders){const i=Ou(e);r=r.concat(i)}return r}function Du(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 l={range:o,...Va(s.substring(a[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function Ou(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){const i=e.getLineContent(r);Vu(i,r,t)}return t}function Vu(e,t,n){Oa.lastIndex=0;const r=Oa.exec(e);if(r){const i=r.indices[1][0]+1,s=r.indices[1][1]+1,a={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(a.endColumn>a.startColumn){const o={range:a,...Va(r[1]),shouldBeInComments:!0};(o.text||o.hasSeparatorLine)&&n.push(o)}}}function Va(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(Pu,""),{text:e,hasSeparatorLine:t}}class Bu extends bl{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}}class rt{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){const t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new Bu(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]}async computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?tu.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(t,n){const r=this._getModel(t);return r?Iu(r,n):[]}async computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:rt.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?Fa.getDefault():Fa.getLegacy(),a=t.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r),u=l.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(h){return h.map(d=>{var g;return[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,(g=d.innerChanges)===null||g===void 0?void 0:g.map(p=>[p.originalRange.startLineNumber,p.originalRange.startColumn,p.originalRange.endLineNumber,p.originalRange.endColumn,p.modifiedRange.startLineNumber,p.modifiedRange.startColumn,p.modifiedRange.endLineNumber,p.modifiedRange.endColumn])]})}return{identical:u,quitEarly:l.hitTimeout,changes:c(l.changes),moves:l.moves.map(h=>[h.lineRangeMapping.original.startLineNumber,h.lineRangeMapping.original.endLineNumberExclusive,h.lineRangeMapping.modified.startLineNumber,h.lineRangeMapping.modified.endLineNumberExclusive,c(h.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((l,u)=>{if(l.range&&u.range)return H.compareRangesUsingStarts(l.range,u.range);const c=l.range?0:1,h=u.range?0:1;return c-h});let o=0;for(let l=1;lrt._diffLimit){s.push({range:l,text:u});continue}const d=$1(h,u,r),g=i.offsetAt(H.lift(l).getStartPosition());for(const p of d){const m=i.positionAt(g+p.originalStart),v=i.positionAt(g+p.originalStart+p.originalLength),_={text:u.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:v.lineNumber,endColumn:v.column}};i.getValueInRange(_.range)!==_.text&&s.push(_)}}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?Nl(n):null}async computeDefaultDocumentColors(t){const n=this._getModel(t);return n?Fu(n):null}async textualSuggest(t,n,r,i){const s=new bn,a=new RegExp(r,i),o=new Set;e:for(const l of t){const u=this._getModel(l);if(u){for(const c of u.words(a))if(!(c===n||!isNaN(Number(c)))&&(o.add(c),o.size>rt._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 l=n.startLineNumber;lthis._host.fhr(o,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,n),Promise.resolve(yn(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}rt._diffLimit=1e5,rt._suggestionsLimit=1e4;function Lh(e){return new rt(e,null)}typeof importScripts=="function"&&(globalThis.monaco=Wl());let Ur=!1;function Ba(e){if(Ur)return;Ur=!0;const t=new Wi(n=>{globalThis.postMessage(n)},n=>new rt(n,e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{Ur||Ba(null)};function Wr(e,t){t===void 0&&(t=!1);var n=e.length,r=0,i="",s=0,a=16,o=0,l=0,u=0,c=0,h=0;function d(b,w){for(var y=0,N=0;y=48&&L<=57)N=N*16+L-48;else if(L>=65&&L<=70)N=N*16+L-65+10;else if(L>=97&&L<=102)N=N*16+L-97+10;else break;r++,y++}return y=n){b+=e.substring(w,r),h=2;break}var y=e.charCodeAt(r);if(y===34){b+=e.substring(w,r),r++;break}if(y===92){if(b+=e.substring(w,r),r++,r>=n){h=2;break}var N=e.charCodeAt(r++);switch(N){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:var L=d(4,!0);L>=0?b+=String.fromCharCode(L):h=4;break;default:h=5}w=r;continue}if(y>=0&&y<=31)if(nn(y)){b+=e.substring(w,r),h=2;break}else h=6;r++}return b}function v(){if(i="",h=0,s=r,l=o,c=u,r>=n)return s=n,a=17;var b=e.charCodeAt(r);if(zr(b)){do r++,i+=String.fromCharCode(b),b=e.charCodeAt(r);while(zr(b));return a=15}if(nn(b))return r++,i+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,i+=` `),o++,u=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=m(),a=10;case 47:var w=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&b<=15);return b}return{setPosition:g,getPosition:function(){return r},scan:t?x:v,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return s},getTokenLength:function(){return r-s},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return s-c},getTokenError:function(){return h}}}function zr(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function nn(e){return e===10||e===13||e===8232||e===8233}function Et(e){return e>=48&&e<=57}function ju(e,t,n){var r,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!ja(e,s-1);)s--;for(var l=o;la)&&e.substring(E,P)!==S&&_.push({offset:E,length:P-E,content:S})}var b=v();if(b!==17){var w=g.getTokenOffset()+s,y=$r(d,r);x(y,s,w)}for(;b!==17;){for(var N=g.getTokenOffset()+g.getTokenLength()+s,L=v(),C="",R=!1;!c&&(L===12||L===13);){var F=g.getTokenOffset()+s;x(" ",N,F),N=g.getTokenOffset()+g.getTokenLength()+s,R=L===12,C=R?m():"",L=v()}if(L===2)b!==1&&(h--,C=m());else if(L===4)b!==3&&(h--,C=m());else{switch(b){case 3:case 1:h++,C=m();break;case 5:case 12:C=m();break;case 13:c?C=m():R||(C=" ");break;case 6:R||(C=" ");break;case 10:if(L===6){R||(C="");break}case 7:case 8:case 9:case 11:case 2:case 4:L===12||L===13?R||(C=" "):L!==5&&L!==17&&(p=!0);break;case 16:p=!0;break}c&&(L===12||L===13)&&(C=m())}L===17&&(C=n.insertFinalNewline?u:"");var D=g.getTokenOffset()+s;x(C,N,D),b=L}return _}function $r(e,t){for(var n="",r=0;r=e.offset&&t0)for(var S=r.getToken();S!==17;){if(F.indexOf(S)!==-1){_();break}else if(D.indexOf(S)!==-1)break;S=_()}}function b(R){var F=r.getTokenValue();return R?h(F):o(F),_(),!0}function w(){switch(r.getToken()){case 11:var R=r.getTokenValue(),F=Number(R);isNaN(F)&&(x(2),F=0),h(F);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return _(),!0}function y(){return r.getToken()!==10?(x(3,[],[2,5]),!1):(b(!1),r.getToken()===6?(d(":"),_(),C()||x(4,[],[2,5])):x(5,[],[2,5]),!0)}function N(){a(),_();for(var R=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(R||x(4,[],[]),d(","),_(),r.getToken()===2&&v)break}else R&&x(6,[],[]);y()||x(4,[],[2,5]),R=!0}return l(),r.getToken()!==2?x(7,[2],[]):_(),!0}function L(){u(),_();for(var R=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(R||x(4,[],[]),d(","),_(),r.getToken()===4&&v)break}else R&&x(6,[],[]);C()||x(4,[],[4,5]),R=!0}return c(),r.getToken()!==4?x(8,[4],[]):_(),!0}function C(){switch(r.getToken()){case 3:return L();case 1:return N();case 10:return b(!0);default:return w()}}return _(),r.getToken()===17?n.allowEmptyContent?!0:(x(4,[],[]),!1):C()?(r.getToken()!==17&&x(9,[],[]),!0):(x(4,[],[]),!1)}var kt=Wr,Hu=Wu,Gu=Ua,Ju=qa,Qu=Hr;function Xu(e,t,n){return ju(e,t,n)}function rn(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;var 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 Bn(e){var t="";Zu(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}var Wa;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Wa||(Wa={}));var jn;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(jn||(jn={}));var Re;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=jn.MAX_VALUE),i===Number.MAX_VALUE&&(i=jn.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){var i=r;return M.objectLiteral(i)&&M.uinteger(i.line)&&M.uinteger(i.character)}e.is=n})(Re||(Re={}));var Y;(function(e){function t(r,i,s,a){if(M.uinteger(r)&&M.uinteger(i)&&M.uinteger(s)&&M.uinteger(a))return{start:Re.create(r,i),end:Re.create(s,a)};if(Re.is(r)&&Re.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+s+", "+a+"]")}e.create=t;function n(r){var i=r;return M.objectLiteral(i)&&Re.is(i.start)&&Re.is(i.end)}e.is=n})(Y||(Y={}));var an;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){var i=r;return M.defined(i)&&Y.is(i.range)&&(M.string(i.uri)||M.undefined(i.uri))}e.is=n})(an||(an={}));var za;(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){var i=r;return M.defined(i)&&Y.is(i.targetRange)&&M.string(i.targetUri)&&(Y.is(i.targetSelectionRange)||M.undefined(i.targetSelectionRange))&&(Y.is(i.originSelectionRange)||M.undefined(i.originSelectionRange))}e.is=n})(za||(za={}));var Gr;(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){var i=r;return M.numberRange(i.red,0,1)&&M.numberRange(i.green,0,1)&&M.numberRange(i.blue,0,1)&&M.numberRange(i.alpha,0,1)}e.is=n})(Gr||(Gr={}));var $a;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){var i=r;return Y.is(i.range)&&Gr.is(i.color)}e.is=n})($a||($a={}));var Ha;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){var i=r;return M.string(i.label)&&(M.undefined(i.textEdit)||Te.is(i))&&(M.undefined(i.additionalTextEdits)||M.typedArray(i.additionalTextEdits,Te.is))}e.is=n})(Ha||(Ha={}));var on;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(on||(on={}));var Ga;(function(e){function t(r,i,s,a,o){var l={startLine:r,endLine:i};return M.defined(s)&&(l.startCharacter=s),M.defined(a)&&(l.endCharacter=a),M.defined(o)&&(l.kind=o),l}e.create=t;function n(r){var i=r;return M.uinteger(i.startLine)&&M.uinteger(i.startLine)&&(M.undefined(i.startCharacter)||M.uinteger(i.startCharacter))&&(M.undefined(i.endCharacter)||M.uinteger(i.endCharacter))&&(M.undefined(i.kind)||M.string(i.kind))}e.is=n})(Ga||(Ga={}));var Jr;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){var i=r;return M.defined(i)&&an.is(i.location)&&M.string(i.message)}e.is=n})(Jr||(Jr={}));var Se;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Se||(Se={}));var Ja;(function(e){e.Unnecessary=1,e.Deprecated=2})(Ja||(Ja={}));var Qa;(function(e){function t(n){var r=n;return r!=null&&M.string(r.href)}e.is=t})(Qa||(Qa={}));var $e;(function(e){function t(r,i,s,a,o,l){var u={range:r,message:i};return M.defined(s)&&(u.severity=s),M.defined(a)&&(u.code=a),M.defined(o)&&(u.source=o),M.defined(l)&&(u.relatedInformation=l),u}e.create=t;function n(r){var i,s=r;return M.defined(s)&&Y.is(s.range)&&M.string(s.message)&&(M.number(s.severity)||M.undefined(s.severity))&&(M.integer(s.code)||M.string(s.code)||M.undefined(s.code))&&(M.undefined(s.codeDescription)||M.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(M.string(s.source)||M.undefined(s.source))&&(M.undefined(s.relatedInformation)||M.typedArray(s.relatedInformation,Jr.is))}e.is=n})($e||($e={}));var ln;(function(e){function t(r,i){for(var s=[],a=2;a0&&(o.arguments=s),o}e.create=t;function n(r){var i=r;return M.defined(i)&&M.string(i.title)&&M.string(i.command)}e.is=n})(ln||(ln={}));var Te;(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){var a=s;return M.objectLiteral(a)&&M.string(a.newText)&&Y.is(a.range)}e.is=i})(Te||(Te={}));var Mt;(function(e){function t(r,i,s){var a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){var i=r;return i!==void 0&&M.objectLiteral(i)&&M.string(i.label)&&(M.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(M.string(i.description)||i.description===void 0)}e.is=n})(Mt||(Mt={}));var fe;(function(e){function t(n){var r=n;return typeof r=="string"}e.is=t})(fe||(fe={}));var it;(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){var a=s;return Te.is(a)&&(Mt.is(a.annotationId)||fe.is(a.annotationId))}e.is=i})(it||(it={}));var qn;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return M.defined(i)&&Wn.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(qn||(qn={}));var un;(function(e){function t(r,i,s){var 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){var i=r;return i&&i.kind==="create"&&M.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||M.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||M.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||fe.is(i.annotationId))}e.is=n})(un||(un={}));var cn;(function(e){function t(r,i,s,a){var 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){var i=r;return i&&i.kind==="rename"&&M.string(i.oldUri)&&M.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||M.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||M.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||fe.is(i.annotationId))}e.is=n})(cn||(cn={}));var fn;(function(e){function t(r,i,s){var 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){var i=r;return i&&i.kind==="delete"&&M.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||M.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||M.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||fe.is(i.annotationId))}e.is=n})(fn||(fn={}));var Qr;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return M.string(i.kind)?un.is(i)||cn.is(i)||fn.is(i):qn.is(i)}))}e.is=t})(Qr||(Qr={}));var Un=function(){function e(t,n){this.edits=t,this.changeAnnotations=n}return e.prototype.insert=function(t,n,r){var i,s;if(r===void 0?i=Te.insert(t,n):fe.is(r)?(s=r,i=it.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=it.insert(t,n,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,n,r){var i,s;if(r===void 0?i=Te.replace(t,n):fe.is(r)?(s=r,i=it.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=it.replace(t,n,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,n){var r,i;if(n===void 0?r=Te.del(t):fe.is(n)?(i=n,r=it.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=it.del(t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Xa=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,n){var r;if(fe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),Sh=function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Xa(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(qn.is(r)){var i=new Un(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new Un(t.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Wn.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new Un(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new Un(i),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Xa,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Mt.is(n)||fe.is(n)?i=n:r=n;var s,a;if(i===void 0?s=un.create(t,r):(a=fe.is(i)?i:this._changeAnnotations.manage(i),s=un.create(t,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.renameFile=function(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Mt.is(r)||fe.is(r)?s=r:i=r;var a,o;if(s===void 0?a=cn.create(t,n,i):(o=fe.is(s)?s:this._changeAnnotations.manage(s),a=cn.create(t,n,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Mt.is(n)||fe.is(n)?i=n:r=n;var s,a;if(i===void 0?s=fn.create(t,r):(a=fe.is(i)?i:this._changeAnnotations.manage(i),s=fn.create(t,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e}(),Ya;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return M.defined(i)&&M.string(i.uri)}e.is=n})(Ya||(Ya={}));var Za;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return M.defined(i)&&M.string(i.uri)&&M.integer(i.version)}e.is=n})(Za||(Za={}));var Wn;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return M.defined(i)&&M.string(i.uri)&&(i.version===null||M.integer(i.version))}e.is=n})(Wn||(Wn={}));var Ka;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){var i=r;return M.defined(i)&&M.string(i.uri)&&M.string(i.languageId)&&M.integer(i.version)&&M.string(i.text)}e.is=n})(Ka||(Ka={}));var He;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(He||(He={})),function(e){function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t}(He||(He={}));var Xr;(function(e){function t(n){var r=n;return M.objectLiteral(n)&&He.is(r.kind)&&M.string(r.value)}e.is=t})(Xr||(Xr={}));var ve;(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})(ve||(ve={}));var se;(function(e){e.PlainText=1,e.Snippet=2})(se||(se={}));var eo;(function(e){e.Deprecated=1})(eo||(eo={}));var to;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){var i=r;return i&&M.string(i.newText)&&Y.is(i.insert)&&Y.is(i.replace)}e.is=n})(to||(to={}));var no;(function(e){e.asIs=1,e.adjustIndentation=2})(no||(no={}));var Yr;(function(e){function t(n){return{label:n}}e.create=t})(Yr||(Yr={}));var ro;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ro||(ro={}));var zn;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return M.string(i)||M.objectLiteral(i)&&M.string(i.language)&&M.string(i.value)}e.is=n})(zn||(zn={}));var io;(function(e){function t(n){var r=n;return!!r&&M.objectLiteral(r)&&(Xr.is(r.contents)||zn.is(r.contents)||M.typedArray(r.contents,zn.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(io||(io={}));var so;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(so||(so={}));var ao;(function(e){function t(n,r){for(var i=[],s=2;s=0;c--){var h=l[c],d=s.offsetAt(h.range.start),g=s.offsetAt(h.range.end);if(g<=u)o=o.substring(0,d)+h.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");u=d}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,l=s.slice(0,o),u=s.slice(o);i(l,a),i(u,a);for(var c=0,h=0,d=0;c0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Re.create(0,t);for(;rt?i=s:r=s+1}var a=r-1;return Re.create(a,t-n[a])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var 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,p,m){return t.call(g)==="[object Number]"&&p<=g&&g<=m}e.numberRange=o;function l(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=l;function u(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=u;function c(g){return t.call(g)==="[object Function]"}e.func=c;function h(g){return g!==null&&typeof g=="object"}e.objectLiteral=h;function d(g,p){return Array.isArray(g)&&g.every(p)}e.typedArray=d})(M||(M={}));var _o=class gi{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(gi.isIncremental(r)){const i=wo(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),l=Math.max(i.end.line,0);let u=this._lineOffsets;const c=yo(r.text,!1,s);if(l-o===c.length)for(let d=0,g=c.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=c.range.start.line-h.range.start.line;return d===0?c.range.start.character-h.range.start.character:d}),l=0;const u=[];for(const c of o){let h=i.offsetAt(c.range.start);if(hl&&u.push(a.substring(l,h)),c.newText.length&&u.push(c.newText),l=i.offsetAt(c.range.end)}return u.push(a.substr(l)),u.join("")}e.applyEdits=r})(Zr||(Zr={}));function Kr(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Kr(r,t),Kr(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 ec(e){const t=wo(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Q;(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.SchemaResolveError=768]="SchemaResolveError"})(Q||(Q={}));var ei;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[He.Markdown,He.PlainText],commitCharactersSupport:!0}}}}})(ei||(ei={}));function tc(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0];return typeof t[s]<"u"?t[s]:r}),n}function nc(e,t,...n){return tc(t,n)}function hn(e){return nc}var ct=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=hn(),rc={"color-hex":{errorMessage:B("colorHexFormatWarning","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:B("dateTimeFormatWarning","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:B("dateFormatWarning","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:B("timeFormatWarning","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:B("emailFormatWarning","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:B("hostnameFormatWarning","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:B("ipv4FormatWarning","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:B("ipv6FormatWarning","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}},ft=function(){function e(t,n,r){r===void 0&&(r=0),this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),ic=function(e){ct(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="null",i.value=null,i}return t}(ft),Lo=function(e){ct(t,e);function t(n,r,i){var s=e.call(this,n,i)||this;return s.type="boolean",s.value=r,s}return t}(ft),sc=function(e){ct(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(ft),ac=function(e){ct(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(ft),ti=function(e){ct(t,e);function t(n,r,i){var s=e.call(this,n,r,i)||this;return s.type="string",s.value="",s}return t}(ft),oc=function(e){ct(t,e);function t(n,r,i){var s=e.call(this,n,r)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(ft),lc=function(e){ct(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(ft);function be(e){return Ie(e)?e?{}:{not:{}}:e}var So;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(So||(So={}));var uc=function(){function e(t,n){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=n,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||Ao(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),ni=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),xe=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var n=0,r=t;n=e.offset&&t0?V={schema:I,validationResult:q,matchingSchemas:U}:z===0&&(V.matchingSchemas.merge(U),V.validationResult.mergeEnumValues(q))}}return O.length>1&&P&&n.problems.push({location:{offset:i.offset,length:1},message:B("oneOfWarning","Matches multiple schemas when only one must validate.")}),V&&(n.merge(V.validationResult),n.propertiesMatches+=V.validationResult.propertiesMatches,n.propertiesValueMatches+=V.validationResult.propertiesValueMatches,r.merge(V.matchingSchemas)),O.length};Array.isArray(t.anyOf)&&w(t.anyOf,!1),Array.isArray(t.oneOf)&&w(t.oneOf,!0);var y=function(E){var P=new xe,O=r.newSub();ce(i,be(E),P,O),n.merge(P),n.propertiesMatches+=P.propertiesMatches,n.propertiesValueMatches+=P.propertiesValueMatches,r.merge(O)},N=function(E,P,O){var V=be(E),k=new xe,A=r.newSub();ce(i,V,k,A),r.merge(A),k.hasProblems()?O&&y(O):P&&y(P)},L=be(t.if);if(L&&N(L,be(t.then),be(t.else)),Array.isArray(t.enum)){for(var C=ht(i),R=!1,F=0,D=t.enum;F=L&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",L)});var C=y(h.minimum,h.exclusiveMinimum);Le(C)&&pR&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("maximumWarning","Value is above the maximum of {0}.",R)})}function o(c,h,d,g){if(Le(h.minLength)&&c.value.lengthh.maxLength&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("maxLengthWarning","String is longer than the maximum length of {0}.",h.maxLength)}),Yu(h.pattern)){var p=Bn(h.pattern);p?.test(c.value)||d.problems.push({location:{offset:c.offset,length:c.length},message:h.patternErrorMessage||h.errorMessage||B("patternWarning",'String does not match the pattern of "{0}".',h.pattern)})}if(h.format)switch(h.format){case"uri":case"uri-reference":{var m=void 0;if(!c.value)m=B("uriEmpty","URI expected.");else{var v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);v?!v[2]&&h.format==="uri"&&(m=B("uriSchemeMissing","URI with a scheme is expected.")):m=B("uriMissing","URI is expected.")}m&&d.problems.push({location:{offset:c.offset,length:c.length},message:h.patternErrorMessage||h.errorMessage||B("uriFormatWarning","String is not a URI: {0}",m)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":var _=rc[h.format];(!c.value||!_.pattern.exec(c.value))&&d.problems.push({location:{offset:c.offset,length:c.length},message:h.patternErrorMessage||h.errorMessage||_.errorMessage});default:}}function l(c,h,d,g){if(Array.isArray(h.items)){for(var p=h.items,m=0;m=p.length&&d.propertiesValueMatches++}if(c.items.length>p.length)if(typeof h.additionalItems=="object")for(var w=p.length;wh.maxItems&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("maxItemsWarning","Array has too many items. Expected {0} or fewer.",h.maxItems)}),h.uniqueItems===!0){var F=ht(c),D=F.some(function(S,E){return E!==F.lastIndexOf(S)});D&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("uniqueItemsWarning","Array has duplicate items.")})}}function u(c,h,d,g){for(var p=Object.create(null),m=[],v=0,_=c.properties;v<_.length;v++){var x=_[v],b=x.keyNode.value;p[b]=x.valueNode,m.push(b)}if(Array.isArray(h.required))for(var w=0,y=h.required;w=0;)m.splice(di,1),di=m.indexOf(Bo)};if(h.properties)for(var F=0,D=Object.keys(h.properties);F0)for(var z=0,Ae=m;zh.maxProperties&&d.problems.push({location:{offset:c.offset,length:c.length},message:B("MaxPropWarning","Object has more properties than limit of {0}.",h.maxProperties)}),Le(h.minProperties)&&c.properties.length0){for(S--;S>0&&/\s/.test(i.charAt(S));)S--;E=S+1}if(u(L,C,S,E),R&&d(R,!1),F.length+D.length>0)for(var P=s.getToken();P!==17;){if(F.indexOf(P)!==-1){o();break}else if(D.indexOf(P)!==-1)break;P=o()}return R}function h(){switch(s.getTokenError()){case 4:return c(B("InvalidUnicode","Invalid unicode sequence in string."),Q.InvalidUnicode),!0;case 5:return c(B("InvalidEscapeCharacter","Invalid escape character in string."),Q.InvalidEscapeCharacter),!0;case 3:return c(B("UnexpectedEndOfNumber","Unexpected end of number."),Q.UnexpectedEndOfNumber),!0;case 1:return c(B("UnexpectedEndOfComment","Unexpected end of comment."),Q.UnexpectedEndOfComment),!0;case 2:return c(B("UnexpectedEndOfString","Unexpected end of string."),Q.UnexpectedEndOfString),!0;case 6:return c(B("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),Q.InvalidCharacter),!0}return!1}function d(L,C){return L.length=s.getTokenOffset()+s.getTokenLength()-L.offset,C&&o(),L}function g(L){if(s.getToken()===3){var C=new sc(L,s.getTokenOffset());o();for(var R=0,F=!1;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){F||c(B("ValueExpected","Value expected"),Q.ValueExpected);var D=s.getTokenOffset();if(o(),s.getToken()===4){F&&u(B("TrailingComma","Trailing comma"),Q.TrailingComma,D,D+1);continue}}else F&&c(B("ExpectedComma","Expected comma"),Q.CommaExpected);var S=w(C);S?C.items.push(S):c(B("PropertyExpected","Value expected"),Q.ValueExpected,void 0,[],[4,5]),F=!0}return s.getToken()!==4?c(B("ExpectedCloseBracket","Expected comma or closing bracket"),Q.CommaOrCloseBacketExpected,C):d(C,!0)}}var p=new ti(void 0,0,0);function m(L,C){var R=new oc(L,s.getTokenOffset(),p),F=_(R);if(!F)if(s.getToken()===16){c(B("DoubleQuotesExpected","Property keys must be doublequoted"),Q.Undefined);var D=new ti(R,s.getTokenOffset(),s.getTokenLength());D.value=s.getTokenValue(),F=D,o()}else return;R.keyNode=F;var S=C[F.value];if(S?(u(B("DuplicateKeyWarning","Duplicate object key"),Q.DuplicateKey,R.keyNode.offset,R.keyNode.offset+R.keyNode.length,Se.Warning),typeof S=="object"&&u(B("DuplicateKeyWarning","Duplicate object key"),Q.DuplicateKey,S.keyNode.offset,S.keyNode.offset+S.keyNode.length,Se.Warning),C[F.value]=!0):C[F.value]=R,s.getToken()===6)R.colonOffset=s.getTokenOffset(),o();else if(c(B("ColonExpected","Colon expected"),Q.ColonExpected),s.getToken()===10&&e.positionAt(F.offset+F.length).line=0;n--){var r=this.contributions[n].resolveCompletion;if(r){var i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,n,r){var i=this,s={items:[],isIncomplete:!1},a=t.getText(),o=t.offsetAt(n),l=r.getNodeFromOffset(o,!0);if(this.isInComment(t,l?l.offset:0,o))return Promise.resolve(s);if(l&&o===l.offset+l.length&&o>0){var u=a[o-1];(l.type==="object"&&u==="}"||l.type==="array"&&u==="]")&&(l=l.parent)}var c=this.getCurrentWord(t,o),h;if(l&&(l.type==="string"||l.type==="number"||l.type==="boolean"||l.type==="null"))h=Y.create(t.positionAt(l.offset),t.positionAt(l.offset+l.length));else{var d=o-c.length;d>0&&a[d-1]==='"'&&d--,h=Y.create(t.positionAt(d),n)}var g=!1,p={},m={add:function(v){var _=v.label,x=p[_];if(x)x.documentation||(x.documentation=v.documentation),x.detail||(x.detail=v.detail);else{if(_=_.replace(/[\n]/g,"\u21B5"),_.length>60){var b=_.substr(0,57).trim()+"...";p[b]||(_=b)}h&&v.insertText!==void 0&&(v.textEdit=Te.replace(h,v.insertText)),g&&(v.commitCharacters=v.kind===ve.Property?dc:hc),v.label=_,p[_]=v,s.items.push(v)}},setAsIncomplete:function(){s.isIncomplete=!0},error:function(v){console.error(v)},log:function(v){console.log(v)},getNumberOfProposals:function(){return s.items.length}};return this.schemaService.getSchemaForResource(t.uri,r).then(function(v){var _=[],x=!0,b="",w=void 0;if(l&&l.type==="string"){var y=l.parent;y&&y.type==="property"&&y.keyNode===l&&(x=!y.valueNode,w=y,b=a.substr(l.offset+1,l.length-2),y&&(l=y.parent))}if(l&&l.type==="object"){if(l.offset===o)return s;var N=l.properties;N.forEach(function(F){(!w||w!==F)&&(p[F.keyNode.value]=Yr.create("__"))});var L="";x&&(L=i.evaluateSeparatorAfter(t,t.offsetAt(h.end))),v?i.getPropertyCompletions(v,r,l,x,L,m):i.getSchemaLessPropertyCompletions(r,l,b,m);var C=ri(l);i.contributions.forEach(function(F){var D=F.collectPropertyCompletions(t.uri,C,c,x,L==="",m);D&&_.push(D)}),!v&&c.length>0&&a.charAt(o-c.length-1)!=='"'&&(m.add({kind:ve.Property,label:i.getLabelForValue(c),insertText:i.getInsertTextForProperty(c,void 0,!1,L),insertTextFormat:se.Snippet,documentation:""}),m.setAsIncomplete())}var R={};return v?i.getValueCompletions(v,r,l,o,t,m,R):i.getSchemaLessValueCompletions(r,l,o,t,m),i.contributions.length>0&&i.getContributedValueCompletions(r,l,o,t,m,_),i.promiseConstructor.all(_).then(function(){if(m.getNumberOfProposals()===0){var F=o;l&&(l.type==="string"||l.type==="number"||l.type==="boolean"||l.type==="null")&&(F=l.offset+l.length);var D=i.evaluateSeparatorAfter(t,F);i.addFillerValueCompletions(R,D,m)}return s})})},e.prototype.getPropertyCompletions=function(t,n,r,i,s,a){var o=this,l=n.getMatchingSchemas(t.schema,r.offset);l.forEach(function(u){if(u.node===r&&!u.inverted){var c=u.schema.properties;c&&Object.keys(c).forEach(function(m){var v=c[m];if(typeof v=="object"&&!v.deprecationMessage&&!v.doNotSuggest){var _={kind:ve.Property,label:m,insertText:o.getInsertTextForProperty(m,v,i,s),insertTextFormat:se.Snippet,filterText:o.getFilterTextForValue(m),documentation:o.fromMarkup(v.markdownDescription)||v.description||""};v.suggestSortText!==void 0&&(_.sortText=v.suggestSortText),_.insertText&&sn(_.insertText,"$1".concat(s))&&(_.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(_)}});var h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){var d=function(m,v){v===void 0&&(v=void 0);var _={kind:ve.Property,label:m,insertText:o.getInsertTextForProperty(m,void 0,i,s),insertTextFormat:se.Snippet,filterText:o.getFilterTextForValue(m),documentation:v||o.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(_.sortText=h.suggestSortText),_.insertText&&sn(_.insertText,"$1".concat(s))&&(_.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(_)};if(h.enum)for(var g=0;g(n.colonOffset||0)){var c=n.valueNode;if(c&&(r>c.offset+c.length||c.type==="object"||c.type==="array"))return;var h=n.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&u(g.valueNode),!0}),h==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(l,s)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){var d=n.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===d&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(u),!0})}else n.items.forEach(u)},e.prototype.getValueCompletions=function(t,n,r,i,s,a,o){var l=i,u=void 0,c=void 0;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(l=r.offset+r.length,c=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(r.type==="property"&&i>(r.colonOffset||0)){var h=r.valueNode;if(h&&i>h.offset+h.length)return;u=r.keyNode.value,r=r.parent}if(r&&(u!==void 0||r.type==="array")){for(var d=this.evaluateSeparatorAfter(s,l),g=n.getMatchingSchemas(t.schema,r.offset,c),p=0,m=g;p(n.colonOffset||0)){var o=n.keyNode.value,l=n.valueNode;if((!l||r<=l.offset+l.length)&&n.parent){var u=ri(n.parent);this.contributions.forEach(function(c){var h=c.collectValueCompletions(i.uri,u,o,s);h&&a.push(h)})}}},e.prototype.addSchemaValueCompletions=function(t,n,r,i){var s=this;typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(a){return s.addSchemaValueCompletions(a,n,r,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(a){return s.addSchemaValueCompletions(a,n,r,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(a){return s.addSchemaValueCompletions(a,n,r,i)}))},e.prototype.addDefaultValueCompletions=function(t,n,r,i){var s=this;i===void 0&&(i=0);var a=!1;if(ze(t.default)){for(var o=t.type,l=t.default,u=i;u>0;u--)l=[l],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,n),insertTextFormat:se.Snippet,detail:si("json.suggest.default","Default value")}),a=!0}Array.isArray(t.examples)&&t.examples.forEach(function(c){for(var h=t.type,d=c,g=i;g>0;g--)d=[d],h="array";r.add({kind:s.getSuggestionKind(h),label:s.getLabelForValue(d),insertText:s.getInsertTextForValue(d,n),insertTextFormat:se.Snippet}),a=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(c){var h=t.type,d=c.body,g=c.label,p,m;if(ze(d)){for(var v=t.type,_=i;_>0;_--)d=[d],v="array";p=s.getInsertTextForSnippetValue(d,n),m=s.getFilterTextForSnippetValue(d),g=g||s.getLabelForSnippetValue(d)}else if(typeof c.bodyText=="string"){for(var x="",b="",w="",_=i;_>0;_--)x=x+w+`[ `,b=b+` `+w+"]",w+=" ",h="array";p=x+w+c.bodyText.split(` `).join(` `+w)+b+n,g=g||p,m=p.replace(/[\n]/g,"")}else return;r.add({kind:s.getSuggestionKind(h),label:g,documentation:s.fromMarkup(c.markdownDescription)||c.description,insertText:p,insertTextFormat:se.Snippet,filterText:m}),a=!0}),!a&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)},e.prototype.addEnumValueCompletions=function(t,n,r){if(ze(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:se.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,s=t.enum.length;i0?n[0]:void 0}if(!t)return ve.Value;switch(t){case"string":return ve.Value;case"object":return ve.Module;case"property":return ve.Property;default:return ve.Value}},e.prototype.getLabelTextForMatchingNode=function(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:var r=n.getText().substr(t.offset,t.length);return r}},e.prototype.getInsertTextForMatchingNode=function(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,n,r,i){var s=this.getInsertTextForValue(t,"");if(!r)return s;var a=s+": ",o,l=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){var u=n.defaultSnippets[0].body;ze(u)&&(o=this.getInsertTextForSnippetValue(u,""))}l+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),l+=n.enum.length),ze(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),l++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),l+=n.examples.length),l===0){var c=Array.isArray(n.type)?n.type[0]:n.type;switch(c||(n.properties?c="object":n.items&&(c="array")),c){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||l>1)&&(o="$1"),a+o+i},e.prototype.getCurrentWord=function(t,n){for(var r=n-1,i=t.getText();r>=0&&` \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)},e.prototype.evaluateSeparatorAfter=function(t,n){var r=kt(t.getText(),!0);r.setPosition(n);var i=r.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,n,r){for(var i=kt(n.getText(),!0),s=t.items,a=s.length-1;a>=0;a--){var o=s[a];if(r>o.offset+o.length){i.setPosition(o.offset+o.length);var l=i.scan();return l===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a}else if(r>=o.offset)return a}return 0},e.prototype.isInComment=function(t,n,r){var i=kt(t.getText(),!1);i.setPosition(n);for(var s=i.scan();s!==17&&i.getTokenOffset()+i.getTokenLength()s.offset+1&&i=0;h--){var d=this.contributions[h],g=d.getInfoContribution(t.uri,c);if(g)return g.then(function(p){return u(p)})}return this.schemaService.getSchemaForResource(t.uri,r).then(function(p){if(p&&s){var m=r.getMatchingSchemas(p.schema,s.offset),v=void 0,_=void 0,x=void 0,b=void 0;m.every(function(y){if(y.node===s&&!y.inverted&&y.schema&&(v=v||y.schema.title,_=_||y.schema.markdownDescription||ai(y.schema.description),y.schema.enum)){var N=y.schema.enum.indexOf(ht(s));y.schema.markdownEnumDescriptions?x=y.schema.markdownEnumDescriptions[N]:y.schema.enumDescriptions&&(x=ai(y.schema.enumDescriptions[N])),x&&(b=y.schema.enum[N],typeof b!="string"&&(b=JSON.stringify(b)))}return!0});var w="";return v&&(w=ai(v)),_&&(w.length>0&&(w+=` `),w+=_),x&&(w.length>0&&(w+=` `),w+="`".concat(pc(b),"`: ").concat(x)),u([w])}return null})},e}();function ai(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function pc(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var vc=hn(),bc=function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Se.Error)},e.prototype.doValidation=function(t,n,r,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},l=function(d){var g=d.range.start.line+" "+d.range.start.character+" "+d.message;o[g]||(o[g]=!0,a.push(d))},u=function(d){var g=r?.trailingCommas?Hn(r.trailingCommas):Se.Error,p=r?.comments?Hn(r.comments):s.commentSeverity,m=r?.schemaValidation?Hn(r.schemaValidation):Se.Warning,v=r?.schemaRequest?Hn(r.schemaRequest):Se.Warning;if(d){if(d.errors.length&&n.root&&v){var _=n.root,x=_.type==="object"?_.properties[0]:void 0;if(x&&x.keyNode.value==="$schema"){var b=x.valueNode||x,w=Y.create(t.positionAt(b.offset),t.positionAt(b.offset+b.length));l($e.create(w,d.errors[0],v,Q.SchemaResolveError))}else{var w=Y.create(t.positionAt(_.offset),t.positionAt(_.offset+1));l($e.create(w,d.errors[0],v,Q.SchemaResolveError))}}else if(m){var y=n.validate(t,d.schema,m);y&&y.forEach(l)}Co(d.schema)&&(p=void 0),Eo(d.schema)&&(g=void 0)}for(var N=0,L=n.syntaxErrors;N=Gn&&e<=wc?e-Gn+10:0)}function Lc(e){if(e[0]==="#")switch(e.length){case 4:return{red:re(e.charCodeAt(1))*17/255,green:re(e.charCodeAt(2))*17/255,blue:re(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:re(e.charCodeAt(1))*17/255,green:re(e.charCodeAt(2))*17/255,blue:re(e.charCodeAt(3))*17/255,alpha:re(e.charCodeAt(4))*17/255};case 7:return{red:(re(e.charCodeAt(1))*16+re(e.charCodeAt(2)))/255,green:(re(e.charCodeAt(3))*16+re(e.charCodeAt(4)))/255,blue:(re(e.charCodeAt(5))*16+re(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(re(e.charCodeAt(1))*16+re(e.charCodeAt(2)))/255,green:(re(e.charCodeAt(3))*16+re(e.charCodeAt(4)))/255,blue:(re(e.charCodeAt(5))*16+re(e.charCodeAt(6)))/255,alpha:(re(e.charCodeAt(7))*16+re(e.charCodeAt(8)))/255}}}var Sc=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||sn(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var l=[],u=0,c=s.items;u0){a--;var F=an.create(t.uri,st(t,C)),D=L?L+"."+C.keyNode.value:C.keyNode.value;b.push({name:i.getKeyLabel(C),kind:i.getSymbolKind(R.type),location:F,containerName:L}),v.push({node:R,containerName:D})}else x=!0})};_0){a--;var D=st(t,R),S=D,E=String(F),P={name:E,kind:i.getSymbolKind(R.type),range:D,selectionRange:S,children:[]};C.push(P),x.push({result:P.children,node:R})}else w=!0}):L.type==="object"&&L.properties.forEach(function(R){var F=R.valueNode;if(F)if(a>0){a--;var D=st(t,R),S=st(t,R.keyNode),E=[],P={name:i.getKeyLabel(R),kind:i.getSymbolKind(F.type),range:D,selectionRange:S,children:E,detail:i.getDetail(F)};C.push(P),x.push({result:E,node:F})}else w=!0})};b{"use strict";var e={470:r=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,l){for(var u,c="",h=0,d=-1,g=0,p=0;p<=o.length;++p){if(p2){var m=c.lastIndexOf("/");if(m!==c.length-1){m===-1?(c="",h=0):h=(c=c.slice(0,m)).length-1-c.lastIndexOf("/"),d=p,g=0;continue}}else if(c.length===2||c.length===1){c="",h=0,d=p,g=0;continue}}l&&(c.length>0?c+="/..":c="..",h=2)}else c.length>0?c+="/"+o.slice(d+1,p):c=o.slice(d+1,p),h=p-d-1;d=p,g=0}else u===46&&g!==-1?++g:g=-1}return c}var a={resolve:function(){for(var o,l="",u=!1,c=arguments.length-1;c>=-1&&!u;c--){var h;c>=0?h=arguments[c]:(o===void 0&&(o=process.cwd()),h=o),i(h),h.length!==0&&(l=h+"/"+l,u=h.charCodeAt(0)===47)}return l=s(l,!u),u?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(o){if(i(o),o.length===0)return".";var l=o.charCodeAt(0)===47,u=o.charCodeAt(o.length-1)===47;return(o=s(o,!l)).length!==0||l||(o="."),o.length>0&&u&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l0&&(o===void 0?o=u:o+="/"+u)}return o===void 0?".":a.normalize(o)},relative:function(o,l){if(i(o),i(l),o===l||(o=a.resolve(o))===(l=a.resolve(l)))return"";for(var u=1;up){if(l.charCodeAt(d+v)===47)return l.slice(d+v+1);if(v===0)return l.slice(d+v)}else h>p&&(o.charCodeAt(u+v)===47?m=v:v===0&&(m=0));break}var _=o.charCodeAt(u+v);if(_!==l.charCodeAt(d+v))break;_===47&&(m=v)}var x="";for(v=u+m+1;v<=c;++v)v!==c&&o.charCodeAt(v)!==47||(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(d+m):(d+=m,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var l=o.charCodeAt(0),u=l===47,c=-1,h=!0,d=o.length-1;d>=1;--d)if((l=o.charCodeAt(d))===47){if(!h){c=d;break}}else h=!1;return c===-1?u?"/":".":u&&c===1?"//":o.slice(0,c)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(o);var u,c=0,h=-1,d=!0;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var g=l.length-1,p=-1;for(u=o.length-1;u>=0;--u){var m=o.charCodeAt(u);if(m===47){if(!d){c=u+1;break}}else p===-1&&(d=!1,p=u+1),g>=0&&(m===l.charCodeAt(g)?--g==-1&&(h=u):(g=-1,h=p))}return c===h?h=p:h===-1&&(h=o.length),o.slice(c,h)}for(u=o.length-1;u>=0;--u)if(o.charCodeAt(u)===47){if(!d){c=u+1;break}}else h===-1&&(d=!1,h=u+1);return h===-1?"":o.slice(c,h)},extname:function(o){i(o);for(var l=-1,u=0,c=-1,h=!0,d=0,g=o.length-1;g>=0;--g){var p=o.charCodeAt(g);if(p!==47)c===-1&&(h=!1,c=g+1),p===46?l===-1?l=g:d!==1&&(d=1):l!==-1&&(d=-1);else if(!h){u=g+1;break}}return l===-1||c===-1||d===0||d===1&&l===c-1&&l===u+1?"":o.slice(l,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(l,u){var c=u.dir||u.root,h=u.base||(u.name||"")+(u.ext||"");return c?c===u.root?c+h:c+"/"+h:h}(0,o)},parse:function(o){i(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var u,c=o.charCodeAt(0),h=c===47;h?(l.root="/",u=1):u=0;for(var d=-1,g=0,p=-1,m=!0,v=o.length-1,_=0;v>=u;--v)if((c=o.charCodeAt(v))!==47)p===-1&&(m=!1,p=v+1),c===46?d===-1?d=v:_!==1&&(_=1):d!==-1&&(_=-1);else if(!m){g=v+1;break}return d===-1||p===-1||_===0||_===1&&d===p-1&&d===g+1?p!==-1&&(l.base=l.name=g===0&&h?o.slice(1,p):o.slice(g,p)):(g===0&&h?(l.name=o.slice(1,d),l.base=o.slice(1,p)):(l.name=o.slice(g,d),l.base=o.slice(g,p)),l.ext=o.slice(d,p)),g>0?l.dir=o.slice(0,g-1):h&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,r.exports=a},447:(r,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>x,Utils:()=>E}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var l,u,c=(l=function(k,A){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,I){T.__proto__=I}||function(T,I){for(var q in I)Object.prototype.hasOwnProperty.call(I,q)&&(T[q]=I[q])})(k,A)},function(k,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function T(){this.constructor=k}l(k,A),k.prototype=A===null?Object.create(A):(T.prototype=A.prototype,new T)}),h=/^\w[\w\d+.-]*$/,d=/^\//,g=/^\/\//;function p(k,A){if(!k.scheme&&A)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(k.authority,'", path: "').concat(k.path,'", query: "').concat(k.query,'", fragment: "').concat(k.fragment,'"}'));if(k.scheme&&!h.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!d.test(k.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(g.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var m="",v="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,x=function(){function k(A,T,I,q,U,z){z===void 0&&(z=!1),typeof A=="object"?(this.scheme=A.scheme||m,this.authority=A.authority||m,this.path=A.path||m,this.query=A.query||m,this.fragment=A.fragment||m):(this.scheme=function(Ae,ie){return Ae||ie?Ae:"file"}(A,z),this.authority=T||m,this.path=function(Ae,ie){switch(Ae){case"https":case"http":case"file":ie?ie[0]!==v&&(ie=v+ie):ie=v}return ie}(this.scheme,I||m),this.query=q||m,this.fragment=U||m,p(this,z))}return k.isUri=function(A){return A instanceof k||!!A&&typeof A.authority=="string"&&typeof A.fragment=="string"&&typeof A.path=="string"&&typeof A.query=="string"&&typeof A.scheme=="string"&&typeof A.fsPath=="string"&&typeof A.with=="function"&&typeof A.toString=="function"},Object.defineProperty(k.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),k.prototype.with=function(A){if(!A)return this;var T=A.scheme,I=A.authority,q=A.path,U=A.query,z=A.fragment;return T===void 0?T=this.scheme:T===null&&(T=m),I===void 0?I=this.authority:I===null&&(I=m),q===void 0?q=this.path:q===null&&(q=m),U===void 0?U=this.query:U===null&&(U=m),z===void 0?z=this.fragment:z===null&&(z=m),T===this.scheme&&I===this.authority&&q===this.path&&U===this.query&&z===this.fragment?this:new w(T,I,q,U,z)},k.parse=function(A,T){T===void 0&&(T=!1);var I=_.exec(A);return I?new w(I[2]||m,S(I[4]||m),S(I[5]||m),S(I[7]||m),S(I[9]||m),T):new w(m,m,m,m,m)},k.file=function(A){var T=m;if(a&&(A=A.replace(/\\/g,v)),A[0]===v&&A[1]===v){var I=A.indexOf(v,2);I===-1?(T=A.substring(2),A=v):(T=A.substring(2,I),A=A.substring(I)||v)}return new w("file",T,A,m,m)},k.from=function(A){var T=new w(A.scheme,A.authority,A.path,A.query,A.fragment);return p(T,!0),T},k.prototype.toString=function(A){return A===void 0&&(A=!1),R(this,A)},k.prototype.toJSON=function(){return this},k.revive=function(A){if(A){if(A instanceof k)return A;var T=new w(A);return T._formatted=A.external,T._fsPath=A._sep===b?A.fsPath:null,T}return A},k}(),b=a?1:void 0,w=function(k){function A(){var T=k!==null&&k.apply(this,arguments)||this;return T._formatted=null,T._fsPath=null,T}return c(A,k),Object.defineProperty(A.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),A.prototype.toString=function(T){return T===void 0&&(T=!1),T?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)},A.prototype.toJSON=function(){var T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=b),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},A}(x),y=((u={})[58]="%3A",u[47]="%2F",u[63]="%3F",u[35]="%23",u[91]="%5B",u[93]="%5D",u[64]="%40",u[33]="%21",u[36]="%24",u[38]="%26",u[39]="%27",u[40]="%28",u[41]="%29",u[42]="%2A",u[43]="%2B",u[44]="%2C",u[59]="%3B",u[61]="%3D",u[32]="%20",u);function N(k,A){for(var T=void 0,I=-1,q=0;q=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||A&&U===47)I!==-1&&(T+=encodeURIComponent(k.substring(I,q)),I=-1),T!==void 0&&(T+=k.charAt(q));else{T===void 0&&(T=k.substr(0,q));var z=y[U];z!==void 0?(I!==-1&&(T+=encodeURIComponent(k.substring(I,q)),I=-1),T+=z):I===-1&&(I=q)}}return I!==-1&&(T+=encodeURIComponent(k.substring(I))),T!==void 0?T:k}function L(k){for(var A=void 0,T=0;T1&&k.scheme==="file"?"//".concat(k.authority).concat(k.path):k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?A?k.path.substr(1):k.path[1].toLowerCase()+k.path.substr(2):k.path,a&&(T=T.replace(/\//g,"\\")),T}function R(k,A){var T=A?L:N,I="",q=k.scheme,U=k.authority,z=k.path,Ae=k.query,ie=k.fragment;if(q&&(I+=q,I+=":"),(U||q==="file")&&(I+=v,I+=v),U){var _e=U.indexOf("@");if(_e!==-1){var ot=U.substr(0,_e);U=U.substr(_e+1),(_e=ot.indexOf(":"))===-1?I+=T(ot,!1):(I+=T(ot.substr(0,_e),!1),I+=":",I+=T(ot.substr(_e+1),!1)),I+="@"}(_e=(U=U.toLowerCase()).indexOf(":"))===-1?I+=T(U,!1):(I+=T(U.substr(0,_e),!1),I+=U.substr(_e))}if(z){if(z.length>=3&&z.charCodeAt(0)===47&&z.charCodeAt(2)===58)(Ve=z.charCodeAt(1))>=65&&Ve<=90&&(z="/".concat(String.fromCharCode(Ve+32),":").concat(z.substr(3)));else if(z.length>=2&&z.charCodeAt(1)===58){var Ve;(Ve=z.charCodeAt(0))>=65&&Ve<=90&&(z="".concat(String.fromCharCode(Ve+32),":").concat(z.substr(2)))}I+=T(z,!0)}return Ae&&(I+="?",I+=T(Ae,!1)),ie&&(I+="#",I+=A?ie:N(ie,!1)),I}function F(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+F(k.substr(3)):k}}var D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(k){return k.match(D)?k.replace(D,function(A){return F(A)}):k}var E,P=s(470),O=function(k,A,T){if(T||arguments.length===2)for(var I,q=0,U=A.length;q{for(var s in i)n.o(i,s)&&!n.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();var{URI:Tt,Utils:Ah}=Ro;function Nc(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var n=String(e),r="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",l,u=0,c=n.length;u1&&(h==="/"||h===void 0||h==="{"||h===",")&&(g==="/"||g===void 0||g===","||g==="}");p?(g==="/"?u++:h==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=l}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var Oe=hn(),Cc="!",Ec="/",kc=function(){function e(t,n){this.globWrappers=[];try{for(var r=0,i=t;r0&&(s[0]===Ec&&(s=s.substring(1)),this.globWrappers.push({regexp:Nc("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var n=!1,r=0,i=this.globWrappers;r0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this;this.cachedSchemaForResource=void 0;var r=!1;t=at(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(u){return n.schemasById[u]});i.length;)for(var a=i.pop(),o=0;o1&&(i=s[1]),sn(i,".")&&(i=i.substr(0,i.length-1)),new dn({},[Oe("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Xn(t),i)])})},e.prototype.resolveSchemaContent=function(t,n){var r=this,i=t.errors.slice(0),s=t.schema;if(s.$schema){var a=at(s.$schema);if(a==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new To({},[Oe("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));a==="https://json-schema.org/draft/2019-09/schema"?i.push(Oe("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported.")):a==="https://json-schema.org/draft/2020-12/schema"&&i.push(Oe("json.schema.draft202012.notsupported","Draft 2020-12 schemas are not yet fully supported."))}var o=this.contextService,l=function(m,v){v=decodeURIComponent(v);var _=m;return v[0]==="/"&&(v=v.substring(1)),v.split("/").some(function(x){return x=x.replace(/~1/g,"/").replace(/~0/g,"~"),_=_[x],!_}),_},u=function(m,v,_){return v.anchors||(v.anchors=p(m)),v.anchors.get(_)},c=function(m,v){for(var _ in v)v.hasOwnProperty(_)&&!m.hasOwnProperty(_)&&_!=="id"&&_!=="$id"&&(m[_]=v[_])},h=function(m,v,_,x){var b;x===void 0||x.length===0?b=v:x.charAt(0)==="/"?b=l(v,x):b=u(v,_,x),b?c(m,b):i.push(Oe("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",x,_.uri))},d=function(m,v,_,x){o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(v)&&(v=o.resolveRelativePath(v,x.uri)),v=at(v);var b=r.getOrAddSchemaHandle(v);return b.getUnresolvedSchema().then(function(w){if(x.dependencies.add(v),w.errors.length){var y=_?v+"#"+_:v;i.push(Oe("json.schema.problemloadingref","Problems loading reference '{0}': {1}",y,w.errors[0]))}return h(m,w.schema,b,_),g(m,w.schema,b)})},g=function(m,v,_){var x=[];return r.traverseNodes(m,function(b){for(var w=new Set;b.$ref;){var y=b.$ref,N=y.split("#",2);if(delete b.$ref,N[0].length>0){x.push(d(b,N[0],N[1],_));return}else if(!w.has(y)){var L=N[1];h(b,v,_,L),w.add(y)}}}),r.promise.all(x)},p=function(m){var v=new Map;return r.traverseNodes(m,function(_){var x=_.$id||_.id;if(typeof x=="string"&&x.charAt(0)==="#"){var b=x.substring(1);v.has(b)?i.push(Oe("json.schema.duplicateid","Duplicate id declaration: '{0}'",x)):v.set(b,_)}}),v};return g(s,s,n).then(function(m){return new To(s,i)})},e.prototype.traverseNodes=function(t,n){if(!t||typeof t!="object")return Promise.resolve(null);for(var r=new Set,i=function(){for(var u=[],c=0;c0?this.createCombinedSchema(t,s).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:a},a},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(function(s){return{$ref:s}})};return this.addSchemaHandle(r,i)},e.prototype.getMatchingSchemas=function(t,n,r){if(r){var i=r.id||"schemaservice://untitled/matchingSchemas/"+Tc++,s=this.addSchemaHandle(i,r);return s.getResolvedSchema().then(function(a){return n.getMatchingSchemas(a.schema).filter(function(o){return!o.inverted})})}return this.getSchemaForResource(t.uri,n).then(function(a){return a?n.getMatchingSchemas(a.schema).filter(function(o){return!o.inverted}):[]})},e}(),Tc=0;function at(e){try{return Tt.parse(e).toString(!0)}catch{return e}}function Fc(e){try{return Tt.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Xn(e){try{var t=Tt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function Pc(e,t){var n=[],r=[],i=[],s=-1,a=kt(e.getText(),!1),o=a.scan();function l(F){n.push(F),r.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{var u=e.positionAt(a.getTokenOffset()).line,c={startLine:u,endLine:u,kind:o===1?"object":"array"};i.push(c);break}case 2:case 4:{var h=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===h){var c=i.pop(),d=e.positionAt(a.getTokenOffset()).line;c&&d>c.startLine+1&&s!==c.startLine&&(c.endLine=d-1,l(c),s=c.startLine)}break}case 13:{var u=e.positionAt(a.getTokenOffset()).line,g=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&u+1=0&&i[v].kind!==on.Region;)v--;if(v>=0){var c=i[v];i.length=v,d>c.startLine&&s!==c.startLine&&(c.endLine=d,l(c),s=c.startLine)}}}break}}o=a.scan()}var _=t&&t.rangeLimit;if(typeof _!="number"||n.length<=_)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var x=[],b=0,w=r;b_){L=v;break}N+=C}}for(var R=[],v=0;v=h&&l<=d&&c.push(i(h,d)),c.push(i(u.offset,u.offset+u.length));break;case"number":case"boolean":case"null":case"property":c.push(i(u.offset,u.offset+u.length));break}if(u.type==="property"||u.parent&&u.parent.type==="array"){var g=a(u.offset+u.length,5);g!==-1&&c.push(i(u.offset,g))}u=u.parent}for(var p=void 0,m=c.length-1;m>=0;m--)p=$n.create(c[m],p);return p||(p=$n.create(Y.create(o,o))),p}function i(o,l){return Y.create(e.positionAt(o),e.positionAt(l))}var s=kt(e.getText(),!0);function a(o,l){s.setPosition(o);var u=s.scan();return u===l?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function Dc(e,t){var n=[];return t.visit(function(r){var i;if(r.type==="property"&&r.keyNode.value==="$ref"&&((i=r.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=r.valueNode.value,a=Vc(t,s);if(a){var o=e.positionAt(a.offset);n.push({target:"".concat(e.uri,"#").concat(o.line+1,",").concat(o.character+1),range:Oc(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Oc(e,t){return Y.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Vc(e,t){var n=Bc(t);return n?ui(n,e.root):null}function ui(e,t){if(!t)return null;if(e.length===0)return t;var n=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(a){return a.keyNode.value===n});return r?ui(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(n),s=t.items[i];return s?ui(e,s):null}return null}function Bc(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(jc)}function jc(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qc(e){var t=e.promiseConstructor||Promise,n=new Rc(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(oi);var r=new gc(n,e.contributions,t,e.clientCapabilities),i=new mc(n,e.contributions,t),s=new Sc(n),a=new bc(n,t);return{configure:function(o){n.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(l){n.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),a.configure(o)},resetSchema:function(o){return n.onResourceChange(o)},doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:function(o){return fc(o,{collectComments:!0})},newJSONDocument:function(o,l){return cc(o,l)},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:Pc,getSelectionRanges:Ic,findDefinition:function(){return Promise.resolve([])},findLinks:Dc,format:function(o,l,u){var c=void 0;if(l){var h=o.offsetAt(l.start),d=o.offsetAt(l.end)-h;c={offset:h,length:d}}var g={tabSize:u?u.tabSize:4,insertSpaces:u?.insertSpaces===!0,insertFinalNewline:u?.insertFinalNewline===!0,eol:` `};return Xu(o.getText(),c,g).map(function(p){return Te.replace(Y.create(o.positionAt(p.offset),o.positionAt(p.offset+p.length)),p.content)})}}}var Fo;typeof fetch<"u"&&(Fo=function(e){return fetch(e).then(t=>t.text())});var Uc=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=qc({workspaceContext:{resolveRelativePath:(n,r)=>{const i=r.substr(0,r.lastIndexOf("/")+1);return $c(i,n)}},schemaRequestService:t.enableSchemaRequest?Fo:void 0,clientCapabilities:ei.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let n=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,n,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.format(r,t,n);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(i)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return Zr.create(e,this._languageId,n.version,n.getValue());return null}},Wc=47,ci=46;function zc(e){return e.charCodeAt(0)===Wc}function $c(e,t){if(zc(t)){const n=Tt.parse(e),r=t.split("/");return n.with({path:Po(r)}).toString()}return Hc(e,t)}function Po(e){const t=[];for(const r of e)r.length===0||r.length===1&&r.charCodeAt(0)===ci||(r.length===2&&r.charCodeAt(0)===ci&&r.charCodeAt(1)===ci?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 Hc(e,...t){const n=Tt.parse(e),r=n.path.split("/");for(let i of t)r.push(...i.split("/"));return n.with({path:Po(r)}).toString()}self.onmessage=()=>{Ba((e,t)=>new Uc(e,t))}})();