(function(){"use strict";class Hi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(r=>{r(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Bi=new Hi;function Yi(e){zi(e)||Bi.onUnexpectedError(e)}function Ur(e){if(e instanceof Error){let{name:t,message:r}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:n}}return e}const Or="Canceled";function zi(e){return e instanceof Error&&e.name===Or&&e.message===Or}var Ot;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return p||r}e.from=s;function a(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=a;function o(p){return p[Symbol.iterator]().next().value}e.first=o;function u(p,d){for(const _ of p)if(d(_))return!0;return!1}e.some=u;function l(p,d){for(const _ of p)if(d(_))return _}e.find=l;function*c(p,d){for(const _ of p)d(_)&&(yield _)}e.filter=c;function*f(p,d){let _=0;for(const L of p)yield d(L,_++)}e.map=f;function*h(...p){for(const d of p)for(const _ of d)yield _}e.concat=h;function*g(p){for(const d of p)for(const _ of d)yield _}e.concatNested=g;function m(p,d,_){let L=_;for(const S of p)L=d(L,S);return L}e.reduce=m;function*v(p,d,_=p.length){for(d<0&&(d+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);d<_;d++)yield p[d]}e.slice=v;function b(p,d=Number.POSITIVE_INFINITY){const _=[];if(d===0)return[_,p];const L=p[Symbol.iterator]();for(let S=0;SL===S){const L=p[Symbol.iterator](),S=d[Symbol.iterator]();for(;;){const A=L.next(),w=S.next();if(A.done!==w.done)return!1;if(A.done)return!0;if(!_(A.value,w.value))return!1}}e.equals=N})(Ot||(Ot={}));function Gi(e){}function Za(e){return e}class Ji extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}}function Vr(e){if(Ot.is(e)){let t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new Ji(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Qi(...e){return e.forEach(Gi),Xi(()=>Vr(e))}function Xi(e){return{dispose:()=>{e()}}}class rt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Vr(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?rt.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}}rt.DISABLE_DISPOSED_WARNING=!1;class $r{constructor(){this._store=new rt}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}$r.None=Object.freeze({dispose(){}});var Vt;const yt="en";let $t=!1,Wt=!1,qt=!1,St,Ht=yt,Zi,De;const ee=typeof self=="object"?self:typeof global=="object"?global:{};let G;typeof ee.vscode<"u"&&typeof ee.vscode.process<"u"?G=ee.vscode.process:typeof process<"u"&&(G=process);const Wr=typeof((Vt=G==null?void 0:G.versions)===null||Vt===void 0?void 0:Vt.electron)=="string"&&G.type==="renderer",Ki=Wr&&(G==null?void 0:G.sandboxed);if((()=>{if(Ki)return"bypassHeatCheck";const e=G==null?void 0:G.env.VSCODE_BROWSER_CODE_LOADING;if(typeof e=="string")return e==="none"||e==="code"||e==="bypassHeatCheck"||e==="bypassHeatCheckAndEagerCompile"?e:"bypassHeatCheck"})(),typeof navigator=="object"&&!Wr)De=navigator.userAgent,$t=De.indexOf("Windows")>=0,Wt=De.indexOf("Macintosh")>=0,(De.indexOf("Macintosh")>=0||De.indexOf("iPad")>=0||De.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,qt=De.indexOf("Linux")>=0,St=navigator.language,Ht=St;else if(typeof G=="object"){$t=G.platform==="win32",Wt=G.platform==="darwin",qt=G.platform==="linux",qt&&G.env.SNAP&&G.env.SNAP_REVISION,St=yt,Ht=yt;const e=G.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];St=t.locale,Ht=r||yt,Zi=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const nt=$t,es=Wt,qr=function(){if(ee.setImmediate)return ee.setImmediate.bind(ee);if(typeof ee.postMessage=="function"&&!ee.importScripts){let r=[];ee.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=r.length;s{const s=++n;r.push({id:s,callback:i}),ee.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(G==null?void 0:G.nextTick)=="function")return G.nextTick.bind(G);const t=Promise.resolve();return r=>t.then(r)}();function ts(e){let t=[],r=Object.getPrototypeOf(e);for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t}function Bt(e){const t=[];for(const r of ts(e))typeof e[r]=="function"&&t.push(r);return t}function Hr(e,t){const r=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)};let n={};for(const i of e)n[i]=r(i);return n}const rs="$initialize";class ns{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,r){let n=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[n]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:n,method:t,args:r})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let s=t;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let r=t,n=r.req;this._handler.handleMessage(r.method,r.args).then(s=>{this._send({vsWorker:this._workerId,seq:n,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=Ur(s.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:Ur(s)})})}_send(t){let r=[];if(t.req){const n=t;for(let i=0;i{t(n,i)},handleMessage:(n,i)=>this._handleMessage(n,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,r){if(t===rs)return this.initialize(r[0],r[1],r[2],r[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,r))}catch(n){return Promise.reject(n)}}initialize(t,r,n,i){this._protocol.setWorkerId(t);const a=Hr(i,(o,u)=>this._protocol.sendMessage(o,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Bt(this._requestHandler))):(r&&(typeof r.baseUrl<"u"&&delete r.baseUrl,typeof r.paths<"u"&&typeof r.paths.vs<"u"&&delete r.paths.vs,typeof r.trustedTypesPolicy!==void 0&&delete r.trustedTypesPolicy,r.catchError=!0,self.require.config(r)),new Promise((o,u)=>{self.require([n],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){u(new Error("No RequestHandler!"));return}o(Bt(this._requestHandler))},u)}))}}class Le{constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function ss(e){return e.split(/\r\n|\r|\n/)}function as(e){for(let t=0,r=e.length;t=0;r--){const n=e.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}function Br(e,t){return(t<<5)-t+e|0}function us(e,t){t=Br(149417,t);for(let r=0,n=e.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new Le(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,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),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 Ce{constructor(t,r,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,s,a]=Ce._getElements(t),[o,u,l]=Ce._getElements(r);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Ce._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,s=r.length;i=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(qe.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new Le(t,0,n,i-n+1)]):t<=r?(qe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Le(t,r-t+1,n,0)]):(qe.Assert(t===r+1,"originalStart should only be one more than originalEnd"),qe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,r,n,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,n,c,s);let h=[];return s[0]?h=[new Le(l+1,r-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,r,c+1,i,s),this.ConcatenateChanges(f,h)}return[new Le(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,s,a,o,u,l,c,f,h,g,m,v,b,N,p){let d=null,_=null,L=new zr,S=r,A=n,w=g[0]-b[0]-i,y=-1073741824,T=this.m_forwardHistory.length-1;do{const P=w+t;P===S||P=0&&(l=this.m_forwardHistory[T],t=l[0],S=1,A=l.length-1)}while(--T>=-1);if(d=L.getReverseChanges(),p[0]){let P=g[0]+1,k=b[0]+1;if(d!==null&&d.length>0){const F=d[d.length-1];P=Math.max(P,F.getOriginalEnd()),k=Math.max(k,F.getModifiedEnd())}_=[new Le(P,h-P+1,k,v-k+1)]}else{L=new zr,S=a,A=o,w=g[0]-b[0]-u,y=1073741824,T=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const P=w+s;P===S||P=c[P+1]?(f=c[P+1]-1,m=f-w-u,f>y&&L.MarkNextChange(),y=f+1,L.AddOriginalElement(f+1,m+1),w=P+1-s):(f=c[P-1],m=f-w-u,f>y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m+1),w=P-1-s),T>=0&&(c=this.m_reverseHistory[T],s=c[0],S=1,A=c.length-1)}while(--T>=-1);_=L.getChanges()}return this.ConcatenateChanges(d,_)}ComputeRecursionPoint(t,r,n,i,s,a,o){let u=0,l=0,c=0,f=0,h=0,g=0;t--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=r-t+(i-n),v=m+1,b=new Int32Array(v),N=new Int32Array(v),p=i-n,d=r-t,_=t-n,L=r-i,A=(d-p)%2===0;b[p]=t,N[d]=r,o[0]=!1;for(let w=1;w<=m/2+1;w++){let y=0,T=0;c=this.ClipDiagonalBound(p-w,w,p,v),f=this.ClipDiagonalBound(p+w,w,p,v);for(let k=c;k<=f;k+=2){k===c||ky+T&&(y=u,T=l),!A&&Math.abs(k-d)<=w-1&&u>=N[k])return s[0]=u,a[0]=l,F<=N[k]&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):null}const P=(y-t+(T-n)-w)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(y,P))return o[0]=!0,s[0]=y,a[0]=T,P>0&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):(t++,n++,[new Le(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(d-w,w,d,v),g=this.ClipDiagonalBound(d+w,w,d,v);for(let k=h;k<=g;k+=2){k===h||k=N[k+1]?u=N[k+1]-1:u=N[k-1],l=u-(k-d)-L;const F=u;for(;u>t&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(N[k]=u,A&&Math.abs(k-p)<=w&&u<=b[k])return s[0]=u,a[0]=l,F>=b[k]&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):null}if(w<=1447){let k=new Int32Array(f-c+2);k[0]=p-c+1,He.Copy2(b,c,k,1,f-c+1),this.m_forwardHistory.push(k),k=new Int32Array(g-h+2),k[0]=d-h+1,He.Copy2(N,h,k,1,g-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o)}PrettifyChanges(t){for(let r=0;r0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;r--){const n=t[r];let i=0,s=0;if(r>0){const f=t[r-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let u=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let f=1;;f++){const h=n.originalStart-f,g=n.modifiedStart-f;if(hl&&(l=v,u=f)}n.originalStart-=u,n.modifiedStart-=u;const c=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],c)){t[r-1]=c[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r0&&g>u&&(u=g,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){const s=this._OriginalRegionIsBoundary(t,r)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return s+a}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return He.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],He.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return He.Copy(t,0,i,0,t.length),He.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(qe.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),qe.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(s=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(o=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Le(i,s,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t=cs&&e<=gs||e>=hs&&e<=ds}function _t(e,t,r,n){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l2){const c=i.lastIndexOf(r);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(r)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===xe&&o!==-1?++o:o=-1}return i}function Qr(e,t){if(t===null||typeof t!="object")throw new Jr("pathObject","Object",t);const r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}const ie={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],J(s,"path"),s.length===0)continue}else t.length===0?s=Yt():(s=fs[`=${t}`]||Yt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)U(c)&&(o=1,l=!0);else if(U(c))if(l=!0,U(s.charCodeAt(1))){let f=2,h=f;for(;f2&&U(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(o)}\\${r}`,n=l,l&&t.length>0)break}return r=_t(r,!n,"\\",U),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){J(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return zt(s)?"\\":e;if(U(s))if(i=!0,U(e.charCodeAt(1))){let o=2,u=o;for(;o2&&U(e.charCodeAt(2))&&(i=!0,r=3));let a=r0&&U(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){J(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return U(r)||t>2&&Te(r)&&e.charCodeAt(1)===ke&&U(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&U(r.charCodeAt(0))){++i;const s=r.length;s>1&&U(r.charCodeAt(1))&&(++i,s>2&&(U(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i=2&&(t=`\\${t.slice(i)}`)}return ie.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t)return"";const r=ie.resolve(e),n=ie.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===se;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(u-1)===se;)u--;const l=u-o,c=ac){if(t.charCodeAt(o+h)===se)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(e.charCodeAt(i+h)===se?f=h:h===2&&(f=3)),f===-1&&(f=0)}let g="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===se)&&(g+=g.length===0?"..":"\\..");return o+=f,g.length>0?`${g}${n.slice(o,u)}`:(n.charCodeAt(o)===se&&++o,n.slice(o,u))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ie.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const r=t.charCodeAt(2);if(r!==ms&&r!==xe)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===ke&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){J(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return U(i)?e:".";if(U(i)){if(r=n=1,U(e.charCodeAt(1))){let o=2,u=o;for(;o2&&U(e.charCodeAt(2))?3:2,n=r);let s=-1,a=!0;for(let o=t-1;o>=n;--o)if(U(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===ke&&(r=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>=r;--s){const u=e.charCodeAt(s);if(U(u)){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(U(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ke&&Te(e.charCodeAt(0))&&(t=n=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(U(u)){if(!s){n=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===xe?r===-1?r=o:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:Qr.bind(null,"\\"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return U(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(U(i)){if(n=1,U(e.charCodeAt(1))){let f=2,h=f;for(;f0&&(t.root=e.slice(0,n));let s=-1,a=n,o=-1,u=!0,l=e.length-1,c=0;for(;l>=n;--l){if(i=e.charCodeAt(l),U(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===xe?s===-1?s=l: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!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ae={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Yt();J(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===Z)}return t=_t(t,!r,"/",zt),r?`/${t}`:t.length>0?t:"."},normalize(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Z,r=e.charCodeAt(e.length-1)===Z;return e=_t(e,!t,"/",zt),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return J(e,"path"),e.length>0&&e.charCodeAt(0)===Z},join(...e){if(e.length===0)return".";let t;for(let r=0;r0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":ae.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t||(e=ae.resolve(e),t=ae.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,a=t.length-s,o=io){if(t.charCodeAt(s+l)===Z)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(r+l)===Z?u=l:l===0&&(u=0));let c="";for(l=r+u+1;l<=n;++l)(l===n||e.charCodeAt(l)===Z)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Z;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Z){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===Z){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===Z){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===Z){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:Qr.bind(null,"/"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===Z;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=n;--u){const c=e.charCodeAt(u);if(c===Z){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===xe?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&r?1:s;i===-1||l===0||l===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):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ae.win32=ie.win32=ie,ae.posix=ie.posix=ae,je==="win32"?ie.normalize:ae.normalize,je==="win32"?ie.resolve:ae.resolve,je==="win32"?ie.relative:ae.relative,je==="win32"?ie.dirname:ae.dirname,je==="win32"?ie.basename:ae.basename,je==="win32"?ie.extname:ae.extname,je==="win32"?ie.sep:ae.sep;const ps=/^\w[\w\d+.-]*$/,vs=/^\//,bs=/^\/\//;function Xr(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&&!ps.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!vs.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(bs.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 ys(e,t){return!e&&!t?"file":e}function Ss(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ge&&(t=ge+t):t=ge;break}return t}const Y="",ge="/",_s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Gt=class Ut{constructor(t,r,n,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=ys(t,a),this.authority=r||Y,this.path=Ss(this.scheme,n||Y),this.query=i||Y,this.fragment=s||Y,Xr(this,a))}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}get fsPath(){return Jt(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Y),n===void 0?n=this.authority:n===null&&(n=Y),i===void 0?i=this.path:i===null&&(i=Y),s===void 0?s=this.query:s===null&&(s=Y),a===void 0?a=this.fragment:a===null&&(a=Y),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Ye(r,n,i,s,a)}static parse(t,r=!1){const n=_s.exec(t);return n?new Ye(n[2]||Y,At(n[4]||Y),At(n[5]||Y),At(n[7]||Y),At(n[9]||Y),r):new Ye(Y,Y,Y,Y,Y)}static file(t){let r=Y;if(nt&&(t=t.replace(/\\/g,ge)),t[0]===ge&&t[1]===ge){const n=t.indexOf(ge,2);n===-1?(r=t.substring(2),t=ge):(r=t.substring(2,n),t=t.substring(n)||ge)}return new Ye("file",r,t,Y,Y)}static from(t){const r=new Ye(t.scheme,t.authority,t.path,t.query,t.fragment);return Xr(r,!0),r}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return nt&&t.scheme==="file"?n=Ut.file(ie.join(Jt(t,!0),...r)).path:n=ae.join(t.path,...r),t.with({path:n})}toString(t=!1){return Qt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Ut)return t;{const r=new Ye(t);return r._formatted=t.external,r._fsPath=t._sep===Zr?t.fsPath:null,r}}else return t}};const Zr=nt?1:void 0;class Ye extends Gt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Jt(this,!1)),this._fsPath}toString(t=!1){return t?Qt(this,!0):(this._formatted||(this._formatted=Qt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Zr),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 Kr={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 en(e,t){let r,n=-1;for(let i=0;i=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const a=Kr[s];a!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function As(e){let t;for(let r=0;r1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,nt&&(r=r.replace(/\//g,"\\")),r}function Qt(e,t){const r=t?As:en;let n="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=ge,n+=ge),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.indexOf(":"),l===-1?n+=r(c,!1):(n+=r(c.substr(0,l),!1),n+=":",n+=r(c.substr(l+1),!1)),n+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?n+=r(s,!1):(n+=r(s.substr(0,l),!1),n+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=r(a,!0)}return o&&(n+="?",n+=r(o,!1)),u&&(n+="#",n+=t?u:en(u,!1)),n}function tn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+tn(e.substr(3)):e}}const rn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function At(e){return e.match(rn)?e.replace(rn,t=>tn(t)):e}let ze=class We{constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new We(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return We.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return We.isBefore(this,t)}static isBefore(t,r){return t.lineNumbern||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return K.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return K.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumbert.endLineNumber||r.lineNumber===t.startLineNumber&&r.columnt.endColumn)}containsRange(t){return K.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumbert.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumnt.endColumn)}strictContainsRange(t){return K.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumbert.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return K.plusRange(this,t)}static plusRange(t,r){let n,i,s,a;return r.startLineNumbert.endLineNumber?(s=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(s=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new K(n,i,s,a)}intersectRanges(t){return K.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn,o=r.startLineNumber,u=r.startColumn,l=r.endLineNumber,c=r.endColumn;return nl?(s=l,a=c):s===l&&(a=Math.min(a,c)),n>s||n===s&&i>a?null:new K(n,i,s,a)}equalsRange(t){return K.equalsRange(this,t)}static equalsRange(t,r){return!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return K.getEndPosition(this)}static getEndPosition(t){return new ze(t.endLineNumber,t.endColumn)}getStartPosition(){return K.getStartPosition(this)}static getStartPosition(t){return new ze(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new K(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new K(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return K.collapseToStart(this)}static collapseToStart(t){return new K(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,r=t){return new K(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new K(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,r){return!(t.endLineNumbert.startLineNumber}};const ws=3;function nn(e,t,r,n){return new Ce(e,t,r).ComputeDiff(n)}class sn{constructor(t){const r=[],n=[];for(let i=0,s=t.length;i0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&s()){const g=n.createCharSequence(t,r.originalStart,r.originalStart+r.originalLength-1),m=i.createCharSequence(t,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let v=nn(g,m,s,!0).changes;o&&(v=Ls(v)),h=[];for(let b=0,N=v.length;b1&&v>1;){const b=h.charCodeAt(m-2),N=g.charCodeAt(v-2);if(b!==N)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,v)}{let m=Zt(h,1),v=Zt(g,1);const b=h.length+1,N=g.length+1;for(;m!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function Je(e){return e<0?0:e>4294967295?4294967295:e|0}class xs{constructor(t,r){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=r}}class ks{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,r){t=Je(t);const n=this.values,i=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+s),this.values.set(r,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,r){return t=Je(t),r=Je(r),this.values[t]===r?!1:(this.values[t]=r,t-1=n.length)return!1;let s=n.length-t;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),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=Je(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,s=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,s=this.prefixSum[i],a=s-this.values[i],t=s)r=i+1;else break;return new xs(i,t-a)}}class Ts{constructor(t,r,n,i){this._uri=t,this._lines=r,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const r=t.changes;for(const n of r)this._acceptDeleteRange(n.range),this._acceptInsertText(new ze(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,r=this._lines.length,n=new Uint32Array(r);for(let i=0;i/?";function Es(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const r of Ps)e.indexOf(r)>=0||(t+="\\"+r);return t+="\\s]+)",new RegExp(t,"g")}const Ms=Es();function Is(e){let t=Ms;if(e&&e instanceof RegExp)if(e.global)t=e;else{let r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),t=new RegExp(e.source,r)}return t.lastIndex=0,t}const Fs={maxLen:1e3,windowSize:15,timeBudget:150};function un(e,t,r,n,i=Fs){if(r.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:n+=l,r=r.substring(l,e+i.maxLen/2),un(e,t,r,n,i)}const s=Date.now(),a=e-1-n;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const f=Rs(t,r,a,o);if(!f&&u||(u=f,c<=0))break;o=c}if(u){let l={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Rs(e,t,r,n){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=r&&e.lastIndex>=r)return i;if(n>0&&s>n)return null}return null}class Kt{constructor(t){let r=on(t);this._defaultValue=r,this._asciiMap=Kt._createAsciiMap(r),this._map=new Map}static _createAsciiMap(t){let r=new Uint8Array(256);for(let n=0;n<256;n++)r[n]=t;return r}set(t,r){let n=on(r);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Ds{constructor(t,r,n){const i=new Uint8Array(t*r);for(let s=0,a=t*r;sr&&(r=u),o>n&&(n=o),l>n&&(n=l)}r++,n++;let i=new Ds(n,r,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,r)}}let er=null;function Us(){return er===null&&(er=new js([[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]])),er}let at=null;function Os(){if(at===null){at=new Kt(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let r=0;ri);if(i>0){const o=r.charCodeAt(i-1),u=r.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:r.substring(i,a+1)}}static computeLinks(t,r=Us()){const n=Os();let i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,f=0,h=1,g=!1,m=!1,v=!1,b=!1;for(;l=0?(i+=n?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}tr.INSTANCE=new tr;class H{constructor(t){this.element=t,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class ln{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!==H.Undefined;){const r=t.next;t.prev=H.Undefined,t.next=H.Undefined,t=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){const n=new H(t);if(this._first===H.Undefined)this._first=n,this._last=n;else if(r){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==H.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==H.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==H.Undefined&&t.next!==H.Undefined){const r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===H.Undefined&&t.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):t.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):t.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==H.Undefined;)yield t.element,t=t.next}}const $s=ee.performance&&typeof ee.performance.now=="function";class Nt{constructor(t){this._highResolution=$s&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Nt(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.performance.now():Date.now()}}var rr;(function(e){e.None=()=>$r.None;function t(p){return(d,_=null,L)=>{let S=!1,A;return A=p(w=>{if(!S)return A?A.dispose():S=!0,d.call(_,w)},null,L),S&&A.dispose(),A}}e.once=t;function r(p,d){return u((_,L=null,S)=>p(A=>_.call(L,d(A)),null,S))}e.map=r;function n(p,d){return u((_,L=null,S)=>p(A=>{d(A),_.call(L,A)},null,S))}e.forEach=n;function i(p,d){return u((_,L=null,S)=>p(A=>d(A)&&_.call(L,A),null,S))}e.filter=i;function s(p){return p}e.signal=s;function a(...p){return(d,_=null,L)=>Qi(...p.map(S=>S(A=>d.call(_,A),null,L)))}e.any=a;function o(p,d,_){let L=_;return r(p,S=>(L=d(L,S),L))}e.reduce=o;function u(p){let d;const _=new ye({onFirstListenerAdd(){d=p(_.fire,_)},onLastListenerRemove(){d.dispose()}});return _.event}function l(p,d,_=100,L=!1,S){let A,w,y,T=0;const P=new ye({leakWarningThreshold:S,onFirstListenerAdd(){A=p(k=>{T++,w=d(w,k),L&&!y&&(P.fire(w),w=void 0),clearTimeout(y),y=setTimeout(()=>{const F=w;w=void 0,y=void 0,(!L||T>1)&&P.fire(F),T=0},_)})},onLastListenerRemove(){A.dispose()}});return P.event}e.debounce=l;function c(p,d=(_,L)=>_===L){let _=!0,L;return i(p,S=>{const A=_||!d(S,L);return _=!1,L=S,A})}e.latch=c;function f(p,d){return[e.filter(p,d),e.filter(p,_=>!d(_))]}e.split=f;function h(p,d=!1,_=[]){let L=_.slice(),S=p(y=>{L?L.push(y):w.fire(y)});const A=()=>{L&&L.forEach(y=>w.fire(y)),L=null},w=new ye({onFirstListenerAdd(){S||(S=p(y=>w.fire(y)))},onFirstListenerDidAdd(){L&&(d?setTimeout(A):A())},onLastListenerRemove(){S&&S.dispose(),S=null}});return w.event}e.buffer=h;class g{constructor(d){this.event=d}map(d){return new g(r(this.event,d))}forEach(d){return new g(n(this.event,d))}filter(d){return new g(i(this.event,d))}reduce(d,_){return new g(o(this.event,d,_))}latch(){return new g(c(this.event))}debounce(d,_=100,L=!1,S){return new g(l(this.event,d,_,L,S))}on(d,_,L){return this.event(d,_,L)}once(d,_,L){return t(this.event)(d,_,L)}}function m(p){return new g(p)}e.chain=m;function v(p,d,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.on(d,L),A=()=>p.removeListener(d,L),w=new ye({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromNodeEventEmitter=v;function b(p,d,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.addEventListener(d,L),A=()=>p.removeEventListener(d,L),w=new ye({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromDOMEventEmitter=b;function N(p){return new Promise(d=>t(p)(d))}e.toPromise=N})(rr||(rr={}));class Lt{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Lt._idPool++}`}start(t){this._stopWatch=new Nt(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Lt._idPool=0;class ye{constructor(t){var r;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Lt(this._options._profName):void 0}get event(){return this._event||(this._event=(t,r,n)=>{var i;this._listeners||(this._listeners=new ln);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(r?[t,r]:t);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,r);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size);let u;return u={dispose:()=>{o&&o(),u.dispose=ye._noop,this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},n instanceof rt?n.add(u):Array.isArray(n)&&n.push(u),u}),this._event}fire(t){var r,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ln);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){Yi(a)}}(n=this._perfMon)===null||n===void 0||n.stop()}}dispose(){var t,r,n,i,s;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(n=this._options)===null||n===void 0?void 0:n.onLastListenerRemove)===null||i===void 0||i.call(n),(s=this._leakageMon)===null||s===void 0||s.dispose())}}ye._noop=function(){};const fn=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var Ct;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof xt?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:rr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:fn})})(Ct||(Ct={}));class xt{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?fn:(this._emitter||(this._emitter=new ye),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Ws{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 xt),this._token}cancel(){this._token?this._token instanceof xt&&this._token.cancel():this._token=Ct.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof xt&&this._token.dispose():this._token=Ct.None}}class nr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,r){this._keyCodeToStr[t]=r,this._strToKeyCode[r.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const ir=new nr,sr=new nr,ar=new nr;(function(){function e(t,r,n=r,i=n){ir.define(t,r),sr.define(t,n),ar.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var cn;(function(e){function t(a){return ir.keyCodeToStr(a)}e.toString=t;function r(a){return ir.strToKeyCode(a)}e.fromString=r;function n(a){return sr.keyCodeToStr(a)}e.toUserSettingsUS=n;function i(a){return ar.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return sr.strToKeyCode(a)||ar.strToKeyCode(a)}e.fromUserSettings=s})(cn||(cn={}));function qs(e,t){const r=(t&65535)<<16>>>0;return(e|r)>>>0}class de extends Ge{constructor(t,r,n,i){super(t,r,n,i),this.selectionStartLineNumber=t,this.selectionStartColumn=r,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return de.selectionsEqual(this,t)}static selectionsEqual(t,r){return t.selectionStartLineNumber===r.selectionStartLineNumber&&t.selectionStartColumn===r.selectionStartColumn&&t.positionLineNumber===r.positionLineNumber&&t.positionColumn===r.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,r){return this.getDirection()===0?new de(this.startLineNumber,this.startColumn,t,r):new de(t,r,this.startLineNumber,this.startColumn)}getPosition(){return new ze(this.positionLineNumber,this.positionColumn)}setStartPosition(t,r){return this.getDirection()===0?new de(t,r,this.endLineNumber,this.endColumn):new de(this.endLineNumber,this.endColumn,t,r)}static fromPositions(t,r=t){return new de(t.lineNumber,t.column,r.lineNumber,r.column)}static liftSelection(t){return new de(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,r){if(t&&!r||!t&&r)return!1;if(!t&&!r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;nthis._lines.length)r=this._lines.length,n=this._lines[r-1].length+1,i=!0;else{let s=this._lines[r-1].length+1;n<1?(n=1,i=!0):n>s&&(n=s,i=!0)}return i?{lineNumber:r,column:n}:t}}class Xe{constructor(t,r){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(r=>t.push(this._models[r])),t}acceptNewModel(t){this._models[t.url]=new Ys(Gt.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,r){if(!this._models[t])return;this._models[t].onEvents(r)}acceptRemovedModel(t){this._models[t]&&delete this._models[t]}computeDiff(t,r,n,i){return Qe(this,void 0,void 0,function*(){const s=this._getModel(t),a=this._getModel(r);if(!s||!a)return null;const o=s.getLinesContent(),u=a.getLinesContent(),c=new Cs(o,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),f=c.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:c.quitEarly,identical:f,changes:c.changes}})}_modelsAreIdentical(t,r){const n=t.getLineCount(),i=r.getLineCount();if(n!==i)return!1;for(let s=1;s<=n;s++){const a=t.getLineContent(s),o=r.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(t,r){return Qe(this,void 0,void 0,function*(){const n=this._getModel(t);if(!n)return r;const i=[];let s;r=r.slice(0).sort((a,o)=>{if(a.range&&o.range)return Ge.compareRangesUsingStarts(a.range,o.range);let u=a.range?0:1,l=o.range?0:1;return u-l});for(let{range:a,text:o,eol:u}of r){if(typeof u=="number"&&(s=u),Ge.isEmpty(a)&&!o)continue;const l=n.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,n.eol),l===o)continue;if(Math.max(o.length,l.length)>Xe._diffLimit){i.push({range:a,text:o});continue}const c=ls(l,o,!1),f=n.offsetAt(Ge.lift(a).getStartPosition());for(const h of c){const g=n.positionAt(f+h.originalStart),m=n.positionAt(f+h.originalStart+h.originalLength),v={text:o.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(v.range)!==v.text&&i.push(v)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Qe(this,void 0,void 0,function*(){let r=this._getModel(t);return r?Vs(r):null})}textualSuggest(t,r,n,i){return Qe(this,void 0,void 0,function*(){const s=new Nt(!0),a=new RegExp(n,i),o=new Set;e:for(let u of t){const l=this._getModel(u);if(l){for(let c of l.words(a))if(!(c===r||!isNaN(Number(c)))&&(o.add(c),o.size>Xe._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(t,r,n,i){return Qe(this,void 0,void 0,function*(){let s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let u=r.startLineNumber;uthis._host.fhr(o,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,r),Promise.resolve(Bt(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,r){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,r))}catch(n){return Promise.reject(n)}}}Xe._diffLimit=1e5,Xe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ee.monaco=Bs());let cr=!1;function qn(e){if(cr)return;cr=!0;const t=new is(r=>{self.postMessage(r)},r=>new Xe(r,e));self.onmessage=r=>{t.onmessage(r.data)}}self.onmessage=e=>{cr||qn(null)};function hr(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",s=0,a=16,o=0,u=0,l=0,c=0,f=0;function h(d,_){for(var L=0,S=0;L=48&&A<=57)S=S*16+A-48;else if(A>=65&&A<=70)S=S*16+A-65+10;else if(A>=97&&A<=102)S=S*16+A-97+10;else break;n++,L++}return L=r){d+=e.substring(_,n),f=2;break}var L=e.charCodeAt(n);if(L===34){d+=e.substring(_,n),n++;break}if(L===92){if(d+=e.substring(_,n),n++,n>=r){f=2;break}var S=e.charCodeAt(n++);switch(S){case 34:d+='"';break;case 92:d+="\\";break;case 47:d+="/";break;case 98:d+="\b";break;case 102:d+="\f";break;case 110:d+=` `;break;case 114:d+="\r";break;case 116:d+=" ";break;case 117:var A=h(4);A>=0?d+=String.fromCharCode(A):f=4;break;default:f=5}_=n;continue}if(L>=0&&L<=31)if(ut(L)){d+=e.substring(_,n),f=2;break}else f=6;n++}return d}function b(){if(i="",f=0,s=n,u=o,c=l,n>=r)return s=r,a=17;var d=e.charCodeAt(n);if(gr(d)){do n++,i+=String.fromCharCode(d),d=e.charCodeAt(n);while(gr(d));return a=15}if(ut(d))return n++,i+=String.fromCharCode(d),d===13&&e.charCodeAt(n)===10&&(n++,i+=` `),o++,l=n,a=14;switch(d){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=v(),a=10;case 47:var _=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&d<=15);return d}return{setPosition:g,getPosition:function(){return n},scan:t?p:b,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return s},getTokenLength:function(){return n-s},getTokenStartLine:function(){return u},getTokenStartCharacter:function(){return s-c},getTokenError:function(){return f}}}function gr(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 ut(e){return e===10||e===13||e===8232||e===8233}function Ze(e){return e>=48&&e<=57}function zs(e,t,r){var n,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!Hn(e,s-1);)s--;for(var u=o;ua)&&e.substring(F,V)!==k&&N.push({offset:F,length:V-F,content:k})}var d=b();if(d!==17){var _=g.getTokenOffset()+s,L=dr(h,n);p(L,s,_)}for(;d!==17;){for(var S=g.getTokenOffset()+g.getTokenLength()+s,A=b(),w="",y=!1;!c&&(A===12||A===13);){var T=g.getTokenOffset()+s;p(" ",S,T),S=g.getTokenOffset()+g.getTokenLength()+s,y=A===12,w=y?v():"",A=b()}if(A===2)d!==1&&(f--,w=v());else if(A===4)d!==3&&(f--,w=v());else{switch(d){case 3:case 1:f++,w=v();break;case 5:case 12:w=v();break;case 13:c?w=v():y||(w=" ");break;case 6:y||(w=" ");break;case 10:if(A===6){y||(w="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?y||(w=" "):A!==5&&A!==17&&(m=!0);break;case 16:m=!0;break}c&&(A===12||A===13)&&(w=v())}A===17&&(w=r.insertFinalNewline?l:"");var P=g.getTokenOffset()+s;p(w,S,P),d=A}return N}function dr(e,t){for(var r="",n=0;n=e.offset&&t0)for(var k=n.getToken();k!==17;){if(T.indexOf(k)!==-1){N();break}else if(P.indexOf(k)!==-1)break;k=N()}}function d(y){var T=n.getTokenValue();return y?f(T):o(T),N(),!0}function _(){switch(n.getToken()){case 11:var y=n.getTokenValue(),T=Number(y);isNaN(T)&&(p(2),T=0),f(T);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return N(),!0}function L(){return n.getToken()!==10?(p(3,[],[2,5]),!1):(d(!1),n.getToken()===6?(h(":"),N(),w()||p(4,[],[2,5])):p(5,[],[2,5]),!0)}function S(){a(),N();for(var y=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===2&&b)break}else y&&p(6,[],[]);L()||p(4,[],[2,5]),y=!0}return u(),n.getToken()!==2?p(7,[2],[]):N(),!0}function A(){l(),N();for(var y=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===4&&b)break}else y&&p(6,[],[]);w()||p(4,[],[4,5]),y=!0}return c(),n.getToken()!==4?p(8,[4],[]):N(),!0}function w(){switch(n.getToken()){case 3:return A();case 1:return S();case 10:return d(!0);default:return _()}}return N(),n.getToken()===17?r.allowEmptyContent?!0:(p(4,[],[]),!1):w()?(n.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Ke=hr,Ks=Qs,ea=Yn,ta=Bn,ra=mr;function na(e,t,r){return zs(e,t,r)}function lt(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 r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r0&&(o.arguments=s),o}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}e.is=r})(ht||(ht={}));var pe;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function r(s,a){return{range:{start:s,end:s},newText:a}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){var a=s;return C.objectLiteral(a)&&C.string(a.newText)&&q.is(a.range)}e.is=i})(pe||(pe={}));var et;(function(e){function t(n,i,s){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function r(n){var i=n;return i!==void 0&&C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}e.is=r})(et||(et={}));var ne;(function(e){function t(r){var n=r;return typeof n=="string"}e.is=t})(ne||(ne={}));var Pe;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}e.del=n;function i(s){var a=s;return pe.is(a)&&(et.is(a.annotationId)||ne.is(a.annotationId))}e.is=i})(Pe||(Pe={}));var Pt;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&Mt.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Pt||(Pt={}));var gt;(function(e){function t(n,i,s){var a={kind:"create",uri:n};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 r(n){var i=n;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(gt||(gt={}));var dt;(function(e){function t(n,i,s,a){var o={kind:"rename",oldUri:n,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 r(n){var i=n;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(dt||(dt={}));var mt;(function(e){function t(n,i,s){var a={kind:"delete",uri:n};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 r(n){var i=n;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(mt||(mt={}));var br;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return C.string(i.kind)?gt.is(i)||dt.is(i)||mt.is(i):Pt.is(i)}))}e.is=t})(br||(br={}));var Et=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var i,s;if(n===void 0?i=pe.insert(t,r):ne.is(n)?(s=n,i=Pe.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.insert(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,r,n){var i,s;if(n===void 0?i=pe.replace(t,r):ne.is(n)?(s=n,i=Pe.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.replace(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,r){var n,i;if(r===void 0?n=pe.del(t):ne.is(r)?(i=r,n=Pe.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Pe.del(t,i)),this.edits.push(n),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}(),ei=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,r){var n;if(ne.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id "+n+" is already in use.");if(r===void 0)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ei(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Pt.is(n)){var i=new Et(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(n){var i=new Et(t.changes[n]);r._textEditChanges[n]=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(Mt.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),n=new Et(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var i=[];this._workspaceEdit.changes[t]=i,n=new Et(i),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ei,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,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;et.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=gt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=gt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.renameFile=function(t,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;et.is(n)||ne.is(n)?s=n:i=n;var a,o;if(s===void 0?a=dt.create(t,r,i):(o=ne.is(s)?s:this._changeAnnotations.manage(s),a=dt.create(t,r,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;et.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=mt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=mt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e})();var ti;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)}e.is=r})(ti||(ti={}));var ri;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}e.is=r})(ri||(ri={}));var Mt;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}e.is=r})(Mt||(Mt={}));var ni;(function(e){function t(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}e.is=r})(ni||(ni={}));var Ne;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(Ne||(Ne={})),function(e){function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t}(Ne||(Ne={}));var yr;(function(e){function t(r){var n=r;return C.objectLiteral(r)&&Ne.is(n.kind)&&C.string(n.value)}e.is=t})(yr||(yr={}));var ce;(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})(ce||(ce={}));var X;(function(e){e.PlainText=1,e.Snippet=2})(X||(X={}));var ii;(function(e){e.Deprecated=1})(ii||(ii={}));var si;(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){var i=n;return i&&C.string(i.newText)&&q.is(i.insert)&&q.is(i.replace)}e.is=r})(si||(si={}));var ai;(function(e){e.asIs=1,e.adjustIndentation=2})(ai||(ai={}));var Sr;(function(e){function t(r){return{label:r}}e.create=t})(Sr||(Sr={}));var oi;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(oi||(oi={}));var It;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var i=n;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}e.is=r})(It||(It={}));var ui;(function(e){function t(r){var n=r;return!!n&&C.objectLiteral(n)&&(yr.is(n.contents)||It.is(n.contents)||C.typedArray(n.contents,It.is))&&(r.range===void 0||q.is(r.range))}e.is=t})(ui||(ui={}));var li;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(li||(li={}));var fi;(function(e){function t(r,n){for(var i=[],s=2;s=0;c--){var f=u[c],h=s.offsetAt(f.range.start),g=s.offsetAt(f.range.end);if(g<=l)o=o.substring(0,h)+f.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=h}return o}e.applyEdits=n;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);for(var c=0,f=0,h=0;c0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return me.create(0,t);for(;nt?i=s:n=s+1}var a=n-1;return me.create(a,t-r[a])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1"u"}e.undefined=n;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,m,v){return t.call(g)==="[object Number]"&&m<=g&&g<=v}e.numberRange=o;function u(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=u;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function c(g){return t.call(g)==="[object Function]"}e.func=c;function f(g){return g!==null&&typeof g=="object"}e.objectLiteral=f;function h(g,m){return Array.isArray(g)&&g.every(m)}e.typedArray=h})(C||(C={}));var wi=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,i=t;nt?i=s:n=s+1}var a=n-1;return{line:a,character:t-r[a]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1u&&l.push(a.substring(u,g)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=n})(_r||(_r={}));function Ar(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Ar(n,t),Ar(i,t);for(var s=0,a=0,o=0;sr.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function aa(e){var t=Li(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var W;(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"})(W||(W={}));var Ci;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ne.Markdown,Ne.PlainText],commitCharactersSupport:!0}}}}})(Ci||(Ci={}));function oa(e,t){var r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var s=i[0];return typeof t[s]<"u"?t[s]:n}),r}function ua(e,t){for(var r=[],n=2;n()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Oe=function(){function e(t,r,n){n===void 0&&(n=0),this.offset=r,this.length=n,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}(),fa=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="null",i.value=null,i}return t}(Oe),xi=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,i)||this;return s.type="boolean",s.value=n,s}return t}(Oe),ca=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Oe),ha=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Oe),wr=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s.type="string",s.value="",s}return t}(Oe),ga=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,n)||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}(Oe),da=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Oe);function oe(e){return Se(e)?e?{}:{not:{}}:e}var ki;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(ki||(ki={}));var ma=function(){function e(t,r){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=r,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||Ti(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Nr=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}(),ue=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 r=0,n=t;r=e.offset&&t0?E={schema:$,validationResult:D,matchingSchemas:O}:B===0&&(E.matchingSchemas.merge(O),E.validationResult.mergeEnumValues(D))}}return z.length>1&&V&&r.problems.push({location:{offset:i.offset,length:1},message:R("oneOfWarning","Matches multiple schemas when only one must validate.")}),E&&(r.merge(E.validationResult),r.propertiesMatches+=E.validationResult.propertiesMatches,r.propertiesValueMatches+=E.validationResult.propertiesValueMatches,n.merge(E.matchingSchemas)),z.length};Array.isArray(t.anyOf)&&_(t.anyOf,!1),Array.isArray(t.oneOf)&&_(t.oneOf,!0);var L=function(F){var V=new ue,z=n.newSub();te(i,oe(F),V,z),r.merge(V),r.propertiesMatches+=V.propertiesMatches,r.propertiesValueMatches+=V.propertiesValueMatches,n.merge(z)},S=function(F,V,z){var E=oe(F),x=new ue,M=n.newSub();te(i,E,x,M),n.merge(M),x.hasProblems()?z&&L(z):V&&L(V)},A=oe(t.if);if(A&&S(A,oe(t.then),oe(t.else)),Array.isArray(t.enum)){for(var w=Ee(i),y=!1,T=0,P=t.enum;T=A&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var w=L(f.minimum,f.exclusiveMinimum);le(w)&&my&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maximumWarning","Value is above the maximum of {0}.",y)})}function o(c,f,h,g){if(le(f.minLength)&&c.value.lengthf.maxLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maxLengthWarning","String is longer than the maximum length of {0}.",f.maxLength)}),ia(f.pattern)){var m=new RegExp(f.pattern);m.test(c.value)||h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||R("patternWarning",'String does not match the pattern of "{0}".',f.pattern)})}if(f.format)switch(f.format){case"uri":case"uri-reference":{var v=void 0;if(!c.value)v=R("uriEmpty","URI expected.");else{var b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);b?!b[2]&&f.format==="uri"&&(v=R("uriSchemeMissing","URI with a scheme is expected.")):v=R("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||R("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var N=la[f.format];(!c.value||!N.pattern.exec(c.value))&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||N.errorMessage})}}function u(c,f,h,g){if(Array.isArray(f.items)){for(var m=f.items,v=0;v=m.length&&h.propertiesValueMatches++}if(c.items.length>m.length)if(typeof f.additionalItems=="object")for(var _=m.length;_f.maxItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maxItemsWarning","Array has too many items. Expected {0} or fewer.",f.maxItems)}),f.uniqueItems===!0){var T=Ee(c),P=T.some(function(k,F){return F!==T.lastIndexOf(k)});P&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("uniqueItemsWarning","Array has duplicate items.")})}}function l(c,f,h,g){for(var m=Object.create(null),v=[],b=0,N=c.properties;b=0;)v.splice(jr,1),jr=v.indexOf(qi)};if(f.properties)for(var T=0,P=Object.keys(f.properties);T0)for(var B=0,re=v;Bf.maxProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("MaxPropWarning","Object has more properties than limit of {0}.",f.maxProperties)}),le(f.minProperties)&&c.properties.length0){for(P--;P>0&&/\s/.test(i.charAt(P));)P--;k=P+1}if(u(S,A,P,k),w&&f(w,!1),y.length+T.length>0)for(var F=s.getToken();F!==17;){if(y.indexOf(F)!==-1){o();break}else if(T.indexOf(F)!==-1)break;F=o()}return w}function c(){switch(s.getTokenError()){case 4:return l(R("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return l(R("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return l(R("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return l(R("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return l(R("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return l(R("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function f(S,A){return S.length=s.getTokenOffset()+s.getTokenLength()-S.offset,A&&o(),S}function h(S){if(s.getToken()===3){var A=new ca(S,s.getTokenOffset());o();for(var w=!1;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){w||l(R("ValueExpected","Value expected"),W.ValueExpected);var y=s.getTokenOffset();if(o(),s.getToken()===4){w&&u(R("TrailingComma","Trailing comma"),W.TrailingComma,y,y+1);continue}}else w&&l(R("ExpectedComma","Expected comma"),W.CommaExpected);var T=d(A);T?A.items.push(T):l(R("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),w=!0}return s.getToken()!==4?l(R("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,A):f(A,!0)}}var g=new wr(void 0,0,0);function m(S,A){var w=new ga(S,s.getTokenOffset(),g),y=b(w);if(!y)if(s.getToken()===16){l(R("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var T=new wr(w,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),y=T,o()}else return;w.keyNode=y;var P=A[y.value];if(P?(u(R("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,fe.Warning),typeof P=="object"&&u(R("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,P.keyNode.offset,P.keyNode.offset+P.keyNode.length,fe.Warning),A[y.value]=!0):A[y.value]=w,s.getToken()===6)w.colonOffset=s.getTokenOffset(),o();else if(l(R("ColonExpected","Colon expected"),W.ColonExpected),s.getToken()===10&&e.positionAt(y.offset+y.length).line0?e.lastIndexOf(t)===r:r===0?e===t:!1}function ya(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}var xr=pt(),Sa=function(){function e(t,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--){var n=this.contributions[r].resolveCompletion;if(n){var i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var i=this,s={items:[],isIncomplete:!1},a=t.getText(),o=t.offsetAt(r),u=n.getNodeFromOffset(o,!0);if(this.isInComment(t,u?u.offset:0,o))return Promise.resolve(s);if(u&&o===u.offset+u.length&&o>0){var l=a[o-1];(u.type==="object"&&l==="}"||u.type==="array"&&l==="]")&&(u=u.parent)}var c=this.getCurrentWord(t,o),f;if(u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null"))f=q.create(t.positionAt(u.offset),t.positionAt(u.offset+u.length));else{var h=o-c.length;h>0&&a[h-1]==='"'&&h--,f=q.create(t.positionAt(h),r)}var g={},m={add:function(v){var b=v.label,N=g[b];if(N)N.documentation||(N.documentation=v.documentation),N.detail||(N.detail=v.detail);else{if(b=b.replace(/[\n]/g,"↵"),b.length>60){var p=b.substr(0,57).trim()+"...";g[p]||(b=p)}f&&v.insertText!==void 0&&(v.textEdit=pe.replace(f,v.insertText)),v.label=b,g[b]=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,n).then(function(v){var b=[],N=!0,p="",d=void 0;if(u&&u.type==="string"){var _=u.parent;_&&_.type==="property"&&_.keyNode===u&&(N=!_.valueNode,d=_,p=a.substr(u.offset+1,u.length-2),_&&(u=_.parent))}if(u&&u.type==="object"){if(u.offset===o)return s;var L=u.properties;L.forEach(function(y){(!d||d!==y)&&(g[y.keyNode.value]=Sr.create("__"))});var S="";N&&(S=i.evaluateSeparatorAfter(t,t.offsetAt(f.end))),v?i.getPropertyCompletions(v,n,u,N,S,m):i.getSchemaLessPropertyCompletions(n,u,p,m);var A=Lr(u);i.contributions.forEach(function(y){var T=y.collectPropertyCompletions(t.uri,A,c,N,S==="",m);T&&b.push(T)}),!v&&c.length>0&&a.charAt(o-c.length-1)!=='"'&&(m.add({kind:ce.Property,label:i.getLabelForValue(c),insertText:i.getInsertTextForProperty(c,void 0,!1,S),insertTextFormat:X.Snippet,documentation:""}),m.setAsIncomplete())}var w={};return v?i.getValueCompletions(v,n,u,o,t,m,w):i.getSchemaLessValueCompletions(n,u,o,t,m),i.contributions.length>0&&i.getContributedValueCompletions(n,u,o,t,m,b),i.promiseConstructor.all(b).then(function(){if(m.getNumberOfProposals()===0){var y=o;u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null")&&(y=u.offset+u.length);var T=i.evaluateSeparatorAfter(t,y);i.addFillerValueCompletions(w,T,m)}return s})})},e.prototype.getPropertyCompletions=function(t,r,n,i,s,a){var o=this,u=r.getMatchingSchemas(t.schema,n.offset);u.forEach(function(l){if(l.node===n&&!l.inverted){var c=l.schema.properties;c&&Object.keys(c).forEach(function(v){var b=c[v];if(typeof b=="object"&&!b.deprecationMessage&&!b.doNotSuggest){var N={kind:ce.Property,label:v,insertText:o.getInsertTextForProperty(v,b,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:o.fromMarkup(b.markdownDescription)||b.description||""};b.suggestSortText!==void 0&&(N.sortText=b.suggestSortText),N.insertText&&vt(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)}});var f=l.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){var h=function(v,b){b===void 0&&(b=void 0);var N={kind:ce.Property,label:v,insertText:o.getInsertTextForProperty(v,void 0,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:b||o.fromMarkup(f.markdownDescription)||f.description||""};f.suggestSortText!==void 0&&(N.sortText=f.suggestSortText),N.insertText&&vt(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)};if(f.enum)for(var g=0;g(r.colonOffset||0)){var c=r.valueNode;if(c&&(n>c.offset+c.length||c.type==="object"||c.type==="array"))return;var f=r.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===f&&g.valueNode&&l(g.valueNode),!0}),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(u,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var h=r.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(l),!0})}else r.items.forEach(l)},e.prototype.getValueCompletions=function(t,r,n,i,s,a,o){var u=i,l=void 0,c=void 0;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(u=n.offset+n.length,c=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(n.type==="property"&&i>(n.colonOffset||0)){var f=n.valueNode;if(f&&i>f.offset+f.length)return;l=n.keyNode.value,n=n.parent}if(n&&(l!==void 0||n.type==="array")){for(var h=this.evaluateSeparatorAfter(s,u),g=r.getMatchingSchemas(t.schema,n.offset,c),m=0,v=g;m(r.colonOffset||0)){var o=r.keyNode.value,u=r.valueNode;if((!u||n<=u.offset+u.length)&&r.parent){var l=Lr(r.parent);this.contributions.forEach(function(c){var f=c.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,i){var s=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,i){var s=this;i===void 0&&(i=0);var a=!1;if(Ae(t.default)){for(var o=t.type,u=t.default,l=i;l>0;l--)u=[u],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:X.Snippet,detail:xr("json.suggest.default","Default value")}),a=!0}Array.isArray(t.examples)&&t.examples.forEach(function(c){for(var f=t.type,h=c,g=i;g>0;g--)h=[h],f="array";n.add({kind:s.getSuggestionKind(f),label:s.getLabelForValue(h),insertText:s.getInsertTextForValue(h,r),insertTextFormat:X.Snippet}),a=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(c){var f=t.type,h=c.body,g=c.label,m,v;if(Ae(h)){t.type;for(var b=i;b>0;b--)h=[h];m=s.getInsertTextForSnippetValue(h,r),v=s.getFilterTextForSnippetValue(h),g=g||s.getLabelForSnippetValue(h)}else if(typeof c.bodyText=="string"){for(var N="",p="",d="",b=i;b>0;b--)N=N+d+`[ `,p=p+` `+d+"]",d+=" ",f="array";m=N+d+c.bodyText.split(` `).join(` `+d)+p+r,g=g||m,v=m.replace(/[\n]/g,"")}else return;n.add({kind:s.getSuggestionKind(f),label:g,documentation:s.fromMarkup(c.markdownDescription)||c.description,insertText:m,insertTextFormat:X.Snippet,filterText:v}),a=!0}),!a&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Ae(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:X.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,s=t.enum.length;i0?r[0]:void 0}if(!t)return ce.Value;switch(t){case"string":return ce.Value;case"object":return ce.Module;case"property":return ce.Property;default:return ce.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,r,n,i){var s=this.getInsertTextForValue(t,"");if(!n)return s;var a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var l=r.defaultSnippets[0].body;Ae(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),Ae(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){var c=Array.isArray(r.type)?r.type[0]:r.type;switch(c||(r.properties?c="object":r.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||u>1)&&(o="$1"),a+o+i},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,i=t.getText();n>=0&&` \r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=Ke(t.getText(),!0);n.setPosition(r);var i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var i=Ke(r.getText(),!0),s=t.items,a=s.length-1;a>=0;a--){var o=s[a];if(n>o.offset+o.length){i.setPosition(o.offset+o.length);var u=i.scan();return u===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a}else if(n>=o.offset)return a}return 0},e.prototype.isInComment=function(t,r,n){var i=Ke(t.getText(),!1);i.setPosition(r);for(var s=i.scan();s!==17&&i.getTokenOffset()+i.getTokenLength()s.offset+1&&i=0;f--){var h=this.contributions[f],g=h.getInfoContribution(t.uri,c);if(g)return g.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(m){if(m&&s){var v=n.getMatchingSchemas(m.schema,s.offset),b=void 0,N=void 0,p=void 0,d=void 0;v.every(function(L){if(L.node===s&&!L.inverted&&L.schema&&(b=b||L.schema.title,N=N||L.schema.markdownDescription||kr(L.schema.description),L.schema.enum)){var S=L.schema.enum.indexOf(Ee(s));L.schema.markdownEnumDescriptions?p=L.schema.markdownEnumDescriptions[S]:L.schema.enumDescriptions&&(p=kr(L.schema.enumDescriptions[S])),p&&(d=L.schema.enum[S],typeof d!="string"&&(d=JSON.stringify(d)))}return!0});var _="";return b&&(_=kr(b)),N&&(_.length>0&&(_+=` `),_+=N),p&&(_.length>0&&(_+=` `),_+="`"+Aa(d)+"`: "+p),l([_])}return null})},e}();function kr(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Aa(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ei;Ei=(()=>{var e={470:n=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,u){for(var l,c="",f=0,h=-1,g=0,m=0;m<=o.length;++m){if(m2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",f=0):f=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),h=m,g=0;continue}}else if(c.length===2||c.length===1){c="",f=0,h=m,g=0;continue}}u&&(c.length>0?c+="/..":c="..",f=2)}else c.length>0?c+="/"+o.slice(h+1,m):c=o.slice(h+1,m),f=m-h-1;h=m,g=0}else l===46&&g!==-1?++g:g=-1}return c}var a={resolve:function(){for(var o,u="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var f;c>=0?f=arguments[c]:(o===void 0&&(o=process.cwd()),f=o),i(f),f.length!==0&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=s(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(i(o),o.length===0)return".";var u=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=s(o,!u)).length!==0||u||(o="."),o.length>0&&l&&(o+="/"),u?"/"+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,u=0;u0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":a.normalize(o)},relative:function(o,u){if(i(o),i(u),o===u||(o=a.resolve(o))===(u=a.resolve(u)))return"";for(var l=1;lm){if(u.charCodeAt(h+b)===47)return u.slice(h+b+1);if(b===0)return u.slice(h+b)}else f>m&&(o.charCodeAt(l+b)===47?v=b:b===0&&(v=0));break}var N=o.charCodeAt(l+b);if(N!==u.charCodeAt(h+b))break;N===47&&(v=b)}var p="";for(b=l+v+1;b<=c;++b)b!==c&&o.charCodeAt(b)!==47||(p.length===0?p+="..":p+="/..");return p.length>0?p+u.slice(h+v):(h+=v,u.charCodeAt(h)===47&&++h,u.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var u=o.charCodeAt(0),l=u===47,c=-1,f=!0,h=o.length-1;h>=1;--h)if((u=o.charCodeAt(h))===47){if(!f){c=h;break}}else f=!1;return c===-1?l?"/":".":l&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');i(o);var l,c=0,f=-1,h=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var g=u.length-1,m=-1;for(l=o.length-1;l>=0;--l){var v=o.charCodeAt(l);if(v===47){if(!h){c=l+1;break}}else m===-1&&(h=!1,m=l+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(f=l):(g=-1,f=m))}return c===f?f=m:f===-1&&(f=o.length),o.slice(c,f)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){c=l+1;break}}else f===-1&&(h=!1,f=l+1);return f===-1?"":o.slice(c,f)},extname:function(o){i(o);for(var u=-1,l=0,c=-1,f=!0,h=0,g=o.length-1;g>=0;--g){var m=o.charCodeAt(g);if(m!==47)c===-1&&(f=!1,c=g+1),m===46?u===-1?u=g:h!==1&&(h=1):u!==-1&&(h=-1);else if(!f){l=g+1;break}}return u===-1||c===-1||h===0||h===1&&u===c-1&&u===l+1?"":o.slice(u,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(u,l){var c=l.dir||l.root,f=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+f:c+"/"+f:f}(0,o)},parse:function(o){i(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var l,c=o.charCodeAt(0),f=c===47;f?(u.root="/",l=1):l=0;for(var h=-1,g=0,m=-1,v=!0,b=o.length-1,N=0;b>=l;--b)if((c=o.charCodeAt(b))!==47)m===-1&&(v=!1,m=b+1),c===46?h===-1?h=b:N!==1&&(N=1):h!==-1&&(N=-1);else if(!v){g=b+1;break}return h===-1||m===-1||N===0||N===1&&h===m-1&&h===g+1?m!==-1&&(u.base=u.name=g===0&&f?o.slice(1,m):o.slice(g,m)):(g===0&&f?(u.name=o.slice(1,h),u.base=o.slice(1,m)):(u.name=o.slice(g,h),u.base=o.slice(g,m)),u.ext=o.slice(h,m)),g>0?u.dir=o.slice(0,g-1):f&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a},447:(n,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>N,Utils:()=>k}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var u,l,c=(u=function(E,x){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,I){M.__proto__=I}||function(M,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(M[$]=I[$])})(E,x)},function(E,x){function M(){this.constructor=E}u(E,x),E.prototype=x===null?Object.create(x):(M.prototype=x.prototype,new M)}),f=/^\w[\w\d+.-]*$/,h=/^\//,g=/^\/\//,m="",v="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,N=function(){function E(x,M,I,$,D,O){O===void 0&&(O=!1),typeof x=="object"?(this.scheme=x.scheme||m,this.authority=x.authority||m,this.path=x.path||m,this.query=x.query||m,this.fragment=x.fragment||m):(this.scheme=function(B,re){return B||re?B:"file"}(x,O),this.authority=M||m,this.path=function(B,re){switch(B){case"https":case"http":case"file":re?re[0]!==v&&(re=v+re):re=v}return re}(this.scheme,I||m),this.query=$||m,this.fragment=D||m,function(B,re){if(!B.scheme&&re)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+B.authority+'", path: "'+B.path+'", query: "'+B.query+'", fragment: "'+B.fragment+'"}');if(B.scheme&&!f.test(B.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(B.path){if(B.authority){if(!h.test(B.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(B.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,O))}return E.isUri=function(x){return x instanceof E||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="function"&&typeof x.with=="function"&&typeof x.toString=="function"},Object.defineProperty(E.prototype,"fsPath",{get:function(){return A(this)},enumerable:!1,configurable:!0}),E.prototype.with=function(x){if(!x)return this;var M=x.scheme,I=x.authority,$=x.path,D=x.query,O=x.fragment;return M===void 0?M=this.scheme:M===null&&(M=m),I===void 0?I=this.authority:I===null&&(I=m),$===void 0?$=this.path:$===null&&($=m),D===void 0?D=this.query:D===null&&(D=m),O===void 0?O=this.fragment:O===null&&(O=m),M===this.scheme&&I===this.authority&&$===this.path&&D===this.query&&O===this.fragment?this:new d(M,I,$,D,O)},E.parse=function(x,M){M===void 0&&(M=!1);var I=b.exec(x);return I?new d(I[2]||m,P(I[4]||m),P(I[5]||m),P(I[7]||m),P(I[9]||m),M):new d(m,m,m,m,m)},E.file=function(x){var M=m;if(a&&(x=x.replace(/\\/g,v)),x[0]===v&&x[1]===v){var I=x.indexOf(v,2);I===-1?(M=x.substring(2),x=v):(M=x.substring(2,I),x=x.substring(I)||v)}return new d("file",M,x,m,m)},E.from=function(x){return new d(x.scheme,x.authority,x.path,x.query,x.fragment)},E.prototype.toString=function(x){return x===void 0&&(x=!1),w(this,x)},E.prototype.toJSON=function(){return this},E.revive=function(x){if(x){if(x instanceof E)return x;var M=new d(x);return M._formatted=x.external,M._fsPath=x._sep===p?x.fsPath:null,M}return x},E}(),p=a?1:void 0,d=function(E){function x(){var M=E!==null&&E.apply(this,arguments)||this;return M._formatted=null,M._fsPath=null,M}return c(x,E),Object.defineProperty(x.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this)),this._fsPath},enumerable:!1,configurable:!0}),x.prototype.toString=function(M){return M===void 0&&(M=!1),M?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},x.prototype.toJSON=function(){var M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=p),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M},x}(N),_=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function L(E,x){for(var M=void 0,I=-1,$=0;$=97&&D<=122||D>=65&&D<=90||D>=48&&D<=57||D===45||D===46||D===95||D===126||x&&D===47)I!==-1&&(M+=encodeURIComponent(E.substring(I,$)),I=-1),M!==void 0&&(M+=E.charAt($));else{M===void 0&&(M=E.substr(0,$));var O=_[D];O!==void 0?(I!==-1&&(M+=encodeURIComponent(E.substring(I,$)),I=-1),M+=O):I===-1&&(I=$)}}return I!==-1&&(M+=encodeURIComponent(E.substring(I))),M!==void 0?M:E}function S(E){for(var x=void 0,M=0;M1&&E.scheme==="file"?"//"+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?E.path[1].toLowerCase()+E.path.substr(2):E.path,a&&(M=M.replace(/\//g,"\\")),M}function w(E,x){var M=x?S:L,I="",$=E.scheme,D=E.authority,O=E.path,B=E.query,re=E.fragment;if($&&(I+=$,I+=":"),(D||$==="file")&&(I+=v,I+=v),D){var he=D.indexOf("@");if(he!==-1){var $e=D.substr(0,he);D=D.substr(he+1),(he=$e.indexOf(":"))===-1?I+=M($e,!1):(I+=M($e.substr(0,he),!1),I+=":",I+=M($e.substr(he+1),!1)),I+="@"}(he=(D=D.toLowerCase()).indexOf(":"))===-1?I+=M(D,!1):(I+=M(D.substr(0,he),!1),I+=D.substr(he))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58)(Re=O.charCodeAt(1))>=65&&Re<=90&&(O="/"+String.fromCharCode(Re+32)+":"+O.substr(3));else if(O.length>=2&&O.charCodeAt(1)===58){var Re;(Re=O.charCodeAt(0))>=65&&Re<=90&&(O=String.fromCharCode(Re+32)+":"+O.substr(2))}I+=M(O,!0)}return B&&(I+="?",I+=M(B,!1)),re&&(I+="#",I+=x?re:L(re,!1)),I}function y(E){try{return decodeURIComponent(E)}catch{return E.length>3?E.substr(0,3)+y(E.substr(3)):E}}var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(E){return E.match(T)?E.replace(T,function(x){return y(x)}):E}var k,F=s(470),V=function(){for(var E=0,x=0,M=arguments.length;x{for(var s in i)r.o(i,s)&&!r.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:i[s]})},r.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),r.r=n=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r(447)})();const{URI:tt,Utils:Ka}=Ei;var Me=pt(),wa=function(){function e(t,r){this.patternRegExps=[],this.isInclude=[];try{for(var n=0,i=t;n0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var r=this,n=!1;t=Ie(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return r.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o1&&(i=s[1]),vt(i,".")&&(i=i.substr(0,i.length-1)),new Ve({},[Me("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Rt(t),i)])})},e.prototype.resolveSchemaContent=function(t,r,n){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=Ie(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Mi({},[Me("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Me("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(g,m){if(!m)return g;var v=g;return m[0]==="/"&&(m=m.substr(1)),m.split("/").some(function(b){return v=v[b],!v}),v},c=function(g,m,v,b){var N=b?decodeURIComponent(b):void 0,p=l(m,N);if(p)for(var d in p)p.hasOwnProperty(d)&&!g.hasOwnProperty(d)&&(g[d]=p[d]);else s.push(Me("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",N,v))},f=function(g,m,v,b,N){u&&!/^\w+:\/\/.*/.test(m)&&(m=u.resolveRelativePath(m,b)),m=Ie(m);var p=i.getOrAddSchemaHandle(m);return p.getUnresolvedSchema().then(function(d){if(N[m]=!0,d.errors.length){var _=v?m+"#"+v:m;s.push(Me("json.schema.problemloadingref","Problems loading reference '{0}': {1}",_,d.errors[0]))}return c(g,d.schema,m,v),h(g,d.schema,m,p.dependencies)})},h=function(g,m,v,b){if(!g||typeof g!="object")return Promise.resolve(null);for(var N=[g],p=[],d=[],_=function(){for(var y=[],T=0;T0){d.push(f(y,k[0],k[1],v,b));return}else T.indexOf(P)===-1&&(c(y,m,v,k[1]),T.push(P))}_(y.items,y.additionalItems,y.additionalProperties,y.not,y.contains,y.propertyNames,y.if,y.then,y.else),L(y.definitions,y.properties,y.patternProperties,y.dependencies),S(y.anyOf,y.allOf,y.oneOf,y.items)};N.length;){var w=N.pop();p.indexOf(w)>=0||(p.push(w),A(w))}return i.promise.all(d)};return h(a,a,r,n).then(function(g){return new Mi(a,s)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(N){return N.keyNode.value==="$schema"&&N.valueNode&&N.valueNode.type==="string"});if(n.length>0){var i=n[0].valueNode;if(i&&i.type==="string"){var s=Ee(i);if(s&&ba(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=Ie(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=xa(t),c=0,f=this.filePatternAssociations;c0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:b},b},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(function(s){return{$ref:s}})};return this.addSchemaHandle(n,i)},e.prototype.getMatchingSchemas=function(t,r,n){if(n){var i=n.id||"schemaservice://untitled/matchingSchemas/"+Ca++;return this.resolveSchemaContent(new Ve(n),i,{}).then(function(s){return r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,r).then(function(s){return s?r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),Ca=0;function Ie(e){try{return tt.parse(e).toString()}catch{return e}}function xa(e){try{return tt.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Rt(e){try{var t=tt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var ka=pt(),Ta=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:fe.Error)},e.prototype.doValidation=function(t,r,n,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(f){var h=f.range.start.line+" "+f.range.start.character+" "+f.message;o[h]||(o[h]=!0,a.push(f))},l=function(f){var h=n?Dt(n.trailingCommas):fe.Error,g=n?Dt(n.comments):s.commentSeverity,m=n!=null&&n.schemaValidation?Dt(n.schemaValidation):fe.Warning,v=n!=null&&n.schemaRequest?Dt(n.schemaRequest):fe.Warning;if(f){if(f.errors.length&&r.root&&v){var b=r.root,N=b.type==="object"?b.properties[0]:void 0;if(N&&N.keyNode.value==="$schema"){var p=N.valueNode||N,d=q.create(t.positionAt(p.offset),t.positionAt(p.offset+p.length));u(we.create(d,f.errors[0],v,W.SchemaResolveError))}else{var d=q.create(t.positionAt(b.offset),t.positionAt(b.offset+1));u(we.create(d,f.errors[0],v,W.SchemaResolveError))}}else if(m){var _=r.validate(t,f.schema,m);_&&_.forEach(u)}Ii(f.schema)&&(g=void 0),Fi(f.schema)&&(h=void 0)}for(var L=0,S=r.syntaxErrors;L=jt&&e<=Ia?e-jt+10:0)}function Fa(e){if(e[0]==="#")switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var Ra=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||vt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l0){a--;var T=ft.create(t.uri,Fe(t,w)),P=A?A+"."+w.keyNode.value:w.keyNode.value;d.push({name:i.getKeyLabel(w),kind:i.getSymbolKind(y.type),location:T,containerName:A}),b.push({node:y,containerName:P})}else p=!0})};N0){a--;var P=Fe(t,y),k=P,F=String(T),V={name:F,kind:i.getSymbolKind(y.type),range:P,selectionRange:k,children:[]};w.push(V),p.push({result:V.children,node:y})}else _=!0}):A.type==="object"&&A.properties.forEach(function(y){var T=y.valueNode;if(T)if(a>0){a--;var P=Fe(t,y),k=Fe(t,y.keyNode),F=[],V={name:i.getKeyLabel(y),kind:i.getSymbolKind(T.type),range:P,selectionRange:k,children:F,detail:i.getDetail(T)};w.push(V),p.push({result:F,node:T})}else _=!0})};d0&&i[i.length-1].kind===f){var c=i.pop(),h=e.positionAt(a.getTokenOffset()).line;c&&h>c.startLine+1&&s!==c.startLine&&(c.endLine=h-1,u(c),s=c.startLine)}break}case 13:{var l=e.positionAt(a.getTokenOffset()).line,g=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&l+1=0&&i[b].kind!==ct.Region;)b--;if(b>=0){var c=i[b];i.length=b,h>c.startLine&&s!==c.startLine&&(c.endLine=h,u(c),s=c.startLine)}}}break}}o=a.scan()}var N=t&&t.rangeLimit;if(typeof N!="number"||r.length<=N)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var p=[],d=0,_=n;d<_.length;d++){var L=_[d];L<30&&(p[L]=(p[L]||0)+1)}for(var S=0,A=0,b=0;bN){A=b;break}S+=w}}for(var y=[],b=0;b=f&&u<=h&&c.push(i(f,h)),c.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":c.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var g=a(l.offset+l.length,5);g!==-1&&c.push(i(l.offset,g))}l=l.parent}for(var m=void 0,v=c.length-1;v>=0;v--)m=Ft.create(c[v],m);return m||(m=Ft.create(q.create(o,o))),m}function i(o,u){return q.create(e.positionAt(o),e.positionAt(u))}var s=Ke(e.getText(),!0);function a(o,u){s.setPosition(o);var l=s.scan();return l===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}function Va(e,t){var r=[];return t.visit(function(n){var i;if(n.type==="property"&&n.keyNode.value==="$ref"&&((i=n.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=n.valueNode.value,a=Wa(t,s);if(a){var o=e.positionAt(a.offset);r.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:$a(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function $a(e,t){return q.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Wa(e,t){var r=qa(t);return r?Mr(r,e.root):null}function Mr(e,t){if(!t)return null;if(e.length===0)return t;var r=e.shift();if(t&&t.type==="object"){var n=t.properties.find(function(a){return a.keyNode.value===r});return n?Mr(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),s=t.items[i];return s?Mr(e,s):null}return null}function qa(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Ha)}function Ha(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ba(e){var t=e.promiseConstructor||Promise,r=new La(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(Tr);var n=new Sa(r,e.contributions,t,e.clientCapabilities),i=new _a(r,e.contributions,t),s=new Ra(r),a=new Ta(r,t);return{configure:function(o){r.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(u){r.registerExternalSchema(u.uri,u.fileMatch,u.schema)}),a.configure(o)},resetSchema:function(o){return r.onResourceChange(o)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(o){return va(o,{collectComments:!0})},newJSONDocument:function(o,u){return pa(o,u)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),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:Ua,getSelectionRanges:Oa,findDefinition:function(){return Promise.resolve([])},findLinks:Va,format:function(o,u,l){var c=void 0;if(u){var f=o.offsetAt(u.start),h=o.offsetAt(u.end)-f;c={offset:f,length:h}}var g={tabSize:l?l.tabSize:4,insertSpaces:(l==null?void 0:l.insertSpaces)===!0,insertFinalNewline:(l==null?void 0:l.insertFinalNewline)===!0,eol:` `};return na(o.getText(),c,g).map(function(m){return pe.replace(q.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var ve=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})},be=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]1&&e[e.length-1].length===0&&t.push("");var s=t.join("/");return e[0].length===0&&(s="/"+s),s}function Qa(e){for(var t=[],r=1;r