@rescript/language-server 1.63.0-next-e1d635a.0 → 1.63.0-next-583c63a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/cli.js CHANGED
@@ -1,49 +1,49 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Mh=Object.create;var Uc=Object.defineProperty;var Hh=Object.getOwnPropertyDescriptor;var Wh=Object.getOwnPropertyNames;var $h=Object.getPrototypeOf,Uh=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Bh=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Wh(e))!Uh.call(t,i)&&i!==n&&Uc(t,i,{get:()=>e[i],enumerable:!(r=Hh(e,i))||r.enumerable});return t};var Ce=(t,e,n)=>(n=t!=null?Mh($h(t)):{},Bh(e||!t||!t.__esModule?Uc(n,"default",{value:t,enumerable:!0}):n,t));var Zt=F(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var jo;function Io(){if(jo===void 0)throw new Error("No runtime abstraction layer installed");return jo}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");jo=n}t.install=e})(Io||(Io={}));Lo.default=Io});var Mo=F(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.Disposable=void 0;var Vh;(function(t){function e(n){return{dispose:n}}t.create=e})(Vh=lr.Disposable||(lr.Disposable={}))});var Bc=F(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.AbstractMessageBuffer=void 0;var zh=13,Gh=10,Kh=`\r
3
- `,Ho=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let e=0,n=0,r=0,i=0;e:for(;n<this._chunks.length;){let u=this._chunks[n];for(r=0;r<u.length;){switch(u[r]){case zh:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case Gh:switch(e){case 1:e=2;break;case 3:e=4,r++;break e;default:e=0}break;default:e=0}r++}i+=u.byteLength,n++}if(e!==4)return;let o=this._read(i+r),s=new Map,a=this.toString(o,"ascii").split(Kh);if(a.length<2)return s;for(let u=0;u<a.length-2;u++){let p=a[u],h=p.indexOf(":");if(h===-1)throw new Error("Message header must separate key and value using :");let y=p.substr(0,h),g=p.substr(h+1).trim();s.set(y,g)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let n=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);n.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return n}};oi.AbstractMessageBuffer=Ho});var Gc=F(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var Yh=Zt(),Vc=require("util"),vn=Mo(),Qh=Bc(),si=class t extends Qh.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,n){return Buffer.from(e,n)}toString(e,n){return e instanceof Buffer?e.toString(n):new Vc.TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,n):Buffer.from(e,0,n)}allocNative(e){return Buffer.allocUnsafe(e)}};si.emptyBuffer=Buffer.allocUnsafe(0);var Wo=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),vn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),vn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),vn.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),vn.Disposable.create(()=>this.stream.off("data",e))}},$o=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),vn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),vn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),vn.Disposable.create(()=>this.stream.off("end",e))}write(e,n){return new Promise((r,i)=>{let o=s=>{s==null?r():i(s)};typeof e=="string"?this.stream.write(e,n,o):this.stream.write(e,o)})}end(){this.stream.end()}},zc=Object.freeze({messageBuffer:Object.freeze({create:t=>new si(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new Vc.TextDecoder(e.charset).decode(t)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:t=>new Wo(t),asWritableStream:t=>new $o(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){let r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){let n=setImmediate(t,...e);return{dispose:()=>clearImmediate(n)}},setInterval(t,e,...n){let r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function Uo(){return zc}(function(t){function e(){Yh.default.install(zc)}t.install=e})(Uo||(Uo={}));Bo.default=Uo});var Wn=F(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.stringArray=rt.array=rt.func=rt.error=rt.number=rt.string=rt.boolean=void 0;function Xh(t){return t===!0||t===!1}rt.boolean=Xh;function Kc(t){return typeof t=="string"||t instanceof String}rt.string=Kc;function Jh(t){return typeof t=="number"||t instanceof Number}rt.number=Jh;function Zh(t){return t instanceof Error}rt.error=Zh;function ep(t){return typeof t=="function"}rt.func=ep;function Yc(t){return Array.isArray(t)}rt.array=Yc;function tp(t){return Yc(t)&&t.every(e=>Kc(e))}rt.stringArray=tp});var ps=F(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.Message=U.NotificationType9=U.NotificationType8=U.NotificationType7=U.NotificationType6=U.NotificationType5=U.NotificationType4=U.NotificationType3=U.NotificationType2=U.NotificationType1=U.NotificationType0=U.NotificationType=U.RequestType9=U.RequestType8=U.RequestType7=U.RequestType6=U.RequestType5=U.RequestType4=U.RequestType3=U.RequestType2=U.RequestType1=U.RequestType=U.RequestType0=U.AbstractMessageSignature=U.ParameterStructures=U.ResponseError=U.ErrorCodes=void 0;var wn=Wn(),Qc;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Qc=U.ErrorCodes||(U.ErrorCodes={}));var Vo=class t extends Error{constructor(e,n,r){super(n),this.code=wn.number(e)?e:Qc.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};U.ResponseError=Vo;var dt=class t{constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};U.ParameterStructures=dt;dt.auto=new dt("auto");dt.byPosition=new dt("byPosition");dt.byName=new dt("byName");var De=class{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return dt.auto}};U.AbstractMessageSignature=De;var zo=class extends De{constructor(e){super(e,0)}};U.RequestType0=zo;var Go=class extends De{constructor(e,n=dt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType=Go;var Ko=class extends De{constructor(e,n=dt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType1=Ko;var Yo=class extends De{constructor(e){super(e,2)}};U.RequestType2=Yo;var Qo=class extends De{constructor(e){super(e,3)}};U.RequestType3=Qo;var Xo=class extends De{constructor(e){super(e,4)}};U.RequestType4=Xo;var Jo=class extends De{constructor(e){super(e,5)}};U.RequestType5=Jo;var Zo=class extends De{constructor(e){super(e,6)}};U.RequestType6=Zo;var es=class extends De{constructor(e){super(e,7)}};U.RequestType7=es;var ts=class extends De{constructor(e){super(e,8)}};U.RequestType8=ts;var ns=class extends De{constructor(e){super(e,9)}};U.RequestType9=ns;var rs=class extends De{constructor(e,n=dt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType=rs;var is=class extends De{constructor(e){super(e,0)}};U.NotificationType0=is;var os=class extends De{constructor(e,n=dt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType1=os;var ss=class extends De{constructor(e){super(e,2)}};U.NotificationType2=ss;var as=class extends De{constructor(e){super(e,3)}};U.NotificationType3=as;var cs=class extends De{constructor(e){super(e,4)}};U.NotificationType4=cs;var us=class extends De{constructor(e){super(e,5)}};U.NotificationType5=us;var ls=class extends De{constructor(e){super(e,6)}};U.NotificationType6=ls;var ds=class extends De{constructor(e){super(e,7)}};U.NotificationType7=ds;var fs=class extends De{constructor(e){super(e,8)}};U.NotificationType8=fs;var hs=class extends De{constructor(e){super(e,9)}};U.NotificationType9=hs;var np;(function(t){function e(i){let o=i;return o&&wn.string(o.method)&&(wn.string(o.id)||wn.number(o.id))}t.isRequest=e;function n(i){let o=i;return o&&wn.string(o.method)&&i.id===void 0}t.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(wn.string(o.id)||wn.number(o.id)||o.id===null)}t.isResponse=r})(np=U.Message||(U.Message={}))});var gs=F(en=>{"use strict";var Xc;Object.defineProperty(en,"__esModule",{value:!0});en.LRUCache=en.LinkedMap=en.Touch=void 0;var st;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(st=en.Touch||(en.Touch={}));var ai=class{constructor(){this[Xc]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=st.None){let r=this._map.get(e);if(r)return n!==st.None&&this.touch(r,n),r.value}set(e,n,r=st.None){let i=this._map.get(e);if(i)i.value=n,r!==st.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case st.None:this.addItemLast(i);break;case st.First:this.addItemFirst(i);break;case st.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Xc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==st.First&&n!==st.Last)){if(n===st.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===st.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};en.LinkedMap=ai;var ms=class extends ai{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=st.AsNew){return super.get(e,n)}peek(e){return super.get(e,st.None)}set(e,n){return super.set(e,n,st.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};en.LRUCache=ms});var $n=F(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Emitter=Cn.Event=void 0;var rp=Zt(),ip;(function(t){let e={dispose(){}};t.None=function(){return e}})(ip=Cn.Event||(Cn.Event={}));var ys=class{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],e))}catch(a){(0,rp.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},ci=class t{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,n,r)=>{this._callbacks||(this._callbacks=new ys),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Cn.Emitter=ci;ci._noop=function(){}});var vs=F(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.CancellationTokenSource=Dn.CancellationToken=void 0;var op=Zt(),sp=Wn(),_s=$n(),Rs;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:_s.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:_s.Event.None});function e(n){let r=n;return r&&(r===t.None||r===t.Cancelled||sp.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(Rs=Dn.CancellationToken||(Dn.CancellationToken={}));var ap=Object.freeze(function(t,e){let n=(0,op.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),ui=class{constructor(){this._isCancelled=!1}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?ap:(this._emitter||(this._emitter=new _s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},bs=class{get token(){return this._token||(this._token=new ui),this._token}cancel(){this._token?this._token.cancel():this._token=Rs.Cancelled}dispose(){this._token?this._token instanceof ui&&this._token.dispose():this._token=Rs.None}};Dn.CancellationTokenSource=bs});var Jc=F(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.ReadableStreamMessageReader=tn.AbstractMessageReader=tn.MessageReader=void 0;var Cs=Zt(),Un=Wn(),ws=$n(),cp;(function(t){function e(n){let r=n;return r&&Un.func(r.listen)&&Un.func(r.dispose)&&Un.func(r.onError)&&Un.func(r.onClose)&&Un.func(r.onPartialMessage)}t.is=e})(cp=tn.MessageReader||(tn.MessageReader={}));var li=class{constructor(){this.errorEmitter=new ws.Emitter,this.closeEmitter=new ws.Emitter,this.partialMessageEmitter=new ws.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Un.string(e.message)?e.message:"unknown"}`)}};tn.AbstractMessageReader=li;var Ds;(function(t){function e(n){let r,i,o,s=new Map,a,u=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let p of n.contentDecoders)s.set(p.name,p);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,u.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let p of n.contentTypeDecoders)u.set(p.name,p)}return a===void 0&&(a=(0,Cs.default)().applicationJson.decoder,u.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:u}}t.fromOptions=e})(Ds||(Ds={}));var Ps=class extends li{constructor(e,n){super(),this.readable=e,this.options=Ds.fromOptions(n),this.buffer=(0,Cs.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders();if(!i)return;let o=i.get("Content-Length");if(!o)throw new Error("Header must provide a Content-Length property.");let s=parseInt(o);if(isNaN(s))throw new Error("Content-Length value must be a number.");this.nextMessageLength=s}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let r;this.options.contentDecoder!==void 0?r=this.options.contentDecoder.decode(n):r=Promise.resolve(n),r.then(i=>{this.options.contentTypeDecoder.decode(i,this.options).then(o=>{this.callback(o)},o=>{this.fireError(o)})},i=>{this.fireError(i)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Cs.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};tn.ReadableStreamMessageReader=Ps});var Zc=F(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Semaphore=void 0;var up=Zt(),Es=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,up.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};di.Semaphore=Es});var ru=F(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.WriteableStreamMessageWriter=nn.AbstractMessageWriter=nn.MessageWriter=void 0;var eu=Zt(),dr=Wn(),lp=Zc(),tu=$n(),dp="Content-Length: ",nu=`\r
4
- `,fp;(function(t){function e(n){let r=n;return r&&dr.func(r.dispose)&&dr.func(r.onClose)&&dr.func(r.onError)&&dr.func(r.write)}t.is=e})(fp=nn.MessageWriter||(nn.MessageWriter={}));var fi=class{constructor(){this.errorEmitter=new tu.Emitter,this.closeEmitter=new tu.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${dr.string(e.message)?e.message:"unknown"}`)}};nn.AbstractMessageWriter=fi;var Ss;(function(t){function e(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,eu.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,eu.default)().applicationJson.encoder}}t.fromOptions=e})(Ss||(Ss={}));var Ts=class extends fi{constructor(e,n){super(),this.writable=e,this.options=Ss.fromOptions(n),this.errorCount=0,this.writeSemaphore=new lp.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(dp,r.byteLength.toString(),nu),i.push(nu),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}};nn.WriteableStreamMessageWriter=Ts});var uu=F(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.createMessageConnection=K.ConnectionOptions=K.CancellationStrategy=K.CancellationSenderStrategy=K.CancellationReceiverStrategy=K.ConnectionStrategy=K.ConnectionError=K.ConnectionErrors=K.LogTraceNotification=K.SetTraceNotification=K.TraceFormat=K.Trace=K.NullLogger=K.ProgressType=K.ProgressToken=void 0;var iu=Zt(),Be=Wn(),G=ps(),ou=gs(),fr=$n(),xs=vs(),pr;(function(t){t.type=new G.NotificationType("$/cancelRequest")})(pr||(pr={}));var su;(function(t){function e(n){return typeof n=="string"||typeof n=="number"}t.is=e})(su=K.ProgressToken||(K.ProgressToken={}));var hr;(function(t){t.type=new G.NotificationType("$/progress")})(hr||(hr={}));var ks=class{constructor(){}};K.ProgressType=ks;var As;(function(t){function e(n){return Be.func(n)}t.is=e})(As||(As={}));K.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var fe;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(fe=K.Trace||(K.Trace={}));(function(t){function e(r){if(!Be.string(r))return t.Off;switch(r=r.toLowerCase(),r){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}t.fromString=e;function n(r){switch(r){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}t.toString=n})(fe=K.Trace||(K.Trace={}));var kt;(function(t){t.Text="text",t.JSON="json"})(kt=K.TraceFormat||(K.TraceFormat={}));(function(t){function e(n){return Be.string(n)?(n=n.toLowerCase(),n==="json"?t.JSON:t.Text):t.Text}t.fromString=e})(kt=K.TraceFormat||(K.TraceFormat={}));var au;(function(t){t.type=new G.NotificationType("$/setTrace")})(au=K.SetTraceNotification||(K.SetTraceNotification={}));var qs;(function(t){t.type=new G.NotificationType("$/logTrace")})(qs=K.LogTraceNotification||(K.LogTraceNotification={}));var hi;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(hi=K.ConnectionErrors||(K.ConnectionErrors={}));var Bn=class t extends Error{constructor(e,n){super(n),this.code=e,Object.setPrototypeOf(this,t.prototype)}};K.ConnectionError=Bn;var cu;(function(t){function e(n){let r=n;return r&&Be.func(r.cancelUndispatched)}t.is=e})(cu=K.ConnectionStrategy||(K.ConnectionStrategy={}));var Ns;(function(t){t.Message=Object.freeze({createCancellationTokenSource(n){return new xs.CancellationTokenSource}});function e(n){let r=n;return r&&Be.func(r.createCancellationTokenSource)}t.is=e})(Ns=K.CancellationReceiverStrategy||(K.CancellationReceiverStrategy={}));var Fs;(function(t){t.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(pr.type,{id:r})},cleanup(n){}});function e(n){let r=n;return r&&Be.func(r.sendCancellation)&&Be.func(r.cleanup)}t.is=e})(Fs=K.CancellationSenderStrategy||(K.CancellationSenderStrategy={}));var Os;(function(t){t.Message=Object.freeze({receiver:Ns.Message,sender:Fs.Message});function e(n){let r=n;return r&&Ns.is(r.receiver)&&Fs.is(r.sender)}t.is=e})(Os=K.CancellationStrategy||(K.CancellationStrategy={}));var hp;(function(t){function e(n){let r=n;return r&&(Os.is(r.cancellationStrategy)||cu.is(r.connectionStrategy))}t.is=e})(hp=K.ConnectionOptions||(K.ConnectionOptions={}));var At;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(At||(At={}));function pp(t,e,n,r){let i=n!==void 0?n:K.NullLogger,o=0,s=0,a=0,u="2.0",p,h=new Map,y,g=new Map,N=new Map,A,q=new ou.LinkedMap,M=new Map,j=new Set,v=new Map,b=fe.Off,k=kt.Text,z,ae=At.New,W=new fr.Emitter,Y=new fr.Emitter,Je=new fr.Emitter,Ne=new fr.Emitter,D=new fr.Emitter,te=r&&r.cancellationStrategy?r.cancellationStrategy:Os.Message;function ze(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function Ge(m){return m===null?"res-unknown-"+(++a).toString():"res-"+m.toString()}function P(){return"not-"+(++s).toString()}function E(m,x){G.Message.isRequest(x)?m.set(ze(x.id),x):G.Message.isResponse(x)?m.set(Ge(x.id),x):m.set(P(),x)}function Te(m){}function Pe(){return ae===At.Listening}function Ke(){return ae===At.Closed}function Ue(){return ae===At.Disposed}function ot(){(ae===At.New||ae===At.Listening)&&(ae=At.Closed,Y.fire(void 0))}function Et(m){W.fire([m,void 0,void 0])}function ar(m){W.fire(m)}t.onClose(ot),t.onError(Et),e.onClose(ot),e.onError(ar);function Yt(){A||q.size===0||(A=(0,iu.default)().timer.setImmediate(()=>{A=void 0,St()}))}function St(){if(q.size===0)return;let m=q.shift();try{G.Message.isRequest(m)?cn(m):G.Message.isNotification(m)?H(m):G.Message.isResponse(m)?cr(m):me(m)}finally{Yt()}}let ee=m=>{try{if(G.Message.isNotification(m)&&m.method===pr.type.method){let x=m.params.id,I=ze(x),$=q.get(I);if(G.Message.isRequest($)){let _e=r?.connectionStrategy,Ee=_e&&_e.cancelUndispatched?_e.cancelUndispatched($,Te):void 0;if(Ee&&(Ee.error!==void 0||Ee.result!==void 0)){q.delete(I),v.delete(x),Ee.id=$.id,Fe(Ee,m.method,Date.now()),e.write(Ee).catch(()=>i.error("Sending response for canceled message failed."));return}}let ye=v.get(x);if(ye!==void 0){ye.cancel(),Qt(m);return}else j.add(x)}E(q,m)}finally{Yt()}};function cn(m){if(Ue())return;function x(ie,Re,ce){let je={jsonrpc:u,id:m.id};ie instanceof G.ResponseError?je.error=ie.toJson():je.result=ie===void 0?null:ie,Fe(je,Re,ce),e.write(je).catch(()=>i.error("Sending response failed."))}function I(ie,Re,ce){let je={jsonrpc:u,id:m.id,error:ie.toJson()};Fe(je,Re,ce),e.write(je).catch(()=>i.error("Sending response failed."))}function $(ie,Re,ce){ie===void 0&&(ie=null);let je={jsonrpc:u,id:m.id,result:ie};Fe(je,Re,ce),e.write(je).catch(()=>i.error("Sending response failed."))}xe(m);let ye=h.get(m.method),_e,Ee;ye&&(_e=ye.type,Ee=ye.handler);let Le=Date.now();if(Ee||p){let ie=m.id??String(Date.now()),Re=te.receiver.createCancellationTokenSource(ie);m.id!==null&&j.has(m.id)&&Re.cancel(),m.id!==null&&v.set(ie,Re);try{let ce;if(Ee)if(m.params===void 0){if(_e!==void 0&&_e.numberOfParams!==0){I(new G.ResponseError(G.ErrorCodes.InvalidParams,`Request ${m.method} defines ${_e.numberOfParams} params but received none.`),m.method,Le);return}ce=Ee(Re.token)}else if(Array.isArray(m.params)){if(_e!==void 0&&_e.parameterStructures===G.ParameterStructures.byName){I(new G.ResponseError(G.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,Le);return}ce=Ee(...m.params,Re.token)}else{if(_e!==void 0&&_e.parameterStructures===G.ParameterStructures.byPosition){I(new G.ResponseError(G.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,Le);return}ce=Ee(m.params,Re.token)}else p&&(ce=p(m.method,m.params,Re.token));let je=ce;ce?je.then?je.then(nt=>{v.delete(ie),x(nt,m.method,Le)},nt=>{v.delete(ie),nt instanceof G.ResponseError?I(nt,m.method,Le):nt&&Be.string(nt.message)?I(new G.ResponseError(G.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${nt.message}`),m.method,Le):I(new G.ResponseError(G.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Le)}):(v.delete(ie),x(ce,m.method,Le)):(v.delete(ie),$(ce,m.method,Le))}catch(ce){v.delete(ie),ce instanceof G.ResponseError?x(ce,m.method,Le):ce&&Be.string(ce.message)?I(new G.ResponseError(G.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${ce.message}`),m.method,Le):I(new G.ResponseError(G.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Le)}}else I(new G.ResponseError(G.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,Le)}function cr(m){if(!Ue())if(m.id===null)m.error?i.error(`Received response message without id: Error is:
5
- ${JSON.stringify(m.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let x=m.id,I=M.get(x);if(un(m,I),I!==void 0){M.delete(x);try{if(m.error){let $=m.error;I.reject(new G.ResponseError($.code,$.message,$.data))}else if(m.result!==void 0)I.resolve(m.result);else throw new Error("Should never happen.")}catch($){$.message?i.error(`Response handler '${I.method}' failed with message: ${$.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}function H(m){if(Ue())return;let x,I;if(m.method===pr.type.method){let $=m.params.id;j.delete($),Qt(m);return}else{let $=g.get(m.method);$&&(I=$.handler,x=$.type)}if(I||y)try{if(Qt(m),I)if(m.params===void 0)x!==void 0&&x.numberOfParams!==0&&x.parameterStructures!==G.ParameterStructures.byName&&i.error(`Notification ${m.method} defines ${x.numberOfParams} params but received none.`),I();else if(Array.isArray(m.params)){let $=m.params;m.method===hr.type.method&&$.length===2&&su.is($[0])?I({token:$[0],value:$[1]}):(x!==void 0&&(x.parameterStructures===G.ParameterStructures.byName&&i.error(`Notification ${m.method} defines parameters by name but received parameters by position`),x.numberOfParams!==m.params.length&&i.error(`Notification ${m.method} defines ${x.numberOfParams} params but received ${$.length} arguments`)),I(...$))}else x!==void 0&&x.parameterStructures===G.ParameterStructures.byPosition&&i.error(`Notification ${m.method} defines parameters by position but received parameters by name`),I(m.params);else y&&y(m.method,m.params)}catch($){$.message?i.error(`Notification handler '${m.method}' failed with message: ${$.message}`):i.error(`Notification handler '${m.method}' failed unexpectedly.`)}else Je.fire(m)}function me(m){if(!m){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
6
- ${JSON.stringify(m,null,4)}`);let x=m;if(Be.string(x.id)||Be.number(x.id)){let I=x.id,$=M.get(I);$&&$.reject(new Error("The received response has neither a result nor an error property."))}}function O(m){if(m!=null)switch(b){case fe.Verbose:return JSON.stringify(m,null,4);case fe.Compact:return JSON.stringify(m);default:return}}function re(m){if(!(b===fe.Off||!z))if(k===kt.Text){let x;(b===fe.Verbose||b===fe.Compact)&&m.params&&(x=`Params: ${O(m.params)}
2
+ "use strict";var Dg=Object.create;var $u=Object.defineProperty;var Sg=Object.getOwnPropertyDescriptor;var Tg=Object.getOwnPropertyNames;var Ag=Object.getPrototypeOf,xg=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var qg=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tg(e))!xg.call(t,i)&&i!==n&&$u(t,i,{get:()=>e[i],enumerable:!(r=Sg(e,i))||r.enumerable});return t};var _e=(t,e,n)=>(n=t!=null?Dg(Ag(t)):{},qg(e||!t||!t.__esModule?$u(n,"default",{value:t,enumerable:!0}):n,t));var un=P(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var co;function uo(){if(co===void 0)throw new Error("No runtime abstraction layer installed");return co}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");co=n}t.install=e})(uo||(uo={}));lo.default=uo});var fo=P(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.Disposable=void 0;var kg;(function(t){function e(n){return{dispose:n}}t.create=e})(kg=Er.Disposable||(Er.Disposable={}))});var Hu=P(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.AbstractMessageBuffer=void 0;var Ng=13,Og=10,Ig=`\r
3
+ `,ho=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let e=0,n=0,r=0,i=0;e:for(;n<this._chunks.length;){let c=this._chunks[n];for(r=0;r<c.length;){switch(c[r]){case Ng:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case Og:switch(e){case 1:e=2;break;case 3:e=4,r++;break e;default:e=0}break;default:e=0}r++}i+=c.byteLength,n++}if(e!==4)return;let s=this._read(i+r),o=new Map,a=this.toString(s,"ascii").split(Ig);if(a.length<2)return o;for(let c=0;c<a.length-2;c++){let d=a[c],p=d.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let m=d.substr(0,p),g=d.substr(p+1).trim();o.set(m,g)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let n=this.allocNative(e),r=0,i=0;for(;e>0;){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);n.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else n.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return n}};Ci.AbstractMessageBuffer=ho});var Bu=P(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var Fg=un(),Wu=require("util"),kn=fo(),Lg=Hu(),Pi=class t extends Lg.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,n){return Buffer.from(e,n)}toString(e,n){return e instanceof Buffer?e.toString(n):new Wu.TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,n):Buffer.from(e,0,n)}allocNative(e){return Buffer.allocUnsafe(e)}};Pi.emptyBuffer=Buffer.allocUnsafe(0);var po=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),kn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),kn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),kn.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),kn.Disposable.create(()=>this.stream.off("data",e))}},mo=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),kn.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),kn.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),kn.Disposable.create(()=>this.stream.off("end",e))}write(e,n){return new Promise((r,i)=>{let s=o=>{o==null?r():i(o)};typeof e=="string"?this.stream.write(e,n,s):this.stream.write(e,s)})}end(){this.stream.end()}},Uu=Object.freeze({messageBuffer:Object.freeze({create:t=>new Pi(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new Wu.TextDecoder(e.charset).decode(t)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:t=>new po(t),asWritableStream:t=>new mo(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){let r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){let n=setImmediate(t,...e);return{dispose:()=>clearImmediate(n)}},setInterval(t,e,...n){let r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function go(){return Uu}(function(t){function e(){Fg.default.install(Uu)}t.install=e})(go||(go={}));yo.default=go});var Jn=P(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.stringArray=at.array=at.func=at.error=at.number=at.string=at.boolean=void 0;function jg(t){return t===!0||t===!1}at.boolean=jg;function Vu(t){return typeof t=="string"||t instanceof String}at.string=Vu;function Mg(t){return typeof t=="number"||t instanceof Number}at.number=Mg;function $g(t){return t instanceof Error}at.error=$g;function Hg(t){return typeof t=="function"}at.func=Hg;function Gu(t){return Array.isArray(t)}at.array=Gu;function Wg(t){return Gu(t)&&t.every(e=>Vu(e))}at.stringArray=Wg});var Ho=P(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.Message=V.NotificationType9=V.NotificationType8=V.NotificationType7=V.NotificationType6=V.NotificationType5=V.NotificationType4=V.NotificationType3=V.NotificationType2=V.NotificationType1=V.NotificationType0=V.NotificationType=V.RequestType9=V.RequestType8=V.RequestType7=V.RequestType6=V.RequestType5=V.RequestType4=V.RequestType3=V.RequestType2=V.RequestType1=V.RequestType=V.RequestType0=V.AbstractMessageSignature=V.ParameterStructures=V.ResponseError=V.ErrorCodes=void 0;var Nn=Jn(),zu;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(zu=V.ErrorCodes||(V.ErrorCodes={}));var Ro=class t extends Error{constructor(e,n,r){super(n),this.code=Nn.number(e)?e:zu.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};V.ResponseError=Ro;var yt=class t{constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};V.ParameterStructures=yt;yt.auto=new yt("auto");yt.byPosition=new yt("byPosition");yt.byName=new yt("byName");var Se=class{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return yt.auto}};V.AbstractMessageSignature=Se;var _o=class extends Se{constructor(e){super(e,0)}};V.RequestType0=_o;var bo=class extends Se{constructor(e,n=yt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};V.RequestType=bo;var vo=class extends Se{constructor(e,n=yt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};V.RequestType1=vo;var Eo=class extends Se{constructor(e){super(e,2)}};V.RequestType2=Eo;var wo=class extends Se{constructor(e){super(e,3)}};V.RequestType3=wo;var Co=class extends Se{constructor(e){super(e,4)}};V.RequestType4=Co;var Po=class extends Se{constructor(e){super(e,5)}};V.RequestType5=Po;var Do=class extends Se{constructor(e){super(e,6)}};V.RequestType6=Do;var So=class extends Se{constructor(e){super(e,7)}};V.RequestType7=So;var To=class extends Se{constructor(e){super(e,8)}};V.RequestType8=To;var Ao=class extends Se{constructor(e){super(e,9)}};V.RequestType9=Ao;var xo=class extends Se{constructor(e,n=yt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};V.NotificationType=xo;var qo=class extends Se{constructor(e){super(e,0)}};V.NotificationType0=qo;var ko=class extends Se{constructor(e,n=yt.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};V.NotificationType1=ko;var No=class extends Se{constructor(e){super(e,2)}};V.NotificationType2=No;var Oo=class extends Se{constructor(e){super(e,3)}};V.NotificationType3=Oo;var Io=class extends Se{constructor(e){super(e,4)}};V.NotificationType4=Io;var Fo=class extends Se{constructor(e){super(e,5)}};V.NotificationType5=Fo;var Lo=class extends Se{constructor(e){super(e,6)}};V.NotificationType6=Lo;var jo=class extends Se{constructor(e){super(e,7)}};V.NotificationType7=jo;var Mo=class extends Se{constructor(e){super(e,8)}};V.NotificationType8=Mo;var $o=class extends Se{constructor(e){super(e,9)}};V.NotificationType9=$o;var Ug;(function(t){function e(i){let s=i;return s&&Nn.string(s.method)&&(Nn.string(s.id)||Nn.number(s.id))}t.isRequest=e;function n(i){let s=i;return s&&Nn.string(s.method)&&i.id===void 0}t.isNotification=n;function r(i){let s=i;return s&&(s.result!==void 0||!!s.error)&&(Nn.string(s.id)||Nn.number(s.id)||s.id===null)}t.isResponse=r})(Ug=V.Message||(V.Message={}))});var Uo=P(ln=>{"use strict";var Ku;Object.defineProperty(ln,"__esModule",{value:!0});ln.LRUCache=ln.LinkedMap=ln.Touch=void 0;var ft;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(ft=ln.Touch||(ln.Touch={}));var Di=class{constructor(){this[Ku]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=ft.None){let r=this._map.get(e);if(r)return n!==ft.None&&this.touch(r,n),r.value}set(e,n,r=ft.None){let i=this._map.get(e);if(i)i.value=n,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Ku=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==ft.First&&n!==ft.Last)){if(n===ft.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===ft.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};ln.LinkedMap=Di;var Wo=class extends Di{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=ft.AsNew){return super.get(e,n)}peek(e){return super.get(e,ft.None)}set(e,n){return super.set(e,n,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};ln.LRUCache=Wo});var Zn=P(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.Emitter=On.Event=void 0;var Bg=un(),Vg;(function(t){let e={dispose(){}};t.None=function(){return e}})(Vg=On.Event||(On.Event={}));var Bo=class{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i<s;i++)if(this._callbacks[i]===e)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{n.push(r[s].apply(i[s],e))}catch(a){(0,Bg.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Si=class t{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,n,r)=>{this._callbacks||(this._callbacks=new Bo),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};On.Emitter=Si;Si._noop=function(){}});var Ko=P(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.CancellationTokenSource=In.CancellationToken=void 0;var Gg=un(),zg=Jn(),Vo=Zn(),Go;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Vo.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Vo.Event.None});function e(n){let r=n;return r&&(r===t.None||r===t.Cancelled||zg.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(Go=In.CancellationToken||(In.CancellationToken={}));var Kg=Object.freeze(function(t,e){let n=(0,Gg.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),Ti=class{constructor(){this._isCancelled=!1}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?Kg:(this._emitter||(this._emitter=new Vo.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},zo=class{get token(){return this._token||(this._token=new Ti),this._token}cancel(){this._token?this._token.cancel():this._token=Go.Cancelled}dispose(){this._token?this._token instanceof Ti&&this._token.dispose():this._token=Go.None}};In.CancellationTokenSource=zo});var Xu=P(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.ReadableStreamMessageReader=fn.AbstractMessageReader=fn.MessageReader=void 0;var Yo=un(),er=Jn(),Xo=Zn(),Xg;(function(t){function e(n){let r=n;return r&&er.func(r.listen)&&er.func(r.dispose)&&er.func(r.onError)&&er.func(r.onClose)&&er.func(r.onPartialMessage)}t.is=e})(Xg=fn.MessageReader||(fn.MessageReader={}));var Ai=class{constructor(){this.errorEmitter=new Xo.Emitter,this.closeEmitter=new Xo.Emitter,this.partialMessageEmitter=new Xo.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${er.string(e.message)?e.message:"unknown"}`)}};fn.AbstractMessageReader=Ai;var Qo;(function(t){function e(n){let r,i,s,o=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(s=n.contentDecoder,o.set(s.name,s)),n.contentDecoders!==void 0)for(let d of n.contentDecoders)o.set(d.name,d);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let d of n.contentTypeDecoders)c.set(d.name,d)}return a===void 0&&(a=(0,Yo.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:s,contentDecoders:o,contentTypeDecoder:a,contentTypeDecoders:c}}t.fromOptions=e})(Qo||(Qo={}));var Jo=class extends Ai{constructor(e,n){super(),this.readable=e,this.options=Qo.fromOptions(n),this.buffer=(0,Yo.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders();if(!i)return;let s=i.get("Content-Length");if(!s)throw new Error("Header must provide a Content-Length property.");let o=parseInt(s);if(isNaN(o))throw new Error("Content-Length value must be a number.");this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let r;this.options.contentDecoder!==void 0?r=this.options.contentDecoder.decode(n):r=Promise.resolve(n),r.then(i=>{this.options.contentTypeDecoder.decode(i,this.options).then(s=>{this.callback(s)},s=>{this.fireError(s)})},i=>{this.fireError(i)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Yo.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};fn.ReadableStreamMessageReader=Jo});var Yu=P(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.Semaphore=void 0;var Yg=un(),Zo=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Yg.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};xi.Semaphore=Zo});var el=P(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.WriteableStreamMessageWriter=dn.AbstractMessageWriter=dn.MessageWriter=void 0;var Qu=un(),wr=Jn(),Qg=Yu(),Ju=Zn(),Jg="Content-Length: ",Zu=`\r
4
+ `,Zg;(function(t){function e(n){let r=n;return r&&wr.func(r.dispose)&&wr.func(r.onClose)&&wr.func(r.onError)&&wr.func(r.write)}t.is=e})(Zg=dn.MessageWriter||(dn.MessageWriter={}));var qi=class{constructor(){this.errorEmitter=new Ju.Emitter,this.closeEmitter=new Ju.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${wr.string(e.message)?e.message:"unknown"}`)}};dn.AbstractMessageWriter=qi;var ea;(function(t){function e(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,Qu.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,Qu.default)().applicationJson.encoder}}t.fromOptions=e})(ea||(ea={}));var ta=class extends qi{constructor(e,n){super(),this.writable=e,this.options=ea.fromOptions(n),this.errorCount=0,this.writeSemaphore=new Qg.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(Jg,r.byteLength.toString(),Zu),i.push(Zu),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}};dn.WriteableStreamMessageWriter=ta});var ol=P(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.createMessageConnection=Y.ConnectionOptions=Y.CancellationStrategy=Y.CancellationSenderStrategy=Y.CancellationReceiverStrategy=Y.ConnectionStrategy=Y.ConnectionError=Y.ConnectionErrors=Y.LogTraceNotification=Y.SetTraceNotification=Y.TraceFormat=Y.Trace=Y.NullLogger=Y.ProgressType=Y.ProgressToken=void 0;var tl=un(),Ke=Jn(),X=Ho(),nl=Uo(),Cr=Zn(),na=Ko(),Dr;(function(t){t.type=new X.NotificationType("$/cancelRequest")})(Dr||(Dr={}));var rl;(function(t){function e(n){return typeof n=="string"||typeof n=="number"}t.is=e})(rl=Y.ProgressToken||(Y.ProgressToken={}));var Pr;(function(t){t.type=new X.NotificationType("$/progress")})(Pr||(Pr={}));var ra=class{constructor(){}};Y.ProgressType=ra;var ia;(function(t){function e(n){return Ke.func(n)}t.is=e})(ia||(ia={}));Y.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ge;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(ge=Y.Trace||(Y.Trace={}));(function(t){function e(r){if(!Ke.string(r))return t.Off;switch(r=r.toLowerCase(),r){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}t.fromString=e;function n(r){switch(r){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}t.toString=n})(ge=Y.Trace||(Y.Trace={}));var Mt;(function(t){t.Text="text",t.JSON="json"})(Mt=Y.TraceFormat||(Y.TraceFormat={}));(function(t){function e(n){return Ke.string(n)?(n=n.toLowerCase(),n==="json"?t.JSON:t.Text):t.Text}t.fromString=e})(Mt=Y.TraceFormat||(Y.TraceFormat={}));var il;(function(t){t.type=new X.NotificationType("$/setTrace")})(il=Y.SetTraceNotification||(Y.SetTraceNotification={}));var sa;(function(t){t.type=new X.NotificationType("$/logTrace")})(sa=Y.LogTraceNotification||(Y.LogTraceNotification={}));var ki;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(ki=Y.ConnectionErrors||(Y.ConnectionErrors={}));var tr=class t extends Error{constructor(e,n){super(n),this.code=e,Object.setPrototypeOf(this,t.prototype)}};Y.ConnectionError=tr;var sl;(function(t){function e(n){let r=n;return r&&Ke.func(r.cancelUndispatched)}t.is=e})(sl=Y.ConnectionStrategy||(Y.ConnectionStrategy={}));var oa;(function(t){t.Message=Object.freeze({createCancellationTokenSource(n){return new na.CancellationTokenSource}});function e(n){let r=n;return r&&Ke.func(r.createCancellationTokenSource)}t.is=e})(oa=Y.CancellationReceiverStrategy||(Y.CancellationReceiverStrategy={}));var aa;(function(t){t.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Dr.type,{id:r})},cleanup(n){}});function e(n){let r=n;return r&&Ke.func(r.sendCancellation)&&Ke.func(r.cleanup)}t.is=e})(aa=Y.CancellationSenderStrategy||(Y.CancellationSenderStrategy={}));var ca;(function(t){t.Message=Object.freeze({receiver:oa.Message,sender:aa.Message});function e(n){let r=n;return r&&oa.is(r.receiver)&&aa.is(r.sender)}t.is=e})(ca=Y.CancellationStrategy||(Y.CancellationStrategy={}));var ey;(function(t){function e(n){let r=n;return r&&(ca.is(r.cancellationStrategy)||sl.is(r.connectionStrategy))}t.is=e})(ey=Y.ConnectionOptions||(Y.ConnectionOptions={}));var $t;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})($t||($t={}));function ty(t,e,n,r){let i=n!==void 0?n:Y.NullLogger,s=0,o=0,a=0,c="2.0",d,p=new Map,m,g=new Map,C=new Map,k,O=new nl.LinkedMap,M=new Map,F=new Set,v=new Map,b=ge.Off,N=Mt.Text,K,le=$t.New,U=new Cr.Emitter,Q=new Cr.Emitter,nt=new Cr.Emitter,Le=new Cr.Emitter,D=new Cr.Emitter,ie=r&&r.cancellationStrategy?r.cancellationStrategy:ca.Message;function Ye(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}function Qe(y){return y===null?"res-unknown-"+(++a).toString():"res-"+y.toString()}function S(){return"not-"+(++o).toString()}function T(y,q){X.Message.isRequest(q)?y.set(Ye(q.id),q):X.Message.isResponse(q)?y.set(Qe(q.id),q):y.set(S(),q)}function ke(y){}function Ae(){return le===$t.Listening}function Je(){return le===$t.Closed}function ze(){return le===$t.Disposed}function lt(){(le===$t.New||le===$t.Listening)&&(le=$t.Closed,Q.fire(void 0))}function It(y){U.fire([y,void 0,void 0])}function _r(y){U.fire(y)}t.onClose(lt),t.onError(It),e.onClose(lt),e.onError(_r);function sn(){k||O.size===0||(k=(0,tl.default)().timer.setImmediate(()=>{k=void 0,Ft()}))}function Ft(){if(O.size===0)return;let y=O.shift();try{X.Message.isRequest(y)?_n(y):X.Message.isNotification(y)?$(y):X.Message.isResponse(y)?br(y):Re(y)}finally{sn()}}let re=y=>{try{if(X.Message.isNotification(y)&&y.method===Dr.type.method){let q=y.params.id,L=Ye(q),B=O.get(L);if(X.Message.isRequest(B)){let Ee=r?.connectionStrategy,xe=Ee&&Ee.cancelUndispatched?Ee.cancelUndispatched(B,ke):void 0;if(xe&&(xe.error!==void 0||xe.result!==void 0)){O.delete(L),v.delete(q),xe.id=B.id,je(xe,y.method,Date.now()),e.write(xe).catch(()=>i.error("Sending response for canceled message failed."));return}}let ve=v.get(q);if(ve!==void 0){ve.cancel(),on(y);return}else F.add(q)}T(O,y)}finally{sn()}};function _n(y){if(ze())return;function q(ae,we,fe){let $e={jsonrpc:c,id:y.id};ae instanceof X.ResponseError?$e.error=ae.toJson():$e.result=ae===void 0?null:ae,je($e,we,fe),e.write($e).catch(()=>i.error("Sending response failed."))}function L(ae,we,fe){let $e={jsonrpc:c,id:y.id,error:ae.toJson()};je($e,we,fe),e.write($e).catch(()=>i.error("Sending response failed."))}function B(ae,we,fe){ae===void 0&&(ae=null);let $e={jsonrpc:c,id:y.id,result:ae};je($e,we,fe),e.write($e).catch(()=>i.error("Sending response failed."))}Ne(y);let ve=p.get(y.method),Ee,xe;ve&&(Ee=ve.type,xe=ve.handler);let Ue=Date.now();if(xe||d){let ae=y.id??String(Date.now()),we=ie.receiver.createCancellationTokenSource(ae);y.id!==null&&F.has(y.id)&&we.cancel(),y.id!==null&&v.set(ae,we);try{let fe;if(xe)if(y.params===void 0){if(Ee!==void 0&&Ee.numberOfParams!==0){L(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines ${Ee.numberOfParams} params but received none.`),y.method,Ue);return}fe=xe(we.token)}else if(Array.isArray(y.params)){if(Ee!==void 0&&Ee.parameterStructures===X.ParameterStructures.byName){L(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,Ue);return}fe=xe(...y.params,we.token)}else{if(Ee!==void 0&&Ee.parameterStructures===X.ParameterStructures.byPosition){L(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,Ue);return}fe=xe(y.params,we.token)}else d&&(fe=d(y.method,y.params,we.token));let $e=fe;fe?$e.then?$e.then(ot=>{v.delete(ae),q(ot,y.method,Ue)},ot=>{v.delete(ae),ot instanceof X.ResponseError?L(ot,y.method,Ue):ot&&Ke.string(ot.message)?L(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ot.message}`),y.method,Ue):L(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ue)}):(v.delete(ae),q(fe,y.method,Ue)):(v.delete(ae),B(fe,y.method,Ue))}catch(fe){v.delete(ae),fe instanceof X.ResponseError?q(fe,y.method,Ue):fe&&Ke.string(fe.message)?L(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${fe.message}`),y.method,Ue):L(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ue)}}else L(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,Ue)}function br(y){if(!ze())if(y.id===null)y.error?i.error(`Received response message without id: Error is:
5
+ ${JSON.stringify(y.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let q=y.id,L=M.get(q);if(bn(y,L),L!==void 0){M.delete(q);try{if(y.error){let B=y.error;L.reject(new X.ResponseError(B.code,B.message,B.data))}else if(y.result!==void 0)L.resolve(y.result);else throw new Error("Should never happen.")}catch(B){B.message?i.error(`Response handler '${L.method}' failed with message: ${B.message}`):i.error(`Response handler '${L.method}' failed unexpectedly.`)}}}}function $(y){if(ze())return;let q,L;if(y.method===Dr.type.method){let B=y.params.id;F.delete(B),on(y);return}else{let B=g.get(y.method);B&&(L=B.handler,q=B.type)}if(L||m)try{if(on(y),L)if(y.params===void 0)q!==void 0&&q.numberOfParams!==0&&q.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines ${q.numberOfParams} params but received none.`),L();else if(Array.isArray(y.params)){let B=y.params;y.method===Pr.type.method&&B.length===2&&rl.is(B[0])?L({token:B[0],value:B[1]}):(q!==void 0&&(q.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${y.method} defines parameters by name but received parameters by position`),q.numberOfParams!==y.params.length&&i.error(`Notification ${y.method} defines ${q.numberOfParams} params but received ${B.length} arguments`)),L(...B))}else q!==void 0&&q.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${y.method} defines parameters by position but received parameters by name`),L(y.params);else m&&m(y.method,y.params)}catch(B){B.message?i.error(`Notification handler '${y.method}' failed with message: ${B.message}`):i.error(`Notification handler '${y.method}' failed unexpectedly.`)}else nt.fire(y)}function Re(y){if(!y){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
6
+ ${JSON.stringify(y,null,4)}`);let q=y;if(Ke.string(q.id)||Ke.number(q.id)){let L=q.id,B=M.get(L);B&&B.reject(new Error("The received response has neither a result nor an error property."))}}function I(y){if(y!=null)switch(b){case ge.Verbose:return JSON.stringify(y,null,4);case ge.Compact:return JSON.stringify(y);default:return}}function oe(y){if(!(b===ge.Off||!K))if(N===Mt.Text){let q;(b===ge.Verbose||b===ge.Compact)&&y.params&&(q=`Params: ${I(y.params)}
7
7
 
8
- `),z.log(`Sending request '${m.method} - (${m.id})'.`,x)}else ln("send-request",m)}function we(m){if(!(b===fe.Off||!z))if(k===kt.Text){let x;(b===fe.Verbose||b===fe.Compact)&&(m.params?x=`Params: ${O(m.params)}
8
+ `),K.log(`Sending request '${y.method} - (${y.id})'.`,q)}else vn("send-request",y)}function De(y){if(!(b===ge.Off||!K))if(N===Mt.Text){let q;(b===ge.Verbose||b===ge.Compact)&&(y.params?q=`Params: ${I(y.params)}
9
9
 
10
- `:x=`No parameters provided.
10
+ `:q=`No parameters provided.
11
11
 
12
- `),z.log(`Sending notification '${m.method}'.`,x)}else ln("send-notification",m)}function Fe(m,x,I){if(!(b===fe.Off||!z))if(k===kt.Text){let $;(b===fe.Verbose||b===fe.Compact)&&(m.error&&m.error.data?$=`Error data: ${O(m.error.data)}
12
+ `),K.log(`Sending notification '${y.method}'.`,q)}else vn("send-notification",y)}function je(y,q,L){if(!(b===ge.Off||!K))if(N===Mt.Text){let B;(b===ge.Verbose||b===ge.Compact)&&(y.error&&y.error.data?B=`Error data: ${I(y.error.data)}
13
13
 
14
- `:m.result?$=`Result: ${O(m.result)}
14
+ `:y.result?B=`Result: ${I(y.result)}
15
15
 
16
- `:m.error===void 0&&($=`No result returned.
16
+ `:y.error===void 0&&(B=`No result returned.
17
17
 
18
- `)),z.log(`Sending response '${x} - (${m.id})'. Processing request took ${Date.now()-I}ms`,$)}else ln("send-response",m)}function xe(m){if(!(b===fe.Off||!z))if(k===kt.Text){let x;(b===fe.Verbose||b===fe.Compact)&&m.params&&(x=`Params: ${O(m.params)}
18
+ `)),K.log(`Sending response '${q} - (${y.id})'. Processing request took ${Date.now()-L}ms`,B)}else vn("send-response",y)}function Ne(y){if(!(b===ge.Off||!K))if(N===Mt.Text){let q;(b===ge.Verbose||b===ge.Compact)&&y.params&&(q=`Params: ${I(y.params)}
19
19
 
20
- `),z.log(`Received request '${m.method} - (${m.id})'.`,x)}else ln("receive-request",m)}function Qt(m){if(!(b===fe.Off||!z||m.method===qs.type.method))if(k===kt.Text){let x;(b===fe.Verbose||b===fe.Compact)&&(m.params?x=`Params: ${O(m.params)}
20
+ `),K.log(`Received request '${y.method} - (${y.id})'.`,q)}else vn("receive-request",y)}function on(y){if(!(b===ge.Off||!K||y.method===sa.type.method))if(N===Mt.Text){let q;(b===ge.Verbose||b===ge.Compact)&&(y.params?q=`Params: ${I(y.params)}
21
21
 
22
- `:x=`No parameters provided.
22
+ `:q=`No parameters provided.
23
23
 
24
- `),z.log(`Received notification '${m.method}'.`,x)}else ln("receive-notification",m)}function un(m,x){if(!(b===fe.Off||!z))if(k===kt.Text){let I;if((b===fe.Verbose||b===fe.Compact)&&(m.error&&m.error.data?I=`Error data: ${O(m.error.data)}
24
+ `),K.log(`Received notification '${y.method}'.`,q)}else vn("receive-notification",y)}function bn(y,q){if(!(b===ge.Off||!K))if(N===Mt.Text){let L;if((b===ge.Verbose||b===ge.Compact)&&(y.error&&y.error.data?L=`Error data: ${I(y.error.data)}
25
25
 
26
- `:m.result?I=`Result: ${O(m.result)}
26
+ `:y.result?L=`Result: ${I(y.result)}
27
27
 
28
- `:m.error===void 0&&(I=`No result returned.
28
+ `:y.error===void 0&&(L=`No result returned.
29
29
 
30
- `)),x){let $=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";z.log(`Received response '${x.method} - (${m.id})' in ${Date.now()-x.timerStart}ms.${$}`,I)}else z.log(`Received response ${m.id} without active response promise.`,I)}else ln("receive-response",m)}function ln(m,x){if(!z||b===fe.Off)return;let I={isLSPMessage:!0,type:m,message:x,timestamp:Date.now()};z.log(I)}function Rn(){if(Ke())throw new Bn(hi.Closed,"Connection is closed.");if(Ue())throw new Bn(hi.Disposed,"Connection is disposed.")}function Fo(){if(Pe())throw new Bn(hi.AlreadyListening,"Connection is already listening")}function Oo(){if(!Pe())throw new Error("Call listen() first.")}function bn(m){return m===void 0?null:m}function Mn(m){if(m!==null)return m}function ni(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function ur(m,x){switch(m){case G.ParameterStructures.auto:return ni(x)?Mn(x):[bn(x)];case G.ParameterStructures.byName:if(!ni(x))throw new Error("Received parameters by name but param is not an object literal.");return Mn(x);case G.ParameterStructures.byPosition:return[bn(x)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function ri(m,x){let I,$=m.numberOfParams;switch($){case 0:I=void 0;break;case 1:I=ur(m.parameterStructures,x[0]);break;default:I=[];for(let ye=0;ye<x.length&&ye<$;ye++)I.push(bn(x[ye]));if(x.length<$)for(let ye=x.length;ye<$;ye++)I.push(null);break}return I}let dn={sendNotification:(m,...x)=>{Rn();let I,$;if(Be.string(m)){I=m;let _e=x[0],Ee=0,Le=G.ParameterStructures.auto;G.ParameterStructures.is(_e)&&(Ee=1,Le=_e);let ie=x.length,Re=ie-Ee;switch(Re){case 0:$=void 0;break;case 1:$=ur(Le,x[Ee]);break;default:if(Le===G.ParameterStructures.byName)throw new Error(`Received ${Re} parameters for 'by Name' notification parameter structure.`);$=x.slice(Ee,ie).map(ce=>bn(ce));break}}else{let _e=x;I=m.method,$=ri(m,_e)}let ye={jsonrpc:u,method:I,params:$};return we(ye),e.write(ye).catch(()=>i.error("Sending notification failed."))},onNotification:(m,x)=>{Rn();let I;return Be.func(m)?y=m:x&&(Be.string(m)?(I=m,g.set(m,{type:void 0,handler:x})):(I=m.method,g.set(m.method,{type:m,handler:x}))),{dispose:()=>{I!==void 0?g.delete(I):y=void 0}}},onProgress:(m,x,I)=>{if(N.has(x))throw new Error(`Progress handler for token ${x} already registered`);return N.set(x,I),{dispose:()=>{N.delete(x)}}},sendProgress:(m,x,I)=>dn.sendNotification(hr.type,{token:x,value:I}),onUnhandledProgress:Ne.event,sendRequest:(m,...x)=>{Rn(),Oo();let I,$,ye;if(Be.string(m)){I=m;let ie=x[0],Re=x[x.length-1],ce=0,je=G.ParameterStructures.auto;G.ParameterStructures.is(ie)&&(ce=1,je=ie);let nt=x.length;xs.CancellationToken.is(Re)&&(nt=nt-1,ye=Re);let Xt=nt-ce;switch(Xt){case 0:$=void 0;break;case 1:$=ur(je,x[ce]);break;default:if(je===G.ParameterStructures.byName)throw new Error(`Received ${Xt} parameters for 'by Name' request parameter structure.`);$=x.slice(ce,nt).map(Wt=>bn(Wt));break}}else{let ie=x;I=m.method,$=ri(m,ie);let Re=m.numberOfParams;ye=xs.CancellationToken.is(ie[Re])?ie[Re]:void 0}let _e=o++,Ee;return ye&&(Ee=ye.onCancellationRequested(()=>{let ie=te.sender.sendCancellation(dn,_e);return ie===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${_e}`),Promise.resolve()):ie.catch(()=>{i.log(`Sending cancellation messages for id ${_e} failed`)})})),new Promise((ie,Re)=>{let ce={jsonrpc:u,id:_e,method:I,params:$},je=Wt=>{ie(Wt),te.sender.cleanup(_e),Ee?.dispose()},nt=Wt=>{Re(Wt),te.sender.cleanup(_e),Ee?.dispose()},Xt={method:I,timerStart:Date.now(),resolve:je,reject:nt};re(ce);try{e.write(ce).catch(()=>i.error("Sending request failed."))}catch(Wt){Xt.reject(new G.ResponseError(G.ErrorCodes.MessageWriteError,Wt.message?Wt.message:"Unknown reason")),Xt=null}Xt&&M.set(_e,Xt)})},onRequest:(m,x)=>{Rn();let I=null;return As.is(m)?(I=void 0,p=m):Be.string(m)?(I=null,x!==void 0&&(I=m,h.set(m,{handler:x,type:void 0}))):x!==void 0&&(I=m.method,h.set(m.method,{type:m,handler:x})),{dispose:()=>{I!==null&&(I!==void 0?h.delete(I):p=void 0)}}},hasPendingResponse:()=>M.size>0,trace:async(m,x,I)=>{let $=!1,ye=kt.Text;I!==void 0&&(Be.boolean(I)?$=I:($=I.sendNotification||!1,ye=I.traceFormat||kt.Text)),b=m,k=ye,b===fe.Off?z=void 0:z=x,$&&!Ke()&&!Ue()&&await dn.sendNotification(au.type,{value:fe.toString(m)})},onError:W.event,onClose:Y.event,onUnhandledNotification:Je.event,onDispose:D.event,end:()=>{e.end()},dispose:()=>{if(Ue())return;ae=At.Disposed,D.fire(void 0);let m=new G.ResponseError(G.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let x of M.values())x.reject(m);M=new Map,v=new Map,j=new Set,q=new ou.LinkedMap,Be.func(e.dispose)&&e.dispose(),Be.func(t.dispose)&&t.dispose()},listen:()=>{Rn(),Fo(),ae=At.Listening,t.listen(ee)},inspect:()=>{(0,iu.default)().console.log("inspect")}};return dn.onNotification(qs.type,m=>{if(b===fe.Off||!z)return;let x=b===fe.Verbose||b===fe.Compact;z.log(m.message,x?m.verbose:void 0)}),dn.onNotification(hr.type,m=>{let x=N.get(m.token);x?x(m.value):Ne.fire(m)}),dn}K.createMessageConnection=pp});var Ms=F(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.SetTraceNotification=S.TraceFormat=S.Trace=S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.CancellationStrategy=S.CancellationSenderStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=void 0;var ve=ps();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return ve.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return ve.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return ve.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return ve.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return ve.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return ve.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return ve.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return ve.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return ve.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return ve.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return ve.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return ve.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return ve.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return ve.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return ve.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return ve.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return ve.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return ve.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return ve.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return ve.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return ve.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return ve.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return ve.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return ve.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return ve.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return ve.ParameterStructures}});var js=gs();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return js.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return js.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return js.Touch}});var mp=Mo();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return mp.Disposable}});var lu=$n();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return lu.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return lu.Emitter}});var du=vs();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return du.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return du.CancellationToken}});var Is=Jc();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return Is.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return Is.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Is.ReadableStreamMessageReader}});var Ls=ru();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return Ls.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ls.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ls.WriteableStreamMessageWriter}});var at=uu();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return at.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return at.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return at.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return at.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return at.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return at.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return at.Trace}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return at.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return at.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return at.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return at.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return at.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return at.CancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return at.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return at.CancellationStrategy}});var gp=Zt();S.RAL=gp.default});var Sn=F(de=>{"use strict";var yp=de&&de.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),_p=de&&de.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yp(e,t,n)};Object.defineProperty(de,"__esModule",{value:!0});de.createMessageConnection=de.createServerSocketTransport=de.createClientSocketTransport=de.createServerPipeTransport=de.createClientPipeTransport=de.generateRandomPipeName=de.StreamMessageWriter=de.StreamMessageReader=de.SocketMessageWriter=de.SocketMessageReader=de.IPCMessageWriter=de.IPCMessageReader=void 0;var Vn=Gc();Vn.default.install();var $t=Ms(),fu=require("path"),Rp=require("os"),bp=require("crypto"),gi=require("net");_p(Ms(),de);var Hs=class extends $t.AbstractMessageReader{constructor(e){super(),this.process=e;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),$t.Disposable.create(()=>this.process.off("message",e))}};de.IPCMessageReader=Hs;var Ws=class extends $t.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,e)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};de.IPCMessageWriter=Ws;var Pn=class extends $t.ReadableStreamMessageReader{constructor(e,n="utf-8"){super((0,Vn.default)().stream.asReadableStream(e),n)}};de.SocketMessageReader=Pn;var En=class extends $t.WriteableStreamMessageWriter{constructor(e,n){super((0,Vn.default)().stream.asWritableStream(e),n),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};de.SocketMessageWriter=En;var pi=class extends $t.ReadableStreamMessageReader{constructor(e,n){super((0,Vn.default)().stream.asReadableStream(e),n)}};de.StreamMessageReader=pi;var mi=class extends $t.WriteableStreamMessageWriter{constructor(e,n){super((0,Vn.default)().stream.asWritableStream(e),n)}};de.StreamMessageWriter=mi;var hu=process.env.XDG_RUNTIME_DIR,vp=new Map([["linux",107],["darwin",103]]);function wp(){let t=(0,bp.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let e;hu?e=fu.join(hu,`vscode-ipc-${t}.sock`):e=fu.join(Rp.tmpdir(),`vscode-${t}.sock`);let n=vp.get(process.platform);return n!==void 0&&e.length>=n&&(0,Vn.default)().console.warn(`WARNING: IPC handle "${e}" is longer than ${n} characters.`),e}de.generateRandomPipeName=wp;function Cp(t,e="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,gi.createServer)(a=>{s.close(),n([new Pn(a,e),new En(a,e)])});s.on("error",o),s.listen(t,()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}de.createClientPipeTransport=Cp;function Dp(t,e="utf-8"){let n=(0,gi.createConnection)(t);return[new Pn(n,e),new En(n,e)]}de.createServerPipeTransport=Dp;function Pp(t,e="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,gi.createServer)(a=>{s.close(),n([new Pn(a,e),new En(a,e)])});s.on("error",o),s.listen(t,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}de.createClientSocketTransport=Pp;function Ep(t,e="utf-8"){let n=(0,gi.createConnection)(t,"127.0.0.1");return[new Pn(n,e),new En(n,e)]}de.createServerSocketTransport=Ep;function Sp(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}function Tp(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}function xp(t,e,n,r){n||(n=$t.NullLogger);let i=Sp(t)?new pi(t):t,o=Tp(e)?new mi(e):e;return $t.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,$t.createMessageConnection)(i,o,n,r)}de.createMessageConnection=xp});var yi=F((Vw,pu)=>{"use strict";pu.exports=Sn()});var mr=F((mu,_i)=>{(function(t){if(typeof _i=="object"&&typeof _i.exports=="object"){var e=t(require,mu);e!==void 0&&(_i.exports=e)}else typeof define=="function"&&define.amd&&define(["require","exports"],t)})(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocument=e.EOL=e.WorkspaceFolder=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.SemanticTokens=e.SemanticTokenModifiers=e.SemanticTokenTypes=e.SelectionRange=e.DocumentLink=e.FormattingOptions=e.CodeLens=e.CodeAction=e.CodeActionContext=e.CodeActionTriggerKind=e.CodeActionKind=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.SignatureInformation=e.ParameterInformation=e.Hover=e.MarkedString=e.CompletionList=e.CompletionItem=e.CompletionItemLabelDetails=e.InsertTextMode=e.InsertReplaceEdit=e.CompletionItemTag=e.InsertTextFormat=e.CompletionItemKind=e.MarkupContent=e.MarkupKind=e.TextDocumentItem=e.OptionalVersionedTextDocumentIdentifier=e.VersionedTextDocumentIdentifier=e.TextDocumentIdentifier=e.WorkspaceChange=e.WorkspaceEdit=e.DeleteFile=e.RenameFile=e.CreateFile=e.TextDocumentEdit=e.AnnotatedTextEdit=e.ChangeAnnotationIdentifier=e.ChangeAnnotation=e.TextEdit=e.Command=e.Diagnostic=e.CodeDescription=e.DiagnosticTag=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.FoldingRange=e.FoldingRangeKind=e.ColorPresentation=e.ColorInformation=e.Color=e.LocationLink=e.Location=e.Range=e.Position=e.uinteger=e.integer=e.URI=e.DocumentUri=void 0;var n;(function(l){function _(R){return typeof R=="string"}l.is=_})(n=e.DocumentUri||(e.DocumentUri={}));var r;(function(l){function _(R){return typeof R=="string"}l.is=_})(r=e.URI||(e.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function _(R){return typeof R=="number"&&l.MIN_VALUE<=R&&R<=l.MAX_VALUE}l.is=_})(i=e.integer||(e.integer={}));var o;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function _(R){return typeof R=="number"&&l.MIN_VALUE<=R&&R<=l.MAX_VALUE}l.is=_})(o=e.uinteger||(e.uinteger={}));var s;(function(l){function _(f,c){return f===Number.MAX_VALUE&&(f=o.MAX_VALUE),c===Number.MAX_VALUE&&(c=o.MAX_VALUE),{line:f,character:c}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&w.uinteger(c.line)&&w.uinteger(c.character)}l.is=R})(s=e.Position||(e.Position={}));var a;(function(l){function _(f,c,C,T){if(w.uinteger(f)&&w.uinteger(c)&&w.uinteger(C)&&w.uinteger(T))return{start:s.create(f,c),end:s.create(C,T)};if(s.is(f)&&s.is(c))return{start:f,end:c};throw new Error("Range#create called with invalid arguments[".concat(f,", ").concat(c,", ").concat(C,", ").concat(T,"]"))}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&s.is(c.start)&&s.is(c.end)}l.is=R})(a=e.Range||(e.Range={}));var u;(function(l){function _(f,c){return{uri:f,range:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&a.is(c.range)&&(w.string(c.uri)||w.undefined(c.uri))}l.is=R})(u=e.Location||(e.Location={}));var p;(function(l){function _(f,c,C,T){return{targetUri:f,targetRange:c,targetSelectionRange:C,originSelectionRange:T}}l.create=_;function R(f){var c=f;return w.defined(c)&&a.is(c.targetRange)&&w.string(c.targetUri)&&a.is(c.targetSelectionRange)&&(a.is(c.originSelectionRange)||w.undefined(c.originSelectionRange))}l.is=R})(p=e.LocationLink||(e.LocationLink={}));var h;(function(l){function _(f,c,C,T){return{red:f,green:c,blue:C,alpha:T}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&w.numberRange(c.red,0,1)&&w.numberRange(c.green,0,1)&&w.numberRange(c.blue,0,1)&&w.numberRange(c.alpha,0,1)}l.is=R})(h=e.Color||(e.Color={}));var y;(function(l){function _(f,c){return{range:f,color:c}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&a.is(c.range)&&h.is(c.color)}l.is=R})(y=e.ColorInformation||(e.ColorInformation={}));var g;(function(l){function _(f,c,C){return{label:f,textEdit:c,additionalTextEdits:C}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&w.string(c.label)&&(w.undefined(c.textEdit)||z.is(c))&&(w.undefined(c.additionalTextEdits)||w.typedArray(c.additionalTextEdits,z.is))}l.is=R})(g=e.ColorPresentation||(e.ColorPresentation={}));var N;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(N=e.FoldingRangeKind||(e.FoldingRangeKind={}));var A;(function(l){function _(f,c,C,T,X,Oe){var be={startLine:f,endLine:c};return w.defined(C)&&(be.startCharacter=C),w.defined(T)&&(be.endCharacter=T),w.defined(X)&&(be.kind=X),w.defined(Oe)&&(be.collapsedText=Oe),be}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&w.uinteger(c.startLine)&&w.uinteger(c.startLine)&&(w.undefined(c.startCharacter)||w.uinteger(c.startCharacter))&&(w.undefined(c.endCharacter)||w.uinteger(c.endCharacter))&&(w.undefined(c.kind)||w.string(c.kind))}l.is=R})(A=e.FoldingRange||(e.FoldingRange={}));var q;(function(l){function _(f,c){return{location:f,message:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&u.is(c.location)&&w.string(c.message)}l.is=R})(q=e.DiagnosticRelatedInformation||(e.DiagnosticRelatedInformation={}));var M;(function(l){l.Error=1,l.Warning=2,l.Information=3,l.Hint=4})(M=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var j;(function(l){l.Unnecessary=1,l.Deprecated=2})(j=e.DiagnosticTag||(e.DiagnosticTag={}));var v;(function(l){function _(R){var f=R;return w.objectLiteral(f)&&w.string(f.href)}l.is=_})(v=e.CodeDescription||(e.CodeDescription={}));var b;(function(l){function _(f,c,C,T,X,Oe){var be={range:f,message:c};return w.defined(C)&&(be.severity=C),w.defined(T)&&(be.code=T),w.defined(X)&&(be.source=X),w.defined(Oe)&&(be.relatedInformation=Oe),be}l.create=_;function R(f){var c,C=f;return w.defined(C)&&a.is(C.range)&&w.string(C.message)&&(w.number(C.severity)||w.undefined(C.severity))&&(w.integer(C.code)||w.string(C.code)||w.undefined(C.code))&&(w.undefined(C.codeDescription)||w.string((c=C.codeDescription)===null||c===void 0?void 0:c.href))&&(w.string(C.source)||w.undefined(C.source))&&(w.undefined(C.relatedInformation)||w.typedArray(C.relatedInformation,q.is))}l.is=R})(b=e.Diagnostic||(e.Diagnostic={}));var k;(function(l){function _(f,c){for(var C=[],T=2;T<arguments.length;T++)C[T-2]=arguments[T];var X={title:f,command:c};return w.defined(C)&&C.length>0&&(X.arguments=C),X}l.create=_;function R(f){var c=f;return w.defined(c)&&w.string(c.title)&&w.string(c.command)}l.is=R})(k=e.Command||(e.Command={}));var z;(function(l){function _(C,T){return{range:C,newText:T}}l.replace=_;function R(C,T){return{range:{start:C,end:C},newText:T}}l.insert=R;function f(C){return{range:C,newText:""}}l.del=f;function c(C){var T=C;return w.objectLiteral(T)&&w.string(T.newText)&&a.is(T.range)}l.is=c})(z=e.TextEdit||(e.TextEdit={}));var ae;(function(l){function _(f,c,C){var T={label:f};return c!==void 0&&(T.needsConfirmation=c),C!==void 0&&(T.description=C),T}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&w.string(c.label)&&(w.boolean(c.needsConfirmation)||c.needsConfirmation===void 0)&&(w.string(c.description)||c.description===void 0)}l.is=R})(ae=e.ChangeAnnotation||(e.ChangeAnnotation={}));var W;(function(l){function _(R){var f=R;return w.string(f)}l.is=_})(W=e.ChangeAnnotationIdentifier||(e.ChangeAnnotationIdentifier={}));var Y;(function(l){function _(C,T,X){return{range:C,newText:T,annotationId:X}}l.replace=_;function R(C,T,X){return{range:{start:C,end:C},newText:T,annotationId:X}}l.insert=R;function f(C,T){return{range:C,newText:"",annotationId:T}}l.del=f;function c(C){var T=C;return z.is(T)&&(ae.is(T.annotationId)||W.is(T.annotationId))}l.is=c})(Y=e.AnnotatedTextEdit||(e.AnnotatedTextEdit={}));var Je;(function(l){function _(f,c){return{textDocument:f,edits:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&Ke.is(c.textDocument)&&Array.isArray(c.edits)}l.is=R})(Je=e.TextDocumentEdit||(e.TextDocumentEdit={}));var Ne;(function(l){function _(f,c,C){var T={kind:"create",uri:f};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(T.options=c),C!==void 0&&(T.annotationId=C),T}l.create=_;function R(f){var c=f;return c&&c.kind==="create"&&w.string(c.uri)&&(c.options===void 0||(c.options.overwrite===void 0||w.boolean(c.options.overwrite))&&(c.options.ignoreIfExists===void 0||w.boolean(c.options.ignoreIfExists)))&&(c.annotationId===void 0||W.is(c.annotationId))}l.is=R})(Ne=e.CreateFile||(e.CreateFile={}));var D;(function(l){function _(f,c,C,T){var X={kind:"rename",oldUri:f,newUri:c};return C!==void 0&&(C.overwrite!==void 0||C.ignoreIfExists!==void 0)&&(X.options=C),T!==void 0&&(X.annotationId=T),X}l.create=_;function R(f){var c=f;return c&&c.kind==="rename"&&w.string(c.oldUri)&&w.string(c.newUri)&&(c.options===void 0||(c.options.overwrite===void 0||w.boolean(c.options.overwrite))&&(c.options.ignoreIfExists===void 0||w.boolean(c.options.ignoreIfExists)))&&(c.annotationId===void 0||W.is(c.annotationId))}l.is=R})(D=e.RenameFile||(e.RenameFile={}));var te;(function(l){function _(f,c,C){var T={kind:"delete",uri:f};return c!==void 0&&(c.recursive!==void 0||c.ignoreIfNotExists!==void 0)&&(T.options=c),C!==void 0&&(T.annotationId=C),T}l.create=_;function R(f){var c=f;return c&&c.kind==="delete"&&w.string(c.uri)&&(c.options===void 0||(c.options.recursive===void 0||w.boolean(c.options.recursive))&&(c.options.ignoreIfNotExists===void 0||w.boolean(c.options.ignoreIfNotExists)))&&(c.annotationId===void 0||W.is(c.annotationId))}l.is=R})(te=e.DeleteFile||(e.DeleteFile={}));var ze;(function(l){function _(R){var f=R;return f&&(f.changes!==void 0||f.documentChanges!==void 0)&&(f.documentChanges===void 0||f.documentChanges.every(function(c){return w.string(c.kind)?Ne.is(c)||D.is(c)||te.is(c):Je.is(c)}))}l.is=_})(ze=e.WorkspaceEdit||(e.WorkspaceEdit={}));var Ge=function(){function l(_,R){this.edits=_,this.changeAnnotations=R}return l.prototype.insert=function(_,R,f){var c,C;if(f===void 0?c=z.insert(_,R):W.is(f)?(C=f,c=Y.insert(_,R,f)):(this.assertChangeAnnotations(this.changeAnnotations),C=this.changeAnnotations.manage(f),c=Y.insert(_,R,C)),this.edits.push(c),C!==void 0)return C},l.prototype.replace=function(_,R,f){var c,C;if(f===void 0?c=z.replace(_,R):W.is(f)?(C=f,c=Y.replace(_,R,f)):(this.assertChangeAnnotations(this.changeAnnotations),C=this.changeAnnotations.manage(f),c=Y.replace(_,R,C)),this.edits.push(c),C!==void 0)return C},l.prototype.delete=function(_,R){var f,c;if(R===void 0?f=z.del(_):W.is(R)?(c=R,f=Y.del(_,R)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(R),f=Y.del(_,c)),this.edits.push(f),c!==void 0)return c},l.prototype.add=function(_){this.edits.push(_)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(_){if(_===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),P=function(){function l(_){this._annotations=_===void 0?Object.create(null):_,this._counter=0,this._size=0}return l.prototype.all=function(){return this._annotations},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),l.prototype.manage=function(_,R){var f;if(W.is(_)?f=_:(f=this.nextId(),R=_),this._annotations[f]!==void 0)throw new Error("Id ".concat(f," is already in use."));if(R===void 0)throw new Error("No annotation provided for id ".concat(f));return this._annotations[f]=R,this._size++,f},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),E=function(){function l(_){var R=this;this._textEditChanges=Object.create(null),_!==void 0?(this._workspaceEdit=_,_.documentChanges?(this._changeAnnotations=new P(_.changeAnnotations),_.changeAnnotations=this._changeAnnotations.all(),_.documentChanges.forEach(function(f){if(Je.is(f)){var c=new Ge(f.edits,R._changeAnnotations);R._textEditChanges[f.textDocument.uri]=c}})):_.changes&&Object.keys(_.changes).forEach(function(f){var c=new Ge(_.changes[f]);R._textEditChanges[f]=c})):this._workspaceEdit={}}return Object.defineProperty(l.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}),l.prototype.getTextEditChange=function(_){if(Ke.is(_)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var R={uri:_.uri,version:_.version},f=this._textEditChanges[R.uri];if(!f){var c=[],C={textDocument:R,edits:c};this._workspaceEdit.documentChanges.push(C),f=new Ge(c,this._changeAnnotations),this._textEditChanges[R.uri]=f}return f}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var f=this._textEditChanges[_];if(!f){var c=[];this._workspaceEdit.changes[_]=c,f=new Ge(c),this._textEditChanges[_]=f}return f}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new P,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},l.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},l.prototype.createFile=function(_,R,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var c;ae.is(R)||W.is(R)?c=R:f=R;var C,T;if(c===void 0?C=Ne.create(_,f):(T=W.is(c)?c:this._changeAnnotations.manage(c),C=Ne.create(_,f,T)),this._workspaceEdit.documentChanges.push(C),T!==void 0)return T},l.prototype.renameFile=function(_,R,f,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var C;ae.is(f)||W.is(f)?C=f:c=f;var T,X;if(C===void 0?T=D.create(_,R,c):(X=W.is(C)?C:this._changeAnnotations.manage(C),T=D.create(_,R,c,X)),this._workspaceEdit.documentChanges.push(T),X!==void 0)return X},l.prototype.deleteFile=function(_,R,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var c;ae.is(R)||W.is(R)?c=R:f=R;var C,T;if(c===void 0?C=te.create(_,f):(T=W.is(c)?c:this._changeAnnotations.manage(c),C=te.create(_,f,T)),this._workspaceEdit.documentChanges.push(C),T!==void 0)return T},l}();e.WorkspaceChange=E;var Te;(function(l){function _(f){return{uri:f}}l.create=_;function R(f){var c=f;return w.defined(c)&&w.string(c.uri)}l.is=R})(Te=e.TextDocumentIdentifier||(e.TextDocumentIdentifier={}));var Pe;(function(l){function _(f,c){return{uri:f,version:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&w.string(c.uri)&&w.integer(c.version)}l.is=R})(Pe=e.VersionedTextDocumentIdentifier||(e.VersionedTextDocumentIdentifier={}));var Ke;(function(l){function _(f,c){return{uri:f,version:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&w.string(c.uri)&&(c.version===null||w.integer(c.version))}l.is=R})(Ke=e.OptionalVersionedTextDocumentIdentifier||(e.OptionalVersionedTextDocumentIdentifier={}));var Ue;(function(l){function _(f,c,C,T){return{uri:f,languageId:c,version:C,text:T}}l.create=_;function R(f){var c=f;return w.defined(c)&&w.string(c.uri)&&w.string(c.languageId)&&w.integer(c.version)&&w.string(c.text)}l.is=R})(Ue=e.TextDocumentItem||(e.TextDocumentItem={}));var ot;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function _(R){var f=R;return f===l.PlainText||f===l.Markdown}l.is=_})(ot=e.MarkupKind||(e.MarkupKind={}));var Et;(function(l){function _(R){var f=R;return w.objectLiteral(R)&&ot.is(f.kind)&&w.string(f.value)}l.is=_})(Et=e.MarkupContent||(e.MarkupContent={}));var ar;(function(l){l.Text=1,l.Method=2,l.Function=3,l.Constructor=4,l.Field=5,l.Variable=6,l.Class=7,l.Interface=8,l.Module=9,l.Property=10,l.Unit=11,l.Value=12,l.Enum=13,l.Keyword=14,l.Snippet=15,l.Color=16,l.File=17,l.Reference=18,l.Folder=19,l.EnumMember=20,l.Constant=21,l.Struct=22,l.Event=23,l.Operator=24,l.TypeParameter=25})(ar=e.CompletionItemKind||(e.CompletionItemKind={}));var Yt;(function(l){l.PlainText=1,l.Snippet=2})(Yt=e.InsertTextFormat||(e.InsertTextFormat={}));var St;(function(l){l.Deprecated=1})(St=e.CompletionItemTag||(e.CompletionItemTag={}));var ee;(function(l){function _(f,c,C){return{newText:f,insert:c,replace:C}}l.create=_;function R(f){var c=f;return c&&w.string(c.newText)&&a.is(c.insert)&&a.is(c.replace)}l.is=R})(ee=e.InsertReplaceEdit||(e.InsertReplaceEdit={}));var cn;(function(l){l.asIs=1,l.adjustIndentation=2})(cn=e.InsertTextMode||(e.InsertTextMode={}));var cr;(function(l){function _(R){var f=R;return f&&(w.string(f.detail)||f.detail===void 0)&&(w.string(f.description)||f.description===void 0)}l.is=_})(cr=e.CompletionItemLabelDetails||(e.CompletionItemLabelDetails={}));var H;(function(l){function _(R){return{label:R}}l.create=_})(H=e.CompletionItem||(e.CompletionItem={}));var me;(function(l){function _(R,f){return{items:R||[],isIncomplete:!!f}}l.create=_})(me=e.CompletionList||(e.CompletionList={}));var O;(function(l){function _(f){return f.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=_;function R(f){var c=f;return w.string(c)||w.objectLiteral(c)&&w.string(c.language)&&w.string(c.value)}l.is=R})(O=e.MarkedString||(e.MarkedString={}));var re;(function(l){function _(R){var f=R;return!!f&&w.objectLiteral(f)&&(Et.is(f.contents)||O.is(f.contents)||w.typedArray(f.contents,O.is))&&(R.range===void 0||a.is(R.range))}l.is=_})(re=e.Hover||(e.Hover={}));var we;(function(l){function _(R,f){return f?{label:R,documentation:f}:{label:R}}l.create=_})(we=e.ParameterInformation||(e.ParameterInformation={}));var Fe;(function(l){function _(R,f){for(var c=[],C=2;C<arguments.length;C++)c[C-2]=arguments[C];var T={label:R};return w.defined(f)&&(T.documentation=f),w.defined(c)?T.parameters=c:T.parameters=[],T}l.create=_})(Fe=e.SignatureInformation||(e.SignatureInformation={}));var xe;(function(l){l.Text=1,l.Read=2,l.Write=3})(xe=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var Qt;(function(l){function _(R,f){var c={range:R};return w.number(f)&&(c.kind=f),c}l.create=_})(Qt=e.DocumentHighlight||(e.DocumentHighlight={}));var un;(function(l){l.File=1,l.Module=2,l.Namespace=3,l.Package=4,l.Class=5,l.Method=6,l.Property=7,l.Field=8,l.Constructor=9,l.Enum=10,l.Interface=11,l.Function=12,l.Variable=13,l.Constant=14,l.String=15,l.Number=16,l.Boolean=17,l.Array=18,l.Object=19,l.Key=20,l.Null=21,l.EnumMember=22,l.Struct=23,l.Event=24,l.Operator=25,l.TypeParameter=26})(un=e.SymbolKind||(e.SymbolKind={}));var ln;(function(l){l.Deprecated=1})(ln=e.SymbolTag||(e.SymbolTag={}));var Rn;(function(l){function _(R,f,c,C,T){var X={name:R,kind:f,location:{uri:C,range:c}};return T&&(X.containerName=T),X}l.create=_})(Rn=e.SymbolInformation||(e.SymbolInformation={}));var Fo;(function(l){function _(R,f,c,C){return C!==void 0?{name:R,kind:f,location:{uri:c,range:C}}:{name:R,kind:f,location:{uri:c}}}l.create=_})(Fo=e.WorkspaceSymbol||(e.WorkspaceSymbol={}));var Oo;(function(l){function _(f,c,C,T,X,Oe){var be={name:f,detail:c,kind:C,range:T,selectionRange:X};return Oe!==void 0&&(be.children=Oe),be}l.create=_;function R(f){var c=f;return c&&w.string(c.name)&&w.number(c.kind)&&a.is(c.range)&&a.is(c.selectionRange)&&(c.detail===void 0||w.string(c.detail))&&(c.deprecated===void 0||w.boolean(c.deprecated))&&(c.children===void 0||Array.isArray(c.children))&&(c.tags===void 0||Array.isArray(c.tags))}l.is=R})(Oo=e.DocumentSymbol||(e.DocumentSymbol={}));var bn;(function(l){l.Empty="",l.QuickFix="quickfix",l.Refactor="refactor",l.RefactorExtract="refactor.extract",l.RefactorInline="refactor.inline",l.RefactorRewrite="refactor.rewrite",l.Source="source",l.SourceOrganizeImports="source.organizeImports",l.SourceFixAll="source.fixAll"})(bn=e.CodeActionKind||(e.CodeActionKind={}));var Mn;(function(l){l.Invoked=1,l.Automatic=2})(Mn=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));var ni;(function(l){function _(f,c,C){var T={diagnostics:f};return c!=null&&(T.only=c),C!=null&&(T.triggerKind=C),T}l.create=_;function R(f){var c=f;return w.defined(c)&&w.typedArray(c.diagnostics,b.is)&&(c.only===void 0||w.typedArray(c.only,w.string))&&(c.triggerKind===void 0||c.triggerKind===Mn.Invoked||c.triggerKind===Mn.Automatic)}l.is=R})(ni=e.CodeActionContext||(e.CodeActionContext={}));var ur;(function(l){function _(f,c,C){var T={title:f},X=!0;return typeof c=="string"?(X=!1,T.kind=c):k.is(c)?T.command=c:T.edit=c,X&&C!==void 0&&(T.kind=C),T}l.create=_;function R(f){var c=f;return c&&w.string(c.title)&&(c.diagnostics===void 0||w.typedArray(c.diagnostics,b.is))&&(c.kind===void 0||w.string(c.kind))&&(c.edit!==void 0||c.command!==void 0)&&(c.command===void 0||k.is(c.command))&&(c.isPreferred===void 0||w.boolean(c.isPreferred))&&(c.edit===void 0||ze.is(c.edit))}l.is=R})(ur=e.CodeAction||(e.CodeAction={}));var ri;(function(l){function _(f,c){var C={range:f};return w.defined(c)&&(C.data=c),C}l.create=_;function R(f){var c=f;return w.defined(c)&&a.is(c.range)&&(w.undefined(c.command)||k.is(c.command))}l.is=R})(ri=e.CodeLens||(e.CodeLens={}));var dn;(function(l){function _(f,c){return{tabSize:f,insertSpaces:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&w.uinteger(c.tabSize)&&w.boolean(c.insertSpaces)}l.is=R})(dn=e.FormattingOptions||(e.FormattingOptions={}));var m;(function(l){function _(f,c,C){return{range:f,target:c,data:C}}l.create=_;function R(f){var c=f;return w.defined(c)&&a.is(c.range)&&(w.undefined(c.target)||w.string(c.target))}l.is=R})(m=e.DocumentLink||(e.DocumentLink={}));var x;(function(l){function _(f,c){return{range:f,parent:c}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&a.is(c.range)&&(c.parent===void 0||l.is(c.parent))}l.is=R})(x=e.SelectionRange||(e.SelectionRange={}));var I;(function(l){l.namespace="namespace",l.type="type",l.class="class",l.enum="enum",l.interface="interface",l.struct="struct",l.typeParameter="typeParameter",l.parameter="parameter",l.variable="variable",l.property="property",l.enumMember="enumMember",l.event="event",l.function="function",l.method="method",l.macro="macro",l.keyword="keyword",l.modifier="modifier",l.comment="comment",l.string="string",l.number="number",l.regexp="regexp",l.operator="operator",l.decorator="decorator"})(I=e.SemanticTokenTypes||(e.SemanticTokenTypes={}));var $;(function(l){l.declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary"})($=e.SemanticTokenModifiers||(e.SemanticTokenModifiers={}));var ye;(function(l){function _(R){var f=R;return w.objectLiteral(f)&&(f.resultId===void 0||typeof f.resultId=="string")&&Array.isArray(f.data)&&(f.data.length===0||typeof f.data[0]=="number")}l.is=_})(ye=e.SemanticTokens||(e.SemanticTokens={}));var _e;(function(l){function _(f,c){return{range:f,text:c}}l.create=_;function R(f){var c=f;return c!=null&&a.is(c.range)&&w.string(c.text)}l.is=R})(_e=e.InlineValueText||(e.InlineValueText={}));var Ee;(function(l){function _(f,c,C){return{range:f,variableName:c,caseSensitiveLookup:C}}l.create=_;function R(f){var c=f;return c!=null&&a.is(c.range)&&w.boolean(c.caseSensitiveLookup)&&(w.string(c.variableName)||c.variableName===void 0)}l.is=R})(Ee=e.InlineValueVariableLookup||(e.InlineValueVariableLookup={}));var Le;(function(l){function _(f,c){return{range:f,expression:c}}l.create=_;function R(f){var c=f;return c!=null&&a.is(c.range)&&(w.string(c.expression)||c.expression===void 0)}l.is=R})(Le=e.InlineValueEvaluatableExpression||(e.InlineValueEvaluatableExpression={}));var ie;(function(l){function _(f,c){return{frameId:f,stoppedLocation:c}}l.create=_;function R(f){var c=f;return w.defined(c)&&a.is(f.stoppedLocation)}l.is=R})(ie=e.InlineValueContext||(e.InlineValueContext={}));var Re;(function(l){l.Type=1,l.Parameter=2;function _(R){return R===1||R===2}l.is=_})(Re=e.InlayHintKind||(e.InlayHintKind={}));var ce;(function(l){function _(f){return{value:f}}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&(c.tooltip===void 0||w.string(c.tooltip)||Et.is(c.tooltip))&&(c.location===void 0||u.is(c.location))&&(c.command===void 0||k.is(c.command))}l.is=R})(ce=e.InlayHintLabelPart||(e.InlayHintLabelPart={}));var je;(function(l){function _(f,c,C){var T={position:f,label:c};return C!==void 0&&(T.kind=C),T}l.create=_;function R(f){var c=f;return w.objectLiteral(c)&&s.is(c.position)&&(w.string(c.label)||w.typedArray(c.label,ce.is))&&(c.kind===void 0||Re.is(c.kind))&&c.textEdits===void 0||w.typedArray(c.textEdits,z.is)&&(c.tooltip===void 0||w.string(c.tooltip)||Et.is(c.tooltip))&&(c.paddingLeft===void 0||w.boolean(c.paddingLeft))&&(c.paddingRight===void 0||w.boolean(c.paddingRight))}l.is=R})(je=e.InlayHint||(e.InlayHint={}));var nt;(function(l){function _(R){var f=R;return w.objectLiteral(f)&&r.is(f.uri)&&w.string(f.name)}l.is=_})(nt=e.WorkspaceFolder||(e.WorkspaceFolder={})),e.EOL=[`
30
+ `)),q){let B=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";K.log(`Received response '${q.method} - (${y.id})' in ${Date.now()-q.timerStart}ms.${B}`,L)}else K.log(`Received response ${y.id} without active response promise.`,L)}else vn("receive-response",y)}function vn(y,q){if(!K||b===ge.Off)return;let L={isLSPMessage:!0,type:y,message:q,timestamp:Date.now()};K.log(L)}function xn(){if(Je())throw new tr(ki.Closed,"Connection is closed.");if(ze())throw new tr(ki.Disposed,"Connection is disposed.")}function oo(){if(Ae())throw new tr(ki.AlreadyListening,"Connection is already listening")}function ao(){if(!Ae())throw new Error("Call listen() first.")}function qn(y){return y===void 0?null:y}function Yn(y){if(y!==null)return y}function vi(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}function vr(y,q){switch(y){case X.ParameterStructures.auto:return vi(q)?Yn(q):[qn(q)];case X.ParameterStructures.byName:if(!vi(q))throw new Error("Received parameters by name but param is not an object literal.");return Yn(q);case X.ParameterStructures.byPosition:return[qn(q)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}function Ei(y,q){let L,B=y.numberOfParams;switch(B){case 0:L=void 0;break;case 1:L=vr(y.parameterStructures,q[0]);break;default:L=[];for(let ve=0;ve<q.length&&ve<B;ve++)L.push(qn(q[ve]));if(q.length<B)for(let ve=q.length;ve<B;ve++)L.push(null);break}return L}let En={sendNotification:(y,...q)=>{xn();let L,B;if(Ke.string(y)){L=y;let Ee=q[0],xe=0,Ue=X.ParameterStructures.auto;X.ParameterStructures.is(Ee)&&(xe=1,Ue=Ee);let ae=q.length,we=ae-xe;switch(we){case 0:B=void 0;break;case 1:B=vr(Ue,q[xe]);break;default:if(Ue===X.ParameterStructures.byName)throw new Error(`Received ${we} parameters for 'by Name' notification parameter structure.`);B=q.slice(xe,ae).map(fe=>qn(fe));break}}else{let Ee=q;L=y.method,B=Ei(y,Ee)}let ve={jsonrpc:c,method:L,params:B};return De(ve),e.write(ve).catch(()=>i.error("Sending notification failed."))},onNotification:(y,q)=>{xn();let L;return Ke.func(y)?m=y:q&&(Ke.string(y)?(L=y,g.set(y,{type:void 0,handler:q})):(L=y.method,g.set(y.method,{type:y,handler:q}))),{dispose:()=>{L!==void 0?g.delete(L):m=void 0}}},onProgress:(y,q,L)=>{if(C.has(q))throw new Error(`Progress handler for token ${q} already registered`);return C.set(q,L),{dispose:()=>{C.delete(q)}}},sendProgress:(y,q,L)=>En.sendNotification(Pr.type,{token:q,value:L}),onUnhandledProgress:Le.event,sendRequest:(y,...q)=>{xn(),ao();let L,B,ve;if(Ke.string(y)){L=y;let ae=q[0],we=q[q.length-1],fe=0,$e=X.ParameterStructures.auto;X.ParameterStructures.is(ae)&&(fe=1,$e=ae);let ot=q.length;na.CancellationToken.is(we)&&(ot=ot-1,ve=we);let an=ot-fe;switch(an){case 0:B=void 0;break;case 1:B=vr($e,q[fe]);break;default:if($e===X.ParameterStructures.byName)throw new Error(`Received ${an} parameters for 'by Name' request parameter structure.`);B=q.slice(fe,ot).map(Yt=>qn(Yt));break}}else{let ae=q;L=y.method,B=Ei(y,ae);let we=y.numberOfParams;ve=na.CancellationToken.is(ae[we])?ae[we]:void 0}let Ee=s++,xe;return ve&&(xe=ve.onCancellationRequested(()=>{let ae=ie.sender.sendCancellation(En,Ee);return ae===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${Ee}`),Promise.resolve()):ae.catch(()=>{i.log(`Sending cancellation messages for id ${Ee} failed`)})})),new Promise((ae,we)=>{let fe={jsonrpc:c,id:Ee,method:L,params:B},$e=Yt=>{ae(Yt),ie.sender.cleanup(Ee),xe?.dispose()},ot=Yt=>{we(Yt),ie.sender.cleanup(Ee),xe?.dispose()},an={method:L,timerStart:Date.now(),resolve:$e,reject:ot};oe(fe);try{e.write(fe).catch(()=>i.error("Sending request failed."))}catch(Yt){an.reject(new X.ResponseError(X.ErrorCodes.MessageWriteError,Yt.message?Yt.message:"Unknown reason")),an=null}an&&M.set(Ee,an)})},onRequest:(y,q)=>{xn();let L=null;return ia.is(y)?(L=void 0,d=y):Ke.string(y)?(L=null,q!==void 0&&(L=y,p.set(y,{handler:q,type:void 0}))):q!==void 0&&(L=y.method,p.set(y.method,{type:y,handler:q})),{dispose:()=>{L!==null&&(L!==void 0?p.delete(L):d=void 0)}}},hasPendingResponse:()=>M.size>0,trace:async(y,q,L)=>{let B=!1,ve=Mt.Text;L!==void 0&&(Ke.boolean(L)?B=L:(B=L.sendNotification||!1,ve=L.traceFormat||Mt.Text)),b=y,N=ve,b===ge.Off?K=void 0:K=q,B&&!Je()&&!ze()&&await En.sendNotification(il.type,{value:ge.toString(y)})},onError:U.event,onClose:Q.event,onUnhandledNotification:nt.event,onDispose:D.event,end:()=>{e.end()},dispose:()=>{if(ze())return;le=$t.Disposed,D.fire(void 0);let y=new X.ResponseError(X.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let q of M.values())q.reject(y);M=new Map,v=new Map,F=new Set,O=new nl.LinkedMap,Ke.func(e.dispose)&&e.dispose(),Ke.func(t.dispose)&&t.dispose()},listen:()=>{xn(),oo(),le=$t.Listening,t.listen(re)},inspect:()=>{(0,tl.default)().console.log("inspect")}};return En.onNotification(sa.type,y=>{if(b===ge.Off||!K)return;let q=b===ge.Verbose||b===ge.Compact;K.log(y.message,q?y.verbose:void 0)}),En.onNotification(Pr.type,y=>{let q=C.get(y.token);q?q(y.value):Le.fire(y)}),En}Y.createMessageConnection=ty});var da=P(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.SetTraceNotification=A.TraceFormat=A.Trace=A.ProgressType=A.ProgressToken=A.createMessageConnection=A.NullLogger=A.ConnectionOptions=A.ConnectionStrategy=A.WriteableStreamMessageWriter=A.AbstractMessageWriter=A.MessageWriter=A.ReadableStreamMessageReader=A.AbstractMessageReader=A.MessageReader=A.CancellationToken=A.CancellationTokenSource=A.Emitter=A.Event=A.Disposable=A.LRUCache=A.Touch=A.LinkedMap=A.ParameterStructures=A.NotificationType9=A.NotificationType8=A.NotificationType7=A.NotificationType6=A.NotificationType5=A.NotificationType4=A.NotificationType3=A.NotificationType2=A.NotificationType1=A.NotificationType0=A.NotificationType=A.ErrorCodes=A.ResponseError=A.RequestType9=A.RequestType8=A.RequestType7=A.RequestType6=A.RequestType5=A.RequestType4=A.RequestType3=A.RequestType2=A.RequestType1=A.RequestType0=A.RequestType=A.Message=A.RAL=void 0;A.CancellationStrategy=A.CancellationSenderStrategy=A.CancellationReceiverStrategy=A.ConnectionError=A.ConnectionErrors=A.LogTraceNotification=void 0;var Pe=Ho();Object.defineProperty(A,"Message",{enumerable:!0,get:function(){return Pe.Message}});Object.defineProperty(A,"RequestType",{enumerable:!0,get:function(){return Pe.RequestType}});Object.defineProperty(A,"RequestType0",{enumerable:!0,get:function(){return Pe.RequestType0}});Object.defineProperty(A,"RequestType1",{enumerable:!0,get:function(){return Pe.RequestType1}});Object.defineProperty(A,"RequestType2",{enumerable:!0,get:function(){return Pe.RequestType2}});Object.defineProperty(A,"RequestType3",{enumerable:!0,get:function(){return Pe.RequestType3}});Object.defineProperty(A,"RequestType4",{enumerable:!0,get:function(){return Pe.RequestType4}});Object.defineProperty(A,"RequestType5",{enumerable:!0,get:function(){return Pe.RequestType5}});Object.defineProperty(A,"RequestType6",{enumerable:!0,get:function(){return Pe.RequestType6}});Object.defineProperty(A,"RequestType7",{enumerable:!0,get:function(){return Pe.RequestType7}});Object.defineProperty(A,"RequestType8",{enumerable:!0,get:function(){return Pe.RequestType8}});Object.defineProperty(A,"RequestType9",{enumerable:!0,get:function(){return Pe.RequestType9}});Object.defineProperty(A,"ResponseError",{enumerable:!0,get:function(){return Pe.ResponseError}});Object.defineProperty(A,"ErrorCodes",{enumerable:!0,get:function(){return Pe.ErrorCodes}});Object.defineProperty(A,"NotificationType",{enumerable:!0,get:function(){return Pe.NotificationType}});Object.defineProperty(A,"NotificationType0",{enumerable:!0,get:function(){return Pe.NotificationType0}});Object.defineProperty(A,"NotificationType1",{enumerable:!0,get:function(){return Pe.NotificationType1}});Object.defineProperty(A,"NotificationType2",{enumerable:!0,get:function(){return Pe.NotificationType2}});Object.defineProperty(A,"NotificationType3",{enumerable:!0,get:function(){return Pe.NotificationType3}});Object.defineProperty(A,"NotificationType4",{enumerable:!0,get:function(){return Pe.NotificationType4}});Object.defineProperty(A,"NotificationType5",{enumerable:!0,get:function(){return Pe.NotificationType5}});Object.defineProperty(A,"NotificationType6",{enumerable:!0,get:function(){return Pe.NotificationType6}});Object.defineProperty(A,"NotificationType7",{enumerable:!0,get:function(){return Pe.NotificationType7}});Object.defineProperty(A,"NotificationType8",{enumerable:!0,get:function(){return Pe.NotificationType8}});Object.defineProperty(A,"NotificationType9",{enumerable:!0,get:function(){return Pe.NotificationType9}});Object.defineProperty(A,"ParameterStructures",{enumerable:!0,get:function(){return Pe.ParameterStructures}});var ua=Uo();Object.defineProperty(A,"LinkedMap",{enumerable:!0,get:function(){return ua.LinkedMap}});Object.defineProperty(A,"LRUCache",{enumerable:!0,get:function(){return ua.LRUCache}});Object.defineProperty(A,"Touch",{enumerable:!0,get:function(){return ua.Touch}});var ny=fo();Object.defineProperty(A,"Disposable",{enumerable:!0,get:function(){return ny.Disposable}});var al=Zn();Object.defineProperty(A,"Event",{enumerable:!0,get:function(){return al.Event}});Object.defineProperty(A,"Emitter",{enumerable:!0,get:function(){return al.Emitter}});var cl=Ko();Object.defineProperty(A,"CancellationTokenSource",{enumerable:!0,get:function(){return cl.CancellationTokenSource}});Object.defineProperty(A,"CancellationToken",{enumerable:!0,get:function(){return cl.CancellationToken}});var la=Xu();Object.defineProperty(A,"MessageReader",{enumerable:!0,get:function(){return la.MessageReader}});Object.defineProperty(A,"AbstractMessageReader",{enumerable:!0,get:function(){return la.AbstractMessageReader}});Object.defineProperty(A,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return la.ReadableStreamMessageReader}});var fa=el();Object.defineProperty(A,"MessageWriter",{enumerable:!0,get:function(){return fa.MessageWriter}});Object.defineProperty(A,"AbstractMessageWriter",{enumerable:!0,get:function(){return fa.AbstractMessageWriter}});Object.defineProperty(A,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return fa.WriteableStreamMessageWriter}});var dt=ol();Object.defineProperty(A,"ConnectionStrategy",{enumerable:!0,get:function(){return dt.ConnectionStrategy}});Object.defineProperty(A,"ConnectionOptions",{enumerable:!0,get:function(){return dt.ConnectionOptions}});Object.defineProperty(A,"NullLogger",{enumerable:!0,get:function(){return dt.NullLogger}});Object.defineProperty(A,"createMessageConnection",{enumerable:!0,get:function(){return dt.createMessageConnection}});Object.defineProperty(A,"ProgressToken",{enumerable:!0,get:function(){return dt.ProgressToken}});Object.defineProperty(A,"ProgressType",{enumerable:!0,get:function(){return dt.ProgressType}});Object.defineProperty(A,"Trace",{enumerable:!0,get:function(){return dt.Trace}});Object.defineProperty(A,"TraceFormat",{enumerable:!0,get:function(){return dt.TraceFormat}});Object.defineProperty(A,"SetTraceNotification",{enumerable:!0,get:function(){return dt.SetTraceNotification}});Object.defineProperty(A,"LogTraceNotification",{enumerable:!0,get:function(){return dt.LogTraceNotification}});Object.defineProperty(A,"ConnectionErrors",{enumerable:!0,get:function(){return dt.ConnectionErrors}});Object.defineProperty(A,"ConnectionError",{enumerable:!0,get:function(){return dt.ConnectionError}});Object.defineProperty(A,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return dt.CancellationReceiverStrategy}});Object.defineProperty(A,"CancellationSenderStrategy",{enumerable:!0,get:function(){return dt.CancellationSenderStrategy}});Object.defineProperty(A,"CancellationStrategy",{enumerable:!0,get:function(){return dt.CancellationStrategy}});var ry=un();A.RAL=ry.default});var jn=P(pe=>{"use strict";var iy=pe&&pe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),sy=pe&&pe.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&iy(e,t,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.createMessageConnection=pe.createServerSocketTransport=pe.createClientSocketTransport=pe.createServerPipeTransport=pe.createClientPipeTransport=pe.generateRandomPipeName=pe.StreamMessageWriter=pe.StreamMessageReader=pe.SocketMessageWriter=pe.SocketMessageReader=pe.IPCMessageWriter=pe.IPCMessageReader=void 0;var nr=Bu();nr.default.install();var Qt=da(),ul=require("path"),oy=require("os"),ay=require("crypto"),Ii=require("net");sy(da(),pe);var ha=class extends Qt.AbstractMessageReader{constructor(e){super(),this.process=e;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Qt.Disposable.create(()=>this.process.off("message",e))}};pe.IPCMessageReader=ha;var pa=class extends Qt.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,e)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};pe.IPCMessageWriter=pa;var Fn=class extends Qt.ReadableStreamMessageReader{constructor(e,n="utf-8"){super((0,nr.default)().stream.asReadableStream(e),n)}};pe.SocketMessageReader=Fn;var Ln=class extends Qt.WriteableStreamMessageWriter{constructor(e,n){super((0,nr.default)().stream.asWritableStream(e),n),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};pe.SocketMessageWriter=Ln;var Ni=class extends Qt.ReadableStreamMessageReader{constructor(e,n){super((0,nr.default)().stream.asReadableStream(e),n)}};pe.StreamMessageReader=Ni;var Oi=class extends Qt.WriteableStreamMessageWriter{constructor(e,n){super((0,nr.default)().stream.asWritableStream(e),n)}};pe.StreamMessageWriter=Oi;var ll=process.env.XDG_RUNTIME_DIR,cy=new Map([["linux",107],["darwin",103]]);function uy(){let t=(0,ay.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let e;ll?e=ul.join(ll,`vscode-ipc-${t}.sock`):e=ul.join(oy.tmpdir(),`vscode-${t}.sock`);let n=cy.get(process.platform);return n!==void 0&&e.length>=n&&(0,nr.default)().console.warn(`WARNING: IPC handle "${e}" is longer than ${n} characters.`),e}pe.generateRandomPipeName=uy;function ly(t,e="utf-8"){let n,r=new Promise((i,s)=>{n=i});return new Promise((i,s)=>{let o=(0,Ii.createServer)(a=>{o.close(),n([new Fn(a,e),new Ln(a,e)])});o.on("error",s),o.listen(t,()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}pe.createClientPipeTransport=ly;function fy(t,e="utf-8"){let n=(0,Ii.createConnection)(t);return[new Fn(n,e),new Ln(n,e)]}pe.createServerPipeTransport=fy;function dy(t,e="utf-8"){let n,r=new Promise((i,s)=>{n=i});return new Promise((i,s)=>{let o=(0,Ii.createServer)(a=>{o.close(),n([new Fn(a,e),new Ln(a,e)])});o.on("error",s),o.listen(t,"127.0.0.1",()=>{o.removeListener("error",s),i({onConnected:()=>r})})})}pe.createClientSocketTransport=dy;function hy(t,e="utf-8"){let n=(0,Ii.createConnection)(t,"127.0.0.1");return[new Fn(n,e),new Ln(n,e)]}pe.createServerSocketTransport=hy;function py(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}function my(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}function gy(t,e,n,r){n||(n=Qt.NullLogger);let i=py(t)?new Ni(t):t,s=my(e)?new Oi(e):e;return Qt.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Qt.createMessageConnection)(i,s,n,r)}pe.createMessageConnection=gy});var Fi=P((CT,fl)=>{"use strict";fl.exports=jn()});var Sr=P((dl,Li)=>{(function(t){if(typeof Li=="object"&&typeof Li.exports=="object"){var e=t(require,dl);e!==void 0&&(Li.exports=e)}else typeof define=="function"&&define.amd&&define(["require","exports"],t)})(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocument=e.EOL=e.WorkspaceFolder=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.SemanticTokens=e.SemanticTokenModifiers=e.SemanticTokenTypes=e.SelectionRange=e.DocumentLink=e.FormattingOptions=e.CodeLens=e.CodeAction=e.CodeActionContext=e.CodeActionTriggerKind=e.CodeActionKind=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.SignatureInformation=e.ParameterInformation=e.Hover=e.MarkedString=e.CompletionList=e.CompletionItem=e.CompletionItemLabelDetails=e.InsertTextMode=e.InsertReplaceEdit=e.CompletionItemTag=e.InsertTextFormat=e.CompletionItemKind=e.MarkupContent=e.MarkupKind=e.TextDocumentItem=e.OptionalVersionedTextDocumentIdentifier=e.VersionedTextDocumentIdentifier=e.TextDocumentIdentifier=e.WorkspaceChange=e.WorkspaceEdit=e.DeleteFile=e.RenameFile=e.CreateFile=e.TextDocumentEdit=e.AnnotatedTextEdit=e.ChangeAnnotationIdentifier=e.ChangeAnnotation=e.TextEdit=e.Command=e.Diagnostic=e.CodeDescription=e.DiagnosticTag=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.FoldingRange=e.FoldingRangeKind=e.ColorPresentation=e.ColorInformation=e.Color=e.LocationLink=e.Location=e.Range=e.Position=e.uinteger=e.integer=e.URI=e.DocumentUri=void 0;var n;(function(l){function R(_){return typeof _=="string"}l.is=R})(n=e.DocumentUri||(e.DocumentUri={}));var r;(function(l){function R(_){return typeof _=="string"}l.is=R})(r=e.URI||(e.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function R(_){return typeof _=="number"&&l.MIN_VALUE<=_&&_<=l.MAX_VALUE}l.is=R})(i=e.integer||(e.integer={}));var s;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function R(_){return typeof _=="number"&&l.MIN_VALUE<=_&&_<=l.MAX_VALUE}l.is=R})(s=e.uinteger||(e.uinteger={}));var o;(function(l){function R(h,u){return h===Number.MAX_VALUE&&(h=s.MAX_VALUE),u===Number.MAX_VALUE&&(u=s.MAX_VALUE),{line:h,character:u}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&E.uinteger(u.line)&&E.uinteger(u.character)}l.is=_})(o=e.Position||(e.Position={}));var a;(function(l){function R(h,u,w,x){if(E.uinteger(h)&&E.uinteger(u)&&E.uinteger(w)&&E.uinteger(x))return{start:o.create(h,u),end:o.create(w,x)};if(o.is(h)&&o.is(u))return{start:h,end:u};throw new Error("Range#create called with invalid arguments[".concat(h,", ").concat(u,", ").concat(w,", ").concat(x,"]"))}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&o.is(u.start)&&o.is(u.end)}l.is=_})(a=e.Range||(e.Range={}));var c;(function(l){function R(h,u){return{uri:h,range:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&a.is(u.range)&&(E.string(u.uri)||E.undefined(u.uri))}l.is=_})(c=e.Location||(e.Location={}));var d;(function(l){function R(h,u,w,x){return{targetUri:h,targetRange:u,targetSelectionRange:w,originSelectionRange:x}}l.create=R;function _(h){var u=h;return E.defined(u)&&a.is(u.targetRange)&&E.string(u.targetUri)&&a.is(u.targetSelectionRange)&&(a.is(u.originSelectionRange)||E.undefined(u.originSelectionRange))}l.is=_})(d=e.LocationLink||(e.LocationLink={}));var p;(function(l){function R(h,u,w,x){return{red:h,green:u,blue:w,alpha:x}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&E.numberRange(u.red,0,1)&&E.numberRange(u.green,0,1)&&E.numberRange(u.blue,0,1)&&E.numberRange(u.alpha,0,1)}l.is=_})(p=e.Color||(e.Color={}));var m;(function(l){function R(h,u){return{range:h,color:u}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&a.is(u.range)&&p.is(u.color)}l.is=_})(m=e.ColorInformation||(e.ColorInformation={}));var g;(function(l){function R(h,u,w){return{label:h,textEdit:u,additionalTextEdits:w}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&E.string(u.label)&&(E.undefined(u.textEdit)||K.is(u))&&(E.undefined(u.additionalTextEdits)||E.typedArray(u.additionalTextEdits,K.is))}l.is=_})(g=e.ColorPresentation||(e.ColorPresentation={}));var C;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(C=e.FoldingRangeKind||(e.FoldingRangeKind={}));var k;(function(l){function R(h,u,w,x,Z,Me){var Ce={startLine:h,endLine:u};return E.defined(w)&&(Ce.startCharacter=w),E.defined(x)&&(Ce.endCharacter=x),E.defined(Z)&&(Ce.kind=Z),E.defined(Me)&&(Ce.collapsedText=Me),Ce}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&E.uinteger(u.startLine)&&E.uinteger(u.startLine)&&(E.undefined(u.startCharacter)||E.uinteger(u.startCharacter))&&(E.undefined(u.endCharacter)||E.uinteger(u.endCharacter))&&(E.undefined(u.kind)||E.string(u.kind))}l.is=_})(k=e.FoldingRange||(e.FoldingRange={}));var O;(function(l){function R(h,u){return{location:h,message:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&c.is(u.location)&&E.string(u.message)}l.is=_})(O=e.DiagnosticRelatedInformation||(e.DiagnosticRelatedInformation={}));var M;(function(l){l.Error=1,l.Warning=2,l.Information=3,l.Hint=4})(M=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var F;(function(l){l.Unnecessary=1,l.Deprecated=2})(F=e.DiagnosticTag||(e.DiagnosticTag={}));var v;(function(l){function R(_){var h=_;return E.objectLiteral(h)&&E.string(h.href)}l.is=R})(v=e.CodeDescription||(e.CodeDescription={}));var b;(function(l){function R(h,u,w,x,Z,Me){var Ce={range:h,message:u};return E.defined(w)&&(Ce.severity=w),E.defined(x)&&(Ce.code=x),E.defined(Z)&&(Ce.source=Z),E.defined(Me)&&(Ce.relatedInformation=Me),Ce}l.create=R;function _(h){var u,w=h;return E.defined(w)&&a.is(w.range)&&E.string(w.message)&&(E.number(w.severity)||E.undefined(w.severity))&&(E.integer(w.code)||E.string(w.code)||E.undefined(w.code))&&(E.undefined(w.codeDescription)||E.string((u=w.codeDescription)===null||u===void 0?void 0:u.href))&&(E.string(w.source)||E.undefined(w.source))&&(E.undefined(w.relatedInformation)||E.typedArray(w.relatedInformation,O.is))}l.is=_})(b=e.Diagnostic||(e.Diagnostic={}));var N;(function(l){function R(h,u){for(var w=[],x=2;x<arguments.length;x++)w[x-2]=arguments[x];var Z={title:h,command:u};return E.defined(w)&&w.length>0&&(Z.arguments=w),Z}l.create=R;function _(h){var u=h;return E.defined(u)&&E.string(u.title)&&E.string(u.command)}l.is=_})(N=e.Command||(e.Command={}));var K;(function(l){function R(w,x){return{range:w,newText:x}}l.replace=R;function _(w,x){return{range:{start:w,end:w},newText:x}}l.insert=_;function h(w){return{range:w,newText:""}}l.del=h;function u(w){var x=w;return E.objectLiteral(x)&&E.string(x.newText)&&a.is(x.range)}l.is=u})(K=e.TextEdit||(e.TextEdit={}));var le;(function(l){function R(h,u,w){var x={label:h};return u!==void 0&&(x.needsConfirmation=u),w!==void 0&&(x.description=w),x}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&E.string(u.label)&&(E.boolean(u.needsConfirmation)||u.needsConfirmation===void 0)&&(E.string(u.description)||u.description===void 0)}l.is=_})(le=e.ChangeAnnotation||(e.ChangeAnnotation={}));var U;(function(l){function R(_){var h=_;return E.string(h)}l.is=R})(U=e.ChangeAnnotationIdentifier||(e.ChangeAnnotationIdentifier={}));var Q;(function(l){function R(w,x,Z){return{range:w,newText:x,annotationId:Z}}l.replace=R;function _(w,x,Z){return{range:{start:w,end:w},newText:x,annotationId:Z}}l.insert=_;function h(w,x){return{range:w,newText:"",annotationId:x}}l.del=h;function u(w){var x=w;return K.is(x)&&(le.is(x.annotationId)||U.is(x.annotationId))}l.is=u})(Q=e.AnnotatedTextEdit||(e.AnnotatedTextEdit={}));var nt;(function(l){function R(h,u){return{textDocument:h,edits:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&Je.is(u.textDocument)&&Array.isArray(u.edits)}l.is=_})(nt=e.TextDocumentEdit||(e.TextDocumentEdit={}));var Le;(function(l){function R(h,u,w){var x={kind:"create",uri:h};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(x.options=u),w!==void 0&&(x.annotationId=w),x}l.create=R;function _(h){var u=h;return u&&u.kind==="create"&&E.string(u.uri)&&(u.options===void 0||(u.options.overwrite===void 0||E.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||E.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||U.is(u.annotationId))}l.is=_})(Le=e.CreateFile||(e.CreateFile={}));var D;(function(l){function R(h,u,w,x){var Z={kind:"rename",oldUri:h,newUri:u};return w!==void 0&&(w.overwrite!==void 0||w.ignoreIfExists!==void 0)&&(Z.options=w),x!==void 0&&(Z.annotationId=x),Z}l.create=R;function _(h){var u=h;return u&&u.kind==="rename"&&E.string(u.oldUri)&&E.string(u.newUri)&&(u.options===void 0||(u.options.overwrite===void 0||E.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||E.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||U.is(u.annotationId))}l.is=_})(D=e.RenameFile||(e.RenameFile={}));var ie;(function(l){function R(h,u,w){var x={kind:"delete",uri:h};return u!==void 0&&(u.recursive!==void 0||u.ignoreIfNotExists!==void 0)&&(x.options=u),w!==void 0&&(x.annotationId=w),x}l.create=R;function _(h){var u=h;return u&&u.kind==="delete"&&E.string(u.uri)&&(u.options===void 0||(u.options.recursive===void 0||E.boolean(u.options.recursive))&&(u.options.ignoreIfNotExists===void 0||E.boolean(u.options.ignoreIfNotExists)))&&(u.annotationId===void 0||U.is(u.annotationId))}l.is=_})(ie=e.DeleteFile||(e.DeleteFile={}));var Ye;(function(l){function R(_){var h=_;return h&&(h.changes!==void 0||h.documentChanges!==void 0)&&(h.documentChanges===void 0||h.documentChanges.every(function(u){return E.string(u.kind)?Le.is(u)||D.is(u)||ie.is(u):nt.is(u)}))}l.is=R})(Ye=e.WorkspaceEdit||(e.WorkspaceEdit={}));var Qe=function(){function l(R,_){this.edits=R,this.changeAnnotations=_}return l.prototype.insert=function(R,_,h){var u,w;if(h===void 0?u=K.insert(R,_):U.is(h)?(w=h,u=Q.insert(R,_,h)):(this.assertChangeAnnotations(this.changeAnnotations),w=this.changeAnnotations.manage(h),u=Q.insert(R,_,w)),this.edits.push(u),w!==void 0)return w},l.prototype.replace=function(R,_,h){var u,w;if(h===void 0?u=K.replace(R,_):U.is(h)?(w=h,u=Q.replace(R,_,h)):(this.assertChangeAnnotations(this.changeAnnotations),w=this.changeAnnotations.manage(h),u=Q.replace(R,_,w)),this.edits.push(u),w!==void 0)return w},l.prototype.delete=function(R,_){var h,u;if(_===void 0?h=K.del(R):U.is(_)?(u=_,h=Q.del(R,_)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(_),h=Q.del(R,u)),this.edits.push(h),u!==void 0)return u},l.prototype.add=function(R){this.edits.push(R)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(R){if(R===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),S=function(){function l(R){this._annotations=R===void 0?Object.create(null):R,this._counter=0,this._size=0}return l.prototype.all=function(){return this._annotations},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),l.prototype.manage=function(R,_){var h;if(U.is(R)?h=R:(h=this.nextId(),_=R),this._annotations[h]!==void 0)throw new Error("Id ".concat(h," is already in use."));if(_===void 0)throw new Error("No annotation provided for id ".concat(h));return this._annotations[h]=_,this._size++,h},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),T=function(){function l(R){var _=this;this._textEditChanges=Object.create(null),R!==void 0?(this._workspaceEdit=R,R.documentChanges?(this._changeAnnotations=new S(R.changeAnnotations),R.changeAnnotations=this._changeAnnotations.all(),R.documentChanges.forEach(function(h){if(nt.is(h)){var u=new Qe(h.edits,_._changeAnnotations);_._textEditChanges[h.textDocument.uri]=u}})):R.changes&&Object.keys(R.changes).forEach(function(h){var u=new Qe(R.changes[h]);_._textEditChanges[h]=u})):this._workspaceEdit={}}return Object.defineProperty(l.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}),l.prototype.getTextEditChange=function(R){if(Je.is(R)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var _={uri:R.uri,version:R.version},h=this._textEditChanges[_.uri];if(!h){var u=[],w={textDocument:_,edits:u};this._workspaceEdit.documentChanges.push(w),h=new Qe(u,this._changeAnnotations),this._textEditChanges[_.uri]=h}return h}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var h=this._textEditChanges[R];if(!h){var u=[];this._workspaceEdit.changes[R]=u,h=new Qe(u),this._textEditChanges[R]=h}return h}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new S,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},l.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},l.prototype.createFile=function(R,_,h){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;le.is(_)||U.is(_)?u=_:h=_;var w,x;if(u===void 0?w=Le.create(R,h):(x=U.is(u)?u:this._changeAnnotations.manage(u),w=Le.create(R,h,x)),this._workspaceEdit.documentChanges.push(w),x!==void 0)return x},l.prototype.renameFile=function(R,_,h,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var w;le.is(h)||U.is(h)?w=h:u=h;var x,Z;if(w===void 0?x=D.create(R,_,u):(Z=U.is(w)?w:this._changeAnnotations.manage(w),x=D.create(R,_,u,Z)),this._workspaceEdit.documentChanges.push(x),Z!==void 0)return Z},l.prototype.deleteFile=function(R,_,h){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;le.is(_)||U.is(_)?u=_:h=_;var w,x;if(u===void 0?w=ie.create(R,h):(x=U.is(u)?u:this._changeAnnotations.manage(u),w=ie.create(R,h,x)),this._workspaceEdit.documentChanges.push(w),x!==void 0)return x},l}();e.WorkspaceChange=T;var ke;(function(l){function R(h){return{uri:h}}l.create=R;function _(h){var u=h;return E.defined(u)&&E.string(u.uri)}l.is=_})(ke=e.TextDocumentIdentifier||(e.TextDocumentIdentifier={}));var Ae;(function(l){function R(h,u){return{uri:h,version:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&E.string(u.uri)&&E.integer(u.version)}l.is=_})(Ae=e.VersionedTextDocumentIdentifier||(e.VersionedTextDocumentIdentifier={}));var Je;(function(l){function R(h,u){return{uri:h,version:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&E.string(u.uri)&&(u.version===null||E.integer(u.version))}l.is=_})(Je=e.OptionalVersionedTextDocumentIdentifier||(e.OptionalVersionedTextDocumentIdentifier={}));var ze;(function(l){function R(h,u,w,x){return{uri:h,languageId:u,version:w,text:x}}l.create=R;function _(h){var u=h;return E.defined(u)&&E.string(u.uri)&&E.string(u.languageId)&&E.integer(u.version)&&E.string(u.text)}l.is=_})(ze=e.TextDocumentItem||(e.TextDocumentItem={}));var lt;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function R(_){var h=_;return h===l.PlainText||h===l.Markdown}l.is=R})(lt=e.MarkupKind||(e.MarkupKind={}));var It;(function(l){function R(_){var h=_;return E.objectLiteral(_)&&lt.is(h.kind)&&E.string(h.value)}l.is=R})(It=e.MarkupContent||(e.MarkupContent={}));var _r;(function(l){l.Text=1,l.Method=2,l.Function=3,l.Constructor=4,l.Field=5,l.Variable=6,l.Class=7,l.Interface=8,l.Module=9,l.Property=10,l.Unit=11,l.Value=12,l.Enum=13,l.Keyword=14,l.Snippet=15,l.Color=16,l.File=17,l.Reference=18,l.Folder=19,l.EnumMember=20,l.Constant=21,l.Struct=22,l.Event=23,l.Operator=24,l.TypeParameter=25})(_r=e.CompletionItemKind||(e.CompletionItemKind={}));var sn;(function(l){l.PlainText=1,l.Snippet=2})(sn=e.InsertTextFormat||(e.InsertTextFormat={}));var Ft;(function(l){l.Deprecated=1})(Ft=e.CompletionItemTag||(e.CompletionItemTag={}));var re;(function(l){function R(h,u,w){return{newText:h,insert:u,replace:w}}l.create=R;function _(h){var u=h;return u&&E.string(u.newText)&&a.is(u.insert)&&a.is(u.replace)}l.is=_})(re=e.InsertReplaceEdit||(e.InsertReplaceEdit={}));var _n;(function(l){l.asIs=1,l.adjustIndentation=2})(_n=e.InsertTextMode||(e.InsertTextMode={}));var br;(function(l){function R(_){var h=_;return h&&(E.string(h.detail)||h.detail===void 0)&&(E.string(h.description)||h.description===void 0)}l.is=R})(br=e.CompletionItemLabelDetails||(e.CompletionItemLabelDetails={}));var $;(function(l){function R(_){return{label:_}}l.create=R})($=e.CompletionItem||(e.CompletionItem={}));var Re;(function(l){function R(_,h){return{items:_||[],isIncomplete:!!h}}l.create=R})(Re=e.CompletionList||(e.CompletionList={}));var I;(function(l){function R(h){return h.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=R;function _(h){var u=h;return E.string(u)||E.objectLiteral(u)&&E.string(u.language)&&E.string(u.value)}l.is=_})(I=e.MarkedString||(e.MarkedString={}));var oe;(function(l){function R(_){var h=_;return!!h&&E.objectLiteral(h)&&(It.is(h.contents)||I.is(h.contents)||E.typedArray(h.contents,I.is))&&(_.range===void 0||a.is(_.range))}l.is=R})(oe=e.Hover||(e.Hover={}));var De;(function(l){function R(_,h){return h?{label:_,documentation:h}:{label:_}}l.create=R})(De=e.ParameterInformation||(e.ParameterInformation={}));var je;(function(l){function R(_,h){for(var u=[],w=2;w<arguments.length;w++)u[w-2]=arguments[w];var x={label:_};return E.defined(h)&&(x.documentation=h),E.defined(u)?x.parameters=u:x.parameters=[],x}l.create=R})(je=e.SignatureInformation||(e.SignatureInformation={}));var Ne;(function(l){l.Text=1,l.Read=2,l.Write=3})(Ne=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var on;(function(l){function R(_,h){var u={range:_};return E.number(h)&&(u.kind=h),u}l.create=R})(on=e.DocumentHighlight||(e.DocumentHighlight={}));var bn;(function(l){l.File=1,l.Module=2,l.Namespace=3,l.Package=4,l.Class=5,l.Method=6,l.Property=7,l.Field=8,l.Constructor=9,l.Enum=10,l.Interface=11,l.Function=12,l.Variable=13,l.Constant=14,l.String=15,l.Number=16,l.Boolean=17,l.Array=18,l.Object=19,l.Key=20,l.Null=21,l.EnumMember=22,l.Struct=23,l.Event=24,l.Operator=25,l.TypeParameter=26})(bn=e.SymbolKind||(e.SymbolKind={}));var vn;(function(l){l.Deprecated=1})(vn=e.SymbolTag||(e.SymbolTag={}));var xn;(function(l){function R(_,h,u,w,x){var Z={name:_,kind:h,location:{uri:w,range:u}};return x&&(Z.containerName=x),Z}l.create=R})(xn=e.SymbolInformation||(e.SymbolInformation={}));var oo;(function(l){function R(_,h,u,w){return w!==void 0?{name:_,kind:h,location:{uri:u,range:w}}:{name:_,kind:h,location:{uri:u}}}l.create=R})(oo=e.WorkspaceSymbol||(e.WorkspaceSymbol={}));var ao;(function(l){function R(h,u,w,x,Z,Me){var Ce={name:h,detail:u,kind:w,range:x,selectionRange:Z};return Me!==void 0&&(Ce.children=Me),Ce}l.create=R;function _(h){var u=h;return u&&E.string(u.name)&&E.number(u.kind)&&a.is(u.range)&&a.is(u.selectionRange)&&(u.detail===void 0||E.string(u.detail))&&(u.deprecated===void 0||E.boolean(u.deprecated))&&(u.children===void 0||Array.isArray(u.children))&&(u.tags===void 0||Array.isArray(u.tags))}l.is=_})(ao=e.DocumentSymbol||(e.DocumentSymbol={}));var qn;(function(l){l.Empty="",l.QuickFix="quickfix",l.Refactor="refactor",l.RefactorExtract="refactor.extract",l.RefactorInline="refactor.inline",l.RefactorRewrite="refactor.rewrite",l.Source="source",l.SourceOrganizeImports="source.organizeImports",l.SourceFixAll="source.fixAll"})(qn=e.CodeActionKind||(e.CodeActionKind={}));var Yn;(function(l){l.Invoked=1,l.Automatic=2})(Yn=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));var vi;(function(l){function R(h,u,w){var x={diagnostics:h};return u!=null&&(x.only=u),w!=null&&(x.triggerKind=w),x}l.create=R;function _(h){var u=h;return E.defined(u)&&E.typedArray(u.diagnostics,b.is)&&(u.only===void 0||E.typedArray(u.only,E.string))&&(u.triggerKind===void 0||u.triggerKind===Yn.Invoked||u.triggerKind===Yn.Automatic)}l.is=_})(vi=e.CodeActionContext||(e.CodeActionContext={}));var vr;(function(l){function R(h,u,w){var x={title:h},Z=!0;return typeof u=="string"?(Z=!1,x.kind=u):N.is(u)?x.command=u:x.edit=u,Z&&w!==void 0&&(x.kind=w),x}l.create=R;function _(h){var u=h;return u&&E.string(u.title)&&(u.diagnostics===void 0||E.typedArray(u.diagnostics,b.is))&&(u.kind===void 0||E.string(u.kind))&&(u.edit!==void 0||u.command!==void 0)&&(u.command===void 0||N.is(u.command))&&(u.isPreferred===void 0||E.boolean(u.isPreferred))&&(u.edit===void 0||Ye.is(u.edit))}l.is=_})(vr=e.CodeAction||(e.CodeAction={}));var Ei;(function(l){function R(h,u){var w={range:h};return E.defined(u)&&(w.data=u),w}l.create=R;function _(h){var u=h;return E.defined(u)&&a.is(u.range)&&(E.undefined(u.command)||N.is(u.command))}l.is=_})(Ei=e.CodeLens||(e.CodeLens={}));var En;(function(l){function R(h,u){return{tabSize:h,insertSpaces:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&E.uinteger(u.tabSize)&&E.boolean(u.insertSpaces)}l.is=_})(En=e.FormattingOptions||(e.FormattingOptions={}));var y;(function(l){function R(h,u,w){return{range:h,target:u,data:w}}l.create=R;function _(h){var u=h;return E.defined(u)&&a.is(u.range)&&(E.undefined(u.target)||E.string(u.target))}l.is=_})(y=e.DocumentLink||(e.DocumentLink={}));var q;(function(l){function R(h,u){return{range:h,parent:u}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&a.is(u.range)&&(u.parent===void 0||l.is(u.parent))}l.is=_})(q=e.SelectionRange||(e.SelectionRange={}));var L;(function(l){l.namespace="namespace",l.type="type",l.class="class",l.enum="enum",l.interface="interface",l.struct="struct",l.typeParameter="typeParameter",l.parameter="parameter",l.variable="variable",l.property="property",l.enumMember="enumMember",l.event="event",l.function="function",l.method="method",l.macro="macro",l.keyword="keyword",l.modifier="modifier",l.comment="comment",l.string="string",l.number="number",l.regexp="regexp",l.operator="operator",l.decorator="decorator"})(L=e.SemanticTokenTypes||(e.SemanticTokenTypes={}));var B;(function(l){l.declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary"})(B=e.SemanticTokenModifiers||(e.SemanticTokenModifiers={}));var ve;(function(l){function R(_){var h=_;return E.objectLiteral(h)&&(h.resultId===void 0||typeof h.resultId=="string")&&Array.isArray(h.data)&&(h.data.length===0||typeof h.data[0]=="number")}l.is=R})(ve=e.SemanticTokens||(e.SemanticTokens={}));var Ee;(function(l){function R(h,u){return{range:h,text:u}}l.create=R;function _(h){var u=h;return u!=null&&a.is(u.range)&&E.string(u.text)}l.is=_})(Ee=e.InlineValueText||(e.InlineValueText={}));var xe;(function(l){function R(h,u,w){return{range:h,variableName:u,caseSensitiveLookup:w}}l.create=R;function _(h){var u=h;return u!=null&&a.is(u.range)&&E.boolean(u.caseSensitiveLookup)&&(E.string(u.variableName)||u.variableName===void 0)}l.is=_})(xe=e.InlineValueVariableLookup||(e.InlineValueVariableLookup={}));var Ue;(function(l){function R(h,u){return{range:h,expression:u}}l.create=R;function _(h){var u=h;return u!=null&&a.is(u.range)&&(E.string(u.expression)||u.expression===void 0)}l.is=_})(Ue=e.InlineValueEvaluatableExpression||(e.InlineValueEvaluatableExpression={}));var ae;(function(l){function R(h,u){return{frameId:h,stoppedLocation:u}}l.create=R;function _(h){var u=h;return E.defined(u)&&a.is(h.stoppedLocation)}l.is=_})(ae=e.InlineValueContext||(e.InlineValueContext={}));var we;(function(l){l.Type=1,l.Parameter=2;function R(_){return _===1||_===2}l.is=R})(we=e.InlayHintKind||(e.InlayHintKind={}));var fe;(function(l){function R(h){return{value:h}}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&(u.tooltip===void 0||E.string(u.tooltip)||It.is(u.tooltip))&&(u.location===void 0||c.is(u.location))&&(u.command===void 0||N.is(u.command))}l.is=_})(fe=e.InlayHintLabelPart||(e.InlayHintLabelPart={}));var $e;(function(l){function R(h,u,w){var x={position:h,label:u};return w!==void 0&&(x.kind=w),x}l.create=R;function _(h){var u=h;return E.objectLiteral(u)&&o.is(u.position)&&(E.string(u.label)||E.typedArray(u.label,fe.is))&&(u.kind===void 0||we.is(u.kind))&&u.textEdits===void 0||E.typedArray(u.textEdits,K.is)&&(u.tooltip===void 0||E.string(u.tooltip)||It.is(u.tooltip))&&(u.paddingLeft===void 0||E.boolean(u.paddingLeft))&&(u.paddingRight===void 0||E.boolean(u.paddingRight))}l.is=_})($e=e.InlayHint||(e.InlayHint={}));var ot;(function(l){function R(_){var h=_;return E.objectLiteral(h)&&r.is(h.uri)&&E.string(h.name)}l.is=R})(ot=e.WorkspaceFolder||(e.WorkspaceFolder={})),e.EOL=[`
31
31
  `,`\r
32
- `,"\r"];var Xt;(function(l){function _(C,T,X,Oe){return new Wt(C,T,X,Oe)}l.create=_;function R(C){var T=C;return!!(w.defined(T)&&w.string(T.uri)&&(w.undefined(T.languageId)||w.string(T.languageId))&&w.uinteger(T.lineCount)&&w.func(T.getText)&&w.func(T.positionAt)&&w.func(T.offsetAt))}l.is=R;function f(C,T){for(var X=C.getText(),Oe=c(T,function(Hn,ii){var $c=Hn.range.start.line-ii.range.start.line;return $c===0?Hn.range.start.character-ii.range.start.character:$c}),be=X.length,Tt=Oe.length-1;Tt>=0;Tt--){var xt=Oe[Tt],Jt=C.offsetAt(xt.range.start),oe=C.offsetAt(xt.range.end);if(oe<=be)X=X.substring(0,Jt)+xt.newText+X.substring(oe,X.length);else throw new Error("Overlapping edit");be=Jt}return X}l.applyEdits=f;function c(C,T){if(C.length<=1)return C;var X=C.length/2|0,Oe=C.slice(0,X),be=C.slice(X);c(Oe,T),c(be,T);for(var Tt=0,xt=0,Jt=0;Tt<Oe.length&&xt<be.length;){var oe=T(Oe[Tt],be[xt]);oe<=0?C[Jt++]=Oe[Tt++]:C[Jt++]=be[xt++]}for(;Tt<Oe.length;)C[Jt++]=Oe[Tt++];for(;xt<be.length;)C[Jt++]=be[xt++];return C}})(Xt=e.TextDocument||(e.TextDocument={}));var Wt=function(){function l(_,R,f,c){this._uri=_,this._languageId=R,this._version=f,this._content=c,this._lineOffsets=void 0}return Object.defineProperty(l.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),l.prototype.getText=function(_){if(_){var R=this.offsetAt(_.start),f=this.offsetAt(_.end);return this._content.substring(R,f)}return this._content},l.prototype.update=function(_,R){this._content=_.text,this._version=R,this._lineOffsets=void 0},l.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var _=[],R=this._content,f=!0,c=0;c<R.length;c++){f&&(_.push(c),f=!1);var C=R.charAt(c);f=C==="\r"||C===`
33
- `,C==="\r"&&c+1<R.length&&R.charAt(c+1)===`
34
- `&&c++}f&&R.length>0&&_.push(R.length),this._lineOffsets=_}return this._lineOffsets},l.prototype.positionAt=function(_){_=Math.max(Math.min(_,this._content.length),0);var R=this.getLineOffsets(),f=0,c=R.length;if(c===0)return s.create(0,_);for(;f<c;){var C=Math.floor((f+c)/2);R[C]>_?c=C:f=C+1}var T=f-1;return s.create(T,_-R[T])},l.prototype.offsetAt=function(_){var R=this.getLineOffsets();if(_.line>=R.length)return this._content.length;if(_.line<0)return 0;var f=R[_.line],c=_.line+1<R.length?R[_.line+1]:this._content.length;return Math.max(Math.min(f+_.character,c),f)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),w;(function(l){var _=Object.prototype.toString;function R(oe){return typeof oe<"u"}l.defined=R;function f(oe){return typeof oe>"u"}l.undefined=f;function c(oe){return oe===!0||oe===!1}l.boolean=c;function C(oe){return _.call(oe)==="[object String]"}l.string=C;function T(oe){return _.call(oe)==="[object Number]"}l.number=T;function X(oe,Hn,ii){return _.call(oe)==="[object Number]"&&Hn<=oe&&oe<=ii}l.numberRange=X;function Oe(oe){return _.call(oe)==="[object Number]"&&-2147483648<=oe&&oe<=2147483647}l.integer=Oe;function be(oe){return _.call(oe)==="[object Number]"&&0<=oe&&oe<=2147483647}l.uinteger=be;function Tt(oe){return _.call(oe)==="[object Function]"}l.func=Tt;function xt(oe){return oe!==null&&typeof oe=="object"}l.objectLiteral=xt;function Jt(oe,Hn){return Array.isArray(oe)&&oe.every(Hn)}l.typedArray=Jt})(w||(w={}))})});var ke=F(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.ProtocolNotificationType=_t.ProtocolNotificationType0=_t.ProtocolRequestType=_t.ProtocolRequestType0=_t.RegistrationType=void 0;var zn=Sn(),$s=class{constructor(e){this.method=e}};_t.RegistrationType=$s;var Us=class extends zn.RequestType0{constructor(e){super(e)}};_t.ProtocolRequestType0=Us;var Bs=class extends zn.RequestType{constructor(e){super(e,zn.ParameterStructures.byName)}};_t.ProtocolRequestType=Bs;var Vs=class extends zn.NotificationType0{constructor(e){super(e)}};_t.ProtocolNotificationType0=Vs;var zs=class extends zn.NotificationType{constructor(e){super(e,zn.ParameterStructures.byName)}};_t.ProtocolNotificationType=zs});var Ri=F(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.objectLiteral=Me.typedArray=Me.stringArray=Me.array=Me.func=Me.error=Me.number=Me.string=Me.boolean=void 0;function kp(t){return t===!0||t===!1}Me.boolean=kp;function gu(t){return typeof t=="string"||t instanceof String}Me.string=gu;function Ap(t){return typeof t=="number"||t instanceof Number}Me.number=Ap;function qp(t){return t instanceof Error}Me.error=qp;function Np(t){return typeof t=="function"}Me.func=Np;function yu(t){return Array.isArray(t)}Me.array=yu;function Fp(t){return yu(t)&&t.every(e=>gu(e))}Me.stringArray=Fp;function Op(t,e){return Array.isArray(t)&&t.every(e)}Me.typedArray=Op;function jp(t){return t!==null&&typeof t=="object"}Me.objectLiteral=jp});var _u=F(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.ImplementationRequest=void 0;var Ip=ke(),Lp;(function(t){t.method="textDocument/implementation",t.type=new Ip.ProtocolRequestType(t.method)})(Lp=gr.ImplementationRequest||(gr.ImplementationRequest={}))});var Ru=F(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.TypeDefinitionRequest=void 0;var Mp=ke(),Hp;(function(t){t.method="textDocument/typeDefinition",t.type=new Mp.ProtocolRequestType(t.method)})(Hp=yr.TypeDefinitionRequest||(yr.TypeDefinitionRequest={}))});var vu=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.DidChangeWorkspaceFoldersNotification=fn.WorkspaceFoldersRequest=void 0;var bu=ke(),Wp;(function(t){t.type=new bu.ProtocolRequestType0("workspace/workspaceFolders")})(Wp=fn.WorkspaceFoldersRequest||(fn.WorkspaceFoldersRequest={}));var $p;(function(t){t.type=new bu.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})($p=fn.DidChangeWorkspaceFoldersNotification||(fn.DidChangeWorkspaceFoldersNotification={}))});var wu=F(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.ConfigurationRequest=void 0;var Up=ke(),Bp;(function(t){t.type=new Up.ProtocolRequestType("workspace/configuration")})(Bp=_r.ConfigurationRequest||(_r.ConfigurationRequest={}))});var Du=F(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.ColorPresentationRequest=hn.DocumentColorRequest=void 0;var Cu=ke(),Vp;(function(t){t.method="textDocument/documentColor",t.type=new Cu.ProtocolRequestType(t.method)})(Vp=hn.DocumentColorRequest||(hn.DocumentColorRequest={}));var zp;(function(t){t.type=new Cu.ProtocolRequestType("textDocument/colorPresentation")})(zp=hn.ColorPresentationRequest||(hn.ColorPresentationRequest={}))});var Pu=F(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.FoldingRangeRequest=void 0;var Gp=ke(),Kp;(function(t){t.method="textDocument/foldingRange",t.type=new Gp.ProtocolRequestType(t.method)})(Kp=Rr.FoldingRangeRequest||(Rr.FoldingRangeRequest={}))});var Eu=F(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.DeclarationRequest=void 0;var Yp=ke(),Qp;(function(t){t.method="textDocument/declaration",t.type=new Yp.ProtocolRequestType(t.method)})(Qp=br.DeclarationRequest||(br.DeclarationRequest={}))});var Su=F(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.SelectionRangeRequest=void 0;var Xp=ke(),Jp;(function(t){t.method="textDocument/selectionRange",t.type=new Xp.ProtocolRequestType(t.method)})(Jp=vr.SelectionRangeRequest||(vr.SelectionRangeRequest={}))});var xu=F(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.WorkDoneProgressCancelNotification=qt.WorkDoneProgressCreateRequest=qt.WorkDoneProgress=void 0;var Zp=Sn(),Tu=ke(),em;(function(t){t.type=new Zp.ProgressType;function e(n){return n===t.type}t.is=e})(em=qt.WorkDoneProgress||(qt.WorkDoneProgress={}));var tm;(function(t){t.method="window/workDoneProgress/create",t.type=new Tu.ProtocolRequestType(t.method)})(tm=qt.WorkDoneProgressCreateRequest||(qt.WorkDoneProgressCreateRequest={}));var nm;(function(t){t.method="window/workDoneProgress/cancel",t.type=new Tu.ProtocolNotificationType(t.method)})(nm=qt.WorkDoneProgressCancelNotification||(qt.WorkDoneProgressCancelNotification={}))});var ku=F(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.CallHierarchyOutgoingCallsRequest=Nt.CallHierarchyIncomingCallsRequest=Nt.CallHierarchyPrepareRequest=void 0;var Gs=ke(),rm;(function(t){t.method="textDocument/prepareCallHierarchy",t.type=new Gs.ProtocolRequestType(t.method)})(rm=Nt.CallHierarchyPrepareRequest||(Nt.CallHierarchyPrepareRequest={}));var im;(function(t){t.method="callHierarchy/incomingCalls",t.type=new Gs.ProtocolRequestType(t.method)})(im=Nt.CallHierarchyIncomingCallsRequest||(Nt.CallHierarchyIncomingCallsRequest={}));var om;(function(t){t.method="callHierarchy/outgoingCalls",t.type=new Gs.ProtocolRequestType(t.method)})(om=Nt.CallHierarchyOutgoingCallsRequest||(Nt.CallHierarchyOutgoingCallsRequest={}))});var Au=F(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.SemanticTokensRefreshRequest=He.SemanticTokensRangeRequest=He.SemanticTokensDeltaRequest=He.SemanticTokensRequest=He.SemanticTokensRegistrationType=He.TokenFormat=void 0;var wr=ke(),sm;(function(t){t.Relative="relative"})(sm=He.TokenFormat||(He.TokenFormat={}));var am;(function(t){t.method="textDocument/semanticTokens",t.type=new wr.RegistrationType(t.method)})(am=He.SemanticTokensRegistrationType||(He.SemanticTokensRegistrationType={}));var cm;(function(t){t.method="textDocument/semanticTokens/full",t.type=new wr.ProtocolRequestType(t.method)})(cm=He.SemanticTokensRequest||(He.SemanticTokensRequest={}));var um;(function(t){t.method="textDocument/semanticTokens/full/delta",t.type=new wr.ProtocolRequestType(t.method)})(um=He.SemanticTokensDeltaRequest||(He.SemanticTokensDeltaRequest={}));var lm;(function(t){t.method="textDocument/semanticTokens/range",t.type=new wr.ProtocolRequestType(t.method)})(lm=He.SemanticTokensRangeRequest||(He.SemanticTokensRangeRequest={}));var dm;(function(t){t.method="workspace/semanticTokens/refresh",t.type=new wr.ProtocolRequestType0(t.method)})(dm=He.SemanticTokensRefreshRequest||(He.SemanticTokensRefreshRequest={}))});var qu=F(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.ShowDocumentRequest=void 0;var fm=ke(),hm;(function(t){t.method="window/showDocument",t.type=new fm.ProtocolRequestType(t.method)})(hm=Cr.ShowDocumentRequest||(Cr.ShowDocumentRequest={}))});var Nu=F(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.LinkedEditingRangeRequest=void 0;var pm=ke(),mm;(function(t){t.method="textDocument/linkedEditingRange",t.type=new pm.ProtocolRequestType(t.method)})(mm=Dr.LinkedEditingRangeRequest||(Dr.LinkedEditingRangeRequest={}))});var Fu=F(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.WillDeleteFilesRequest=Ae.DidDeleteFilesNotification=Ae.DidRenameFilesNotification=Ae.WillRenameFilesRequest=Ae.DidCreateFilesNotification=Ae.WillCreateFilesRequest=Ae.FileOperationPatternKind=void 0;var Gn=ke(),gm;(function(t){t.file="file",t.folder="folder"})(gm=Ae.FileOperationPatternKind||(Ae.FileOperationPatternKind={}));var ym;(function(t){t.method="workspace/willCreateFiles",t.type=new Gn.ProtocolRequestType(t.method)})(ym=Ae.WillCreateFilesRequest||(Ae.WillCreateFilesRequest={}));var _m;(function(t){t.method="workspace/didCreateFiles",t.type=new Gn.ProtocolNotificationType(t.method)})(_m=Ae.DidCreateFilesNotification||(Ae.DidCreateFilesNotification={}));var Rm;(function(t){t.method="workspace/willRenameFiles",t.type=new Gn.ProtocolRequestType(t.method)})(Rm=Ae.WillRenameFilesRequest||(Ae.WillRenameFilesRequest={}));var bm;(function(t){t.method="workspace/didRenameFiles",t.type=new Gn.ProtocolNotificationType(t.method)})(bm=Ae.DidRenameFilesNotification||(Ae.DidRenameFilesNotification={}));var vm;(function(t){t.method="workspace/didDeleteFiles",t.type=new Gn.ProtocolNotificationType(t.method)})(vm=Ae.DidDeleteFilesNotification||(Ae.DidDeleteFilesNotification={}));var wm;(function(t){t.method="workspace/willDeleteFiles",t.type=new Gn.ProtocolRequestType(t.method)})(wm=Ae.WillDeleteFilesRequest||(Ae.WillDeleteFilesRequest={}))});var Ou=F(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.MonikerRequest=Ft.MonikerKind=Ft.UniquenessLevel=void 0;var Cm=ke(),Dm;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(Dm=Ft.UniquenessLevel||(Ft.UniquenessLevel={}));var Pm;(function(t){t.$import="import",t.$export="export",t.local="local"})(Pm=Ft.MonikerKind||(Ft.MonikerKind={}));var Em;(function(t){t.method="textDocument/moniker",t.type=new Cm.ProtocolRequestType(t.method)})(Em=Ft.MonikerRequest||(Ft.MonikerRequest={}))});var ju=F(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.TypeHierarchySubtypesRequest=Ot.TypeHierarchySupertypesRequest=Ot.TypeHierarchyPrepareRequest=void 0;var Ks=ke(),Sm;(function(t){t.method="textDocument/prepareTypeHierarchy",t.type=new Ks.ProtocolRequestType(t.method)})(Sm=Ot.TypeHierarchyPrepareRequest||(Ot.TypeHierarchyPrepareRequest={}));var Tm;(function(t){t.method="typeHierarchy/supertypes",t.type=new Ks.ProtocolRequestType(t.method)})(Tm=Ot.TypeHierarchySupertypesRequest||(Ot.TypeHierarchySupertypesRequest={}));var xm;(function(t){t.method="typeHierarchy/subtypes",t.type=new Ks.ProtocolRequestType(t.method)})(xm=Ot.TypeHierarchySubtypesRequest||(Ot.TypeHierarchySubtypesRequest={}))});var Lu=F(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.InlineValueRefreshRequest=pn.InlineValueRequest=void 0;var Iu=ke(),km;(function(t){t.method="textDocument/inlineValue",t.type=new Iu.ProtocolRequestType(t.method)})(km=pn.InlineValueRequest||(pn.InlineValueRequest={}));var Am;(function(t){t.method="workspace/inlineValue/refresh",t.type=new Iu.ProtocolRequestType0(t.method)})(Am=pn.InlineValueRefreshRequest||(pn.InlineValueRefreshRequest={}))});var Mu=F(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.InlayHintRefreshRequest=jt.InlayHintResolveRequest=jt.InlayHintRequest=void 0;var Ys=ke(),qm;(function(t){t.method="textDocument/inlayHint",t.type=new Ys.ProtocolRequestType(t.method)})(qm=jt.InlayHintRequest||(jt.InlayHintRequest={}));var Nm;(function(t){t.method="inlayHint/resolve",t.type=new Ys.ProtocolRequestType(t.method)})(Nm=jt.InlayHintResolveRequest||(jt.InlayHintResolveRequest={}));var Fm;(function(t){t.method="workspace/inlayHint/refresh",t.type=new Ys.ProtocolRequestType0(t.method)})(Fm=jt.InlayHintRefreshRequest||(jt.InlayHintRefreshRequest={}))});var Wu=F(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.DiagnosticRefreshRequest=Ze.WorkspaceDiagnosticRequest=Ze.DocumentDiagnosticRequest=Ze.DocumentDiagnosticReportKind=Ze.DiagnosticServerCancellationData=void 0;var Hu=Sn(),Om=Ri(),Qs=ke(),jm;(function(t){function e(n){let r=n;return r&&Om.boolean(r.retriggerRequest)}t.is=e})(jm=Ze.DiagnosticServerCancellationData||(Ze.DiagnosticServerCancellationData={}));var Im;(function(t){t.Full="full",t.Unchanged="unchanged"})(Im=Ze.DocumentDiagnosticReportKind||(Ze.DocumentDiagnosticReportKind={}));var Lm;(function(t){t.method="textDocument/diagnostic",t.type=new Qs.ProtocolRequestType(t.method),t.partialResult=new Hu.ProgressType})(Lm=Ze.DocumentDiagnosticRequest||(Ze.DocumentDiagnosticRequest={}));var Mm;(function(t){t.method="workspace/diagnostic",t.type=new Qs.ProtocolRequestType(t.method),t.partialResult=new Hu.ProgressType})(Mm=Ze.WorkspaceDiagnosticRequest||(Ze.WorkspaceDiagnosticRequest={}));var Hm;(function(t){t.method="workspace/diagnostic/refresh",t.type=new Qs.ProtocolRequestType0(t.method)})(Hm=Ze.DiagnosticRefreshRequest||(Ze.DiagnosticRefreshRequest={}))});var Bu=F(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.DidCloseNotebookDocumentNotification=ue.DidSaveNotebookDocumentNotification=ue.DidChangeNotebookDocumentNotification=ue.NotebookCellArrayChange=ue.DidOpenNotebookDocumentNotification=ue.NotebookDocumentSyncRegistrationType=ue.NotebookDocument=ue.NotebookCell=ue.ExecutionSummary=ue.NotebookCellKind=void 0;var Pr=mr(),It=Ri(),Er=ke(),$u;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})($u=ue.NotebookCellKind||(ue.NotebookCellKind={}));var Uu;(function(t){function e(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}t.create=e;function n(i){let o=i;return It.objectLiteral(o)&&Pr.uinteger.is(o.executionOrder)&&(o.success===void 0||It.boolean(o.success))}t.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}t.equals=r})(Uu=ue.ExecutionSummary||(ue.ExecutionSummary={}));var Xs;(function(t){function e(o,s){return{kind:o,document:s}}t.create=e;function n(o){let s=o;return It.objectLiteral(s)&&$u.is(s.kind)&&Pr.DocumentUri.is(s.document)&&(s.metadata===void 0||It.objectLiteral(s.metadata))}t.is=n;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Uu.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}t.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),u=Array.isArray(s);if(a!==u)return!1;if(a&&u){if(o.length!==s.length)return!1;for(let p=0;p<o.length;p++)if(!i(o[p],s[p]))return!1}if(It.objectLiteral(o)&&It.objectLiteral(s)){let p=Object.keys(o),h=Object.keys(s);if(p.length!==h.length||(p.sort(),h.sort(),!i(p,h)))return!1;for(let y=0;y<p.length;y++){let g=p[y];if(!i(o[g],s[g]))return!1}}return!0}})(Xs=ue.NotebookCell||(ue.NotebookCell={}));var Wm;(function(t){function e(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}t.create=e;function n(r){let i=r;return It.objectLiteral(i)&&It.string(i.uri)&&Pr.integer.is(i.version)&&It.typedArray(i.cells,Xs.is)}t.is=n})(Wm=ue.NotebookDocument||(ue.NotebookDocument={}));var $m;(function(t){t.method="notebookDocument/sync",t.type=new Er.RegistrationType(t.method)})($m=ue.NotebookDocumentSyncRegistrationType||(ue.NotebookDocumentSyncRegistrationType={}));var Um;(function(t){t.method="notebookDocument/didOpen",t.type=new Er.ProtocolNotificationType(t.method)})(Um=ue.DidOpenNotebookDocumentNotification||(ue.DidOpenNotebookDocumentNotification={}));var Bm;(function(t){function e(r){let i=r;return It.objectLiteral(i)&&Pr.uinteger.is(i.start)&&Pr.uinteger.is(i.deleteCount)&&(i.cells===void 0||It.typedArray(i.cells,Xs.is))}t.is=e;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}t.create=n})(Bm=ue.NotebookCellArrayChange||(ue.NotebookCellArrayChange={}));var Vm;(function(t){t.method="notebookDocument/didChange",t.type=new Er.ProtocolNotificationType(t.method)})(Vm=ue.DidChangeNotebookDocumentNotification||(ue.DidChangeNotebookDocumentNotification={}));var zm;(function(t){t.method="notebookDocument/didSave",t.type=new Er.ProtocolNotificationType(t.method)})(zm=ue.DidSaveNotebookDocumentNotification||(ue.DidSaveNotebookDocumentNotification={}));var Gm;(function(t){t.method="notebookDocument/didClose",t.type=new Er.ProtocolNotificationType(t.method)})(Gm=ue.DidCloseNotebookDocumentNotification||(ue.DidCloseNotebookDocumentNotification={}))});var Zu=F(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.WorkspaceSymbolRequest=d.CodeActionResolveRequest=d.CodeActionRequest=d.DocumentSymbolRequest=d.DocumentHighlightRequest=d.ReferencesRequest=d.DefinitionRequest=d.SignatureHelpRequest=d.SignatureHelpTriggerKind=d.HoverRequest=d.CompletionResolveRequest=d.CompletionRequest=d.CompletionTriggerKind=d.PublishDiagnosticsNotification=d.WatchKind=d.RelativePattern=d.FileChangeType=d.DidChangeWatchedFilesNotification=d.WillSaveTextDocumentWaitUntilRequest=d.WillSaveTextDocumentNotification=d.TextDocumentSaveReason=d.DidSaveTextDocumentNotification=d.DidCloseTextDocumentNotification=d.DidChangeTextDocumentNotification=d.TextDocumentContentChangeEvent=d.DidOpenTextDocumentNotification=d.TextDocumentSyncKind=d.TelemetryEventNotification=d.LogMessageNotification=d.ShowMessageRequest=d.ShowMessageNotification=d.MessageType=d.DidChangeConfigurationNotification=d.ExitNotification=d.ShutdownRequest=d.InitializedNotification=d.InitializeErrorCodes=d.InitializeRequest=d.WorkDoneProgressOptions=d.TextDocumentRegistrationOptions=d.StaticRegistrationOptions=d.PositionEncodingKind=d.FailureHandlingKind=d.ResourceOperationKind=d.UnregistrationRequest=d.RegistrationRequest=d.DocumentSelector=d.NotebookCellTextDocumentFilter=d.NotebookDocumentFilter=d.TextDocumentFilter=void 0;d.TypeHierarchySubtypesRequest=d.TypeHierarchyPrepareRequest=d.MonikerRequest=d.MonikerKind=d.UniquenessLevel=d.WillDeleteFilesRequest=d.DidDeleteFilesNotification=d.WillRenameFilesRequest=d.DidRenameFilesNotification=d.WillCreateFilesRequest=d.DidCreateFilesNotification=d.FileOperationPatternKind=d.LinkedEditingRangeRequest=d.ShowDocumentRequest=d.SemanticTokensRegistrationType=d.SemanticTokensRefreshRequest=d.SemanticTokensRangeRequest=d.SemanticTokensDeltaRequest=d.SemanticTokensRequest=d.TokenFormat=d.CallHierarchyPrepareRequest=d.CallHierarchyOutgoingCallsRequest=d.CallHierarchyIncomingCallsRequest=d.WorkDoneProgressCancelNotification=d.WorkDoneProgressCreateRequest=d.WorkDoneProgress=d.SelectionRangeRequest=d.DeclarationRequest=d.FoldingRangeRequest=d.ColorPresentationRequest=d.DocumentColorRequest=d.ConfigurationRequest=d.DidChangeWorkspaceFoldersNotification=d.WorkspaceFoldersRequest=d.TypeDefinitionRequest=d.ImplementationRequest=d.ApplyWorkspaceEditRequest=d.ExecuteCommandRequest=d.PrepareRenameRequest=d.RenameRequest=d.PrepareSupportDefaultBehavior=d.DocumentOnTypeFormattingRequest=d.DocumentRangeFormattingRequest=d.DocumentFormattingRequest=d.DocumentLinkResolveRequest=d.DocumentLinkRequest=d.CodeLensRefreshRequest=d.CodeLensResolveRequest=d.CodeLensRequest=d.WorkspaceSymbolResolveRequest=void 0;d.DidCloseNotebookDocumentNotification=d.DidSaveNotebookDocumentNotification=d.DidChangeNotebookDocumentNotification=d.NotebookCellArrayChange=d.DidOpenNotebookDocumentNotification=d.NotebookDocumentSyncRegistrationType=d.NotebookDocument=d.NotebookCell=d.ExecutionSummary=d.NotebookCellKind=d.DiagnosticRefreshRequest=d.WorkspaceDiagnosticRequest=d.DocumentDiagnosticRequest=d.DocumentDiagnosticReportKind=d.DiagnosticServerCancellationData=d.InlayHintRefreshRequest=d.InlayHintResolveRequest=d.InlayHintRequest=d.InlineValueRefreshRequest=d.InlineValueRequest=d.TypeHierarchySupertypesRequest=void 0;var J=ke(),Vu=mr(),et=Ri(),Km=_u();Object.defineProperty(d,"ImplementationRequest",{enumerable:!0,get:function(){return Km.ImplementationRequest}});var Ym=Ru();Object.defineProperty(d,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Ym.TypeDefinitionRequest}});var zu=vu();Object.defineProperty(d,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return zu.WorkspaceFoldersRequest}});Object.defineProperty(d,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return zu.DidChangeWorkspaceFoldersNotification}});var Qm=wu();Object.defineProperty(d,"ConfigurationRequest",{enumerable:!0,get:function(){return Qm.ConfigurationRequest}});var Gu=Du();Object.defineProperty(d,"DocumentColorRequest",{enumerable:!0,get:function(){return Gu.DocumentColorRequest}});Object.defineProperty(d,"ColorPresentationRequest",{enumerable:!0,get:function(){return Gu.ColorPresentationRequest}});var Xm=Pu();Object.defineProperty(d,"FoldingRangeRequest",{enumerable:!0,get:function(){return Xm.FoldingRangeRequest}});var Jm=Eu();Object.defineProperty(d,"DeclarationRequest",{enumerable:!0,get:function(){return Jm.DeclarationRequest}});var Zm=Su();Object.defineProperty(d,"SelectionRangeRequest",{enumerable:!0,get:function(){return Zm.SelectionRangeRequest}});var Js=xu();Object.defineProperty(d,"WorkDoneProgress",{enumerable:!0,get:function(){return Js.WorkDoneProgress}});Object.defineProperty(d,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Js.WorkDoneProgressCreateRequest}});Object.defineProperty(d,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Js.WorkDoneProgressCancelNotification}});var Zs=ku();Object.defineProperty(d,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return Zs.CallHierarchyIncomingCallsRequest}});Object.defineProperty(d,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return Zs.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(d,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return Zs.CallHierarchyPrepareRequest}});var Kn=Au();Object.defineProperty(d,"TokenFormat",{enumerable:!0,get:function(){return Kn.TokenFormat}});Object.defineProperty(d,"SemanticTokensRequest",{enumerable:!0,get:function(){return Kn.SemanticTokensRequest}});Object.defineProperty(d,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Kn.SemanticTokensDeltaRequest}});Object.defineProperty(d,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Kn.SemanticTokensRangeRequest}});Object.defineProperty(d,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Kn.SemanticTokensRefreshRequest}});Object.defineProperty(d,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Kn.SemanticTokensRegistrationType}});var eg=qu();Object.defineProperty(d,"ShowDocumentRequest",{enumerable:!0,get:function(){return eg.ShowDocumentRequest}});var tg=Nu();Object.defineProperty(d,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return tg.LinkedEditingRangeRequest}});var Tn=Fu();Object.defineProperty(d,"FileOperationPatternKind",{enumerable:!0,get:function(){return Tn.FileOperationPatternKind}});Object.defineProperty(d,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Tn.DidCreateFilesNotification}});Object.defineProperty(d,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Tn.WillCreateFilesRequest}});Object.defineProperty(d,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Tn.DidRenameFilesNotification}});Object.defineProperty(d,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Tn.WillRenameFilesRequest}});Object.defineProperty(d,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Tn.DidDeleteFilesNotification}});Object.defineProperty(d,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Tn.WillDeleteFilesRequest}});var ea=Ou();Object.defineProperty(d,"UniquenessLevel",{enumerable:!0,get:function(){return ea.UniquenessLevel}});Object.defineProperty(d,"MonikerKind",{enumerable:!0,get:function(){return ea.MonikerKind}});Object.defineProperty(d,"MonikerRequest",{enumerable:!0,get:function(){return ea.MonikerRequest}});var ta=ju();Object.defineProperty(d,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return ta.TypeHierarchyPrepareRequest}});Object.defineProperty(d,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return ta.TypeHierarchySubtypesRequest}});Object.defineProperty(d,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return ta.TypeHierarchySupertypesRequest}});var Ku=Lu();Object.defineProperty(d,"InlineValueRequest",{enumerable:!0,get:function(){return Ku.InlineValueRequest}});Object.defineProperty(d,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Ku.InlineValueRefreshRequest}});var na=Mu();Object.defineProperty(d,"InlayHintRequest",{enumerable:!0,get:function(){return na.InlayHintRequest}});Object.defineProperty(d,"InlayHintResolveRequest",{enumerable:!0,get:function(){return na.InlayHintResolveRequest}});Object.defineProperty(d,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return na.InlayHintRefreshRequest}});var Sr=Wu();Object.defineProperty(d,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Sr.DiagnosticServerCancellationData}});Object.defineProperty(d,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Sr.DocumentDiagnosticReportKind}});Object.defineProperty(d,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Sr.DocumentDiagnosticRequest}});Object.defineProperty(d,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Sr.WorkspaceDiagnosticRequest}});Object.defineProperty(d,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Sr.DiagnosticRefreshRequest}});var Ut=Bu();Object.defineProperty(d,"NotebookCellKind",{enumerable:!0,get:function(){return Ut.NotebookCellKind}});Object.defineProperty(d,"ExecutionSummary",{enumerable:!0,get:function(){return Ut.ExecutionSummary}});Object.defineProperty(d,"NotebookCell",{enumerable:!0,get:function(){return Ut.NotebookCell}});Object.defineProperty(d,"NotebookDocument",{enumerable:!0,get:function(){return Ut.NotebookDocument}});Object.defineProperty(d,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Ut.NotebookDocumentSyncRegistrationType}});Object.defineProperty(d,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Ut.DidOpenNotebookDocumentNotification}});Object.defineProperty(d,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Ut.NotebookCellArrayChange}});Object.defineProperty(d,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Ut.DidChangeNotebookDocumentNotification}});Object.defineProperty(d,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Ut.DidSaveNotebookDocumentNotification}});Object.defineProperty(d,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Ut.DidCloseNotebookDocumentNotification}});var Yu;(function(t){function e(n){let r=n;return et.string(r.language)||et.string(r.scheme)||et.string(r.pattern)}t.is=e})(Yu=d.TextDocumentFilter||(d.TextDocumentFilter={}));var Qu;(function(t){function e(n){let r=n;return et.objectLiteral(r)&&(et.string(r.notebookType)||et.string(r.scheme)||et.string(r.pattern))}t.is=e})(Qu=d.NotebookDocumentFilter||(d.NotebookDocumentFilter={}));var Xu;(function(t){function e(n){let r=n;return et.objectLiteral(r)&&(et.string(r.notebook)||Qu.is(r.notebook))&&(r.language===void 0||et.string(r.language))}t.is=e})(Xu=d.NotebookCellTextDocumentFilter||(d.NotebookCellTextDocumentFilter={}));var Ju;(function(t){function e(n){if(!Array.isArray(n))return!1;for(let r of n)if(!et.string(r)&&!Yu.is(r)&&!Xu.is(r))return!1;return!0}t.is=e})(Ju=d.DocumentSelector||(d.DocumentSelector={}));var ng;(function(t){t.type=new J.ProtocolRequestType("client/registerCapability")})(ng=d.RegistrationRequest||(d.RegistrationRequest={}));var rg;(function(t){t.type=new J.ProtocolRequestType("client/unregisterCapability")})(rg=d.UnregistrationRequest||(d.UnregistrationRequest={}));var ig;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(ig=d.ResourceOperationKind||(d.ResourceOperationKind={}));var og;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(og=d.FailureHandlingKind||(d.FailureHandlingKind={}));var sg;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(sg=d.PositionEncodingKind||(d.PositionEncodingKind={}));var ag;(function(t){function e(n){let r=n;return r&&et.string(r.id)&&r.id.length>0}t.hasId=e})(ag=d.StaticRegistrationOptions||(d.StaticRegistrationOptions={}));var cg;(function(t){function e(n){let r=n;return r&&(r.documentSelector===null||Ju.is(r.documentSelector))}t.is=e})(cg=d.TextDocumentRegistrationOptions||(d.TextDocumentRegistrationOptions={}));var ug;(function(t){function e(r){let i=r;return et.objectLiteral(i)&&(i.workDoneProgress===void 0||et.boolean(i.workDoneProgress))}t.is=e;function n(r){let i=r;return i&&et.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=n})(ug=d.WorkDoneProgressOptions||(d.WorkDoneProgressOptions={}));var lg;(function(t){t.type=new J.ProtocolRequestType("initialize")})(lg=d.InitializeRequest||(d.InitializeRequest={}));var dg;(function(t){t.unknownProtocolVersion=1})(dg=d.InitializeErrorCodes||(d.InitializeErrorCodes={}));var fg;(function(t){t.type=new J.ProtocolNotificationType("initialized")})(fg=d.InitializedNotification||(d.InitializedNotification={}));var hg;(function(t){t.type=new J.ProtocolRequestType0("shutdown")})(hg=d.ShutdownRequest||(d.ShutdownRequest={}));var pg;(function(t){t.type=new J.ProtocolNotificationType0("exit")})(pg=d.ExitNotification||(d.ExitNotification={}));var mg;(function(t){t.type=new J.ProtocolNotificationType("workspace/didChangeConfiguration")})(mg=d.DidChangeConfigurationNotification||(d.DidChangeConfigurationNotification={}));var gg;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4})(gg=d.MessageType||(d.MessageType={}));var yg;(function(t){t.type=new J.ProtocolNotificationType("window/showMessage")})(yg=d.ShowMessageNotification||(d.ShowMessageNotification={}));var _g;(function(t){t.type=new J.ProtocolRequestType("window/showMessageRequest")})(_g=d.ShowMessageRequest||(d.ShowMessageRequest={}));var Rg;(function(t){t.type=new J.ProtocolNotificationType("window/logMessage")})(Rg=d.LogMessageNotification||(d.LogMessageNotification={}));var bg;(function(t){t.type=new J.ProtocolNotificationType("telemetry/event")})(bg=d.TelemetryEventNotification||(d.TelemetryEventNotification={}));var vg;(function(t){t.None=0,t.Full=1,t.Incremental=2})(vg=d.TextDocumentSyncKind||(d.TextDocumentSyncKind={}));var wg;(function(t){t.method="textDocument/didOpen",t.type=new J.ProtocolNotificationType(t.method)})(wg=d.DidOpenTextDocumentNotification||(d.DidOpenTextDocumentNotification={}));var Cg;(function(t){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=n})(Cg=d.TextDocumentContentChangeEvent||(d.TextDocumentContentChangeEvent={}));var Dg;(function(t){t.method="textDocument/didChange",t.type=new J.ProtocolNotificationType(t.method)})(Dg=d.DidChangeTextDocumentNotification||(d.DidChangeTextDocumentNotification={}));var Pg;(function(t){t.method="textDocument/didClose",t.type=new J.ProtocolNotificationType(t.method)})(Pg=d.DidCloseTextDocumentNotification||(d.DidCloseTextDocumentNotification={}));var Eg;(function(t){t.method="textDocument/didSave",t.type=new J.ProtocolNotificationType(t.method)})(Eg=d.DidSaveTextDocumentNotification||(d.DidSaveTextDocumentNotification={}));var Sg;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(Sg=d.TextDocumentSaveReason||(d.TextDocumentSaveReason={}));var Tg;(function(t){t.method="textDocument/willSave",t.type=new J.ProtocolNotificationType(t.method)})(Tg=d.WillSaveTextDocumentNotification||(d.WillSaveTextDocumentNotification={}));var xg;(function(t){t.method="textDocument/willSaveWaitUntil",t.type=new J.ProtocolRequestType(t.method)})(xg=d.WillSaveTextDocumentWaitUntilRequest||(d.WillSaveTextDocumentWaitUntilRequest={}));var kg;(function(t){t.type=new J.ProtocolNotificationType("workspace/didChangeWatchedFiles")})(kg=d.DidChangeWatchedFilesNotification||(d.DidChangeWatchedFilesNotification={}));var Ag;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Ag=d.FileChangeType||(d.FileChangeType={}));var qg;(function(t){function e(n){let r=n;return et.objectLiteral(r)&&(Vu.URI.is(r.baseUri)||Vu.WorkspaceFolder.is(r.baseUri))&&et.string(r.pattern)}t.is=e})(qg=d.RelativePattern||(d.RelativePattern={}));var Ng;(function(t){t.Create=1,t.Change=2,t.Delete=4})(Ng=d.WatchKind||(d.WatchKind={}));var Fg;(function(t){t.type=new J.ProtocolNotificationType("textDocument/publishDiagnostics")})(Fg=d.PublishDiagnosticsNotification||(d.PublishDiagnosticsNotification={}));var Og;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Og=d.CompletionTriggerKind||(d.CompletionTriggerKind={}));var jg;(function(t){t.method="textDocument/completion",t.type=new J.ProtocolRequestType(t.method)})(jg=d.CompletionRequest||(d.CompletionRequest={}));var Ig;(function(t){t.method="completionItem/resolve",t.type=new J.ProtocolRequestType(t.method)})(Ig=d.CompletionResolveRequest||(d.CompletionResolveRequest={}));var Lg;(function(t){t.method="textDocument/hover",t.type=new J.ProtocolRequestType(t.method)})(Lg=d.HoverRequest||(d.HoverRequest={}));var Mg;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Mg=d.SignatureHelpTriggerKind||(d.SignatureHelpTriggerKind={}));var Hg;(function(t){t.method="textDocument/signatureHelp",t.type=new J.ProtocolRequestType(t.method)})(Hg=d.SignatureHelpRequest||(d.SignatureHelpRequest={}));var Wg;(function(t){t.method="textDocument/definition",t.type=new J.ProtocolRequestType(t.method)})(Wg=d.DefinitionRequest||(d.DefinitionRequest={}));var $g;(function(t){t.method="textDocument/references",t.type=new J.ProtocolRequestType(t.method)})($g=d.ReferencesRequest||(d.ReferencesRequest={}));var Ug;(function(t){t.method="textDocument/documentHighlight",t.type=new J.ProtocolRequestType(t.method)})(Ug=d.DocumentHighlightRequest||(d.DocumentHighlightRequest={}));var Bg;(function(t){t.method="textDocument/documentSymbol",t.type=new J.ProtocolRequestType(t.method)})(Bg=d.DocumentSymbolRequest||(d.DocumentSymbolRequest={}));var Vg;(function(t){t.method="textDocument/codeAction",t.type=new J.ProtocolRequestType(t.method)})(Vg=d.CodeActionRequest||(d.CodeActionRequest={}));var zg;(function(t){t.method="codeAction/resolve",t.type=new J.ProtocolRequestType(t.method)})(zg=d.CodeActionResolveRequest||(d.CodeActionResolveRequest={}));var Gg;(function(t){t.method="workspace/symbol",t.type=new J.ProtocolRequestType(t.method)})(Gg=d.WorkspaceSymbolRequest||(d.WorkspaceSymbolRequest={}));var Kg;(function(t){t.method="workspaceSymbol/resolve",t.type=new J.ProtocolRequestType(t.method)})(Kg=d.WorkspaceSymbolResolveRequest||(d.WorkspaceSymbolResolveRequest={}));var Yg;(function(t){t.method="textDocument/codeLens",t.type=new J.ProtocolRequestType(t.method)})(Yg=d.CodeLensRequest||(d.CodeLensRequest={}));var Qg;(function(t){t.method="codeLens/resolve",t.type=new J.ProtocolRequestType(t.method)})(Qg=d.CodeLensResolveRequest||(d.CodeLensResolveRequest={}));var Xg;(function(t){t.method="workspace/codeLens/refresh",t.type=new J.ProtocolRequestType0(t.method)})(Xg=d.CodeLensRefreshRequest||(d.CodeLensRefreshRequest={}));var Jg;(function(t){t.method="textDocument/documentLink",t.type=new J.ProtocolRequestType(t.method)})(Jg=d.DocumentLinkRequest||(d.DocumentLinkRequest={}));var Zg;(function(t){t.method="documentLink/resolve",t.type=new J.ProtocolRequestType(t.method)})(Zg=d.DocumentLinkResolveRequest||(d.DocumentLinkResolveRequest={}));var ey;(function(t){t.method="textDocument/formatting",t.type=new J.ProtocolRequestType(t.method)})(ey=d.DocumentFormattingRequest||(d.DocumentFormattingRequest={}));var ty;(function(t){t.method="textDocument/rangeFormatting",t.type=new J.ProtocolRequestType(t.method)})(ty=d.DocumentRangeFormattingRequest||(d.DocumentRangeFormattingRequest={}));var ny;(function(t){t.method="textDocument/onTypeFormatting",t.type=new J.ProtocolRequestType(t.method)})(ny=d.DocumentOnTypeFormattingRequest||(d.DocumentOnTypeFormattingRequest={}));var ry;(function(t){t.Identifier=1})(ry=d.PrepareSupportDefaultBehavior||(d.PrepareSupportDefaultBehavior={}));var iy;(function(t){t.method="textDocument/rename",t.type=new J.ProtocolRequestType(t.method)})(iy=d.RenameRequest||(d.RenameRequest={}));var oy;(function(t){t.method="textDocument/prepareRename",t.type=new J.ProtocolRequestType(t.method)})(oy=d.PrepareRenameRequest||(d.PrepareRenameRequest={}));var sy;(function(t){t.type=new J.ProtocolRequestType("workspace/executeCommand")})(sy=d.ExecuteCommandRequest||(d.ExecuteCommandRequest={}));var ay;(function(t){t.type=new J.ProtocolRequestType("workspace/applyEdit")})(ay=d.ApplyWorkspaceEditRequest||(d.ApplyWorkspaceEditRequest={}))});var tl=F(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.createProtocolConnection=void 0;var el=Sn();function cy(t,e,n,r){return el.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,el.createMessageConnection)(t,e,n,r)}bi.createProtocolConnection=cy});var nl=F(ct=>{"use strict";var uy=ct&&ct.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),vi=ct&&ct.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&uy(e,t,n)};Object.defineProperty(ct,"__esModule",{value:!0});ct.LSPErrorCodes=ct.createProtocolConnection=void 0;vi(Sn(),ct);vi(mr(),ct);vi(ke(),ct);vi(Zu(),ct);var ly=tl();Object.defineProperty(ct,"createProtocolConnection",{enumerable:!0,get:function(){return ly.createProtocolConnection}});var dy;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(dy=ct.LSPErrorCodes||(ct.LSPErrorCodes={}))});var qe=F(Bt=>{"use strict";var fy=Bt&&Bt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),rl=Bt&&Bt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&fy(e,t,n)};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.createProtocolConnection=void 0;var hy=yi();rl(yi(),Bt);rl(nl(),Bt);function py(t,e,n,r){return(0,hy.createMessageConnection)(t,e,n,r)}Bt.createProtocolConnection=py});var wi=F(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.thenable=We.typedArray=We.stringArray=We.array=We.func=We.error=We.number=We.string=We.boolean=void 0;function my(t){return t===!0||t===!1}We.boolean=my;function il(t){return typeof t=="string"||t instanceof String}We.string=il;function gy(t){return typeof t=="number"||t instanceof Number}We.number=gy;function yy(t){return t instanceof Error}We.error=yy;function ol(t){return typeof t=="function"}We.func=ol;function sl(t){return Array.isArray(t)}We.array=sl;function _y(t){return sl(t)&&t.every(e=>il(e))}We.stringArray=_y;function Ry(t,e){return Array.isArray(t)&&t.every(e)}We.typedArray=Ry;function by(t){return t&&ol(t.then)}We.thenable=by});var ra=F(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.generateUuid=Rt.parse=Rt.isUUID=Rt.v4=Rt.empty=void 0;var Tr=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},xr=class t extends Tr{constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}};xr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];xr._timeHighBits=["8","9","a","b"];Rt.empty=new Tr("00000000-0000-0000-0000-000000000000");function al(){return new xr}Rt.v4=al;var vy=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function cl(t){return vy.test(t)}Rt.isUUID=cl;function wy(t){if(!cl(t))throw new Error("invalid uuid");return new Tr(t)}Rt.parse=wy;function Cy(){return al().asHex()}Rt.generateUuid=Cy});var ul=F(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.attachPartialResult=gn.ProgressFeature=gn.attachWorkDone=void 0;var mn=qe(),Dy=ra(),xn=class t{constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let o={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,o)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,{kind:"end"})}};xn.Instances=new Map;var Ci=class extends xn{constructor(e,n){super(e,n),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},kr=class{constructor(){}begin(){}report(){}done(){}},Di=class extends kr{constructor(){super(),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Py(t,e){if(e===void 0||e.workDoneToken===void 0)return new kr;let n=e.workDoneToken;return delete e.workDoneToken,new xn(t,n)}gn.attachWorkDone=Py;var Ey=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(mn.WorkDoneProgressCancelNotification.type,n=>{let r=xn.Instances.get(n.token);(r instanceof Ci||r instanceof Di)&&r.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new kr:new xn(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,Dy.generateUuid)();return this.connection.sendRequest(mn.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new Ci(this.connection,e))}else return Promise.resolve(new Di)}};gn.ProgressFeature=Ey;var ia;(function(t){t.type=new mn.ProgressType})(ia||(ia={}));var oa=class{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(ia.type,this._token,e)}};function Sy(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new oa(t,n)}gn.attachPartialResult=Sy});var ll=F(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ConfigurationFeature=void 0;var Ty=qe(),xy=wi(),ky=t=>class extends t{getConfiguration(e){return e?xy.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(Ty.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};Pi.ConfigurationFeature=ky});var dl=F(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.WorkspaceFoldersFeature=void 0;var Ei=qe(),Ay=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ei.Emitter,this.connection.onNotification(Ei.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let n=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ei.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ei.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Si.WorkspaceFoldersFeature=Ay});var fl=F(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.CallHierarchyFeature=void 0;var sa=qe(),qy=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(sa.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=sa.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=sa.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ti.CallHierarchyFeature=qy});var ca=F(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.SemanticTokensBuilder=yn.SemanticTokensDiff=yn.SemanticTokensFeature=void 0;var xi=qe(),Ny=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(xi.SemanticTokensRefreshRequest.type),on:e=>{let n=xi.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=xi.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=xi.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};yn.SemanticTokensFeature=Ny;var ki=class{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};yn.SemanticTokensDiff=ki;var aa=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,n,r,i,o){let s=e,a=n;this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new ki(this._prevData,this._data).computeDiff()}:this.build()}};yn.SemanticTokensBuilder=aa});var hl=F(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ShowDocumentFeature=void 0;var Fy=qe(),Oy=t=>class extends t{showDocument(e){return this.connection.sendRequest(Fy.ShowDocumentRequest.type,e)}};Ai.ShowDocumentFeature=Oy});var pl=F(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.FileOperationsFeature=void 0;var Yn=qe(),jy=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(Yn.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(Yn.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(Yn.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(Yn.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(Yn.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(Yn.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};qi.FileOperationsFeature=jy});var ml=F(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.LinkedEditingRangeFeature=void 0;var Iy=qe(),Ly=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(Iy.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};Ni.LinkedEditingRangeFeature=Ly});var gl=F(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.TypeHierarchyFeature=void 0;var ua=qe(),My=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(ua.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=ua.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=ua.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Fi.TypeHierarchyFeature=My});var _l=F(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.InlineValueFeature=void 0;var yl=qe(),Hy=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(yl.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(yl.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};Oi.InlineValueFeature=Hy});var Rl=F(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.InlayHintFeature=void 0;var la=qe(),Wy=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(la.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(la.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(la.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};ji.InlayHintFeature=Wy});var bl=F(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.DiagnosticFeature=void 0;var Ar=qe(),$y=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ar.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(Ar.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ar.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(Ar.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ar.WorkspaceDiagnosticRequest.partialResult,n)))}}};Ii.DiagnosticFeature=$y});var fa=F(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.TextDocuments=void 0;var kn=qe(),da=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new kn.Emitter,this._onDidOpen=new kn.Emitter,this._onDidClose=new kn.Emitter,this._onDidSave=new kn.Emitter,this._onWillSave=new kn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=kn.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),kn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Li.TextDocuments=da});var pa=F(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.NotebookDocuments=Qn.NotebookSyncFeature=void 0;var bt=qe(),vl=fa(),Uy=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(bt.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(bt.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(bt.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(bt.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};Qn.NotebookSyncFeature=Uy;var Mi=class t{onDidOpenTextDocument(e){return this.openHandler=e,bt.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,bt.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,bt.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};Mi.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var ha=class{constructor(e){e instanceof vl.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new vl.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new bt.Emitter,this._onDidChange=new bt.Emitter,this._onDidSave=new bt.Emitter,this._onDidClose=new bt.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new Mi,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,u=i.change;u.metadata!==void 0&&(a=!0,o.metadata=u.metadata);let p=[],h=[],y=[],g=[];if(u.cells!==void 0){let j=u.cells;if(j.structure!==void 0){let v=j.structure.array;if(o.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),j.structure.didOpen!==void 0)for(let b of j.structure.didOpen)n.openTextDocument({textDocument:b}),p.push(b.uri);if(j.structure.didClose)for(let b of j.structure.didClose)n.closeTextDocument({textDocument:b}),h.push(b.uri)}if(j.data!==void 0){let v=new Map(j.data.map(b=>[b.document,b]));for(let b=0;b<=o.cells.length;b++){let k=v.get(o.cells[b].document);if(k!==void 0){let z=o.cells.splice(b,1,k);if(y.push({old:z[0],new:k}),v.delete(k.document),v.size===0)break}}}if(j.textContent!==void 0)for(let v of j.textContent)n.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),g.push(v.document.uri)}this.updateCellMap(o);let N={notebookDocument:o};a&&(N.metadata={old:s,new:o.metadata});let A=[];for(let j of p)A.push(this.getNotebookCell(j));let q=[];for(let j of h)q.push(this.getNotebookCell(j));let M=[];for(let j of g)M.push(this.getNotebookCell(j));(A.length>0||q.length>0||y.length>0||M.length>0)&&(N.cells={added:A,removed:q,changed:{data:y,textContent:M}}),(N.metadata!==void 0||N.cells!==void 0)&&this._onDidChange.fire(N)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),bt.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};Qn.NotebookDocuments=ha});var wl=F(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.MonikerFeature=void 0;var By=qe(),Vy=t=>class extends t{get moniker(){return{on:e=>{let n=By.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Hi.MonikerFeature=Vy});var ba=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.createConnection=se.combineFeatures=se.combineNotebooksFeatures=se.combineLanguagesFeatures=se.combineWorkspaceFeatures=se.combineWindowFeatures=se.combineClientFeatures=se.combineTracerFeatures=se.combineTelemetryFeatures=se.combineConsoleFeatures=se._NotebooksImpl=se._LanguagesImpl=se.BulkUnregistration=se.BulkRegistration=se.ErrorMessageTracker=void 0;var L=qe(),vt=wi(),ga=ra(),Q=ul(),zy=ll(),Gy=dl(),Ky=fl(),Yy=ca(),Qy=hl(),Xy=pl(),Jy=ml(),Zy=gl(),e_=_l(),t_=Rl(),n_=bl(),r_=pa(),i_=wl();function ma(t){if(t!==null)return t}var ya=class{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};se.ErrorMessageTracker=ya;var Wi=class{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(L.MessageType.Error,e)}warn(e){this.send(L.MessageType.Warning,e)}info(e){this.send(L.MessageType.Info,e)}log(e){this.send(L.MessageType.Log,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(L.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,L.RAL)().console.error("Sending log message failed")})}},_a=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:L.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(L.ShowMessageRequest.type,r).then(ma)}showWarningMessage(e,...n){let r={type:L.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(L.ShowMessageRequest.type,r).then(ma)}showInformationMessage(e,...n){let r={type:L.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(L.ShowMessageRequest.type,r).then(ma)}},Cl=(0,Qy.ShowDocumentFeature)((0,Q.ProgressFeature)(_a)),o_;(function(t){function e(){return new $i}t.create=e})(o_=se.BulkRegistration||(se.BulkRegistration={}));var $i=class{constructor(){this._registrations=[],this._registered=new Set}add(e,n){let r=vt.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=ga.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},s_;(function(t){function e(){return new qr(void 0,[])}t.create=e})(s_=se.BulkUnregistration||(se.BulkUnregistration={}));var qr=class{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(L.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=vt.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(L.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Ui=class{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof $i?this.registerMany(e):e instanceof qr?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=vt.string(n)?n:n.method,o=ga.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(L.RegistrationRequest.type,s).then(a=>(e.add({id:o,method:i}),e),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(e,n){let r=vt.string(e)?e:e.method,i=ga.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(L.RegistrationRequest.type,o).then(s=>L.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(L.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(L.RegistrationRequest.type,n).then(()=>new qr(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Ra=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(L.ApplyWorkspaceEditRequest.type,r)}},Dl=(0,Xy.FileOperationsFeature)((0,Gy.WorkspaceFoldersFeature)((0,zy.ConfigurationFeature)(Ra))),Bi=class{constructor(){this._trace=L.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==L.Trace.Off&&this.connection.sendNotification(L.LogTraceNotification.type,{message:e,verbose:this._trace===L.Trace.Verbose?n:void 0}).catch(()=>{})}},Vi=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(L.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},zi=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,Q.attachPartialResult)(this.connection,n)}};se._LanguagesImpl=zi;var Pl=(0,i_.MonikerFeature)((0,n_.DiagnosticFeature)((0,t_.InlayHintFeature)((0,e_.InlineValueFeature)((0,Zy.TypeHierarchyFeature)((0,Jy.LinkedEditingRangeFeature)((0,Yy.SemanticTokensFeature)((0,Ky.CallHierarchyFeature)(zi)))))))),Gi=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,Q.attachPartialResult)(this.connection,n)}};se._NotebooksImpl=Gi;var El=(0,r_.NotebookSyncFeature)(Gi);function Sl(t,e){return function(n){return e(t(n))}}se.combineConsoleFeatures=Sl;function Tl(t,e){return function(n){return e(t(n))}}se.combineTelemetryFeatures=Tl;function xl(t,e){return function(n){return e(t(n))}}se.combineTracerFeatures=xl;function kl(t,e){return function(n){return e(t(n))}}se.combineClientFeatures=kl;function Al(t,e){return function(n){return e(t(n))}}se.combineWindowFeatures=Al;function ql(t,e){return function(n){return e(t(n))}}se.combineWorkspaceFeatures=ql;function Nl(t,e){return function(n){return e(t(n))}}se.combineLanguagesFeatures=Nl;function Fl(t,e){return function(n){return e(t(n))}}se.combineNotebooksFeatures=Fl;function a_(t,e){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(t.console,e.console,Sl),tracer:n(t.tracer,e.tracer,xl),telemetry:n(t.telemetry,e.telemetry,Tl),client:n(t.client,e.client,kl),window:n(t.window,e.window,Al),workspace:n(t.workspace,e.workspace,ql),languages:n(t.languages,e.languages,Nl),notebooks:n(t.notebooks,e.notebooks,Fl)}}se.combineFeatures=a_;function c_(t,e,n){let r=n&&n.console?new(n.console(Wi)):new Wi,i=t(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(Bi)):new Bi,s=n&&n.telemetry?new(n.telemetry(Vi)):new Vi,a=n&&n.client?new(n.client(Ui)):new Ui,u=n&&n.window?new(n.window(Cl)):new Cl,p=n&&n.workspace?new(n.workspace(Dl)):new Dl,h=n&&n.languages?new(n.languages(Pl)):new Pl,y=n&&n.notebooks?new(n.notebooks(El)):new El,g=[r,o,s,a,u,p,h,y];function N(v){return v instanceof Promise?v:vt.thenable(v)?new Promise((b,k)=>{v.then(z=>b(z),z=>k(z))}):Promise.resolve(v)}let A,q,M,j={listen:()=>i.listen(),sendRequest:(v,...b)=>i.sendRequest(vt.string(v)?v:v.method,...b),onRequest:(v,b)=>i.onRequest(v,b),sendNotification:(v,b)=>{let k=vt.string(v)?v:v.method;return arguments.length===1?i.sendNotification(k):i.sendNotification(k,b)},onNotification:(v,b)=>i.onNotification(v,b),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:v=>(q=v,{dispose:()=>{q=void 0}}),onInitialized:v=>i.onNotification(L.InitializedNotification.type,v),onShutdown:v=>(A=v,{dispose:()=>{A=void 0}}),onExit:v=>(M=v,{dispose:()=>{M=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return u},get workspace(){return p},get languages(){return h},get notebooks(){return y},onDidChangeConfiguration:v=>i.onNotification(L.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(L.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(L.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(L.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(L.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(L.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(L.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(L.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(L.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(L.HoverRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),onCompletion:v=>i.onRequest(L.CompletionRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onCompletionResolve:v=>i.onRequest(L.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(L.SignatureHelpRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),onDeclaration:v=>i.onRequest(L.DeclarationRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onDefinition:v=>i.onRequest(L.DefinitionRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onTypeDefinition:v=>i.onRequest(L.TypeDefinitionRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onImplementation:v=>i.onRequest(L.ImplementationRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onReferences:v=>i.onRequest(L.ReferencesRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onDocumentHighlight:v=>i.onRequest(L.DocumentHighlightRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onDocumentSymbol:v=>i.onRequest(L.DocumentSymbolRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onWorkspaceSymbol:v=>i.onRequest(L.WorkspaceSymbolRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onWorkspaceSymbolResolve:v=>i.onRequest(L.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(L.CodeActionRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onCodeActionResolve:v=>i.onRequest(L.CodeActionResolveRequest.type,(b,k)=>v(b,k)),onCodeLens:v=>i.onRequest(L.CodeLensRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onCodeLensResolve:v=>i.onRequest(L.CodeLensResolveRequest.type,(b,k)=>v(b,k)),onDocumentFormatting:v=>i.onRequest(L.DocumentFormattingRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),onDocumentRangeFormatting:v=>i.onRequest(L.DocumentRangeFormattingRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(L.DocumentOnTypeFormattingRequest.type,(b,k)=>v(b,k)),onRenameRequest:v=>i.onRequest(L.RenameRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),onPrepareRename:v=>i.onRequest(L.PrepareRenameRequest.type,(b,k)=>v(b,k)),onDocumentLinks:v=>i.onRequest(L.DocumentLinkRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onDocumentLinkResolve:v=>i.onRequest(L.DocumentLinkResolveRequest.type,(b,k)=>v(b,k)),onDocumentColor:v=>i.onRequest(L.DocumentColorRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onColorPresentation:v=>i.onRequest(L.ColorPresentationRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onFoldingRanges:v=>i.onRequest(L.FoldingRangeRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onSelectionRanges:v=>i.onRequest(L.SelectionRangeRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),(0,Q.attachPartialResult)(i,b))),onExecuteCommand:v=>i.onRequest(L.ExecuteCommandRequest.type,(b,k)=>v(b,k,(0,Q.attachWorkDone)(i,b),void 0)),dispose:()=>i.dispose()};for(let v of g)v.attach(j);return i.onRequest(L.InitializeRequest.type,v=>{e.initialize(v),vt.string(v.trace)&&(o.trace=L.Trace.fromString(v.trace));for(let b of g)b.initialize(v.capabilities);if(q){let b=q(v,new L.CancellationTokenSource().token,(0,Q.attachWorkDone)(i,v),void 0);return N(b).then(k=>{if(k instanceof L.ResponseError)return k;let z=k;z||(z={capabilities:{}});let ae=z.capabilities;ae||(ae={},z.capabilities=ae),ae.textDocumentSync===void 0||ae.textDocumentSync===null?ae.textDocumentSync=vt.number(j.__textDocumentSync)?j.__textDocumentSync:L.TextDocumentSyncKind.None:!vt.number(ae.textDocumentSync)&&!vt.number(ae.textDocumentSync.change)&&(ae.textDocumentSync.change=vt.number(j.__textDocumentSync)?j.__textDocumentSync:L.TextDocumentSyncKind.None);for(let W of g)W.fillServerCapabilities(ae);return z})}else{let b={capabilities:{textDocumentSync:L.TextDocumentSyncKind.None}};for(let k of g)k.fillServerCapabilities(b.capabilities);return b}}),i.onRequest(L.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,A)return A(new L.CancellationTokenSource().token)}),i.onNotification(L.ExitNotification.type,()=>{try{M&&M()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(L.SetTraceNotification.type,v=>{o.trace=L.Trace.fromString(v.value)}),j}se.createConnection=c_});var jl=F(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.resolveModulePath=ut.FileSystem=ut.resolveGlobalYarnPath=ut.resolveGlobalNodePath=ut.resolve=ut.uriToFilePath=void 0;var u_=require("url"),Lt=require("path"),va=require("fs"),Da=require("child_process");function l_(t){let e=u_.parse(t);if(e.protocol!=="file:"||!e.path)return;let n=e.path.split("/");for(var r=0,i=n.length;r<i;r++)n[r]=decodeURIComponent(n[r]);if(process.platform==="win32"&&n.length>1){let o=n[0],s=n[1];o.length===0&&s.length>1&&s[1]===":"&&n.shift()}return Lt.normalize(n.join("/"))}ut.uriToFilePath=l_;function wa(){return process.platform==="win32"}function Ki(t,e,n,r){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let u=process.env,p=Object.create(null);Object.keys(u).forEach(h=>p[h]=u[h]),e&&va.existsSync(e)&&(p[i]?p[i]=e+Lt.delimiter+p[i]:p[i]=e,r&&r(`NODE_PATH value is: ${p[i]}`)),p.ELECTRON_RUN_AS_NODE="1";try{let h=(0,Da.fork)("",[],{cwd:n,env:p,execArgv:["-e",o]});if(h.pid===void 0){a(new Error(`Starting process to resolve node module ${t} failed`));return}h.on("error",g=>{a(g)}),h.on("message",g=>{g.c==="r"&&(h.send({c:"e"}),g.s?s(g.r):a(new Error(`Failed to resolve module: ${t}`)))});let y={c:"rs",a:t};h.send(y)}catch(h){a(h)}})}ut.resolve=Ki;function Ca(t){let e="npm",n=Object.create(null);Object.keys(process.env).forEach(o=>n[o]=process.env[o]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};wa()&&(e="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=(0,Da.spawnSync)(e,["config","get","prefix"],r).stdout;if(!o){t&&t("'npm config get prefix' didn't return a value.");return}let s=o.trim();return t&&t(`'npm config get prefix' value is: ${s}`),s.length>0?wa()?Lt.join(s,"node_modules"):Lt.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}ut.resolveGlobalNodePath=Ca;function d_(t){let e="yarn",n={encoding:"utf8"};wa()&&(e="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let i=(0,Da.spawnSync)(e,["global","dir","--json"],n),o=i.stdout;if(!o){t&&(t("'yarn global dir' didn't return a value."),i.stderr&&t(i.stderr));return}let s=o.trim().split(/\r?\n/);for(let a of s)try{let u=JSON.parse(a);if(u.type==="log")return Lt.join(u.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}ut.resolveGlobalYarnPath=d_;var Ol;(function(t){let e;function n(){return e!==void 0||(process.platform==="win32"?e=!1:e=!va.existsSync(__filename.toUpperCase())||!va.existsSync(__filename.toLowerCase())),e}t.isCaseSensitive=n;function r(i,o){return n()?Lt.normalize(o).indexOf(Lt.normalize(i))===0:Lt.normalize(o).toLowerCase().indexOf(Lt.normalize(i).toLowerCase())===0}t.isParent=r})(Ol=ut.FileSystem||(ut.FileSystem={}));function f_(t,e,n,r){return n?(Lt.isAbsolute(n)||(n=Lt.join(t,n)),Ki(e,n,n,r).then(i=>Ol.isParent(n,i)?i:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,i=>Ki(e,Ca(r),t,r))):Ki(e,Ca(r),t,r)}ut.resolveModulePath=f_});var Pa=F((XC,Il)=>{"use strict";Il.exports=qe()});var Ml=F(tt=>{"use strict";var h_=tt&&tt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Ll=tt&&tt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&h_(e,t,n)};Object.defineProperty(tt,"__esModule",{value:!0});tt.ProposedFeatures=tt.NotebookDocuments=tt.TextDocuments=tt.SemanticTokensBuilder=void 0;var p_=ca();Object.defineProperty(tt,"SemanticTokensBuilder",{enumerable:!0,get:function(){return p_.SemanticTokensBuilder}});Ll(qe(),tt);var m_=fa();Object.defineProperty(tt,"TextDocuments",{enumerable:!0,get:function(){return m_.TextDocuments}});var g_=pa();Object.defineProperty(tt,"NotebookDocuments",{enumerable:!0,get:function(){return g_.NotebookDocuments}});Ll(ba(),tt);var y_;(function(t){t.all={__brand:"features"}})(y_=tt.ProposedFeatures||(tt.ProposedFeatures={}))});var Ul=F(pt=>{"use strict";var __=pt&&pt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Wl=pt&&pt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&__(e,t,n)};Object.defineProperty(pt,"__esModule",{value:!0});pt.createConnection=pt.Files=void 0;var Ea=wi(),R_=ba(),Nr=jl(),An=Pa();Wl(Pa(),pt);Wl(Ml(),pt);var b_;(function(t){t.uriToFilePath=Nr.uriToFilePath,t.resolveGlobalNodePath=Nr.resolveGlobalNodePath,t.resolveGlobalYarnPath=Nr.resolveGlobalYarnPath,t.resolve=Nr.resolve,t.resolveModulePath=Nr.resolveModulePath})(b_=pt.Files||(pt.Files={}));var Hl;function Yi(){if(Hl!==void 0)try{Hl.end()}catch{}}var Xn=!1,$l;function v_(){let t="--clientProcessId";function e(n){try{let r=parseInt(n);isNaN(r)||($l=setInterval(()=>{try{process.kill(r,0)}catch{Yi(),process.exit(Xn?0:1)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let r=process.argv[n];if(r===t&&n+1<process.argv.length){e(process.argv[n+1]);return}else{let i=r.split("=");i[0]===t&&e(i[1])}}}v_();var w_={initialize:t=>{let e=t.processId;Ea.number(e)&&$l===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(Xn?0:1)}},3e3)},get shutdownReceived(){return Xn},set shutdownReceived(t){Xn=t},exit:t=>{Yi(),process.exit(t)}};function C_(t,e,n,r){let i,o,s,a;return t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),An.ConnectionStrategy.is(t)||An.ConnectionOptions.is(t)?a=t:(o=t,s=e,a=n),D_(o,s,a,i)}pt.createConnection=C_;function D_(t,e,n,r){if(!t&&!e&&process.argv.length>2){let a,u,p=process.argv.slice(2);for(let h=0;h<p.length;h++){let y=p[h];if(y==="--node-ipc"){t=new An.IPCMessageReader(process),e=new An.IPCMessageWriter(process);break}else if(y==="--stdio"){t=process.stdin,e=process.stdout;break}else if(y==="--socket"){a=parseInt(p[h+1]);break}else if(y==="--pipe"){u=p[h+1];break}else{var i=y.split("=");if(i[0]==="--socket"){a=parseInt(i[1]);break}else if(i[0]==="--pipe"){u=i[1];break}}}if(a){let h=(0,An.createServerSocketTransport)(a);t=h[0],e=h[1]}else if(u){let h=(0,An.createServerPipeTransport)(u);t=h[0],e=h[1]}}var o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!t)throw new Error("Connection input stream is not set. "+o);if(!e)throw new Error("Connection output stream is not set. "+o);if(Ea.func(t.read)&&Ea.func(t.on)){let a=t;a.on("end",()=>{Yi(),process.exit(Xn?0:1)}),a.on("close",()=>{Yi(),process.exit(Xn?0:1)})}let s=a=>(0,An.createProtocolConnection)(t,e,a,n);return(0,R_.createConnection)(s,w_,r)}});var $r=F((fD,bd)=>{"use strict";var B_=require("path"),Kt="\\\\/",gd=`[^${Kt}]`,sn="\\.",V_="\\+",z_="\\?",lo="\\/",G_="(?=.)",yd="[^/]",ja=`(?:${lo}|$)`,_d=`(?:^|${lo})`,Ia=`${sn}{1,2}${ja}`,K_=`(?!${sn})`,Y_=`(?!${_d}${Ia})`,Q_=`(?!${sn}{0,1}${ja})`,X_=`(?!${Ia})`,J_=`[^.${lo}]`,Z_=`${yd}*?`,Rd={DOT_LITERAL:sn,PLUS_LITERAL:V_,QMARK_LITERAL:z_,SLASH_LITERAL:lo,ONE_CHAR:G_,QMARK:yd,END_ANCHOR:ja,DOTS_SLASH:Ia,NO_DOT:K_,NO_DOTS:Y_,NO_DOT_SLASH:Q_,NO_DOTS_SLASH:X_,QMARK_NO_DOT:J_,STAR:Z_,START_ANCHOR:_d},eR={...Rd,SLASH_LITERAL:`[${Kt}]`,QMARK:gd,STAR:`${gd}*?`,DOTS_SLASH:`${sn}{1,2}(?:[${Kt}]|$)`,NO_DOT:`(?!${sn})`,NO_DOTS:`(?!(?:^|[${Kt}])${sn}{1,2}(?:[${Kt}]|$))`,NO_DOT_SLASH:`(?!${sn}{0,1}(?:[${Kt}]|$))`,NO_DOTS_SLASH:`(?!${sn}{1,2}(?:[${Kt}]|$))`,QMARK_NO_DOT:`[^.${Kt}]`,START_ANCHOR:`(?:^|[${Kt}])`,END_ANCHOR:`(?:[${Kt}]|$)`},tR={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};bd.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:tR,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:B_.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?eR:Rd}}});var fo=F(ft=>{"use strict";var nR=require("path"),rR=process.platform==="win32",{REGEX_BACKSLASH:iR,REGEX_REMOVE_BACKSLASH:oR,REGEX_SPECIAL_CHARS:sR,REGEX_SPECIAL_CHARS_GLOBAL:aR}=$r();ft.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ft.hasRegexChars=t=>sR.test(t);ft.isRegexChar=t=>t.length===1&&ft.hasRegexChars(t);ft.escapeRegex=t=>t.replace(aR,"\\$1");ft.toPosixSlashes=t=>t.replace(iR,"/");ft.removeBackslashes=t=>t.replace(oR,e=>e==="\\"?"":e);ft.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ft.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:rR===!0||nR.sep==="\\";ft.escapeLast=(t,e,n)=>{let r=t.lastIndexOf(e,n);return r===-1?t:t[r-1]==="\\"?ft.escapeLast(t,e,r-1):`${t.slice(0,r)}\\${t.slice(r)}`};ft.removePrefix=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n};ft.wrapOutput=(t,e={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",o=`${r}(?:${t})${i}`;return e.negated===!0&&(o=`(?:^(?!${o}).*$)`),o}});var xd=F((pD,Td)=>{"use strict";var vd=fo(),{CHAR_ASTERISK:La,CHAR_AT:cR,CHAR_BACKWARD_SLASH:Ur,CHAR_COMMA:uR,CHAR_DOT:Ma,CHAR_EXCLAMATION_MARK:wd,CHAR_FORWARD_SLASH:Sd,CHAR_LEFT_CURLY_BRACE:Ha,CHAR_LEFT_PARENTHESES:Wa,CHAR_LEFT_SQUARE_BRACKET:lR,CHAR_PLUS:dR,CHAR_QUESTION_MARK:Cd,CHAR_RIGHT_CURLY_BRACE:fR,CHAR_RIGHT_PARENTHESES:Dd,CHAR_RIGHT_SQUARE_BRACKET:hR}=$r(),Pd=t=>t===Sd||t===Ur,Ed=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},pR=(t,e)=>{let n=e||{},r=t.length-1,i=n.parts===!0||n.scanToEnd===!0,o=[],s=[],a=[],u=t,p=-1,h=0,y=0,g=!1,N=!1,A=!1,q=!1,M=!1,j=!1,v=!1,b=!1,k=!1,z=0,ae,W,Y={value:"",depth:0,isGlob:!1},Je=()=>p>=r,Ne=()=>u.charCodeAt(p+1),D=()=>(ae=W,u.charCodeAt(++p));for(;p<r;){W=D();let E;if(W===Ur){v=Y.backslashes=!0,W=D(),W===Ha&&(j=!0);continue}if(j===!0||W===Ha){for(z++;Je()!==!0&&(W=D());){if(W===Ur){v=Y.backslashes=!0,D();continue}if(W===Ha){z++;continue}if(j!==!0&&W===Ma&&(W=D())===Ma){if(g=Y.isBrace=!0,A=Y.isGlob=!0,k=!0,i===!0)continue;break}if(j!==!0&&W===uR){if(g=Y.isBrace=!0,A=Y.isGlob=!0,k=!0,i===!0)continue;break}if(W===fR&&(z--,z===0)){j=!1,g=Y.isBrace=!0,k=!0;break}}if(i===!0)continue;break}if(W===Sd){if(o.push(p),s.push(Y),Y={value:"",depth:0,isGlob:!1},k===!0)continue;if(ae===Ma&&p===h+1){h+=2;continue}y=p+1;continue}if(n.noext!==!0&&(W===dR||W===cR||W===La||W===Cd||W===wd)===!0&&Ne()===Wa){if(A=Y.isGlob=!0,q=Y.isExtglob=!0,k=!0,i===!0){for(;Je()!==!0&&(W=D());){if(W===Ur){v=Y.backslashes=!0,W=D();continue}if(W===Dd){A=Y.isGlob=!0,k=!0;break}}continue}break}if(W===La){if(ae===La&&(M=Y.isGlobstar=!0),A=Y.isGlob=!0,k=!0,i===!0)continue;break}if(W===Cd){if(A=Y.isGlob=!0,k=!0,i===!0)continue;break}if(W===lR){for(;Je()!==!0&&(E=D());){if(E===Ur){v=Y.backslashes=!0,D();continue}if(E===hR){N=Y.isBracket=!0,A=Y.isGlob=!0,k=!0;break}}if(i===!0)continue;break}if(n.nonegate!==!0&&W===wd&&p===h){b=Y.negated=!0,h++;continue}if(n.noparen!==!0&&W===Wa){if(A=Y.isGlob=!0,i===!0){for(;Je()!==!0&&(W=D());){if(W===Wa){v=Y.backslashes=!0,W=D();continue}if(W===Dd){k=!0;break}}continue}break}if(A===!0){if(k=!0,i===!0)continue;break}}n.noext===!0&&(q=!1,A=!1);let te=u,ze="",Ge="";h>0&&(ze=u.slice(0,h),u=u.slice(h),y-=h),te&&A===!0&&y>0?(te=u.slice(0,y),Ge=u.slice(y)):A===!0?(te="",Ge=u):te=u,te&&te!==""&&te!=="/"&&te!==u&&Pd(te.charCodeAt(te.length-1))&&(te=te.slice(0,-1)),n.unescape===!0&&(Ge&&(Ge=vd.removeBackslashes(Ge)),te&&v===!0&&(te=vd.removeBackslashes(te)));let P={prefix:ze,input:t,start:h,base:te,glob:Ge,isBrace:g,isBracket:N,isGlob:A,isExtglob:q,isGlobstar:M,negated:b};if(n.tokens===!0&&(P.maxDepth=0,Pd(W)||s.push(Y),P.tokens=s),n.parts===!0||n.tokens===!0){let E;for(let Te=0;Te<o.length;Te++){let Pe=E?E+1:h,Ke=o[Te],Ue=t.slice(Pe,Ke);n.tokens&&(Te===0&&h!==0?(s[Te].isPrefix=!0,s[Te].value=ze):s[Te].value=Ue,Ed(s[Te]),P.maxDepth+=s[Te].depth),(Te!==0||Ue!=="")&&a.push(Ue),E=Ke}if(E&&E+1<t.length){let Te=t.slice(E+1);a.push(Te),n.tokens&&(s[s.length-1].value=Te,Ed(s[s.length-1]),P.maxDepth+=s[s.length-1].depth)}P.slashes=o,P.parts=a}return P};Td.exports=pR});var Nd=F((mD,qd)=>{"use strict";var ho=$r(),mt=fo(),{MAX_LENGTH:po,POSIX_REGEX_SOURCE:mR,REGEX_NON_SPECIAL_CHARS:gR,REGEX_SPECIAL_CHARS_BACKREF:yR,REPLACEMENTS:kd}=ho,_R=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let n=`[${t.join("-")}]`;try{new RegExp(n)}catch{return t.map(i=>mt.escapeRegex(i)).join("..")}return n},er=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Ad=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=kd[t]||t;let n={...e},r=typeof n.maxLength=="number"?Math.min(po,n.maxLength):po,i=t.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:n.prepend||""},s=[o],a=n.capture?"":"?:",u=mt.isWindows(e),p=ho.globChars(u),h=ho.extglobChars(p),{DOT_LITERAL:y,PLUS_LITERAL:g,SLASH_LITERAL:N,ONE_CHAR:A,DOTS_SLASH:q,NO_DOT:M,NO_DOT_SLASH:j,NO_DOTS_SLASH:v,QMARK:b,QMARK_NO_DOT:k,STAR:z,START_ANCHOR:ae}=p,W=H=>`(${a}(?:(?!${ae}${H.dot?q:y}).)*?)`,Y=n.dot?"":M,Je=n.dot?b:k,Ne=n.bash===!0?W(n):z;n.capture&&(Ne=`(${Ne})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let D={input:t,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};t=mt.removePrefix(t,D),i=t.length;let te=[],ze=[],Ge=[],P=o,E,Te=()=>D.index===i-1,Pe=D.peek=(H=1)=>t[D.index+H],Ke=D.advance=()=>t[++D.index],Ue=()=>t.slice(D.index+1),ot=(H="",me=0)=>{D.consumed+=H,D.index+=me},Et=H=>{D.output+=H.output!=null?H.output:H.value,ot(H.value)},ar=()=>{let H=1;for(;Pe()==="!"&&(Pe(2)!=="("||Pe(3)==="?");)Ke(),D.start++,H++;return H%2===0?!1:(D.negated=!0,D.start++,!0)},Yt=H=>{D[H]++,Ge.push(H)},St=H=>{D[H]--,Ge.pop()},ee=H=>{if(P.type==="globstar"){let me=D.braces>0&&(H.type==="comma"||H.type==="brace"),O=H.extglob===!0||te.length&&(H.type==="pipe"||H.type==="paren");H.type!=="slash"&&H.type!=="paren"&&!me&&!O&&(D.output=D.output.slice(0,-P.output.length),P.type="star",P.value="*",P.output=Ne,D.output+=P.output)}if(te.length&&H.type!=="paren"&&!h[H.value]&&(te[te.length-1].inner+=H.value),(H.value||H.output)&&Et(H),P&&P.type==="text"&&H.type==="text"){P.value+=H.value,P.output=(P.output||"")+H.value;return}H.prev=P,s.push(H),P=H},cn=(H,me)=>{let O={...h[me],conditions:1,inner:""};O.prev=P,O.parens=D.parens,O.output=D.output;let re=(n.capture?"(":"")+O.open;Yt("parens"),ee({type:H,value:me,output:D.output?"":A}),ee({type:"paren",extglob:!0,value:Ke(),output:re}),te.push(O)},cr=H=>{let me=H.close+(n.capture?")":"");if(H.type==="negate"){let O=Ne;H.inner&&H.inner.length>1&&H.inner.includes("/")&&(O=W(n)),(O!==Ne||Te()||/^\)+$/.test(Ue()))&&(me=H.close=`)$))${O}`),H.prev.type==="bos"&&(D.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:E,output:me}),St("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let H=!1,me=t.replace(yR,(O,re,we,Fe,xe,Qt)=>Fe==="\\"?(H=!0,O):Fe==="?"?re?re+Fe+(xe?b.repeat(xe.length):""):Qt===0?Je+(xe?b.repeat(xe.length):""):b.repeat(we.length):Fe==="."?y.repeat(we.length):Fe==="*"?re?re+Fe+(xe?Ne:""):Ne:re?O:`\\${O}`);return H===!0&&(n.unescape===!0?me=me.replace(/\\/g,""):me=me.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),me===t&&n.contains===!0?(D.output=t,D):(D.output=mt.wrapOutput(me,D,e),D)}for(;!Te();){if(E=Ke(),E==="\0")continue;if(E==="\\"){let O=Pe();if(O==="/"&&n.bash!==!0||O==="."||O===";")continue;if(!O){E+="\\",ee({type:"text",value:E});continue}let re=/^\\+/.exec(Ue()),we=0;if(re&&re[0].length>2&&(we=re[0].length,D.index+=we,we%2!==0&&(E+="\\")),n.unescape===!0?E=Ke()||"":E+=Ke()||"",D.brackets===0){ee({type:"text",value:E});continue}}if(D.brackets>0&&(E!=="]"||P.value==="["||P.value==="[^")){if(n.posix!==!1&&E===":"){let O=P.value.slice(1);if(O.includes("[")&&(P.posix=!0,O.includes(":"))){let re=P.value.lastIndexOf("["),we=P.value.slice(0,re),Fe=P.value.slice(re+2),xe=mR[Fe];if(xe){P.value=we+xe,D.backtrack=!0,Ke(),!o.output&&s.indexOf(P)===1&&(o.output=A);continue}}}(E==="["&&Pe()!==":"||E==="-"&&Pe()==="]")&&(E=`\\${E}`),E==="]"&&(P.value==="["||P.value==="[^")&&(E=`\\${E}`),n.posix===!0&&E==="!"&&P.value==="["&&(E="^"),P.value+=E,Et({value:E});continue}if(D.quotes===1&&E!=='"'){E=mt.escapeRegex(E),P.value+=E,Et({value:E});continue}if(E==='"'){D.quotes=D.quotes===1?0:1,n.keepQuotes===!0&&ee({type:"text",value:E});continue}if(E==="("){Yt("parens"),ee({type:"paren",value:E});continue}if(E===")"){if(D.parens===0&&n.strictBrackets===!0)throw new SyntaxError(er("opening","("));let O=te[te.length-1];if(O&&D.parens===O.parens+1){cr(te.pop());continue}ee({type:"paren",value:E,output:D.parens?")":"\\)"}),St("parens");continue}if(E==="["){if(n.nobracket===!0||!Ue().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(er("closing","]"));E=`\\${E}`}else Yt("brackets");ee({type:"bracket",value:E});continue}if(E==="]"){if(n.nobracket===!0||P&&P.type==="bracket"&&P.value.length===1){ee({type:"text",value:E,output:`\\${E}`});continue}if(D.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(er("opening","["));ee({type:"text",value:E,output:`\\${E}`});continue}St("brackets");let O=P.value.slice(1);if(P.posix!==!0&&O[0]==="^"&&!O.includes("/")&&(E=`/${E}`),P.value+=E,Et({value:E}),n.literalBrackets===!1||mt.hasRegexChars(O))continue;let re=mt.escapeRegex(P.value);if(D.output=D.output.slice(0,-P.value.length),n.literalBrackets===!0){D.output+=re,P.value=re;continue}P.value=`(${a}${re}|${P.value})`,D.output+=P.value;continue}if(E==="{"&&n.nobrace!==!0){Yt("braces");let O={type:"brace",value:E,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};ze.push(O),ee(O);continue}if(E==="}"){let O=ze[ze.length-1];if(n.nobrace===!0||!O){ee({type:"text",value:E,output:E});continue}let re=")";if(O.dots===!0){let we=s.slice(),Fe=[];for(let xe=we.length-1;xe>=0&&(s.pop(),we[xe].type!=="brace");xe--)we[xe].type!=="dots"&&Fe.unshift(we[xe].value);re=_R(Fe,n),D.backtrack=!0}if(O.comma!==!0&&O.dots!==!0){let we=D.output.slice(0,O.outputIndex),Fe=D.tokens.slice(O.tokensIndex);O.value=O.output="\\{",E=re="\\}",D.output=we;for(let xe of Fe)D.output+=xe.output||xe.value}ee({type:"brace",value:E,output:re}),St("braces"),ze.pop();continue}if(E==="|"){te.length>0&&te[te.length-1].conditions++,ee({type:"text",value:E});continue}if(E===","){let O=E,re=ze[ze.length-1];re&&Ge[Ge.length-1]==="braces"&&(re.comma=!0,O="|"),ee({type:"comma",value:E,output:O});continue}if(E==="/"){if(P.type==="dot"&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",s.pop(),P=o;continue}ee({type:"slash",value:E,output:N});continue}if(E==="."){if(D.braces>0&&P.type==="dot"){P.value==="."&&(P.output=y);let O=ze[ze.length-1];P.type="dots",P.output+=E,P.value+=E,O.dots=!0;continue}if(D.braces+D.parens===0&&P.type!=="bos"&&P.type!=="slash"){ee({type:"text",value:E,output:y});continue}ee({type:"dot",value:E,output:y});continue}if(E==="?"){if(!(P&&P.value==="(")&&n.noextglob!==!0&&Pe()==="("&&Pe(2)!=="?"){cn("qmark",E);continue}if(P&&P.type==="paren"){let re=Pe(),we=E;if(re==="<"&&!mt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(P.value==="("&&!/[!=<:]/.test(re)||re==="<"&&!/<([!=]|\w+>)/.test(Ue()))&&(we=`\\${E}`),ee({type:"text",value:E,output:we});continue}if(n.dot!==!0&&(P.type==="slash"||P.type==="bos")){ee({type:"qmark",value:E,output:k});continue}ee({type:"qmark",value:E,output:b});continue}if(E==="!"){if(n.noextglob!==!0&&Pe()==="("&&(Pe(2)!=="?"||!/[!=<:]/.test(Pe(3)))){cn("negate",E);continue}if(n.nonegate!==!0&&D.index===0){ar();continue}}if(E==="+"){if(n.noextglob!==!0&&Pe()==="("&&Pe(2)!=="?"){cn("plus",E);continue}if(P&&P.value==="("||n.regex===!1){ee({type:"plus",value:E,output:g});continue}if(P&&(P.type==="bracket"||P.type==="paren"||P.type==="brace")||D.parens>0){ee({type:"plus",value:E});continue}ee({type:"plus",value:g});continue}if(E==="@"){if(n.noextglob!==!0&&Pe()==="("&&Pe(2)!=="?"){ee({type:"at",extglob:!0,value:E,output:""});continue}ee({type:"text",value:E});continue}if(E!=="*"){(E==="$"||E==="^")&&(E=`\\${E}`);let O=gR.exec(Ue());O&&(E+=O[0],D.index+=O[0].length),ee({type:"text",value:E});continue}if(P&&(P.type==="globstar"||P.star===!0)){P.type="star",P.star=!0,P.value+=E,P.output=Ne,D.backtrack=!0,D.globstar=!0,ot(E);continue}let H=Ue();if(n.noextglob!==!0&&/^\([^?]/.test(H)){cn("star",E);continue}if(P.type==="star"){if(n.noglobstar===!0){ot(E);continue}let O=P.prev,re=O.prev,we=O.type==="slash"||O.type==="bos",Fe=re&&(re.type==="star"||re.type==="globstar");if(n.bash===!0&&(!we||H[0]&&H[0]!=="/")){ee({type:"star",value:E,output:""});continue}let xe=D.braces>0&&(O.type==="comma"||O.type==="brace"),Qt=te.length&&(O.type==="pipe"||O.type==="paren");if(!we&&O.type!=="paren"&&!xe&&!Qt){ee({type:"star",value:E,output:""});continue}for(;H.slice(0,3)==="/**";){let un=t[D.index+4];if(un&&un!=="/")break;H=H.slice(3),ot("/**",3)}if(O.type==="bos"&&Te()){P.type="globstar",P.value+=E,P.output=W(n),D.output=P.output,D.globstar=!0,ot(E);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!Fe&&Te()){D.output=D.output.slice(0,-(O.output+P.output).length),O.output=`(?:${O.output}`,P.type="globstar",P.output=W(n)+(n.strictSlashes?")":"|$)"),P.value+=E,D.globstar=!0,D.output+=O.output+P.output,ot(E);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&H[0]==="/"){let un=H[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(O.output+P.output).length),O.output=`(?:${O.output}`,P.type="globstar",P.output=`${W(n)}${N}|${N}${un})`,P.value+=E,D.output+=O.output+P.output,D.globstar=!0,ot(E+Ke()),ee({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&H[0]==="/"){P.type="globstar",P.value+=E,P.output=`(?:^|${N}|${W(n)}${N})`,D.output=P.output,D.globstar=!0,ot(E+Ke()),ee({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-P.output.length),P.type="globstar",P.output=W(n),P.value+=E,D.output+=P.output,D.globstar=!0,ot(E);continue}let me={type:"star",value:E,output:Ne};if(n.bash===!0){me.output=".*?",(P.type==="bos"||P.type==="slash")&&(me.output=Y+me.output),ee(me);continue}if(P&&(P.type==="bracket"||P.type==="paren")&&n.regex===!0){me.output=E,ee(me);continue}(D.index===D.start||P.type==="slash"||P.type==="dot")&&(P.type==="dot"?(D.output+=j,P.output+=j):n.dot===!0?(D.output+=v,P.output+=v):(D.output+=Y,P.output+=Y),Pe()!=="*"&&(D.output+=A,P.output+=A)),ee(me)}for(;D.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(er("closing","]"));D.output=mt.escapeLast(D.output,"["),St("brackets")}for(;D.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(er("closing",")"));D.output=mt.escapeLast(D.output,"("),St("parens")}for(;D.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(er("closing","}"));D.output=mt.escapeLast(D.output,"{"),St("braces")}if(n.strictSlashes!==!0&&(P.type==="star"||P.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${N}?`}),D.backtrack===!0){D.output="";for(let H of D.tokens)D.output+=H.output!=null?H.output:H.value,H.suffix&&(D.output+=H.suffix)}return D};Ad.fastpaths=(t,e)=>{let n={...e},r=typeof n.maxLength=="number"?Math.min(po,n.maxLength):po,i=t.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);t=kd[t]||t;let o=mt.isWindows(e),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:p,NO_DOT:h,NO_DOTS:y,NO_DOTS_SLASH:g,STAR:N,START_ANCHOR:A}=ho.globChars(o),q=n.dot?y:h,M=n.dot?g:h,j=n.capture?"":"?:",v={negated:!1,prefix:""},b=n.bash===!0?".*?":N;n.capture&&(b=`(${b})`);let k=Y=>Y.noglobstar===!0?b:`(${j}(?:(?!${A}${Y.dot?p:s}).)*?)`,z=Y=>{switch(Y){case"*":return`${q}${u}${b}`;case".*":return`${s}${u}${b}`;case"*.*":return`${q}${b}${s}${u}${b}`;case"*/*":return`${q}${b}${a}${u}${M}${b}`;case"**":return q+k(n);case"**/*":return`(?:${q}${k(n)}${a})?${M}${u}${b}`;case"**/*.*":return`(?:${q}${k(n)}${a})?${M}${b}${s}${u}${b}`;case"**/.*":return`(?:${q}${k(n)}${a})?${s}${u}${b}`;default:{let Je=/^(.*?)\.(\w+)$/.exec(Y);if(!Je)return;let Ne=z(Je[1]);return Ne?Ne+s+Je[2]:void 0}}},ae=mt.removePrefix(t,v),W=z(ae);return W&&n.strictSlashes!==!0&&(W+=`${a}?`),W};qd.exports=Ad});var Od=F((gD,Fd)=>{"use strict";var RR=require("path"),bR=xd(),$a=Nd(),Ua=fo(),vR=$r(),wR=t=>t&&typeof t=="object"&&!Array.isArray(t),Ie=(t,e,n=!1)=>{if(Array.isArray(t)){let h=t.map(g=>Ie(g,e,n));return g=>{for(let N of h){let A=N(g);if(A)return A}return!1}}let r=wR(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},o=Ua.isWindows(e),s=r?Ie.compileRe(t,e):Ie.makeRe(t,e,!1,!0),a=s.state;delete s.state;let u=()=>!1;if(i.ignore){let h={...e,ignore:null,onMatch:null,onResult:null};u=Ie(i.ignore,h,n)}let p=(h,y=!1)=>{let{isMatch:g,match:N,output:A}=Ie.test(h,s,e,{glob:t,posix:o}),q={glob:t,state:a,regex:s,posix:o,input:h,output:A,match:N,isMatch:g};return typeof i.onResult=="function"&&i.onResult(q),g===!1?(q.isMatch=!1,y?q:!1):u(h)?(typeof i.onIgnore=="function"&&i.onIgnore(q),q.isMatch=!1,y?q:!1):(typeof i.onMatch=="function"&&i.onMatch(q),y?q:!0)};return n&&(p.state=a),p};Ie.test=(t,e,n,{glob:r,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let o=n||{},s=o.format||(i?Ua.toPosixSlashes:null),a=t===r,u=a&&s?s(t):t;return a===!1&&(u=s?s(t):t,a=u===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ie.matchBase(t,e,n,i):a=e.exec(u)),{isMatch:!!a,match:a,output:u}};Ie.matchBase=(t,e,n,r=Ua.isWindows(n))=>(e instanceof RegExp?e:Ie.makeRe(e,n)).test(RR.basename(t));Ie.isMatch=(t,e,n)=>Ie(e,n)(t);Ie.parse=(t,e)=>Array.isArray(t)?t.map(n=>Ie.parse(n,e)):$a(t,{...e,fastpaths:!1});Ie.scan=(t,e)=>bR(t,e);Ie.compileRe=(t,e,n=!1,r=!1)=>{if(n===!0)return t.output;let i=e||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${t.output})${s}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=Ie.toRegex(a,e);return r===!0&&(u.state=t),u};Ie.makeRe=(t,e,n=!1,r=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i=e||{},o={negated:!1,fastpaths:!0},s="",a;return t.startsWith("./")&&(t=t.slice(2),s=o.prefix="./"),i.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a=$a.fastpaths(t,e)),a===void 0?(o=$a(t,e),o.prefix=s+(o.prefix||"")):o.output=a,Ie.compileRe(o,e,n,r)};Ie.toRegex=(t,e)=>{try{let n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(n){if(e&&e.debug===!0)throw n;return/$^/}};Ie.constants=vR;Fd.exports=Ie});var Ba=F((yD,jd)=>{"use strict";jd.exports=Od()});var Ud=F((_D,$d)=>{"use strict";var Vr=require("fs"),{Readable:CR}=require("stream"),Br=require("path"),{promisify:_o}=require("util"),Va=Ba(),DR=_o(Vr.readdir),Id=_o(Vr.stat),Ld=_o(Vr.lstat),PR=_o(Vr.realpath),ER="!",SR=new Set(["ENOENT","EPERM","EACCES","ELOOP"]),za="files",Wd="directories",go="files_directories",mo="all",Md=[za,Wd,go,mo],TR=t=>SR.has(t.code),Hd=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){let e=Va(t.trim());return n=>e(n.basename)}if(Array.isArray(t)){let e=[],n=[];for(let r of t){let i=r.trim();i.charAt(0)===ER?n.push(Va(i.slice(1))):e.push(Va(i))}return n.length>0?e.length>0?r=>e.some(i=>i(r.basename))&&!n.some(i=>i(r.basename)):r=>!n.some(i=>i(r.basename)):r=>e.some(i=>i(r.basename))}}},yo=class t extends CR{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:za,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});let n={...t.defaultOptions,...e},{root:r,type:i}=n;this._fileFilter=Hd(n.fileFilter),this._directoryFilter=Hd(n.directoryFilter);let o=n.lstat?Ld:Id;process.platform==="win32"&&Id.length===3?this._stat=s=>o(s,{bigint:!0}):this._stat=o,this._maxDepth=n.depth,this._wantsDir=[Wd,go,mo].includes(i),this._wantsFile=[za,go,mo].includes(i),this._wantsEverything=i===mo,this._root=Br.resolve(r),this._isDirent="Dirent"in Vr&&!n.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let{path:n,depth:r,files:i=[]}=this.parent||{};if(i.length>0){let o=i.splice(0,e).map(s=>this._formatEntry(s,n));for(let s of await Promise.all(o)){if(this.destroyed)return;let a=await this._getEntryType(s);a==="directory"&&this._directoryFilter(s)?(r<=this._maxDepth&&this.parents.push(this._exploreDir(s.fullPath,r+1)),this._wantsDir&&(this.push(s),e--)):(a==="file"||this._includeAsFile(s))&&this._fileFilter(s)&&this._wantsFile&&(this.push(s),e--)}}else{let o=this.parents.pop();if(!o){this.push(null);break}if(this.parent=await o,this.destroyed)return}}}catch(n){this.destroy(n)}finally{this.reading=!1}}}async _exploreDir(e,n){let r;try{r=await DR(e,this._rdOptions)}catch(i){this._onError(i)}return{files:r,depth:n,path:e}}async _formatEntry(e,n){let r;try{let i=this._isDirent?e.name:e,o=Br.resolve(Br.join(n,i));r={path:Br.relative(this._root,o),fullPath:o,basename:i},r[this._statsProp]=this._isDirent?e:await this._stat(o)}catch(i){this._onError(i)}return r}_onError(e){TR(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){let n=e&&e[this._statsProp];if(n){if(n.isFile())return"file";if(n.isDirectory())return"directory";if(n&&n.isSymbolicLink()){let r=e.fullPath;try{let i=await PR(r),o=await Ld(i);if(o.isFile())return"file";if(o.isDirectory()){let s=i.length;return r.startsWith(i)&&r.substr(s,1)===Br.sep?this._onError(new Error(`Circular symlink detected: "${r}" points to "${i}"`)):"directory"}}catch(i){this._onError(i)}}}}_includeAsFile(e){let n=e&&e[this._statsProp];return n&&this._wantsEverything&&!n.isDirectory()}},tr=(t,e={})=>{let n=e.entryType||e.type;if(n==="both"&&(n=go),n&&(e.type=n),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(n&&!Md.includes(n))throw new Error(`readdirp: Invalid type passed. Use one of ${Md.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new yo(e)},xR=(t,e={})=>new Promise((n,r)=>{let i=[];tr(t,e).on("data",o=>i.push(o)).on("end",()=>n(i)).on("error",o=>r(o))});tr.promise=xR;tr.ReaddirpStream=yo;tr.default=tr;$d.exports=tr});var Ga=F((RD,Bd)=>{Bd.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var n=t.length;if(n<=1)return t;var r="";if(n>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var o=t.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var Qd=F((Kd,Yd)=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var Gd=Ba(),kR=Ga(),Vd="!",AR={returnIndex:!1},qR=t=>Array.isArray(t)?t:[t],NR=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=Gd(t,e);return r=>t===r||n(r)}return t instanceof RegExp?n=>t.test(n):n=>!1},zd=(t,e,n,r)=>{let i=Array.isArray(n),o=i?n[0]:n;if(!i&&typeof o!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o));let s=kR(o);for(let u=0;u<e.length;u++){let p=e[u];if(p(s))return r?-1:!1}let a=i&&[s].concat(n.slice(1));for(let u=0;u<t.length;u++){let p=t[u];if(i?p(...a):p(s))return r?u:!0}return r?-1:!1},Ka=(t,e,n=AR)=>{if(t==null)throw new TypeError("anymatch: specify first argument");let r=typeof n=="boolean"?{returnIndex:n}:n,i=r.returnIndex||!1,o=qR(t),s=o.filter(u=>typeof u=="string"&&u.charAt(0)===Vd).map(u=>u.slice(1)).map(u=>Gd(u,r)),a=o.filter(u=>typeof u!="string"||typeof u=="string"&&u.charAt(0)!==Vd).map(u=>NR(u,r));return e==null?(u,p=!1)=>zd(a,s,u,typeof p=="boolean"?p:!1):zd(a,s,e,i)};Ka.default=Ka;Yd.exports=Ka});var Jd=F((bD,Xd)=>{Xd.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(n[2])return!0;e=e.slice(n.index+n[0].length)}return!1}});var Ya=F((vD,Zd)=>{var FR=Jd(),OR={"{":"}","(":")","[":"]"},jR=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,IR=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;Zd.exports=function(e,n){if(typeof e!="string"||e==="")return!1;if(FR(e))return!0;var r=jR,i;for(n&&n.strict===!1&&(r=IR);i=r.exec(e);){if(i[2])return!0;var o=i.index+i[0].length,s=i[1],a=s?OR[s]:null;if(s&&a){var u=e.indexOf(a,o);u!==-1&&(o=u+1)}e=e.slice(o)}return!1}});var tf=F((wD,ef)=>{"use strict";var LR=Ya(),MR=require("path").posix.dirname,HR=require("os").platform()==="win32",Qa="/",WR=/\\/g,$R=/[\{\[].*[\}\]]$/,UR=/(^|[^\\])([\{\[]|\([^\)]+$)/,BR=/\\([\!\*\?\|\[\]\(\)\{\}])/g;ef.exports=function(e,n){var r=Object.assign({flipBackslashes:!0},n);r.flipBackslashes&&HR&&e.indexOf(Qa)<0&&(e=e.replace(WR,Qa)),$R.test(e)&&(e+=Qa),e+="a";do e=MR(e);while(LR(e)||UR.test(e));return e.replace(BR,"$1")}});var Ro=F(Pt=>{"use strict";Pt.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Pt.find=(t,e)=>t.nodes.find(n=>n.type===e);Pt.exceedsLimit=(t,e,n=1,r)=>r===!1||!Pt.isInteger(t)||!Pt.isInteger(e)?!1:(Number(e)-Number(t))/Number(n)>=r;Pt.escapeNode=(t,e=0,n)=>{let r=t.nodes[e];r&&(n&&r.type===n||r.type==="open"||r.type==="close")&&r.escaped!==!0&&(r.value="\\"+r.value,r.escaped=!0)};Pt.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Pt.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Pt.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Pt.reduce=t=>t.reduce((e,n)=>(n.type==="text"&&e.push(n.value),n.type==="range"&&(n.type="text"),e),[]);Pt.flatten=(...t)=>{let e=[],n=r=>{for(let i=0;i<r.length;i++){let o=r[i];Array.isArray(o)?n(o,e):o!==void 0&&e.push(o)}return e};return n(t),e}});var bo=F((DD,rf)=>{"use strict";var nf=Ro();rf.exports=(t,e={})=>{let n=(r,i={})=>{let o=e.escapeInvalid&&nf.isInvalidBrace(i),s=r.invalid===!0&&e.escapeInvalid===!0,a="";if(r.value)return(o||s)&&nf.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let u of r.nodes)a+=n(u);return a};return n(t)}});var sf=F((PD,of)=>{"use strict";of.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var mf=F((ED,pf)=>{"use strict";var af=sf(),Nn=(t,e,n)=>{if(af(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(af(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let i=String(r.relaxZeros),o=String(r.shorthand),s=String(r.capture),a=String(r.wrap),u=t+":"+e+"="+i+o+s+a;if(Nn.cache.hasOwnProperty(u))return Nn.cache[u].result;let p=Math.min(t,e),h=Math.max(t,e);if(Math.abs(p-h)===1){let q=t+"|"+e;return r.capture?`(${q})`:r.wrap===!1?q:`(?:${q})`}let y=hf(t)||hf(e),g={min:t,max:e,a:p,b:h},N=[],A=[];if(y&&(g.isPadded=y,g.maxLen=String(g.max).length),p<0){let q=h<0?Math.abs(h):1;A=cf(q,Math.abs(p),g,r),p=g.a=0}return h>=0&&(N=cf(p,h,g,r)),g.negatives=A,g.positives=N,g.result=VR(A,N,r),r.capture===!0?g.result=`(${g.result})`:r.wrap!==!1&&N.length+A.length>1&&(g.result=`(?:${g.result})`),Nn.cache[u]=g,g.result};function VR(t,e,n){let r=Xa(t,e,"-",!1,n)||[],i=Xa(e,t,"",!1,n)||[],o=Xa(t,e,"-?",!0,n)||[];return r.concat(o).concat(i).join("|")}function zR(t,e){let n=1,r=1,i=lf(t,n),o=new Set([e]);for(;t<=i&&i<=e;)o.add(i),n+=1,i=lf(t,n);for(i=df(e+1,r)-1;t<i&&i<=e;)o.add(i),r+=1,i=df(e+1,r)-1;return o=[...o],o.sort(YR),o}function GR(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=KR(t,e),i=r.length,o="",s=0;for(let a=0;a<i;a++){let[u,p]=r[a];u===p?o+=u:u!=="0"||p!=="9"?o+=QR(u,p,n):s++}return s&&(o+=n.shorthand===!0?"\\d":"[0-9]"),{pattern:o,count:[s],digits:i}}function cf(t,e,n,r){let i=zR(t,e),o=[],s=t,a;for(let u=0;u<i.length;u++){let p=i[u],h=GR(String(s),String(p),r),y="";if(!n.isPadded&&a&&a.pattern===h.pattern){a.count.length>1&&a.count.pop(),a.count.push(h.count[0]),a.string=a.pattern+ff(a.count),s=p+1;continue}n.isPadded&&(y=XR(p,n,r)),h.string=y+h.pattern+ff(h.count),o.push(h),s=p+1,a=h}return o}function Xa(t,e,n,r,i){let o=[];for(let s of t){let{string:a}=s;!r&&!uf(e,"string",a)&&o.push(n+a),r&&uf(e,"string",a)&&o.push(n+a)}return o}function KR(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}function YR(t,e){return t>e?1:e>t?-1:0}function uf(t,e,n){return t.some(r=>r[e]===n)}function lf(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function df(t,e){return t-t%Math.pow(10,e)}function ff(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function QR(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function hf(t){return/^-?(0+)\d/.test(t)}function XR(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),i=n.relaxZeros!==!1;switch(r){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${r}}`:`0{${r}}`}}Nn.cache={};Nn.clearCache=()=>Nn.cache={};pf.exports=Nn});var ec=F((SD,Cf)=>{"use strict";var JR=require("util"),_f=mf(),gf=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),ZR=t=>e=>t===!0?Number(e):String(e),Ja=t=>typeof t=="number"||typeof t=="string"&&t!=="",zr=t=>Number.isInteger(+t),Za=t=>{let e=`${t}`,n=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++n]==="0";);return n>0},eb=(t,e,n)=>typeof t=="string"||typeof e=="string"?!0:n.stringify===!0,tb=(t,e,n)=>{if(e>0){let r=t[0]==="-"?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return n===!1?String(t):t},yf=(t,e)=>{let n=t[0]==="-"?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},nb=(t,e)=>{t.negatives.sort((s,a)=>s<a?-1:s>a?1:0),t.positives.sort((s,a)=>s<a?-1:s>a?1:0);let n=e.capture?"":"?:",r="",i="",o;return t.positives.length&&(r=t.positives.join("|")),t.negatives.length&&(i=`-(${n}${t.negatives.join("|")})`),r&&i?o=`${r}|${i}`:o=r||i,e.wrap?`(${n}${o})`:o},Rf=(t,e,n,r)=>{if(n)return _f(t,e,{wrap:!1,...r});let i=String.fromCharCode(t);if(t===e)return i;let o=String.fromCharCode(e);return`[${i}-${o}]`},bf=(t,e,n)=>{if(Array.isArray(t)){let r=n.wrap===!0,i=n.capture?"":"?:";return r?`(${i}${t.join("|")})`:t.join("|")}return _f(t,e,n)},vf=(...t)=>new RangeError("Invalid range arguments: "+JR.inspect(...t)),wf=(t,e,n)=>{if(n.strictRanges===!0)throw vf([t,e]);return[]},rb=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},ib=(t,e,n=1,r={})=>{let i=Number(t),o=Number(e);if(!Number.isInteger(i)||!Number.isInteger(o)){if(r.strictRanges===!0)throw vf([t,e]);return[]}i===0&&(i=0),o===0&&(o=0);let s=i>o,a=String(t),u=String(e),p=String(n);n=Math.max(Math.abs(n),1);let h=Za(a)||Za(u)||Za(p),y=h?Math.max(a.length,u.length,p.length):0,g=h===!1&&eb(t,e,r)===!1,N=r.transform||ZR(g);if(r.toRegex&&n===1)return Rf(yf(t,y),yf(e,y),!0,r);let A={negatives:[],positives:[]},q=v=>A[v<0?"negatives":"positives"].push(Math.abs(v)),M=[],j=0;for(;s?i>=o:i<=o;)r.toRegex===!0&&n>1?q(i):M.push(tb(N(i,j),y,g)),i=s?i-n:i+n,j++;return r.toRegex===!0?n>1?nb(A,r):bf(M,null,{wrap:!1,...r}):M},ob=(t,e,n=1,r={})=>{if(!zr(t)&&t.length>1||!zr(e)&&e.length>1)return wf(t,e,r);let i=r.transform||(g=>String.fromCharCode(g)),o=`${t}`.charCodeAt(0),s=`${e}`.charCodeAt(0),a=o>s,u=Math.min(o,s),p=Math.max(o,s);if(r.toRegex&&n===1)return Rf(u,p,!1,r);let h=[],y=0;for(;a?o>=s:o<=s;)h.push(i(o,y)),o=a?o-n:o+n,y++;return r.toRegex===!0?bf(h,null,{wrap:!1,options:r}):h},vo=(t,e,n,r={})=>{if(e==null&&Ja(t))return[t];if(!Ja(t)||!Ja(e))return wf(t,e,r);if(typeof n=="function")return vo(t,e,1,{transform:n});if(gf(n))return vo(t,e,0,n);let i={...r};return i.capture===!0&&(i.wrap=!0),n=n||i.step||1,zr(n)?zr(t)&&zr(e)?ib(t,e,n,i):ob(t,e,Math.max(Math.abs(n),1),i):n!=null&&!gf(n)?rb(n,i):vo(t,e,1,n)};Cf.exports=vo});var Ef=F((TD,Pf)=>{"use strict";var sb=ec(),Df=Ro(),ab=(t,e={})=>{let n=(r,i={})=>{let o=Df.isInvalidBrace(i),s=r.invalid===!0&&e.escapeInvalid===!0,a=o===!0||s===!0,u=e.escapeInvalid===!0?"\\":"",p="";if(r.isOpen===!0||r.isClose===!0)return u+r.value;if(r.type==="open")return a?u+r.value:"(";if(r.type==="close")return a?u+r.value:")";if(r.type==="comma")return r.prev.type==="comma"?"":a?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){let h=Df.reduce(r.nodes),y=sb(...h,{...e,wrap:!1,toRegex:!0});if(y.length!==0)return h.length>1&&y.length>1?`(${y})`:y}if(r.nodes)for(let h of r.nodes)p+=n(h,r);return p};return n(t)};Pf.exports=ab});var xf=F((xD,Tf)=>{"use strict";var cb=ec(),Sf=bo(),nr=Ro(),Fn=(t="",e="",n=!1)=>{let r=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return n?nr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let o of i)r.push(Fn(o,e,n));else for(let o of e)n===!0&&typeof o=="string"&&(o=`{${o}}`),r.push(Array.isArray(o)?Fn(i,o,n):i+o);return nr.flatten(r)},ub=(t,e={})=>{let n=e.rangeLimit===void 0?1e3:e.rangeLimit,r=(i,o={})=>{i.queue=[];let s=o,a=o.queue;for(;s.type!=="brace"&&s.type!=="root"&&s.parent;)s=s.parent,a=s.queue;if(i.invalid||i.dollar){a.push(Fn(a.pop(),Sf(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Fn(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let y=nr.reduce(i.nodes);if(nr.exceedsLimit(...y,e.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=cb(...y,e);g.length===0&&(g=Sf(i,e)),a.push(Fn(a.pop(),g)),i.nodes=[];return}let u=nr.encloseBrace(i),p=i.queue,h=i;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,p=h.queue;for(let y=0;y<i.nodes.length;y++){let g=i.nodes[y];if(g.type==="comma"&&i.type==="brace"){y===1&&p.push(""),p.push("");continue}if(g.type==="close"){a.push(Fn(a.pop(),p,u));continue}if(g.value&&g.type!=="open"){p.push(Fn(p.pop(),g.value));continue}g.nodes&&r(g,i)}return p};return nr.flatten(r(t))};Tf.exports=ub});var Af=F((kD,kf)=>{"use strict";kf.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
35
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var jf=F((AD,Of)=>{"use strict";var lb=bo(),{MAX_LENGTH:qf,CHAR_BACKSLASH:tc,CHAR_BACKTICK:db,CHAR_COMMA:fb,CHAR_DOT:hb,CHAR_LEFT_PARENTHESES:pb,CHAR_RIGHT_PARENTHESES:mb,CHAR_LEFT_CURLY_BRACE:gb,CHAR_RIGHT_CURLY_BRACE:yb,CHAR_LEFT_SQUARE_BRACKET:Nf,CHAR_RIGHT_SQUARE_BRACKET:Ff,CHAR_DOUBLE_QUOTE:_b,CHAR_SINGLE_QUOTE:Rb,CHAR_NO_BREAK_SPACE:bb,CHAR_ZERO_WIDTH_NOBREAK_SPACE:vb}=Af(),wb=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let n=e||{},r=typeof n.maxLength=="number"?Math.min(qf,n.maxLength):qf;if(t.length>r)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${r})`);let i={type:"root",input:t,nodes:[]},o=[i],s=i,a=i,u=0,p=t.length,h=0,y=0,g,N={},A=()=>t[h++],q=M=>{if(M.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&M.type==="text"){a.value+=M.value;return}return s.nodes.push(M),M.parent=s,M.prev=a,a=M,M};for(q({type:"bos"});h<p;)if(s=o[o.length-1],g=A(),!(g===vb||g===bb)){if(g===tc){q({type:"text",value:(e.keepEscaping?g:"")+A()});continue}if(g===Ff){q({type:"text",value:"\\"+g});continue}if(g===Nf){u++;let M=!0,j;for(;h<p&&(j=A());){if(g+=j,j===Nf){u++;continue}if(j===tc){g+=A();continue}if(j===Ff&&(u--,u===0))break}q({type:"text",value:g});continue}if(g===pb){s=q({type:"paren",nodes:[]}),o.push(s),q({type:"text",value:g});continue}if(g===mb){if(s.type!=="paren"){q({type:"text",value:g});continue}s=o.pop(),q({type:"text",value:g}),s=o[o.length-1];continue}if(g===_b||g===Rb||g===db){let M=g,j;for(e.keepQuotes!==!0&&(g="");h<p&&(j=A());){if(j===tc){g+=j+A();continue}if(j===M){e.keepQuotes===!0&&(g+=j);break}g+=j}q({type:"text",value:g});continue}if(g===gb){y++;let j={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:y,commas:0,ranges:0,nodes:[]};s=q(j),o.push(s),q({type:"open",value:g});continue}if(g===yb){if(s.type!=="brace"){q({type:"text",value:g});continue}let M="close";s=o.pop(),s.close=!0,q({type:M,value:g}),y--,s=o[o.length-1];continue}if(g===fb&&y>0){if(s.ranges>0){s.ranges=0;let M=s.nodes.shift();s.nodes=[M,{type:"text",value:lb(s)}]}q({type:"comma",value:g}),s.commas++;continue}if(g===hb&&y>0&&s.commas===0){let M=s.nodes;if(y===0||M.length===0){q({type:"text",value:g});continue}if(a.type==="dot"){if(s.range=[],a.value+=g,a.type="range",s.nodes.length!==3&&s.nodes.length!==5){s.invalid=!0,s.ranges=0,a.type="text";continue}s.ranges++,s.args=[];continue}if(a.type==="range"){M.pop();let j=M[M.length-1];j.value+=a.value+g,a=j,s.ranges--;continue}q({type:"dot",value:g});continue}q({type:"text",value:g})}do if(s=o.pop(),s.type!=="root"){s.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let M=o[o.length-1],j=M.nodes.indexOf(s);M.nodes.splice(j,1,...s.nodes)}while(o.length>0);return q({type:"eos"}),i};Of.exports=wb});var Mf=F((qD,Lf)=>{"use strict";var If=bo(),Cb=Ef(),Db=xf(),Pb=jf(),gt=(t,e={})=>{let n=[];if(Array.isArray(t))for(let r of t){let i=gt.create(r,e);Array.isArray(i)?n.push(...i):n.push(i)}else n=[].concat(gt.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(n=[...new Set(n)]),n};gt.parse=(t,e={})=>Pb(t,e);gt.stringify=(t,e={})=>If(typeof t=="string"?gt.parse(t,e):t,e);gt.compile=(t,e={})=>(typeof t=="string"&&(t=gt.parse(t,e)),Cb(t,e));gt.expand=(t,e={})=>{typeof t=="string"&&(t=gt.parse(t,e));let n=Db(t,e);return e.noempty===!0&&(n=n.filter(Boolean)),e.nodupes===!0&&(n=[...new Set(n)]),n};gt.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?gt.compile(t,e):gt.expand(t,e);Lf.exports=gt});var Hf=F((ND,Eb)=>{Eb.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var $f=F((FD,Wf)=>{Wf.exports=Hf()});var Bf=F((OD,Uf)=>{"use strict";var Sb=require("path"),Tb=$f(),xb=new Set(Tb);Uf.exports=t=>xb.has(Sb.extname(t).slice(1).toLowerCase())});var wo=F(V=>{"use strict";var{sep:kb}=require("path"),{platform:nc}=process;V.EV_ALL="all";V.EV_READY="ready";V.EV_ADD="add";V.EV_CHANGE="change";V.EV_ADD_DIR="addDir";V.EV_UNLINK="unlink";V.EV_UNLINK_DIR="unlinkDir";V.EV_RAW="raw";V.EV_ERROR="error";V.STR_DATA="data";V.STR_END="end";V.STR_CLOSE="close";V.FSEVENT_CREATED="created";V.FSEVENT_MODIFIED="modified";V.FSEVENT_DELETED="deleted";V.FSEVENT_MOVED="moved";V.FSEVENT_CLONED="cloned";V.FSEVENT_UNKNOWN="unknown";V.FSEVENT_TYPE_FILE="file";V.FSEVENT_TYPE_DIRECTORY="directory";V.FSEVENT_TYPE_SYMLINK="symlink";V.KEY_LISTENERS="listeners";V.KEY_ERR="errHandlers";V.KEY_RAW="rawEmitters";V.HANDLER_KEYS=[V.KEY_LISTENERS,V.KEY_ERR,V.KEY_RAW];V.DOT_SLASH=`.${kb}`;V.BACK_SLASH_RE=/\\/g;V.DOUBLE_SLASH_RE=/\/\//;V.SLASH_OR_BACK_SLASH_RE=/[/\\]/;V.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;V.REPLACER_RE=/^\.[/\\]/;V.SLASH="/";V.SLASH_SLASH="//";V.BRACE_START="{";V.BANG="!";V.ONE_DOT=".";V.TWO_DOTS="..";V.STAR="*";V.GLOBSTAR="**";V.ROOT_GLOBSTAR="/**/*";V.SLASH_GLOBSTAR="/**";V.DIR_SUFFIX="Dir";V.ANYMATCH_OPTS={dot:!0};V.STRING_TYPE="string";V.FUNCTION_TYPE="function";V.EMPTY_STR="";V.EMPTY_FN=()=>{};V.IDENTITY_FN=t=>t;V.isWindows=nc==="win32";V.isMacos=nc==="darwin";V.isLinux=nc==="linux"});var Qf=F((ID,Yf)=>{"use strict";var an=require("fs"),Qe=require("path"),{promisify:Qr}=require("util"),Ab=Bf(),{isWindows:qb,isLinux:Nb,EMPTY_FN:Fb,EMPTY_STR:Ob,KEY_LISTENERS:rr,KEY_ERR:rc,KEY_RAW:Gr,HANDLER_KEYS:jb,EV_CHANGE:Do,EV_ADD:Co,EV_ADD_DIR:Ib,EV_ERROR:zf,STR_DATA:Lb,STR_END:Mb,BRACE_START:Hb,STAR:Wb}=wo(),$b="watch",Ub=Qr(an.open),Gf=Qr(an.stat),Bb=Qr(an.lstat),Vb=Qr(an.close),ic=Qr(an.realpath),zb={lstat:Bb,stat:Gf},sc=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Kr=(t,e,n)=>{let r=t[e];r instanceof Set||(t[e]=r=new Set([r])),r.add(n)},Gb=t=>e=>{let n=t[e];n instanceof Set?n.clear():delete t[e]},Yr=(t,e,n)=>{let r=t[e];r instanceof Set?r.delete(n):r===n&&delete t[e]},Kf=t=>t instanceof Set?t.size===0:!t,Po=new Map;function Vf(t,e,n,r,i){let o=(s,a)=>{n(t),i(s,a,{watchedPath:t}),a&&t!==a&&Eo(Qe.resolve(t,a),rr,Qe.join(t,a))};try{return an.watch(t,e,o)}catch(s){r(s)}}var Eo=(t,e,n,r,i)=>{let o=Po.get(t);o&&sc(o[e],s=>{s(n,r,i)})},Kb=(t,e,n,r)=>{let{listener:i,errHandler:o,rawEmitter:s}=r,a=Po.get(e),u;if(!n.persistent)return u=Vf(t,n,i,o,s),u.close.bind(u);if(a)Kr(a,rr,i),Kr(a,rc,o),Kr(a,Gr,s);else{if(u=Vf(t,n,Eo.bind(null,e,rr),o,Eo.bind(null,e,Gr)),!u)return;u.on(zf,async p=>{let h=Eo.bind(null,e,rc);if(a.watcherUnusable=!0,qb&&p.code==="EPERM")try{let y=await Ub(t,"r");await Vb(y),h(p)}catch{}else h(p)}),a={listeners:i,errHandlers:o,rawEmitters:s,watcher:u},Po.set(e,a)}return()=>{Yr(a,rr,i),Yr(a,rc,o),Yr(a,Gr,s),Kf(a.listeners)&&(a.watcher.close(),Po.delete(e),jb.forEach(Gb(a)),a.watcher=void 0,Object.freeze(a))}},oc=new Map,Yb=(t,e,n,r)=>{let{listener:i,rawEmitter:o}=r,s=oc.get(e),a=new Set,u=new Set,p=s&&s.options;return p&&(p.persistent<n.persistent||p.interval>n.interval)&&(a=s.listeners,u=s.rawEmitters,an.unwatchFile(e),s=void 0),s?(Kr(s,rr,i),Kr(s,Gr,o)):(s={listeners:i,rawEmitters:o,options:n,watcher:an.watchFile(e,n,(h,y)=>{sc(s.rawEmitters,N=>{N(Do,e,{curr:h,prev:y})});let g=h.mtimeMs;(h.size!==y.size||g>y.mtimeMs||g===0)&&sc(s.listeners,N=>N(t,h))})},oc.set(e,s)),()=>{Yr(s,rr,i),Yr(s,Gr,o),Kf(s.listeners)&&(oc.delete(e),an.unwatchFile(e),s.options=s.watcher=void 0,Object.freeze(s))}},ac=class{constructor(e){this.fsw=e,this._boundHandleError=n=>e._handleError(n)}_watchWithNodeFs(e,n){let r=this.fsw.options,i=Qe.dirname(e),o=Qe.basename(e);this.fsw._getWatchedDir(i).add(o);let a=Qe.resolve(e),u={persistent:r.persistent};n||(n=Fb);let p;return r.usePolling?(u.interval=r.enableBinaryInterval&&Ab(o)?r.binaryInterval:r.interval,p=Yb(e,a,u,{listener:n,rawEmitter:this.fsw._emitRaw})):p=Kb(e,a,u,{listener:n,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),p}_handleFile(e,n,r){if(this.fsw.closed)return;let i=Qe.dirname(e),o=Qe.basename(e),s=this.fsw._getWatchedDir(i),a=n;if(s.has(o))return;let u=async(h,y)=>{if(this.fsw._throttle($b,e,5)){if(!y||y.mtimeMs===0)try{let g=await Gf(e);if(this.fsw.closed)return;let N=g.atimeMs,A=g.mtimeMs;(!N||N<=A||A!==a.mtimeMs)&&this.fsw._emit(Do,e,g),Nb&&a.ino!==g.ino?(this.fsw._closeFile(h),a=g,this.fsw._addPathCloser(h,this._watchWithNodeFs(e,u))):a=g}catch{this.fsw._remove(i,o)}else if(s.has(o)){let g=y.atimeMs,N=y.mtimeMs;(!g||g<=N||N!==a.mtimeMs)&&this.fsw._emit(Do,e,y),a=y}}},p=this._watchWithNodeFs(e,u);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Co,e,0))return;this.fsw._emit(Co,e,n)}return p}async _handleSymlink(e,n,r,i){if(this.fsw.closed)return;let o=e.fullPath,s=this.fsw._getWatchedDir(n);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a=await ic(r);return this.fsw.closed?void 0:(s.has(i)?this.fsw._symlinkPaths.get(o)!==a&&(this.fsw._symlinkPaths.set(o,a),this.fsw._emit(Do,r,e.stats)):(s.add(i),this.fsw._symlinkPaths.set(o,a),this.fsw._emit(Co,r,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(o))return!0;this.fsw._symlinkPaths.set(o,!0)}_handleRead(e,n,r,i,o,s,a){if(e=Qe.join(e,Ob),!r.hasGlob&&(a=this.fsw._throttle("readdir",e,1e3),!a))return;let u=this.fsw._getWatchedDir(r.path),p=new Set,h=this.fsw._readdirp(e,{fileFilter:y=>r.filterPath(y),directoryFilter:y=>r.filterDir(y),depth:0}).on(Lb,async y=>{if(this.fsw.closed){h=void 0;return}let g=y.path,N=Qe.join(e,g);if(p.add(g),!(y.stats.isSymbolicLink()&&await this._handleSymlink(y,e,N,g))){if(this.fsw.closed){h=void 0;return}(g===i||!i&&!u.has(g))&&(this.fsw._incrReadyCount(),N=Qe.join(o,Qe.relative(o,N)),this._addToNodeFs(N,n,r,s+1))}}).on(zf,this._boundHandleError);return new Promise(y=>h.once(Mb,()=>{if(this.fsw.closed){h=void 0;return}let g=a?a.clear():!1;y(),u.getChildren().filter(N=>N!==e&&!p.has(N)&&(!r.hasGlob||r.filterPath({fullPath:Qe.resolve(e,N)}))).forEach(N=>{this.fsw._remove(e,N)}),h=void 0,g&&this._handleRead(e,!1,r,i,o,s,a)}))}async _handleDir(e,n,r,i,o,s,a){let u=this.fsw._getWatchedDir(Qe.dirname(e)),p=u.has(Qe.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!o&&!p&&(!s.hasGlob||s.globFilter(e))&&this.fsw._emit(Ib,e,n),u.add(Qe.basename(e)),this.fsw._getWatchedDir(e);let h,y,g=this.fsw.options.depth;if((g==null||i<=g)&&!this.fsw._symlinkPaths.has(a)){if(!o&&(await this._handleRead(e,r,s,o,e,i,h),this.fsw.closed))return;y=this._watchWithNodeFs(e,(N,A)=>{A&&A.mtimeMs===0||this._handleRead(N,!1,s,o,e,i,h)})}return y}async _addToNodeFs(e,n,r,i,o){let s=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return s(),!1;let a=this.fsw._getWatchHelpers(e,i);!a.hasGlob&&r&&(a.hasGlob=r.hasGlob,a.globFilter=r.globFilter,a.filterPath=u=>r.filterPath(u),a.filterDir=u=>r.filterDir(u));try{let u=await zb[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,u))return s(),!1;let p=this.fsw.options.followSymlinks&&!e.includes(Wb)&&!e.includes(Hb),h;if(u.isDirectory()){let y=Qe.resolve(e),g=p?await ic(e):e;if(this.fsw.closed||(h=await this._handleDir(a.watchPath,u,n,i,o,a,g),this.fsw.closed))return;y!==g&&g!==void 0&&this.fsw._symlinkPaths.set(y,g)}else if(u.isSymbolicLink()){let y=p?await ic(e):e;if(this.fsw.closed)return;let g=Qe.dirname(a.watchPath);if(this.fsw._getWatchedDir(g).add(a.watchPath),this.fsw._emit(Co,a.watchPath,u),h=await this._handleDir(g,u,n,i,e,a,y),this.fsw.closed)return;y!==void 0&&this.fsw._symlinkPaths.set(Qe.resolve(e),y)}else h=this._handleFile(a.watchPath,u,n);return s(),this.fsw._addPathCloser(e,h),!1}catch(u){if(this.fsw._handleError(u))return s(),e}}};Yf.exports=ac});var rh=F((LD,mc)=>{"use strict";var hc=require("fs"),Xe=require("path"),{promisify:pc}=require("util"),ir;try{ir=require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(ir){let t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){let e=Number.parseInt(t[1],10),n=Number.parseInt(t[2],10);e===8&&n<16&&(ir=void 0)}}var{EV_ADD:cc,EV_CHANGE:Qb,EV_ADD_DIR:Xf,EV_UNLINK:So,EV_ERROR:Xb,STR_DATA:Jb,STR_END:Zb,FSEVENT_CREATED:ev,FSEVENT_MODIFIED:tv,FSEVENT_DELETED:nv,FSEVENT_MOVED:rv,FSEVENT_UNKNOWN:iv,FSEVENT_TYPE_FILE:ov,FSEVENT_TYPE_DIRECTORY:Xr,FSEVENT_TYPE_SYMLINK:nh,ROOT_GLOBSTAR:Jf,DIR_SUFFIX:sv,DOT_SLASH:Zf,FUNCTION_TYPE:uc,EMPTY_FN:av,IDENTITY_FN:cv}=wo(),uv=t=>isNaN(t)?{}:{depth:t},dc=pc(hc.stat),lv=pc(hc.lstat),eh=pc(hc.realpath),dv={stat:dc,lstat:lv},On=new Map,fv=10,hv=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),pv=(t,e)=>({stop:ir.watch(t,e)});function mv(t,e,n,r){let i=Xe.extname(t)?Xe.dirname(t):t,o=Xe.dirname(i),s=On.get(i);gv(o)&&(i=o);let a=Xe.resolve(t),u=a!==e,p=(y,g,N)=>{u&&(y=y.replace(e,a)),(y===a||!y.indexOf(a+Xe.sep))&&n(y,g,N)},h=!1;for(let y of On.keys())if(e.indexOf(Xe.resolve(y)+Xe.sep)===0){i=y,s=On.get(i),h=!0;break}return s||h?s.listeners.add(p):(s={listeners:new Set([p]),rawEmitter:r,watcher:pv(i,(y,g)=>{if(!s.listeners.size)return;let N=ir.getInfo(y,g);s.listeners.forEach(A=>{A(y,g,N)}),s.rawEmitter(N.event,y,N)})},On.set(i,s)),()=>{let y=s.listeners;if(y.delete(p),!y.size&&(On.delete(i),s.watcher))return s.watcher.stop().then(()=>{s.rawEmitter=s.watcher=void 0,Object.freeze(s)})}}var gv=t=>{let e=0;for(let n of On.keys())if(n.indexOf(t)===0&&(e++,e>=fv))return!0;return!1},yv=()=>ir&&On.size<128,lc=(t,e)=>{let n=0;for(;!t.indexOf(e)&&(t=Xe.dirname(t))!==e;)n++;return n},th=(t,e)=>t.type===Xr&&e.isDirectory()||t.type===nh&&e.isSymbolicLink()||t.type===ov&&e.isFile(),fc=class{constructor(e){this.fsw=e}checkIgnored(e,n){let r=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,n))return r.add(e),n&&n.isDirectory()&&r.add(e+Jf),!0;r.delete(e),r.delete(e+Jf)}addOrChange(e,n,r,i,o,s,a,u){let p=o.has(s)?Qb:cc;this.handleEvent(p,e,n,r,i,o,s,a,u)}async checkExists(e,n,r,i,o,s,a,u){try{let p=await dc(e);if(this.fsw.closed)return;th(a,p)?this.addOrChange(e,n,r,i,o,s,a,u):this.handleEvent(So,e,n,r,i,o,s,a,u)}catch(p){p.code==="EACCES"?this.addOrChange(e,n,r,i,o,s,a,u):this.handleEvent(So,e,n,r,i,o,s,a,u)}}handleEvent(e,n,r,i,o,s,a,u,p){if(!(this.fsw.closed||this.checkIgnored(n)))if(e===So){let h=u.type===Xr;(h||s.has(a))&&this.fsw._remove(o,a,h)}else{if(e===cc){if(u.type===Xr&&this.fsw._getWatchedDir(n),u.type===nh&&p.followSymlinks){let y=p.depth===void 0?void 0:lc(r,i)+1;return this._addToFsEvents(n,!1,!0,y)}this.fsw._getWatchedDir(o).add(a)}let h=u.type===Xr?e+sv:e;this.fsw._emit(h,n),h===Xf&&this._addToFsEvents(n,!1,!0)}}_watchWithFsEvents(e,n,r,i){if(this.fsw.closed||this.fsw._isIgnored(e))return;let o=this.fsw.options,a=mv(e,n,async(u,p,h)=>{if(this.fsw.closed||o.depth!==void 0&&lc(u,n)>o.depth)return;let y=r(Xe.join(e,Xe.relative(e,u)));if(i&&!i(y))return;let g=Xe.dirname(y),N=Xe.basename(y),A=this.fsw._getWatchedDir(h.type===Xr?y:g);if(hv.has(p)||h.event===iv)if(typeof o.ignored===uc){let q;try{q=await dc(y)}catch{}if(this.fsw.closed||this.checkIgnored(y,q))return;th(h,q)?this.addOrChange(y,u,n,g,A,N,h,o):this.handleEvent(So,y,u,n,g,A,N,h,o)}else this.checkExists(y,u,n,g,A,N,h,o);else switch(h.event){case ev:case tv:return this.addOrChange(y,u,n,g,A,N,h,o);case nv:case rv:return this.checkExists(y,u,n,g,A,N,h,o)}},this.fsw._emitRaw);return this.fsw._emitReady(),a}async _handleFsEventsSymlink(e,n,r,i){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(n))){this.fsw._symlinkPaths.set(n,!0),this.fsw._incrReadyCount();try{let o=await eh(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(o))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(o||e,s=>{let a=e;return o&&o!==Zf?a=s.replace(o,e):s!==Zf&&(a=Xe.join(e,s)),r(a)},!1,i)}catch(o){if(this.fsw._handleError(o))return this.fsw._emitReady()}}}emitAdd(e,n,r,i,o){let s=r(e),a=n.isDirectory(),u=this.fsw._getWatchedDir(Xe.dirname(s)),p=Xe.basename(s);a&&this.fsw._getWatchedDir(s),!u.has(p)&&(u.add(p),(!i.ignoreInitial||o===!0)&&this.fsw._emit(a?Xf:cc,s,n))}initWatch(e,n,r,i){if(this.fsw.closed)return;let o=this._watchWithFsEvents(r.watchPath,Xe.resolve(e||r.watchPath),i,r.globFilter);this.fsw._addPathCloser(n,o)}async _addToFsEvents(e,n,r,i){if(this.fsw.closed)return;let o=this.fsw.options,s=typeof n===uc?n:cv,a=this.fsw._getWatchHelpers(e);try{let u=await dv[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,u))throw null;if(u.isDirectory()){if(a.globFilter||this.emitAdd(s(e),u,s,o,r),i&&i>o.depth)return;this.fsw._readdirp(a.watchPath,{fileFilter:p=>a.filterPath(p),directoryFilter:p=>a.filterDir(p),...uv(o.depth-(i||0))}).on(Jb,p=>{if(this.fsw.closed||p.stats.isDirectory()&&!a.filterPath(p))return;let h=Xe.join(a.watchPath,p.path),{fullPath:y}=p;if(a.followSymlinks&&p.stats.isSymbolicLink()){let g=o.depth===void 0?void 0:lc(h,Xe.resolve(a.watchPath))+1;this._handleFsEventsSymlink(h,y,s,g)}else this.emitAdd(h,p.stats,s,o,r)}).on(Xb,av).on(Zb,()=>{this.fsw._emitReady()})}else this.emitAdd(a.watchPath,u,s,o,r),this.fsw._emitReady()}catch(u){(!u||this.fsw._handleError(u))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(o.persistent&&r!==!0)if(typeof n===uc)this.initWatch(void 0,e,a,s);else{let u;try{u=await eh(a.watchPath)}catch{}this.initWatch(u,e,a,s)}}};mc.exports=fc;mc.exports.canUse=yv});var Ac=F(kc=>{"use strict";var{EventEmitter:_v}=require("events"),Tc=require("fs"),he=require("path"),{promisify:lh}=require("util"),Rv=Ud(),vc=Qd().default,bv=tf(),gc=Ya(),vv=Mf(),wv=Ga(),Cv=Qf(),ih=rh(),{EV_ALL:yc,EV_READY:Dv,EV_ADD:To,EV_CHANGE:Jr,EV_UNLINK:oh,EV_ADD_DIR:Pv,EV_UNLINK_DIR:Ev,EV_RAW:Sv,EV_ERROR:_c,STR_CLOSE:Tv,STR_END:xv,BACK_SLASH_RE:kv,DOUBLE_SLASH_RE:sh,SLASH_OR_BACK_SLASH_RE:Av,DOT_RE:qv,REPLACER_RE:Nv,SLASH:Rc,SLASH_SLASH:Fv,BRACE_START:Ov,BANG:wc,ONE_DOT:dh,TWO_DOTS:jv,GLOBSTAR:Iv,SLASH_GLOBSTAR:bc,ANYMATCH_OPTS:Cc,STRING_TYPE:xc,FUNCTION_TYPE:Lv,EMPTY_STR:Dc,EMPTY_FN:Mv,isWindows:Hv,isMacos:Wv}=wo(),$v=lh(Tc.stat),Uv=lh(Tc.readdir),Pc=(t=[])=>Array.isArray(t)?t:[t],fh=(t,e=[])=>(t.forEach(n=>{Array.isArray(n)?fh(n,e):e.push(n)}),e),ah=t=>{let e=fh(Pc(t));if(!e.every(n=>typeof n===xc))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(hh)},ch=t=>{let e=t.replace(kv,Rc),n=!1;for(e.startsWith(Fv)&&(n=!0);e.match(sh);)e=e.replace(sh,Rc);return n&&(e=Rc+e),e},hh=t=>ch(he.normalize(ch(t))),uh=(t=Dc)=>e=>typeof e!==xc?e:hh(he.isAbsolute(e)?e:he.join(t,e)),Bv=(t,e)=>he.isAbsolute(t)?t:t.startsWith(wc)?wc+he.join(e,t.slice(1)):he.join(e,t),Ht=(t,e)=>t[e]===void 0,Ec=class{constructor(e,n){this.path=e,this._removeWatcher=n,this.items=new Set}add(e){let{items:n}=this;n&&e!==dh&&e!==jv&&n.add(e)}async remove(e){let{items:n}=this;if(!n||(n.delete(e),n.size>0))return;let r=this.path;try{await Uv(r)}catch{this._removeWatcher&&this._removeWatcher(he.dirname(r),he.basename(r))}}has(e){let{items:n}=this;if(n)return n.has(e)}getChildren(){let{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},Vv="stat",zv="lstat",Sc=class{constructor(e,n,r,i){this.fsw=i,this.path=e=e.replace(Nv,Dc),this.watchPath=n,this.fullWatchPath=he.resolve(n),this.hasGlob=n!==e,e===Dc&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&r?void 0:!1,this.globFilter=this.hasGlob?vc(e,void 0,Cc):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(o=>{o.length>1&&o.pop()}),this.followSymlinks=r,this.statMethod=r?Vv:zv}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return he.join(this.watchPath,he.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){let{stats:n}=e;if(n&&n.isSymbolicLink())return this.filterDir(e);let r=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Lv?this.globFilter(r):!0)&&this.fsw._isntIgnored(r,n)&&this.fsw._hasReadPermissions(n)}getDirParts(e){if(!this.hasGlob)return[];let n=[];return(e.includes(Ov)?vv.expand(e):[e]).forEach(i=>{n.push(he.relative(this.watchPath,i).split(Av))}),n}filterDir(e){if(this.hasGlob){let n=this.getDirParts(this.checkGlobSymlink(e)),r=!1;this.unmatchedGlob=!this.dirParts.some(i=>i.every((o,s)=>(o===Iv&&(r=!0),r||!n[0][s]||vc(o,n[0][s],Cc))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}},xo=class extends _v{constructor(e){super();let n={};e&&Object.assign(n,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,Ht(n,"persistent")&&(n.persistent=!0),Ht(n,"ignoreInitial")&&(n.ignoreInitial=!1),Ht(n,"ignorePermissionErrors")&&(n.ignorePermissionErrors=!1),Ht(n,"interval")&&(n.interval=100),Ht(n,"binaryInterval")&&(n.binaryInterval=300),Ht(n,"disableGlobbing")&&(n.disableGlobbing=!1),n.enableBinaryInterval=n.binaryInterval!==n.interval,Ht(n,"useFsEvents")&&(n.useFsEvents=!n.usePolling),ih.canUse()||(n.useFsEvents=!1),Ht(n,"usePolling")&&!n.useFsEvents&&(n.usePolling=Wv);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let u=i.toLowerCase();u==="false"||u==="0"?n.usePolling=!1:u==="true"||u==="1"?n.usePolling=!0:n.usePolling=!!u}let o=process.env.CHOKIDAR_INTERVAL;o&&(n.interval=Number.parseInt(o,10)),Ht(n,"atomic")&&(n.atomic=!n.usePolling&&!n.useFsEvents),n.atomic&&(this._pendingUnlinks=new Map),Ht(n,"followSymlinks")&&(n.followSymlinks=!0),Ht(n,"awaitWriteFinish")&&(n.awaitWriteFinish=!1),n.awaitWriteFinish===!0&&(n.awaitWriteFinish={});let s=n.awaitWriteFinish;s&&(s.stabilityThreshold||(s.stabilityThreshold=2e3),s.pollInterval||(s.pollInterval=100),this._pendingWrites=new Map),n.ignored&&(n.ignored=Pc(n.ignored));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=Mv,this._readyEmitted=!0,process.nextTick(()=>this.emit(Dv)))},this._emitRaw=(...u)=>this.emit(Sv,...u),this._readyEmitted=!1,this.options=n,n.useFsEvents?this._fsEventsHandler=new ih(this):this._nodeFsHandler=new Cv(this),Object.freeze(n)}add(e,n,r){let{cwd:i,disableGlobbing:o}=this.options;this.closed=!1;let s=ah(e);return i&&(s=s.map(a=>{let u=Bv(a,i);return o||!gc(a)?u:wv(u)})),s=s.filter(a=>a.startsWith(wc)?(this._ignoredPaths.add(a.slice(1)),!1):(this._ignoredPaths.delete(a),this._ignoredPaths.delete(a+bc),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=s.length),this.options.persistent&&(this._readyCount*=2),s.forEach(a=>this._fsEventsHandler._addToFsEvents(a))):(this._readyCount||(this._readyCount=0),this._readyCount+=s.length,Promise.all(s.map(async a=>{let u=await this._nodeFsHandler._addToNodeFs(a,!r,0,0,n);return u&&this._emitReady(),u})).then(a=>{this.closed||a.filter(u=>u).forEach(u=>{this.add(he.dirname(u),he.basename(n||u))})})),this}unwatch(e){if(this.closed)return this;let n=ah(e),{cwd:r}=this.options;return n.forEach(i=>{!he.isAbsolute(i)&&!this._closers.has(i)&&(r&&(i=he.join(r,i)),i=he.resolve(i)),this._closePath(i),this._ignoredPaths.add(i),this._watched.has(i)&&this._ignoredPaths.add(i+bc),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(n=>n.forEach(r=>{let i=r();i instanceof Promise&&e.push(i)})),this._streams.forEach(n=>n.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(n=>n.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(n=>{this[`_${n}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((n,r)=>{let i=this.options.cwd?he.relative(this.options.cwd,r):r;e[i||dh]=n.getChildren().sort()}),e}emitWithAll(e,n){this.emit(...n),e!==_c&&this.emit(yc,...n)}async _emit(e,n,r,i,o){if(this.closed)return;let s=this.options;Hv&&(n=he.normalize(n)),s.cwd&&(n=he.relative(s.cwd,n));let a=[e,n];o!==void 0?a.push(r,i,o):i!==void 0?a.push(r,i):r!==void 0&&a.push(r);let u=s.awaitWriteFinish,p;if(u&&(p=this._pendingWrites.get(n)))return p.lastChange=new Date,this;if(s.atomic){if(e===oh)return this._pendingUnlinks.set(n,a),setTimeout(()=>{this._pendingUnlinks.forEach((h,y)=>{this.emit(...h),this.emit(yc,...h),this._pendingUnlinks.delete(y)})},typeof s.atomic=="number"?s.atomic:100),this;e===To&&this._pendingUnlinks.has(n)&&(e=a[0]=Jr,this._pendingUnlinks.delete(n))}if(u&&(e===To||e===Jr)&&this._readyEmitted){let h=(y,g)=>{y?(e=a[0]=_c,a[1]=y,this.emitWithAll(e,a)):g&&(a.length>2?a[2]=g:a.push(g),this.emitWithAll(e,a))};return this._awaitWriteFinish(n,u.stabilityThreshold,e,h),this}if(e===Jr&&!this._throttle(Jr,n,50))return this;if(s.alwaysStat&&r===void 0&&(e===To||e===Pv||e===Jr)){let h=s.cwd?he.join(s.cwd,n):n,y;try{y=await $v(h)}catch{}if(!y||this.closed)return;a.push(y)}return this.emitWithAll(e,a),this}_handleError(e){let n=e&&e.code;return e&&n!=="ENOENT"&&n!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||n!=="EPERM"&&n!=="EACCES")&&this.emit(_c,e),e||this.closed}_throttle(e,n,r){this._throttled.has(e)||this._throttled.set(e,new Map);let i=this._throttled.get(e),o=i.get(n);if(o)return o.count++,!1;let s,a=()=>{let p=i.get(n),h=p?p.count:0;return i.delete(n),clearTimeout(s),p&&clearTimeout(p.timeoutObject),h};s=setTimeout(a,r);let u={timeoutObject:s,clear:a,count:0};return i.set(n,u),u}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,n,r,i){let o,s=e;this.options.cwd&&!he.isAbsolute(e)&&(s=he.join(this.options.cwd,e));let a=new Date,u=p=>{Tc.stat(s,(h,y)=>{if(h||!this._pendingWrites.has(e)){h&&h.code!=="ENOENT"&&i(h);return}let g=Number(new Date);p&&y.size!==p.size&&(this._pendingWrites.get(e).lastChange=g);let N=this._pendingWrites.get(e);g-N.lastChange>=n?(this._pendingWrites.delete(e),i(void 0,y)):o=setTimeout(u,this.options.awaitWriteFinish.pollInterval,y)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:a,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(o),r)}),o=setTimeout(u,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,n){if(this.options.atomic&&qv.test(e))return!0;if(!this._userIgnored){let{cwd:r}=this.options,i=this.options.ignored,o=i&&i.map(uh(r)),s=Pc(o).filter(u=>typeof u===xc&&!gc(u)).map(u=>u+bc),a=this._getGlobIgnored().map(uh(r)).concat(o,s);this._userIgnored=vc(a,void 0,Cc)}return this._userIgnored([e,n])}_isntIgnored(e,n){return!this._isIgnored(e,n)}_getWatchHelpers(e,n){let r=n||this.options.disableGlobbing||!gc(e)?e:bv(e),i=this.options.followSymlinks;return new Sc(e,r,i,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));let n=he.resolve(e);return this._watched.has(n)||this._watched.set(n,new Ec(n,this._boundRemove)),this._watched.get(n)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;let r=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(r.toString(8)[0],10))}_remove(e,n,r){let i=he.join(e,n),o=he.resolve(i);if(r=r??(this._watched.has(i)||this._watched.has(o)),!this._throttle("remove",i,100))return;!r&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,n,!0),this._getWatchedDir(i).getChildren().forEach(g=>this._remove(i,g));let u=this._getWatchedDir(e),p=u.has(n);u.remove(n),this._symlinkPaths.has(o)&&this._symlinkPaths.delete(o);let h=i;if(this.options.cwd&&(h=he.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(h)&&this._pendingWrites.get(h).cancelWait()===To)return;this._watched.delete(i),this._watched.delete(o);let y=r?Ev:oh;p&&!this._isIgnored(i)&&this._emit(y,i),this.options.useFsEvents||this._closePath(i)}_closePath(e){this._closeFile(e);let n=he.dirname(e);this._getWatchedDir(n).remove(he.basename(e))}_closeFile(e){let n=this._closers.get(e);n&&(n.forEach(r=>r()),this._closers.delete(e))}_addPathCloser(e,n){if(!n)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(n)}_readdirp(e,n){if(this.closed)return;let r={type:yc,alwaysStat:!0,lstat:!0,...n},i=Rv(e,r);return this._streams.add(i),i.once(Tv,()=>{i=void 0}),i.once(xv,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};kc.FSWatcher=xo;var Gv=(t,e)=>{let n=new xo(e);return n.add(t),n};kc.watch=Gv});var Ih=Ce(require("fs")),Lh=Ce(require("path"));var In=Ce(require("process")),B=Ce(qe()),ti=Ce(Ul()),qo=Ce(yi()),pe=Ce(require("path")),$e=Ce(require("fs")),_n=Ce(qe());var Mr=Ce(require("fs")),Ye=Ce(require("path"));var it=Ce(require("path"));var Qi=process.arch=="arm64"?process.platform+process.arch:process.platform,Z="2.0",P_=it.join("rescript",Qi),E_=it.join("node_modules",P_),Fr="bsc.exe",Xi="rescript-editor-analysis.exe",rD=it.join(E_,Fr),Sa=it.join(it.dirname(__dirname),"..",Xi),Ta=it.join(it.dirname(__dirname),"analysis_binaries",Qi,Xi),Ji="rescript";var Zi=it.join("node_modules",".bin"),iD=it.join(Zi,Ji),Bl=".bsb.lock",Or="bsconfig.json",jr="rescript.json",Jn=it.join("lib","bs"),Vl=it.join("lib","ocaml"),eo=it.join("lib","bs",".compiler.log"),Ir=it.join("lib","bs","build.ninja"),xa=it.join("lib","rewatch.lock"),Vt=".res",Lr=".resi",zl=".cmi",ka="Start Build",Gl="commonjs",Kl=".js",Aa="rescript_configuration_request",Yl=1e4;var S_=t=>{switch(t){case"esmodule":case"es6":return"es6";case"es6-global":return"es6_global";case"commonjs":default:return"js"}},no=(t,e)=>{let n=Ye.basename(t,Ye.extname(t));return Ye.format({dir:Ye.dirname(t),name:n,ext:e})},qn=(t,e)=>{if(t==null)return null;let n=Ye.join(t,e);if(Mr.existsSync(n))return n;let r=Ye.dirname(t);return r===t?null:qn(r,e)},ro=t=>{try{let e=Ye.join(t,jr),n=Ye.join(t,Or),r=Mr.readFileSync(Mr.existsSync(e)?e:n,{encoding:"utf-8"});return JSON.parse(r)}catch{return null}},Ql=t=>{let e=t["package-specs"],n="",r=Gl,i={module:r},o=Kl;return e&&(!Array.isArray(e)&&typeof e!="string"&&e.module?i=e:typeof e=="string"?r=e:Array.isArray(e)&&e[0]&&(typeof e[0]=="string"?r=e[0]:i=e[0])),i.module&&(r=i.module),i["in-source"]||(n="lib/"+S_(r)),i.suffix?o=i.suffix:t.suffix&&(o=t.suffix),[o,n]},Xl=(t,e)=>{let n=ro(t);if(!n)return null;let[r,i]=Ql(n),o=no(e,r);return Ye.join(t,i,o)},Jl=(t,e)=>{let n=qn(Ye.join("..",t),jr);if(n||(n=qn(Ye.join("..",t),Or)),!n)return null;let r=ro(Ye.dirname(n));if(!r)return null;let[i,o]=Ql(r),s=no(e,i);return Ye.join(t,o,s)};var Gt=Ce(require("child_process")),lt=Ce(require("path")),wt=Ce(mr()),Mt=Ce(require("fs")),ao=Ce(require("os"));var rn=Ce(qe());var nd=require("url"),io=(t,e,n)=>{let r=t.start.line===t.end.line&&t.start.character===t.end.character?1:0,i={start:{line:t.start.line,character:t.start.character-r},end:{line:t.start.line,character:t.start.character-r}},o={start:{line:t.end.line,character:t.end.character},end:{line:t.end.line,character:t.end.character}};return[{range:i,newText:e},{range:o,newText:n}]},T_=(t,e)=>{let n={line:t.end.line,character:t.end.character-1};return[{range:{start:n,end:n},newText:e}]},x_=(t,e)=>[{range:t,newText:e}],ed=t=>{let e=t.trim();return e.endsWith(",")?e.slice(0,e.length-1):e},td=t=>{let e=[];for(let n=0;n<=t.length-1;n+=1){let r=t[n];if(r.includes("(defined as")){let[i,o]=r.split("(defined as");e.push(ed(i));break}else e.push(ed(r))}return e.join("").trim()},k_=(t,e)=>{let n=[],r=t.slice(),i=!1;return r.forEach(o=>{i||(o.startsWith(e)?i=!0:n.push(o))}),n},rd=({diagnostic:t,diagnosticMessage:e,file:n,range:r,addFoundActionsHere:i})=>{e.forEach((o,s,a)=>{let u=[L_,A_,N_,F_,O_,j_,I_,q_];for(let p of u){let h=!1;try{h=p({array:a,codeActions:i,diagnostic:t,file:n,index:s,line:o,range:r})}catch(y){console.error(y)}if(h)break}})},A_=({codeActions:t,diagnostic:e,file:n,line:r,range:i})=>{if(r.startsWith("Hint: Did you mean")){let o=/Did you mean ([A-Za-z0-9_]*)?/,s=r.match(o);if(s===null)return!1;let[a,u]=s;if(u!=null){t[n]=t[n]||[];let p={title:`Replace with '${u}'`,edit:{changes:{[n]:[{range:i,newText:u}]}},diagnostics:[e],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return t[n].push({range:i,codeAction:p}),!0}}return!1},q_=({codeActions:t,diagnostic:e,file:n,line:r,range:i,array:o,index:s})=>{if(r.startsWith("This pattern matches values of type")){let a=/This pattern matches values of type (.*)$/,u=r.match(a);if(u===null)return!1;let[p,h]=u;if(!h.startsWith("option<")){let y=o.slice(s+1),g=y.findIndex(q=>q.trim().startsWith("but a pattern was expected which matches values of type"));if(g===-1)return!1;let[N,A=""]=y[g].split("but a pattern was expected which matches values of type");if(A.trim()===""&&(A=(y[g+1]??"").trim()),A.trim().startsWith("option<")){t[n]=t[n]||[];let q={title:"Wrap in option Some",edit:{changes:{[n]:io(i,"Some(",")")}},diagnostics:[e],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return t[n].push({range:i,codeAction:q}),!0}}}return!1},id=({recordFieldNames:t,codeActions:e,file:n,range:r,diagnostic:i,todoValue:o})=>{if(t!=null){e[n]=e[n]||[];let s=r.start.line!==r.end.line,a="";if(s){let p=s?r.end.character+2:0,h=Array.from({length:p}).join(" "),y=Array.from({length:r.end.character}).join(" ");t.forEach((g,N)=>{N===0?a+=" ":a+=h,a+=`${g}: ${o},
36
- `}),a+=`${y}`}else r.end.character-r.start.character>2&&(a+=", "),a+=t.map(p=>`${p}: ${o}`).join(", ");let u={title:"Add missing record fields",edit:{changes:{[n]:T_(r,a)}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:u}),!0}return!1},N_=({array:t,codeActions:e,diagnostic:n,file:r,index:i,line:o,range:s})=>{if(o.startsWith("Some record fields are undefined:")){let a=o.trim().split("Some record fields are undefined: ")[1]?.split(" ");return t.slice(i+1).forEach(u=>{a.push(...u.trim().split(" "))}),id({recordFieldNames:a,codeActions:e,diagnostic:n,file:r,range:s,todoValue:'failwith("TODO")'})}return!1},F_=({array:t,codeActions:e,diagnostic:n,file:r,index:i,line:o,range:s})=>{if(o.startsWith("Some required record fields are missing:")){let a=o;a.endsWith(".")&&(a=a.slice(0,a.length-1));let u=a.trim().split("Some required record fields are missing: ")[1]?.split(" "),p=!1;return t.slice(i+1).forEach(h=>{p||(u.push(...h.trim().split(".")[0].split(" ")),h.includes(".")&&(p=!0))}),id({recordFieldNames:u,codeActions:e,diagnostic:n,file:r,range:s,todoValue:"%todo"})}return!1},O_=({line:t,codeActions:e,file:n,range:r,diagnostic:i})=>{if(t.startsWith("You can convert ")){let o=/You can convert (\w*) to (\w*) with ([\w.]*).$/,s=t.match(o);if(s===null)return!1;let[a,u,p,h]=s;if(u!=null&&p!=null&&h!=null){e[n]=e[n]||[];let y={title:`Convert ${u} to ${p} with ${h}`,edit:{changes:{[n]:io(r,`${h}(`,")")}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:y}),!0}}return!1},j_=({line:t,codeActions:e,file:n,range:r,diagnostic:i})=>{if(t.startsWith("This is an uncurried ReScript function. It must be applied with a dot.")){let o={line:r.end.line,character:r.end.character+1};e[n]=e[n]||[];let s={title:"Apply uncurried function call with dot",edit:{changes:{[n]:[{range:{start:o,end:o},newText:". "}]}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:s}),!0}return!1},I_=({line:t,codeActions:e,file:n,range:r,diagnostic:i,array:o,index:s})=>{if(t.startsWith("You forgot to handle a possible case here, for example:")){let a=o.slice(s+1).join("").trim(),u=(0,nd.fileURLToPath)(n),p=zt(u,["codemod",u,r.start.line,r.start.character,"add-missing-cases",a]);e[n]=e[n]||[];let h={title:"Insert missing cases",edit:{changes:{[n]:x_(r,p)}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:h}),!0}return!1},L_=({line:t,codeActions:e,file:n,range:r,diagnostic:i,array:o,index:s})=>{let a="This has type:";if(t.startsWith(a)){let u=k_([t.slice(a.length),...o.slice(s+1)],"Somewhere wanted:"),p=o.slice(s+u.length).map(g=>g.replace("Somewhere wanted:","")),h=td(u),y=td(p);if(h===`option<${y}>`){e[n]=e[n]||[];let g="assert false";switch(y){case"string":{g='"-"';break}case"bool":{g="false";break}case"int":{g="-1";break}case"float":{g="-1.";break}}let N={title:"Unwrap optional value",edit:{changes:{[n]:io(r,"switch ",` { | None => ${g} | Some(v) => v }`)}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:N}),!0}if(`option<${h}>`===y){e[n]=e[n]||[];let g={title:"Wrap value in Some",edit:{changes:{[n]:io(r,"Some(",")")}},diagnostics:[i],kind:rn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:g}),!0}}return!1};var oo=[],Na={},od=t=>(oo.push(t),()=>{oo=oo.filter(e=>e!==t)}),sd=(t,e)=>{(Na[t]==null||Na[t]<Date.now()-9e5)&&(Na[t]=Date.now(),oo.forEach(n=>n(e)))};var H_={extensionConfiguration:{askToStartBuild:!0,inlayHints:{enable:!1,maxLength:25},codeLens:!1,binaryPath:null,platformPath:null,signatureHelp:{enabled:!0,forConstructorPayloads:!0},incrementalTypechecking:{enable:!0,acrossFiles:!1,debugLogging:!1},cache:{projectConfig:{enable:!0}}}},le=H_;var Ve=new Map;var W_="rescript_format_file_"+process.pid+"_",Fa=0,on=(t="")=>{let e=W_+Fa+t;return Fa=Fa+1,lt.join(ao.tmpdir(),e)},cd=t=>{let e=lt.dirname(t);return Mt.default.existsSync(lt.join(e,jr))||Mt.default.existsSync(lt.join(e,Or))?e:e===t?null:cd(e)},Ct=(t,e)=>{let n=null;for(let r of Ve.keys())t.startsWith(r)&&(!e||t!==r)&&(n==null||r.length>n.length)&&(n=r);if(n!=null)return n;{let r=lt.extname(t)==="";return cd(r&&!e?lt.join(t,"dummy.res"):t)}},Zn=(t,e)=>{if(t==null)return null;let n=lt.join(t,e);return Mt.default.existsSync(n)?n:null},ud=(t,e,n)=>{let r=lt.extname(e),i=on(r);Mt.default.writeFileSync(i,n,{encoding:"utf-8"});try{if(t!=null)return{kind:"success",result:Gt.execFileSync(t,["-color","never","-format",i]).toString()};throw new Error("Could not find ReScript compiler for project.")}catch(o){return{kind:"error",error:o instanceof Error?o.message:String(o)}}finally{Mt.default.unlink(i,()=>null)}},$_=t=>{let e=Ct(t);if(e==null)return;let n=Zn(uo(e),Fr);if(n!=null)try{return Gt.execSync(`${n} -v`).toString().replace(/rescript/gi,"").trim()}catch(r){console.error("rescrip binary failed",r);return}};function ld(t){let e=Zn(uo(t),Fr);if(e!=null)try{return Gt.execSync(`${e} -v`).toString().replace(/rescript/gi,"").trim()}catch{return}}var so=null;Mt.default.existsSync(Sa)?so=Sa:Mt.default.existsSync(Ta)&&(so=Ta);var zt=(t,e,n=!1)=>{let r=Ct(t);if(r==null&&n)return null;let i=Ve.get(r??"")?.rescriptVersion??$_(t),o=so,s=r?Ve.get(r):null,a=i?.startsWith("9.")||i?.startsWith("10.")||i?.startsWith("11.")||["12.0.0-alpha.1","12.0.0-alpha.2","12.0.0-alpha.3","12.0.0-alpha.4"].includes(i??"");if(!a&&s!=null)o=s.editorAnalysisLocation;else{if(!a&&s==null)return null;o=so}let u={cwd:r||void 0,maxBuffer:1/0,env:{...process.env,RESCRIPT_VERSION:i,RESCRIPT_INCREMENTAL_TYPECHECKING:le.extensionConfiguration.incrementalTypechecking?.enable===!0?"true":void 0,RESCRIPT_PROJECT_CONFIG_CACHE:le.extensionConfiguration.cache?.projectConfig?.enable===!0?"true":void 0}};if(o==null)return null;let p="";try{return p=Gt.execFileSync(o,e,u).toString(),JSON.parse(p)}catch(h){return console.error(h),console.error("Original response: ",p),console.error("Args: ",e),sd(String(e[0]),String(h)),null}},Dt=(t,e,n,r=!0)=>{let i=zt(t,e,r);return{jsonrpc:Z,id:n.id,result:i}},Oa=(t,e)=>zt(t,["references",t,e.line,e.character]),ad=t=>t.replace(/(?:^\w|[A-Z]|\b\w)/g,e=>e.toUpperCase()).replace(/(\s|-)+/g,""),Wr=t=>{let e=ro(t),n="";return e?(e.namespace===!0?n=ad(e.name):typeof e.namespace=="string"&&(n=ad(e.namespace)),{kind:"success",result:n}):{kind:"error",error:"Could not read ReScript config file"}},dd=(t,e)=>{let n={kind:"error",error:"Could not read ReScript config file"},r=t.split(e)[1],i=Xl(e,r);if(!i)return n;let o=i;if(!Mt.default.existsSync(o)){let s=Jl(e,r);if(!s)return n;o=s}return{kind:"success",result:o}},fd=(t,e)=>{let n={cwd:e};return process.platform==="win32"?Gt.exec(`"${t}".cmd build -w`,n):Gt.execFile(t,["build","-w"],n)},Hr=t=>process.platform==="win32"?`file:\\\\\\${t}`:`file://${t}`,U_=t=>{let e=/(.+)\:(\d+)\:(\d+)(-(\d+)(\:(\d+))?)?$/,n=t.trim(),r=n.match(e);if(r===null)return{file:Hr(n),range:{start:{line:0,character:0},end:{line:0,character:0}}};let[i,o,s,a,u,p,h,y]=r,g;if(u==null){let N={line:parseInt(s)-1,character:parseInt(a)};g={start:N,end:N}}else{let N=y==null,[A,q]=N?[s,p]:[p,y];g={start:{line:parseInt(s)-1,character:parseInt(a)-1},end:{line:parseInt(A)-1,character:parseInt(q)}}}return{file:Hr(o),range:g}},co=t=>{let e=[],n=[],r=t.split(ao.EOL),i=!1;for(let a=0;a<r.length;a++){let u=r[a];if(u.startsWith(" We've found a bug for you!"))e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[]});else if(u.startsWith("FAILED:"))e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[u]});else if(u.startsWith("Fatal error:"))e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[u]});else if(u.startsWith(" Warning number ")){let p=parseInt(u.slice(17)),h;switch(p){case 11:case 20:case 26:case 27:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 60:case 66:case 67:case 101:h=wt.DiagnosticTag.Unnecessary;break;case 3:h=wt.DiagnosticTag.Deprecated;break}let y=u.includes("(configured as error)")?wt.DiagnosticSeverity.Error:wt.DiagnosticSeverity.Warning;e.push({code:Number.isNaN(p)?void 0:p,severity:y,tag:h,content:[]})}else u.startsWith(" Syntax error!")?e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[]}):u.startsWith(" Warning genType")?e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[]}):u.startsWith("#Start(")||(u.startsWith("#Done(")?i=!0:u.startsWith("File ")&&a+1<r.length&&r[a+1].startsWith("Warning ")?a++:u.startsWith("File ")&&a+1<r.length&&r[a+1].startsWith("Error: Syntax error")?(e.push({code:void 0,severity:wt.DiagnosticSeverity.Error,tag:void 0,content:[r[a],r[a+1]]}),a++):/^ +([0-9]+| +|\.) (│|┆)/.test(u)||(u.startsWith(" ")?e[e.length-1]==null?n.push(u):e[e.length-1].content.push(u.slice(2)):u.trim()!=""&&(e[e.length-1]==null?n.push(u):e[e.length-1].content.push(u))))}let o={},s={};return e.forEach(a=>{let[u,...p]=a.content,{file:h,range:y}=U_(u);o[h]==null&&(o[h]=[]);let g={severity:a.severity,tags:a.tag===void 0?[]:[a.tag],code:a.code,range:y,source:"ReScript",message:p.join(`
37
- `).trim()};rd({addFoundActionsHere:s,diagnostic:g,diagnosticMessage:p,file:h,range:y}),o[h].push(g)}),{done:i,result:o,codeActions:s,linesWithParseErrors:n}},hd=(t,e)=>!(e.start.line<t.start.line||e.end.line<t.start.line||e.start.line>t.end.line||e.end.line>t.end.line||e.start.line===t.start.line&&e.start.character<t.start.character||e.end.line===t.end.line&&e.end.character>t.end.character),uo=t=>{if(le.extensionConfiguration.platformPath!=null)return le.extensionConfiguration.platformPath;let e=qn(t,lt.join("node_modules","rescript"));if(e==null)return null;let n=lt.join(e,Qi);return Mt.default.existsSync(n)||(n=lt.join(e,"..",`@rescript/${process.platform}-${process.arch}/bin`)),process.platform=="darwin"&&process.arch=="arm64"&&!Mt.default.existsSync(n)&&(n=lt.join(e,process.platform)),n},pd=t=>Zn(uo(t),Fr),md=t=>Zn(uo(t),Xi);var kh=Ce(Ac()),Hc=require("console"),Se=require("url");var ge=Ce(require("path")),yt=Ce(require("fs"));var qc=require("url"),gh=Ce(require("readline")),ko=require("perf_hooks"),yh=Ce(qe()),Ao=Ce(require("node:child_process"));var _h=Ce(Ac());function ht(){return le.extensionConfiguration.incrementalTypechecking?.debugLogging??!1}var Rh="___incremental",or=ge.join(Jn,Rh),jn=new Map,ph=new Set,Fc=new Map,bh=_h.watch([],{awaitWriteFinish:{stabilityThreshold:1}}).on("all",(t,e)=>{if(t!=="change"&&t!=="unlink")return;let n=Fc.get(e);if(n!=null){let r=jn.get(n);r!=null&&(ht()&&console.log("[watcher] Cleaning up incremental files for "+n),r.compilation!=null&&(ht()&&console.log("[watcher] Was compiling, killing"),clearTimeout(r.compilation.timeout),r.killCompilationListeners.forEach(i=>i()),r.compilation=null),wh(r.file.sourceFilePath,r.project.rootPath))}});function Oc(t,e){yt.default.rm(ge.resolve(t,or),{force:!0,recursive:!0},n=>{e?.()})}function vh(t){ht()&&console.log("Recreating incremental file folder"),Oc(t,()=>{yt.default.mkdir(ge.resolve(t,or),{recursive:!0},e=>{})})}function wh(t,e){let n=t.endsWith(".resi")?".resi":".res",r=Wr(e),i=ge.basename(t,n),o=r.kind==="success"&&r.result!==""?`${i}-${r.result}`:i;ht()&&console.log("Cleaning up incremental file assets for: "+i),yt.default.unlink(ge.resolve(e,or,ge.basename(t)),s=>{}),[o+".ast",o+".cmt",o+".cmti",o+".cmi",o+".cmj"].forEach(s=>{yt.default.unlink(ge.resolve(e,or,s),a=>{})})}function Kv(t){let e=ge.resolve(t.project.rootPath,Ir),n=ge.resolve(t.project.workspaceRootPath,xa),r=null,i=null;try{i=yt.default.statSync(e),r="bsb"}catch{}try{i=yt.default.statSync(n),r="rewatch"}catch{}if(r==null)return console.log("Did not find build.ninja or rewatch.lock, cannot proceed.."),Promise.resolve(null);let o=t.buildNinja,s=t.buildRewatch;return r==="bsb"&&o!=null&&i!=null&&o.fileMtime>=i.mtimeMs?Promise.resolve(o.rawExtracted):r==="rewatch"&&s!=null&&s.lastFile===t.file.sourceFilePath?Promise.resolve(s.compilerArgs):new Promise((a,u)=>{function p(h){i!=null&&Array.isArray(h)?t.buildNinja={fileMtime:i.mtimeMs,rawExtracted:h}:Array.isArray(h)||(t.buildRewatch={lastFile:t.file.sourceFilePath,compilerArgs:h}),a(h)}if(r==="bsb"){let h=yt.default.createReadStream(e,{encoding:"utf8"});h.on("error",M=>{console.error("File stream error:",M),p([])});let y=gh.default.createInterface({input:h,crlfDelay:1/0}),g=!1,N=!1,A=!1,q=[];y.on("line",M=>{if(M=M.trim(),!A){if(g&&(q.push(M),g=!1),N){y.close(),p(q),A=!0;return}M.startsWith("rule astj")&&(g=!0),M.startsWith("rule mij")&&(g=!0,N=!0)}}),y.on("error",M=>{console.error("Readline error:",M),p([])}),y.on("close",()=>{p(q)})}else if(r==="rewatch")try{let h=Ve.get(t.project.rootPath);if(h?.rescriptVersion==null)return;let y=ge.resolve(t.project.workspaceRootPath,"node_modules/@rolandpeelen/rewatch/rewatch"),g=JSON.parse(Ao.execFileSync(y,["--rescript-version",h.rescriptVersion,"--compiler-args",t.file.sourceFilePath]).toString().trim());p(g)}catch(h){console.error(h)}})}function Nc(t){let e=[];for(let n=0;n<=t.length-1;n++){let r=t[n],i=n+1,o=t[i]??"";if(r.startsWith("-")&&o.startsWith("-"))e.push([r]);else if(r.startsWith("-")&&o.startsWith("'")){let s=[o.slice(1)];for(let a=i+1;a<=t.length-1;a++){let u=t[a],p=!1;if(u.endsWith("'")&&(u=u.slice(0,u.length-1),n=a,p=!0),s.push(u),p)break}e.push([r,s.join(" ")])}else r.startsWith("-")&&e.push([r,o])}return e}function mh(t){let e=t.trim().split("command = ")[1].split(" ").map(n=>n.trim()).filter(n=>n!=="");return Nc(e)}function Yv(t){let e=/\x1B[@-_][0-?]*[ -/]*[@-~]/g;return t.replace(e,"")}function Qv(t,e,n,r){let i=jn.get(t);if(i==null){let u=Ct(t);if(u==null){ht()&&console.log("Did not find project root path for "+t);return}let p=Ve.get(u);if(p==null){ht()&&console.log("Did not find open project for "+t);return}let h=ge.resolve(u,xa),y=!1;yt.default.existsSync(h)&&(y=!0);let g=u&&!y?Ct(u,!0):null,N=p.bscBinaryLocation;if(N==null){ht()&&console.log("Could not find bsc binary location for "+t);return}let A=t.endsWith(".resi")?".resi":".res",q=ge.basename(t,A),M=p.namespaceName!=null?`${q}-${p.namespaceName}`:q,j=ge.join(u,or),v=ge.resolve(u,Jn,ge.relative(u,t)),b=ge.parse(v);b.ext=A===".res"?".cmt":".cmti",b.base="",v=ge.format(b),i={file:{originalTypeFileLocation:v,extension:A,moduleName:q,moduleNameNamespaced:M,sourceFileName:q+A,sourceFilePath:t,incrementalFilePath:ge.join(j,q+A)},project:{workspaceRootPath:g??u,rootPath:u,callArgs:Promise.resolve([]),bscBinaryLocation:N,incrementalFolderPath:j},buildRewatch:null,buildNinja:null,compilation:null,killCompilationListeners:[],codeActions:[]},i.project.callArgs=Ch(i),bh.add([i.file.originalTypeFileLocation]),Fc.set(i.file.originalTypeFileLocation,i.file.sourceFilePath),jn.set(t,i)}if(i==null)return;let o=i;o.compilation!=null&&(clearTimeout(o.compilation.timeout),o.killCompilationListeners.forEach(u=>u()),o.killCompilationListeners=[]);let s=ko.performance.now(),a=setTimeout(()=>{Jv(o,e,n,r)},20);o.compilation!=null?(o.compilation.timeout=a,o.compilation.triggerToken=s):o.compilation={timeout:a,triggerToken:s}}function Xv(t,e){return jn.get(t)?.compilation?.triggerToken===e}async function Ch(t){let e=Ve.get(t.project.rootPath);if(e?.rescriptVersion==null)return ht()&&console.log("Found no project (or ReScript version) for "+t.file.sourceFilePath),null;let n=await Kv(t);if(n==null)return null;let r=[],i=[],o=Array.isArray(n);if(Array.isArray(n)){let[a,u]=n;r=mh(a),i=mh(u)}else r=Nc(n.parser_args),i=Nc(n.compiler_args);let s=[];return le.extensionConfiguration.incrementalTypechecking?.acrossFiles&&s.push("-I",ge.resolve(t.project.rootPath,or)),i.forEach(([a,u])=>{if(a==="-I")o?s.push("-I",ge.resolve(t.project.rootPath,Jn,u)):u==="."?s.push("-I",ge.resolve(t.project.rootPath,Vl)):s.push("-I",u);else if(a==="-bs-v")s.push("-bs-v",Date.now().toString());else{if(a==="-bs-package-output")return;u==null||u===""?s.push(a):s.push(a,u)}}),r.forEach(([a,u])=>{(a.startsWith("-bs-jsx")||a.startsWith("-ppx"))&&s.push(a,u)}),s.push("-color","never"),parseInt(e.rescriptVersion.split(".")[0]??"10")>=11&&s.push("-ignore-parse-errors"),s=s.filter(a=>a!=null&&a!==""),s.push(t.file.incrementalFilePath),s}async function Jv(t,e,n,r){let i=t.compilation?.triggerToken,o=await t.project.callArgs;if(o==null){let a=await Ch(t);if(a!=null)o=a,t.project.callArgs=Promise.resolve(a);else{ht()&&console.log("Could not figure out call args. Maybe build.ninja does not exist yet?");return}}let s=ko.performance.now();if(!yt.default.existsSync(t.project.incrementalFolderPath))try{yt.default.mkdirSync(t.project.incrementalFolderPath,{recursive:!0})}catch{}try{yt.default.writeFileSync(t.file.incrementalFilePath,e);let a=Ao.execFile(t.project.bscBinaryLocation,o,{cwd:t.project.rootPath},(u,p,h)=>{u?.killed?ht()&&console.log(`Compilation of ${t.file.sourceFileName} was killed.`):ht()&&console.log(`Recompiled ${t.file.sourceFileName} in ${(ko.performance.now()-s)/1e3}s`);let y=!1;if(!u?.killed&&i!=null&&Xv(t.file.sourceFilePath,i)){ht()&&console.log("Resetting compilation status."),t.compilation=null;let{result:g,codeActions:N}=co(`${h}
38
- #Done()`),A=Object.values(N)[0]??[];A.forEach(j=>{if(j.codeAction.edit!=null&&j.codeAction.edit.changes!=null){let v=Object.values(j.codeAction.edit.changes)[0];j.codeAction.edit.changes={[(0,qc.pathToFileURL)(t.file.sourceFilePath).toString()]:v}}}),t.codeActions=A;let q=(Object.values(g)[0]??[]).map(j=>({...j,message:Yv(j.message)})).filter(j=>!j.message.startsWith("Uninterpreted extension 'rescript.")&&(!j.message.includes(`/${Rh}/${t.file.sourceFileName}`)||j.message.startsWith("Multiple definition of the")||j.message.startsWith("Signature mismatch")||j.message.startsWith("In this `with' constraint")||j.message.startsWith("This `with' constraint on"))?(y=!0,!0):!1);if(q.length===0&&h!==""&&!y&&!ph.has(t.project.rootPath))try{ph.add(t.project.rootPath);let j=ge.resolve(t.project.incrementalFolderPath,"error.log");yt.default.writeFileSync(j,`== BSC ARGS ==
39
- ${o?.join(" ")}
32
+ `,"\r"];var an;(function(l){function R(w,x,Z,Me){return new Yt(w,x,Z,Me)}l.create=R;function _(w){var x=w;return!!(E.defined(x)&&E.string(x.uri)&&(E.undefined(x.languageId)||E.string(x.languageId))&&E.uinteger(x.lineCount)&&E.func(x.getText)&&E.func(x.positionAt)&&E.func(x.offsetAt))}l.is=_;function h(w,x){for(var Z=w.getText(),Me=u(x,function(Qn,wi){var Mu=Qn.range.start.line-wi.range.start.line;return Mu===0?Qn.range.start.character-wi.range.start.character:Mu}),Ce=Z.length,Lt=Me.length-1;Lt>=0;Lt--){var jt=Me[Lt],cn=w.offsetAt(jt.range.start),ce=w.offsetAt(jt.range.end);if(ce<=Ce)Z=Z.substring(0,cn)+jt.newText+Z.substring(ce,Z.length);else throw new Error("Overlapping edit");Ce=cn}return Z}l.applyEdits=h;function u(w,x){if(w.length<=1)return w;var Z=w.length/2|0,Me=w.slice(0,Z),Ce=w.slice(Z);u(Me,x),u(Ce,x);for(var Lt=0,jt=0,cn=0;Lt<Me.length&&jt<Ce.length;){var ce=x(Me[Lt],Ce[jt]);ce<=0?w[cn++]=Me[Lt++]:w[cn++]=Ce[jt++]}for(;Lt<Me.length;)w[cn++]=Me[Lt++];for(;jt<Ce.length;)w[cn++]=Ce[jt++];return w}})(an=e.TextDocument||(e.TextDocument={}));var Yt=function(){function l(R,_,h,u){this._uri=R,this._languageId=_,this._version=h,this._content=u,this._lineOffsets=void 0}return Object.defineProperty(l.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),l.prototype.getText=function(R){if(R){var _=this.offsetAt(R.start),h=this.offsetAt(R.end);return this._content.substring(_,h)}return this._content},l.prototype.update=function(R,_){this._content=R.text,this._version=_,this._lineOffsets=void 0},l.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var R=[],_=this._content,h=!0,u=0;u<_.length;u++){h&&(R.push(u),h=!1);var w=_.charAt(u);h=w==="\r"||w===`
33
+ `,w==="\r"&&u+1<_.length&&_.charAt(u+1)===`
34
+ `&&u++}h&&_.length>0&&R.push(_.length),this._lineOffsets=R}return this._lineOffsets},l.prototype.positionAt=function(R){R=Math.max(Math.min(R,this._content.length),0);var _=this.getLineOffsets(),h=0,u=_.length;if(u===0)return o.create(0,R);for(;h<u;){var w=Math.floor((h+u)/2);_[w]>R?u=w:h=w+1}var x=h-1;return o.create(x,R-_[x])},l.prototype.offsetAt=function(R){var _=this.getLineOffsets();if(R.line>=_.length)return this._content.length;if(R.line<0)return 0;var h=_[R.line],u=R.line+1<_.length?_[R.line+1]:this._content.length;return Math.max(Math.min(h+R.character,u),h)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),E;(function(l){var R=Object.prototype.toString;function _(ce){return typeof ce<"u"}l.defined=_;function h(ce){return typeof ce>"u"}l.undefined=h;function u(ce){return ce===!0||ce===!1}l.boolean=u;function w(ce){return R.call(ce)==="[object String]"}l.string=w;function x(ce){return R.call(ce)==="[object Number]"}l.number=x;function Z(ce,Qn,wi){return R.call(ce)==="[object Number]"&&Qn<=ce&&ce<=wi}l.numberRange=Z;function Me(ce){return R.call(ce)==="[object Number]"&&-2147483648<=ce&&ce<=2147483647}l.integer=Me;function Ce(ce){return R.call(ce)==="[object Number]"&&0<=ce&&ce<=2147483647}l.uinteger=Ce;function Lt(ce){return R.call(ce)==="[object Function]"}l.func=Lt;function jt(ce){return ce!==null&&typeof ce=="object"}l.objectLiteral=jt;function cn(ce,Qn){return Array.isArray(ce)&&ce.every(Qn)}l.typedArray=cn})(E||(E={}))})});var Oe=P(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.ProtocolNotificationType=Pt.ProtocolNotificationType0=Pt.ProtocolRequestType=Pt.ProtocolRequestType0=Pt.RegistrationType=void 0;var rr=jn(),ma=class{constructor(e){this.method=e}};Pt.RegistrationType=ma;var ga=class extends rr.RequestType0{constructor(e){super(e)}};Pt.ProtocolRequestType0=ga;var ya=class extends rr.RequestType{constructor(e){super(e,rr.ParameterStructures.byName)}};Pt.ProtocolRequestType=ya;var Ra=class extends rr.NotificationType0{constructor(e){super(e)}};Pt.ProtocolNotificationType0=Ra;var _a=class extends rr.NotificationType{constructor(e){super(e,rr.ParameterStructures.byName)}};Pt.ProtocolNotificationType=_a});var ji=P(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.objectLiteral=Be.typedArray=Be.stringArray=Be.array=Be.func=Be.error=Be.number=Be.string=Be.boolean=void 0;function yy(t){return t===!0||t===!1}Be.boolean=yy;function hl(t){return typeof t=="string"||t instanceof String}Be.string=hl;function Ry(t){return typeof t=="number"||t instanceof Number}Be.number=Ry;function _y(t){return t instanceof Error}Be.error=_y;function by(t){return typeof t=="function"}Be.func=by;function pl(t){return Array.isArray(t)}Be.array=pl;function vy(t){return pl(t)&&t.every(e=>hl(e))}Be.stringArray=vy;function Ey(t,e){return Array.isArray(t)&&t.every(e)}Be.typedArray=Ey;function wy(t){return t!==null&&typeof t=="object"}Be.objectLiteral=wy});var ml=P(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.ImplementationRequest=void 0;var Cy=Oe(),Py;(function(t){t.method="textDocument/implementation",t.type=new Cy.ProtocolRequestType(t.method)})(Py=Tr.ImplementationRequest||(Tr.ImplementationRequest={}))});var gl=P(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.TypeDefinitionRequest=void 0;var Dy=Oe(),Sy;(function(t){t.method="textDocument/typeDefinition",t.type=new Dy.ProtocolRequestType(t.method)})(Sy=Ar.TypeDefinitionRequest||(Ar.TypeDefinitionRequest={}))});var Rl=P(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.DidChangeWorkspaceFoldersNotification=wn.WorkspaceFoldersRequest=void 0;var yl=Oe(),Ty;(function(t){t.type=new yl.ProtocolRequestType0("workspace/workspaceFolders")})(Ty=wn.WorkspaceFoldersRequest||(wn.WorkspaceFoldersRequest={}));var Ay;(function(t){t.type=new yl.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(Ay=wn.DidChangeWorkspaceFoldersNotification||(wn.DidChangeWorkspaceFoldersNotification={}))});var _l=P(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigurationRequest=void 0;var xy=Oe(),qy;(function(t){t.type=new xy.ProtocolRequestType("workspace/configuration")})(qy=xr.ConfigurationRequest||(xr.ConfigurationRequest={}))});var vl=P(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ColorPresentationRequest=Cn.DocumentColorRequest=void 0;var bl=Oe(),ky;(function(t){t.method="textDocument/documentColor",t.type=new bl.ProtocolRequestType(t.method)})(ky=Cn.DocumentColorRequest||(Cn.DocumentColorRequest={}));var Ny;(function(t){t.type=new bl.ProtocolRequestType("textDocument/colorPresentation")})(Ny=Cn.ColorPresentationRequest||(Cn.ColorPresentationRequest={}))});var El=P(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.FoldingRangeRequest=void 0;var Oy=Oe(),Iy;(function(t){t.method="textDocument/foldingRange",t.type=new Oy.ProtocolRequestType(t.method)})(Iy=qr.FoldingRangeRequest||(qr.FoldingRangeRequest={}))});var wl=P(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.DeclarationRequest=void 0;var Fy=Oe(),Ly;(function(t){t.method="textDocument/declaration",t.type=new Fy.ProtocolRequestType(t.method)})(Ly=kr.DeclarationRequest||(kr.DeclarationRequest={}))});var Cl=P(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.SelectionRangeRequest=void 0;var jy=Oe(),My;(function(t){t.method="textDocument/selectionRange",t.type=new jy.ProtocolRequestType(t.method)})(My=Nr.SelectionRangeRequest||(Nr.SelectionRangeRequest={}))});var Dl=P(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.WorkDoneProgressCancelNotification=Ht.WorkDoneProgressCreateRequest=Ht.WorkDoneProgress=void 0;var $y=jn(),Pl=Oe(),Hy;(function(t){t.type=new $y.ProgressType;function e(n){return n===t.type}t.is=e})(Hy=Ht.WorkDoneProgress||(Ht.WorkDoneProgress={}));var Wy;(function(t){t.method="window/workDoneProgress/create",t.type=new Pl.ProtocolRequestType(t.method)})(Wy=Ht.WorkDoneProgressCreateRequest||(Ht.WorkDoneProgressCreateRequest={}));var Uy;(function(t){t.method="window/workDoneProgress/cancel",t.type=new Pl.ProtocolNotificationType(t.method)})(Uy=Ht.WorkDoneProgressCancelNotification||(Ht.WorkDoneProgressCancelNotification={}))});var Sl=P(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.CallHierarchyOutgoingCallsRequest=Wt.CallHierarchyIncomingCallsRequest=Wt.CallHierarchyPrepareRequest=void 0;var ba=Oe(),By;(function(t){t.method="textDocument/prepareCallHierarchy",t.type=new ba.ProtocolRequestType(t.method)})(By=Wt.CallHierarchyPrepareRequest||(Wt.CallHierarchyPrepareRequest={}));var Vy;(function(t){t.method="callHierarchy/incomingCalls",t.type=new ba.ProtocolRequestType(t.method)})(Vy=Wt.CallHierarchyIncomingCallsRequest||(Wt.CallHierarchyIncomingCallsRequest={}));var Gy;(function(t){t.method="callHierarchy/outgoingCalls",t.type=new ba.ProtocolRequestType(t.method)})(Gy=Wt.CallHierarchyOutgoingCallsRequest||(Wt.CallHierarchyOutgoingCallsRequest={}))});var Tl=P(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.SemanticTokensRefreshRequest=Ve.SemanticTokensRangeRequest=Ve.SemanticTokensDeltaRequest=Ve.SemanticTokensRequest=Ve.SemanticTokensRegistrationType=Ve.TokenFormat=void 0;var Or=Oe(),zy;(function(t){t.Relative="relative"})(zy=Ve.TokenFormat||(Ve.TokenFormat={}));var Ky;(function(t){t.method="textDocument/semanticTokens",t.type=new Or.RegistrationType(t.method)})(Ky=Ve.SemanticTokensRegistrationType||(Ve.SemanticTokensRegistrationType={}));var Xy;(function(t){t.method="textDocument/semanticTokens/full",t.type=new Or.ProtocolRequestType(t.method)})(Xy=Ve.SemanticTokensRequest||(Ve.SemanticTokensRequest={}));var Yy;(function(t){t.method="textDocument/semanticTokens/full/delta",t.type=new Or.ProtocolRequestType(t.method)})(Yy=Ve.SemanticTokensDeltaRequest||(Ve.SemanticTokensDeltaRequest={}));var Qy;(function(t){t.method="textDocument/semanticTokens/range",t.type=new Or.ProtocolRequestType(t.method)})(Qy=Ve.SemanticTokensRangeRequest||(Ve.SemanticTokensRangeRequest={}));var Jy;(function(t){t.method="workspace/semanticTokens/refresh",t.type=new Or.ProtocolRequestType0(t.method)})(Jy=Ve.SemanticTokensRefreshRequest||(Ve.SemanticTokensRefreshRequest={}))});var Al=P(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.ShowDocumentRequest=void 0;var Zy=Oe(),eR;(function(t){t.method="window/showDocument",t.type=new Zy.ProtocolRequestType(t.method)})(eR=Ir.ShowDocumentRequest||(Ir.ShowDocumentRequest={}))});var xl=P(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.LinkedEditingRangeRequest=void 0;var tR=Oe(),nR;(function(t){t.method="textDocument/linkedEditingRange",t.type=new tR.ProtocolRequestType(t.method)})(nR=Fr.LinkedEditingRangeRequest||(Fr.LinkedEditingRangeRequest={}))});var ql=P(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.WillDeleteFilesRequest=Ie.DidDeleteFilesNotification=Ie.DidRenameFilesNotification=Ie.WillRenameFilesRequest=Ie.DidCreateFilesNotification=Ie.WillCreateFilesRequest=Ie.FileOperationPatternKind=void 0;var ir=Oe(),rR;(function(t){t.file="file",t.folder="folder"})(rR=Ie.FileOperationPatternKind||(Ie.FileOperationPatternKind={}));var iR;(function(t){t.method="workspace/willCreateFiles",t.type=new ir.ProtocolRequestType(t.method)})(iR=Ie.WillCreateFilesRequest||(Ie.WillCreateFilesRequest={}));var sR;(function(t){t.method="workspace/didCreateFiles",t.type=new ir.ProtocolNotificationType(t.method)})(sR=Ie.DidCreateFilesNotification||(Ie.DidCreateFilesNotification={}));var oR;(function(t){t.method="workspace/willRenameFiles",t.type=new ir.ProtocolRequestType(t.method)})(oR=Ie.WillRenameFilesRequest||(Ie.WillRenameFilesRequest={}));var aR;(function(t){t.method="workspace/didRenameFiles",t.type=new ir.ProtocolNotificationType(t.method)})(aR=Ie.DidRenameFilesNotification||(Ie.DidRenameFilesNotification={}));var cR;(function(t){t.method="workspace/didDeleteFiles",t.type=new ir.ProtocolNotificationType(t.method)})(cR=Ie.DidDeleteFilesNotification||(Ie.DidDeleteFilesNotification={}));var uR;(function(t){t.method="workspace/willDeleteFiles",t.type=new ir.ProtocolRequestType(t.method)})(uR=Ie.WillDeleteFilesRequest||(Ie.WillDeleteFilesRequest={}))});var kl=P(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.MonikerRequest=Ut.MonikerKind=Ut.UniquenessLevel=void 0;var lR=Oe(),fR;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(fR=Ut.UniquenessLevel||(Ut.UniquenessLevel={}));var dR;(function(t){t.$import="import",t.$export="export",t.local="local"})(dR=Ut.MonikerKind||(Ut.MonikerKind={}));var hR;(function(t){t.method="textDocument/moniker",t.type=new lR.ProtocolRequestType(t.method)})(hR=Ut.MonikerRequest||(Ut.MonikerRequest={}))});var Nl=P(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.TypeHierarchySubtypesRequest=Bt.TypeHierarchySupertypesRequest=Bt.TypeHierarchyPrepareRequest=void 0;var va=Oe(),pR;(function(t){t.method="textDocument/prepareTypeHierarchy",t.type=new va.ProtocolRequestType(t.method)})(pR=Bt.TypeHierarchyPrepareRequest||(Bt.TypeHierarchyPrepareRequest={}));var mR;(function(t){t.method="typeHierarchy/supertypes",t.type=new va.ProtocolRequestType(t.method)})(mR=Bt.TypeHierarchySupertypesRequest||(Bt.TypeHierarchySupertypesRequest={}));var gR;(function(t){t.method="typeHierarchy/subtypes",t.type=new va.ProtocolRequestType(t.method)})(gR=Bt.TypeHierarchySubtypesRequest||(Bt.TypeHierarchySubtypesRequest={}))});var Il=P(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.InlineValueRefreshRequest=Pn.InlineValueRequest=void 0;var Ol=Oe(),yR;(function(t){t.method="textDocument/inlineValue",t.type=new Ol.ProtocolRequestType(t.method)})(yR=Pn.InlineValueRequest||(Pn.InlineValueRequest={}));var RR;(function(t){t.method="workspace/inlineValue/refresh",t.type=new Ol.ProtocolRequestType0(t.method)})(RR=Pn.InlineValueRefreshRequest||(Pn.InlineValueRefreshRequest={}))});var Fl=P(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.InlayHintRefreshRequest=Vt.InlayHintResolveRequest=Vt.InlayHintRequest=void 0;var Ea=Oe(),_R;(function(t){t.method="textDocument/inlayHint",t.type=new Ea.ProtocolRequestType(t.method)})(_R=Vt.InlayHintRequest||(Vt.InlayHintRequest={}));var bR;(function(t){t.method="inlayHint/resolve",t.type=new Ea.ProtocolRequestType(t.method)})(bR=Vt.InlayHintResolveRequest||(Vt.InlayHintResolveRequest={}));var vR;(function(t){t.method="workspace/inlayHint/refresh",t.type=new Ea.ProtocolRequestType0(t.method)})(vR=Vt.InlayHintRefreshRequest||(Vt.InlayHintRefreshRequest={}))});var jl=P(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.DiagnosticRefreshRequest=rt.WorkspaceDiagnosticRequest=rt.DocumentDiagnosticRequest=rt.DocumentDiagnosticReportKind=rt.DiagnosticServerCancellationData=void 0;var Ll=jn(),ER=ji(),wa=Oe(),wR;(function(t){function e(n){let r=n;return r&&ER.boolean(r.retriggerRequest)}t.is=e})(wR=rt.DiagnosticServerCancellationData||(rt.DiagnosticServerCancellationData={}));var CR;(function(t){t.Full="full",t.Unchanged="unchanged"})(CR=rt.DocumentDiagnosticReportKind||(rt.DocumentDiagnosticReportKind={}));var PR;(function(t){t.method="textDocument/diagnostic",t.type=new wa.ProtocolRequestType(t.method),t.partialResult=new Ll.ProgressType})(PR=rt.DocumentDiagnosticRequest||(rt.DocumentDiagnosticRequest={}));var DR;(function(t){t.method="workspace/diagnostic",t.type=new wa.ProtocolRequestType(t.method),t.partialResult=new Ll.ProgressType})(DR=rt.WorkspaceDiagnosticRequest||(rt.WorkspaceDiagnosticRequest={}));var SR;(function(t){t.method="workspace/diagnostic/refresh",t.type=new wa.ProtocolRequestType0(t.method)})(SR=rt.DiagnosticRefreshRequest||(rt.DiagnosticRefreshRequest={}))});var Hl=P(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.DidCloseNotebookDocumentNotification=he.DidSaveNotebookDocumentNotification=he.DidChangeNotebookDocumentNotification=he.NotebookCellArrayChange=he.DidOpenNotebookDocumentNotification=he.NotebookDocumentSyncRegistrationType=he.NotebookDocument=he.NotebookCell=he.ExecutionSummary=he.NotebookCellKind=void 0;var Lr=Sr(),Gt=ji(),jr=Oe(),Ml;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(Ml=he.NotebookCellKind||(he.NotebookCellKind={}));var $l;(function(t){function e(i,s){let o={executionOrder:i};return(s===!0||s===!1)&&(o.success=s),o}t.create=e;function n(i){let s=i;return Gt.objectLiteral(s)&&Lr.uinteger.is(s.executionOrder)&&(s.success===void 0||Gt.boolean(s.success))}t.is=n;function r(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=r})($l=he.ExecutionSummary||(he.ExecutionSummary={}));var Ca;(function(t){function e(s,o){return{kind:s,document:o}}t.create=e;function n(s){let o=s;return Gt.objectLiteral(o)&&Ml.is(o.kind)&&Lr.DocumentUri.is(o.document)&&(o.metadata===void 0||Gt.objectLiteral(o.metadata))}t.is=n;function r(s,o){let a=new Set;return s.document!==o.document&&a.add("document"),s.kind!==o.kind&&a.add("kind"),s.executionSummary!==o.executionSummary&&a.add("executionSummary"),(s.metadata!==void 0||o.metadata!==void 0)&&!i(s.metadata,o.metadata)&&a.add("metadata"),(s.executionSummary!==void 0||o.executionSummary!==void 0)&&!$l.equals(s.executionSummary,o.executionSummary)&&a.add("executionSummary"),a}t.diff=r;function i(s,o){if(s===o)return!0;if(s==null||o===null||o===void 0||typeof s!=typeof o||typeof s!="object")return!1;let a=Array.isArray(s),c=Array.isArray(o);if(a!==c)return!1;if(a&&c){if(s.length!==o.length)return!1;for(let d=0;d<s.length;d++)if(!i(s[d],o[d]))return!1}if(Gt.objectLiteral(s)&&Gt.objectLiteral(o)){let d=Object.keys(s),p=Object.keys(o);if(d.length!==p.length||(d.sort(),p.sort(),!i(d,p)))return!1;for(let m=0;m<d.length;m++){let g=d[m];if(!i(s[g],o[g]))return!1}}return!0}})(Ca=he.NotebookCell||(he.NotebookCell={}));var TR;(function(t){function e(r,i,s,o){return{uri:r,notebookType:i,version:s,cells:o}}t.create=e;function n(r){let i=r;return Gt.objectLiteral(i)&&Gt.string(i.uri)&&Lr.integer.is(i.version)&&Gt.typedArray(i.cells,Ca.is)}t.is=n})(TR=he.NotebookDocument||(he.NotebookDocument={}));var AR;(function(t){t.method="notebookDocument/sync",t.type=new jr.RegistrationType(t.method)})(AR=he.NotebookDocumentSyncRegistrationType||(he.NotebookDocumentSyncRegistrationType={}));var xR;(function(t){t.method="notebookDocument/didOpen",t.type=new jr.ProtocolNotificationType(t.method)})(xR=he.DidOpenNotebookDocumentNotification||(he.DidOpenNotebookDocumentNotification={}));var qR;(function(t){function e(r){let i=r;return Gt.objectLiteral(i)&&Lr.uinteger.is(i.start)&&Lr.uinteger.is(i.deleteCount)&&(i.cells===void 0||Gt.typedArray(i.cells,Ca.is))}t.is=e;function n(r,i,s){let o={start:r,deleteCount:i};return s!==void 0&&(o.cells=s),o}t.create=n})(qR=he.NotebookCellArrayChange||(he.NotebookCellArrayChange={}));var kR;(function(t){t.method="notebookDocument/didChange",t.type=new jr.ProtocolNotificationType(t.method)})(kR=he.DidChangeNotebookDocumentNotification||(he.DidChangeNotebookDocumentNotification={}));var NR;(function(t){t.method="notebookDocument/didSave",t.type=new jr.ProtocolNotificationType(t.method)})(NR=he.DidSaveNotebookDocumentNotification||(he.DidSaveNotebookDocumentNotification={}));var OR;(function(t){t.method="notebookDocument/didClose",t.type=new jr.ProtocolNotificationType(t.method)})(OR=he.DidCloseNotebookDocumentNotification||(he.DidCloseNotebookDocumentNotification={}))});var Yl=P(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.WorkspaceSymbolRequest=f.CodeActionResolveRequest=f.CodeActionRequest=f.DocumentSymbolRequest=f.DocumentHighlightRequest=f.ReferencesRequest=f.DefinitionRequest=f.SignatureHelpRequest=f.SignatureHelpTriggerKind=f.HoverRequest=f.CompletionResolveRequest=f.CompletionRequest=f.CompletionTriggerKind=f.PublishDiagnosticsNotification=f.WatchKind=f.RelativePattern=f.FileChangeType=f.DidChangeWatchedFilesNotification=f.WillSaveTextDocumentWaitUntilRequest=f.WillSaveTextDocumentNotification=f.TextDocumentSaveReason=f.DidSaveTextDocumentNotification=f.DidCloseTextDocumentNotification=f.DidChangeTextDocumentNotification=f.TextDocumentContentChangeEvent=f.DidOpenTextDocumentNotification=f.TextDocumentSyncKind=f.TelemetryEventNotification=f.LogMessageNotification=f.ShowMessageRequest=f.ShowMessageNotification=f.MessageType=f.DidChangeConfigurationNotification=f.ExitNotification=f.ShutdownRequest=f.InitializedNotification=f.InitializeErrorCodes=f.InitializeRequest=f.WorkDoneProgressOptions=f.TextDocumentRegistrationOptions=f.StaticRegistrationOptions=f.PositionEncodingKind=f.FailureHandlingKind=f.ResourceOperationKind=f.UnregistrationRequest=f.RegistrationRequest=f.DocumentSelector=f.NotebookCellTextDocumentFilter=f.NotebookDocumentFilter=f.TextDocumentFilter=void 0;f.TypeHierarchySubtypesRequest=f.TypeHierarchyPrepareRequest=f.MonikerRequest=f.MonikerKind=f.UniquenessLevel=f.WillDeleteFilesRequest=f.DidDeleteFilesNotification=f.WillRenameFilesRequest=f.DidRenameFilesNotification=f.WillCreateFilesRequest=f.DidCreateFilesNotification=f.FileOperationPatternKind=f.LinkedEditingRangeRequest=f.ShowDocumentRequest=f.SemanticTokensRegistrationType=f.SemanticTokensRefreshRequest=f.SemanticTokensRangeRequest=f.SemanticTokensDeltaRequest=f.SemanticTokensRequest=f.TokenFormat=f.CallHierarchyPrepareRequest=f.CallHierarchyOutgoingCallsRequest=f.CallHierarchyIncomingCallsRequest=f.WorkDoneProgressCancelNotification=f.WorkDoneProgressCreateRequest=f.WorkDoneProgress=f.SelectionRangeRequest=f.DeclarationRequest=f.FoldingRangeRequest=f.ColorPresentationRequest=f.DocumentColorRequest=f.ConfigurationRequest=f.DidChangeWorkspaceFoldersNotification=f.WorkspaceFoldersRequest=f.TypeDefinitionRequest=f.ImplementationRequest=f.ApplyWorkspaceEditRequest=f.ExecuteCommandRequest=f.PrepareRenameRequest=f.RenameRequest=f.PrepareSupportDefaultBehavior=f.DocumentOnTypeFormattingRequest=f.DocumentRangeFormattingRequest=f.DocumentFormattingRequest=f.DocumentLinkResolveRequest=f.DocumentLinkRequest=f.CodeLensRefreshRequest=f.CodeLensResolveRequest=f.CodeLensRequest=f.WorkspaceSymbolResolveRequest=void 0;f.DidCloseNotebookDocumentNotification=f.DidSaveNotebookDocumentNotification=f.DidChangeNotebookDocumentNotification=f.NotebookCellArrayChange=f.DidOpenNotebookDocumentNotification=f.NotebookDocumentSyncRegistrationType=f.NotebookDocument=f.NotebookCell=f.ExecutionSummary=f.NotebookCellKind=f.DiagnosticRefreshRequest=f.WorkspaceDiagnosticRequest=f.DocumentDiagnosticRequest=f.DocumentDiagnosticReportKind=f.DiagnosticServerCancellationData=f.InlayHintRefreshRequest=f.InlayHintResolveRequest=f.InlayHintRequest=f.InlineValueRefreshRequest=f.InlineValueRequest=f.TypeHierarchySupertypesRequest=void 0;var ee=Oe(),Wl=Sr(),it=ji(),IR=ml();Object.defineProperty(f,"ImplementationRequest",{enumerable:!0,get:function(){return IR.ImplementationRequest}});var FR=gl();Object.defineProperty(f,"TypeDefinitionRequest",{enumerable:!0,get:function(){return FR.TypeDefinitionRequest}});var Ul=Rl();Object.defineProperty(f,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return Ul.WorkspaceFoldersRequest}});Object.defineProperty(f,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return Ul.DidChangeWorkspaceFoldersNotification}});var LR=_l();Object.defineProperty(f,"ConfigurationRequest",{enumerable:!0,get:function(){return LR.ConfigurationRequest}});var Bl=vl();Object.defineProperty(f,"DocumentColorRequest",{enumerable:!0,get:function(){return Bl.DocumentColorRequest}});Object.defineProperty(f,"ColorPresentationRequest",{enumerable:!0,get:function(){return Bl.ColorPresentationRequest}});var jR=El();Object.defineProperty(f,"FoldingRangeRequest",{enumerable:!0,get:function(){return jR.FoldingRangeRequest}});var MR=wl();Object.defineProperty(f,"DeclarationRequest",{enumerable:!0,get:function(){return MR.DeclarationRequest}});var $R=Cl();Object.defineProperty(f,"SelectionRangeRequest",{enumerable:!0,get:function(){return $R.SelectionRangeRequest}});var Pa=Dl();Object.defineProperty(f,"WorkDoneProgress",{enumerable:!0,get:function(){return Pa.WorkDoneProgress}});Object.defineProperty(f,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Pa.WorkDoneProgressCreateRequest}});Object.defineProperty(f,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Pa.WorkDoneProgressCancelNotification}});var Da=Sl();Object.defineProperty(f,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return Da.CallHierarchyIncomingCallsRequest}});Object.defineProperty(f,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return Da.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(f,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return Da.CallHierarchyPrepareRequest}});var sr=Tl();Object.defineProperty(f,"TokenFormat",{enumerable:!0,get:function(){return sr.TokenFormat}});Object.defineProperty(f,"SemanticTokensRequest",{enumerable:!0,get:function(){return sr.SemanticTokensRequest}});Object.defineProperty(f,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return sr.SemanticTokensDeltaRequest}});Object.defineProperty(f,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return sr.SemanticTokensRangeRequest}});Object.defineProperty(f,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return sr.SemanticTokensRefreshRequest}});Object.defineProperty(f,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return sr.SemanticTokensRegistrationType}});var HR=Al();Object.defineProperty(f,"ShowDocumentRequest",{enumerable:!0,get:function(){return HR.ShowDocumentRequest}});var WR=xl();Object.defineProperty(f,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return WR.LinkedEditingRangeRequest}});var Mn=ql();Object.defineProperty(f,"FileOperationPatternKind",{enumerable:!0,get:function(){return Mn.FileOperationPatternKind}});Object.defineProperty(f,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Mn.DidCreateFilesNotification}});Object.defineProperty(f,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Mn.WillCreateFilesRequest}});Object.defineProperty(f,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Mn.DidRenameFilesNotification}});Object.defineProperty(f,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Mn.WillRenameFilesRequest}});Object.defineProperty(f,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Mn.DidDeleteFilesNotification}});Object.defineProperty(f,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Mn.WillDeleteFilesRequest}});var Sa=kl();Object.defineProperty(f,"UniquenessLevel",{enumerable:!0,get:function(){return Sa.UniquenessLevel}});Object.defineProperty(f,"MonikerKind",{enumerable:!0,get:function(){return Sa.MonikerKind}});Object.defineProperty(f,"MonikerRequest",{enumerable:!0,get:function(){return Sa.MonikerRequest}});var Ta=Nl();Object.defineProperty(f,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Ta.TypeHierarchyPrepareRequest}});Object.defineProperty(f,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Ta.TypeHierarchySubtypesRequest}});Object.defineProperty(f,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Ta.TypeHierarchySupertypesRequest}});var Vl=Il();Object.defineProperty(f,"InlineValueRequest",{enumerable:!0,get:function(){return Vl.InlineValueRequest}});Object.defineProperty(f,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Vl.InlineValueRefreshRequest}});var Aa=Fl();Object.defineProperty(f,"InlayHintRequest",{enumerable:!0,get:function(){return Aa.InlayHintRequest}});Object.defineProperty(f,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Aa.InlayHintResolveRequest}});Object.defineProperty(f,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Aa.InlayHintRefreshRequest}});var Mr=jl();Object.defineProperty(f,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Mr.DiagnosticServerCancellationData}});Object.defineProperty(f,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Mr.DocumentDiagnosticReportKind}});Object.defineProperty(f,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Mr.DocumentDiagnosticRequest}});Object.defineProperty(f,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Mr.WorkspaceDiagnosticRequest}});Object.defineProperty(f,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Mr.DiagnosticRefreshRequest}});var Jt=Hl();Object.defineProperty(f,"NotebookCellKind",{enumerable:!0,get:function(){return Jt.NotebookCellKind}});Object.defineProperty(f,"ExecutionSummary",{enumerable:!0,get:function(){return Jt.ExecutionSummary}});Object.defineProperty(f,"NotebookCell",{enumerable:!0,get:function(){return Jt.NotebookCell}});Object.defineProperty(f,"NotebookDocument",{enumerable:!0,get:function(){return Jt.NotebookDocument}});Object.defineProperty(f,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Jt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(f,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Jt.DidOpenNotebookDocumentNotification}});Object.defineProperty(f,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Jt.NotebookCellArrayChange}});Object.defineProperty(f,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Jt.DidChangeNotebookDocumentNotification}});Object.defineProperty(f,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Jt.DidSaveNotebookDocumentNotification}});Object.defineProperty(f,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Jt.DidCloseNotebookDocumentNotification}});var Gl;(function(t){function e(n){let r=n;return it.string(r.language)||it.string(r.scheme)||it.string(r.pattern)}t.is=e})(Gl=f.TextDocumentFilter||(f.TextDocumentFilter={}));var zl;(function(t){function e(n){let r=n;return it.objectLiteral(r)&&(it.string(r.notebookType)||it.string(r.scheme)||it.string(r.pattern))}t.is=e})(zl=f.NotebookDocumentFilter||(f.NotebookDocumentFilter={}));var Kl;(function(t){function e(n){let r=n;return it.objectLiteral(r)&&(it.string(r.notebook)||zl.is(r.notebook))&&(r.language===void 0||it.string(r.language))}t.is=e})(Kl=f.NotebookCellTextDocumentFilter||(f.NotebookCellTextDocumentFilter={}));var Xl;(function(t){function e(n){if(!Array.isArray(n))return!1;for(let r of n)if(!it.string(r)&&!Gl.is(r)&&!Kl.is(r))return!1;return!0}t.is=e})(Xl=f.DocumentSelector||(f.DocumentSelector={}));var UR;(function(t){t.type=new ee.ProtocolRequestType("client/registerCapability")})(UR=f.RegistrationRequest||(f.RegistrationRequest={}));var BR;(function(t){t.type=new ee.ProtocolRequestType("client/unregisterCapability")})(BR=f.UnregistrationRequest||(f.UnregistrationRequest={}));var VR;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(VR=f.ResourceOperationKind||(f.ResourceOperationKind={}));var GR;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(GR=f.FailureHandlingKind||(f.FailureHandlingKind={}));var zR;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(zR=f.PositionEncodingKind||(f.PositionEncodingKind={}));var KR;(function(t){function e(n){let r=n;return r&&it.string(r.id)&&r.id.length>0}t.hasId=e})(KR=f.StaticRegistrationOptions||(f.StaticRegistrationOptions={}));var XR;(function(t){function e(n){let r=n;return r&&(r.documentSelector===null||Xl.is(r.documentSelector))}t.is=e})(XR=f.TextDocumentRegistrationOptions||(f.TextDocumentRegistrationOptions={}));var YR;(function(t){function e(r){let i=r;return it.objectLiteral(i)&&(i.workDoneProgress===void 0||it.boolean(i.workDoneProgress))}t.is=e;function n(r){let i=r;return i&&it.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=n})(YR=f.WorkDoneProgressOptions||(f.WorkDoneProgressOptions={}));var QR;(function(t){t.type=new ee.ProtocolRequestType("initialize")})(QR=f.InitializeRequest||(f.InitializeRequest={}));var JR;(function(t){t.unknownProtocolVersion=1})(JR=f.InitializeErrorCodes||(f.InitializeErrorCodes={}));var ZR;(function(t){t.type=new ee.ProtocolNotificationType("initialized")})(ZR=f.InitializedNotification||(f.InitializedNotification={}));var e_;(function(t){t.type=new ee.ProtocolRequestType0("shutdown")})(e_=f.ShutdownRequest||(f.ShutdownRequest={}));var t_;(function(t){t.type=new ee.ProtocolNotificationType0("exit")})(t_=f.ExitNotification||(f.ExitNotification={}));var n_;(function(t){t.type=new ee.ProtocolNotificationType("workspace/didChangeConfiguration")})(n_=f.DidChangeConfigurationNotification||(f.DidChangeConfigurationNotification={}));var r_;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4})(r_=f.MessageType||(f.MessageType={}));var i_;(function(t){t.type=new ee.ProtocolNotificationType("window/showMessage")})(i_=f.ShowMessageNotification||(f.ShowMessageNotification={}));var s_;(function(t){t.type=new ee.ProtocolRequestType("window/showMessageRequest")})(s_=f.ShowMessageRequest||(f.ShowMessageRequest={}));var o_;(function(t){t.type=new ee.ProtocolNotificationType("window/logMessage")})(o_=f.LogMessageNotification||(f.LogMessageNotification={}));var a_;(function(t){t.type=new ee.ProtocolNotificationType("telemetry/event")})(a_=f.TelemetryEventNotification||(f.TelemetryEventNotification={}));var c_;(function(t){t.None=0,t.Full=1,t.Incremental=2})(c_=f.TextDocumentSyncKind||(f.TextDocumentSyncKind={}));var u_;(function(t){t.method="textDocument/didOpen",t.type=new ee.ProtocolNotificationType(t.method)})(u_=f.DidOpenTextDocumentNotification||(f.DidOpenTextDocumentNotification={}));var l_;(function(t){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=n})(l_=f.TextDocumentContentChangeEvent||(f.TextDocumentContentChangeEvent={}));var f_;(function(t){t.method="textDocument/didChange",t.type=new ee.ProtocolNotificationType(t.method)})(f_=f.DidChangeTextDocumentNotification||(f.DidChangeTextDocumentNotification={}));var d_;(function(t){t.method="textDocument/didClose",t.type=new ee.ProtocolNotificationType(t.method)})(d_=f.DidCloseTextDocumentNotification||(f.DidCloseTextDocumentNotification={}));var h_;(function(t){t.method="textDocument/didSave",t.type=new ee.ProtocolNotificationType(t.method)})(h_=f.DidSaveTextDocumentNotification||(f.DidSaveTextDocumentNotification={}));var p_;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(p_=f.TextDocumentSaveReason||(f.TextDocumentSaveReason={}));var m_;(function(t){t.method="textDocument/willSave",t.type=new ee.ProtocolNotificationType(t.method)})(m_=f.WillSaveTextDocumentNotification||(f.WillSaveTextDocumentNotification={}));var g_;(function(t){t.method="textDocument/willSaveWaitUntil",t.type=new ee.ProtocolRequestType(t.method)})(g_=f.WillSaveTextDocumentWaitUntilRequest||(f.WillSaveTextDocumentWaitUntilRequest={}));var y_;(function(t){t.type=new ee.ProtocolNotificationType("workspace/didChangeWatchedFiles")})(y_=f.DidChangeWatchedFilesNotification||(f.DidChangeWatchedFilesNotification={}));var R_;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(R_=f.FileChangeType||(f.FileChangeType={}));var __;(function(t){function e(n){let r=n;return it.objectLiteral(r)&&(Wl.URI.is(r.baseUri)||Wl.WorkspaceFolder.is(r.baseUri))&&it.string(r.pattern)}t.is=e})(__=f.RelativePattern||(f.RelativePattern={}));var b_;(function(t){t.Create=1,t.Change=2,t.Delete=4})(b_=f.WatchKind||(f.WatchKind={}));var v_;(function(t){t.type=new ee.ProtocolNotificationType("textDocument/publishDiagnostics")})(v_=f.PublishDiagnosticsNotification||(f.PublishDiagnosticsNotification={}));var E_;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(E_=f.CompletionTriggerKind||(f.CompletionTriggerKind={}));var w_;(function(t){t.method="textDocument/completion",t.type=new ee.ProtocolRequestType(t.method)})(w_=f.CompletionRequest||(f.CompletionRequest={}));var C_;(function(t){t.method="completionItem/resolve",t.type=new ee.ProtocolRequestType(t.method)})(C_=f.CompletionResolveRequest||(f.CompletionResolveRequest={}));var P_;(function(t){t.method="textDocument/hover",t.type=new ee.ProtocolRequestType(t.method)})(P_=f.HoverRequest||(f.HoverRequest={}));var D_;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(D_=f.SignatureHelpTriggerKind||(f.SignatureHelpTriggerKind={}));var S_;(function(t){t.method="textDocument/signatureHelp",t.type=new ee.ProtocolRequestType(t.method)})(S_=f.SignatureHelpRequest||(f.SignatureHelpRequest={}));var T_;(function(t){t.method="textDocument/definition",t.type=new ee.ProtocolRequestType(t.method)})(T_=f.DefinitionRequest||(f.DefinitionRequest={}));var A_;(function(t){t.method="textDocument/references",t.type=new ee.ProtocolRequestType(t.method)})(A_=f.ReferencesRequest||(f.ReferencesRequest={}));var x_;(function(t){t.method="textDocument/documentHighlight",t.type=new ee.ProtocolRequestType(t.method)})(x_=f.DocumentHighlightRequest||(f.DocumentHighlightRequest={}));var q_;(function(t){t.method="textDocument/documentSymbol",t.type=new ee.ProtocolRequestType(t.method)})(q_=f.DocumentSymbolRequest||(f.DocumentSymbolRequest={}));var k_;(function(t){t.method="textDocument/codeAction",t.type=new ee.ProtocolRequestType(t.method)})(k_=f.CodeActionRequest||(f.CodeActionRequest={}));var N_;(function(t){t.method="codeAction/resolve",t.type=new ee.ProtocolRequestType(t.method)})(N_=f.CodeActionResolveRequest||(f.CodeActionResolveRequest={}));var O_;(function(t){t.method="workspace/symbol",t.type=new ee.ProtocolRequestType(t.method)})(O_=f.WorkspaceSymbolRequest||(f.WorkspaceSymbolRequest={}));var I_;(function(t){t.method="workspaceSymbol/resolve",t.type=new ee.ProtocolRequestType(t.method)})(I_=f.WorkspaceSymbolResolveRequest||(f.WorkspaceSymbolResolveRequest={}));var F_;(function(t){t.method="textDocument/codeLens",t.type=new ee.ProtocolRequestType(t.method)})(F_=f.CodeLensRequest||(f.CodeLensRequest={}));var L_;(function(t){t.method="codeLens/resolve",t.type=new ee.ProtocolRequestType(t.method)})(L_=f.CodeLensResolveRequest||(f.CodeLensResolveRequest={}));var j_;(function(t){t.method="workspace/codeLens/refresh",t.type=new ee.ProtocolRequestType0(t.method)})(j_=f.CodeLensRefreshRequest||(f.CodeLensRefreshRequest={}));var M_;(function(t){t.method="textDocument/documentLink",t.type=new ee.ProtocolRequestType(t.method)})(M_=f.DocumentLinkRequest||(f.DocumentLinkRequest={}));var $_;(function(t){t.method="documentLink/resolve",t.type=new ee.ProtocolRequestType(t.method)})($_=f.DocumentLinkResolveRequest||(f.DocumentLinkResolveRequest={}));var H_;(function(t){t.method="textDocument/formatting",t.type=new ee.ProtocolRequestType(t.method)})(H_=f.DocumentFormattingRequest||(f.DocumentFormattingRequest={}));var W_;(function(t){t.method="textDocument/rangeFormatting",t.type=new ee.ProtocolRequestType(t.method)})(W_=f.DocumentRangeFormattingRequest||(f.DocumentRangeFormattingRequest={}));var U_;(function(t){t.method="textDocument/onTypeFormatting",t.type=new ee.ProtocolRequestType(t.method)})(U_=f.DocumentOnTypeFormattingRequest||(f.DocumentOnTypeFormattingRequest={}));var B_;(function(t){t.Identifier=1})(B_=f.PrepareSupportDefaultBehavior||(f.PrepareSupportDefaultBehavior={}));var V_;(function(t){t.method="textDocument/rename",t.type=new ee.ProtocolRequestType(t.method)})(V_=f.RenameRequest||(f.RenameRequest={}));var G_;(function(t){t.method="textDocument/prepareRename",t.type=new ee.ProtocolRequestType(t.method)})(G_=f.PrepareRenameRequest||(f.PrepareRenameRequest={}));var z_;(function(t){t.type=new ee.ProtocolRequestType("workspace/executeCommand")})(z_=f.ExecuteCommandRequest||(f.ExecuteCommandRequest={}));var K_;(function(t){t.type=new ee.ProtocolRequestType("workspace/applyEdit")})(K_=f.ApplyWorkspaceEditRequest||(f.ApplyWorkspaceEditRequest={}))});var Jl=P(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.createProtocolConnection=void 0;var Ql=jn();function X_(t,e,n,r){return Ql.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Ql.createMessageConnection)(t,e,n,r)}Mi.createProtocolConnection=X_});var Zl=P(ht=>{"use strict";var Y_=ht&&ht.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$i=ht&&ht.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Y_(e,t,n)};Object.defineProperty(ht,"__esModule",{value:!0});ht.LSPErrorCodes=ht.createProtocolConnection=void 0;$i(jn(),ht);$i(Sr(),ht);$i(Oe(),ht);$i(Yl(),ht);var Q_=Jl();Object.defineProperty(ht,"createProtocolConnection",{enumerable:!0,get:function(){return Q_.createProtocolConnection}});var J_;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(J_=ht.LSPErrorCodes||(ht.LSPErrorCodes={}))});var Fe=P(Zt=>{"use strict";var Z_=Zt&&Zt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ef=Zt&&Zt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Z_(e,t,n)};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.createProtocolConnection=void 0;var eb=Fi();ef(Fi(),Zt);ef(Zl(),Zt);function tb(t,e,n,r){return(0,eb.createMessageConnection)(t,e,n,r)}Zt.createProtocolConnection=tb});var Hi=P(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.thenable=Ge.typedArray=Ge.stringArray=Ge.array=Ge.func=Ge.error=Ge.number=Ge.string=Ge.boolean=void 0;function nb(t){return t===!0||t===!1}Ge.boolean=nb;function tf(t){return typeof t=="string"||t instanceof String}Ge.string=tf;function rb(t){return typeof t=="number"||t instanceof Number}Ge.number=rb;function ib(t){return t instanceof Error}Ge.error=ib;function nf(t){return typeof t=="function"}Ge.func=nf;function rf(t){return Array.isArray(t)}Ge.array=rf;function sb(t){return rf(t)&&t.every(e=>tf(e))}Ge.stringArray=sb;function ob(t,e){return Array.isArray(t)&&t.every(e)}Ge.typedArray=ob;function ab(t){return t&&nf(t.then)}Ge.thenable=ab});var xa=P(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.generateUuid=Dt.parse=Dt.isUUID=Dt.v4=Dt.empty=void 0;var $r=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Hr=class t extends $r{constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}};Hr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Hr._timeHighBits=["8","9","a","b"];Dt.empty=new $r("00000000-0000-0000-0000-000000000000");function sf(){return new Hr}Dt.v4=sf;var cb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function of(t){return cb.test(t)}Dt.isUUID=of;function ub(t){if(!of(t))throw new Error("invalid uuid");return new $r(t)}Dt.parse=ub;function lb(){return sf().asHex()}Dt.generateUuid=lb});var af=P(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.attachPartialResult=Sn.ProgressFeature=Sn.attachWorkDone=void 0;var Dn=Fe(),fb=xa(),$n=class t{constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let s={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(Dn.WorkDoneProgress.type,this._token,s)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(Dn.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(Dn.WorkDoneProgress.type,this._token,{kind:"end"})}};$n.Instances=new Map;var Wi=class extends $n{constructor(e,n){super(e,n),this._source=new Dn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Wr=class{constructor(){}begin(){}report(){}done(){}},Ui=class extends Wr{constructor(){super(),this._source=new Dn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function db(t,e){if(e===void 0||e.workDoneToken===void 0)return new Wr;let n=e.workDoneToken;return delete e.workDoneToken,new $n(t,n)}Sn.attachWorkDone=db;var hb=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Dn.WorkDoneProgressCancelNotification.type,n=>{let r=$n.Instances.get(n.token);(r instanceof Wi||r instanceof Ui)&&r.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new Wr:new $n(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,fb.generateUuid)();return this.connection.sendRequest(Dn.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new Wi(this.connection,e))}else return Promise.resolve(new Ui)}};Sn.ProgressFeature=hb;var qa;(function(t){t.type=new Dn.ProgressType})(qa||(qa={}));var ka=class{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(qa.type,this._token,e)}};function pb(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new ka(t,n)}Sn.attachPartialResult=pb});var cf=P(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.ConfigurationFeature=void 0;var mb=Fe(),gb=Hi(),yb=t=>class extends t{getConfiguration(e){return e?gb.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(mb.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};Bi.ConfigurationFeature=yb});var uf=P(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.WorkspaceFoldersFeature=void 0;var Vi=Fe(),Rb=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Vi.Emitter,this.connection.onNotification(Vi.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let n=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Vi.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Vi.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Gi.WorkspaceFoldersFeature=Rb});var lf=P(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.CallHierarchyFeature=void 0;var Na=Fe(),_b=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(Na.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=Na.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=Na.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zi.CallHierarchyFeature=_b});var Ia=P(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.SemanticTokensBuilder=Tn.SemanticTokensDiff=Tn.SemanticTokensFeature=void 0;var Ki=Fe(),bb=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ki.SemanticTokensRefreshRequest.type),on:e=>{let n=Ki.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=Ki.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=Ki.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Tn.SemanticTokensFeature=bb;var Xi=class{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,s=n-1;for(;i>=r&&s>=r&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i<r||s<r)&&(i++,s++);let o=i-r+1,a=this.modifiedSequence.slice(r,s+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:o-1}]:[{start:r,deleteCount:o,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};Tn.SemanticTokensDiff=Xi;var Oa=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,n,r,i,s){let o=e,a=n;this._dataLen>0&&(o-=this._prevLine,o===0&&(a-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=a,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new Xi(this._prevData,this._data).computeDiff()}:this.build()}};Tn.SemanticTokensBuilder=Oa});var ff=P(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.ShowDocumentFeature=void 0;var vb=Fe(),Eb=t=>class extends t{showDocument(e){return this.connection.sendRequest(vb.ShowDocumentRequest.type,e)}};Yi.ShowDocumentFeature=Eb});var df=P(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.FileOperationsFeature=void 0;var or=Fe(),wb=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(or.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(or.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(or.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(or.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(or.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(or.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};Qi.FileOperationsFeature=wb});var hf=P(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.LinkedEditingRangeFeature=void 0;var Cb=Fe(),Pb=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(Cb.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};Ji.LinkedEditingRangeFeature=Pb});var pf=P(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.TypeHierarchyFeature=void 0;var Fa=Fe(),Db=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(Fa.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=Fa.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=Fa.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zi.TypeHierarchyFeature=Db});var gf=P(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.InlineValueFeature=void 0;var mf=Fe(),Sb=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(mf.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(mf.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};es.InlineValueFeature=Sb});var yf=P(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.InlayHintFeature=void 0;var La=Fe(),Tb=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(La.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(La.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(La.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};ts.InlayHintFeature=Tb});var Rf=P(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.DiagnosticFeature=void 0;var Ur=Fe(),Ab=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ur.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(Ur.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(Ur.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.WorkspaceDiagnosticRequest.partialResult,n)))}}};ns.DiagnosticFeature=Ab});var Ma=P(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.TextDocuments=void 0;var Hn=Fe(),ja=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new Hn.Emitter,this._onDidOpen=new Hn.Emitter,this._onDidClose=new Hn.Emitter,this._onDidSave=new Hn.Emitter,this._onWillSave=new Hn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=Hn.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.textDocument,s=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,s);let o=Object.freeze({document:s});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,s=r.contentChanges;if(s.length===0)return;let{version:o}=i;if(o==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,s,o),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let s=this._syncedDocuments.get(r.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Hn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};rs.TextDocuments=ja});var Ha=P(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.NotebookDocuments=ar.NotebookSyncFeature=void 0;var St=Fe(),_f=Ma(),xb=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(St.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(St.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(St.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(St.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};ar.NotebookSyncFeature=xb;var is=class t{onDidOpenTextDocument(e){return this.openHandler=e,St.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,St.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,St.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};is.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var $a=class{constructor(e){e instanceof _f.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new _f.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new St.Emitter,this._onDidChange=new St.Emitter,this._onDidSave=new St.Emitter,this._onDidClose=new St.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new is,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let s of i.cellTextDocuments)n.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s===void 0)return;s.version=i.notebookDocument.version;let o=s.metadata,a=!1,c=i.change;c.metadata!==void 0&&(a=!0,s.metadata=c.metadata);let d=[],p=[],m=[],g=[];if(c.cells!==void 0){let F=c.cells;if(F.structure!==void 0){let v=F.structure.array;if(s.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),F.structure.didOpen!==void 0)for(let b of F.structure.didOpen)n.openTextDocument({textDocument:b}),d.push(b.uri);if(F.structure.didClose)for(let b of F.structure.didClose)n.closeTextDocument({textDocument:b}),p.push(b.uri)}if(F.data!==void 0){let v=new Map(F.data.map(b=>[b.document,b]));for(let b=0;b<=s.cells.length;b++){let N=v.get(s.cells[b].document);if(N!==void 0){let K=s.cells.splice(b,1,N);if(m.push({old:K[0],new:N}),v.delete(N.document),v.size===0)break}}}if(F.textContent!==void 0)for(let v of F.textContent)n.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),g.push(v.document.uri)}this.updateCellMap(s);let C={notebookDocument:s};a&&(C.metadata={old:o,new:s.metadata});let k=[];for(let F of d)k.push(this.getNotebookCell(F));let O=[];for(let F of p)O.push(this.getNotebookCell(F));let M=[];for(let F of g)M.push(this.getNotebookCell(F));(k.length>0||O.length>0||m.length>0||M.length>0)&&(C.cells={added:k,removed:O,changed:{data:m,textContent:M}}),(C.metadata!==void 0||C.cells!==void 0)&&this._onDidChange.fire(C)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let s=this.notebookDocuments.get(i.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let o of i.cellTextDocuments)n.closeTextDocument({textDocument:o});this.notebookDocuments.delete(i.notebookDocument.uri);for(let o of s.cells)this.notebookCellMap.delete(o.document)}})),St.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};ar.NotebookDocuments=$a});var bf=P(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.MonikerFeature=void 0;var qb=Fe(),kb=t=>class extends t{get moniker(){return{on:e=>{let n=qb.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ss.MonikerFeature=kb});var za=P(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.createConnection=ue.combineFeatures=ue.combineNotebooksFeatures=ue.combineLanguagesFeatures=ue.combineWorkspaceFeatures=ue.combineWindowFeatures=ue.combineClientFeatures=ue.combineTracerFeatures=ue.combineTelemetryFeatures=ue.combineConsoleFeatures=ue._NotebooksImpl=ue._LanguagesImpl=ue.BulkUnregistration=ue.BulkRegistration=ue.ErrorMessageTracker=void 0;var j=Fe(),Tt=Hi(),Ua=xa(),J=af(),Nb=cf(),Ob=uf(),Ib=lf(),Fb=Ia(),Lb=ff(),jb=df(),Mb=hf(),$b=pf(),Hb=gf(),Wb=yf(),Ub=Rf(),Bb=Ha(),Vb=bf();function Wa(t){if(t!==null)return t}var Ba=class{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};ue.ErrorMessageTracker=Ba;var os=class{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(j.MessageType.Error,e)}warn(e){this.send(j.MessageType.Warning,e)}info(e){this.send(j.MessageType.Info,e)}log(e){this.send(j.MessageType.Log,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(j.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,j.RAL)().console.error("Sending log message failed")})}},Va=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:j.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,r).then(Wa)}showWarningMessage(e,...n){let r={type:j.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,r).then(Wa)}showInformationMessage(e,...n){let r={type:j.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(j.ShowMessageRequest.type,r).then(Wa)}},vf=(0,Lb.ShowDocumentFeature)((0,J.ProgressFeature)(Va)),Gb;(function(t){function e(){return new as}t.create=e})(Gb=ue.BulkRegistration||(ue.BulkRegistration={}));var as=class{constructor(){this._registrations=[],this._registered=new Set}add(e,n){let r=Tt.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Ua.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},zb;(function(t){function e(){return new Br(void 0,[])}t.create=e})(zb=ue.BulkUnregistration||(ue.BulkUnregistration={}));var Br=class{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(j.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=Tt.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(j.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},cs=class{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof as?this.registerMany(e):e instanceof Br?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=Tt.string(n)?n:n.method,s=Ua.generateUuid(),o={registrations:[{id:s,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(j.RegistrationRequest.type,o).then(a=>(e.add({id:s,method:i}),e),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(e,n){let r=Tt.string(e)?e:e.method,i=Ua.generateUuid(),s={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(j.RegistrationRequest.type,s).then(o=>j.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),o=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(o)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(j.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(j.RegistrationRequest.type,n).then(()=>new Br(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Ga=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(j.ApplyWorkspaceEditRequest.type,r)}},Ef=(0,jb.FileOperationsFeature)((0,Ob.WorkspaceFoldersFeature)((0,Nb.ConfigurationFeature)(Ga))),us=class{constructor(){this._trace=j.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==j.Trace.Off&&this.connection.sendNotification(j.LogTraceNotification.type,{message:e,verbose:this._trace===j.Trace.Verbose?n:void 0}).catch(()=>{})}},ls=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(j.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},fs=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,J.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,J.attachPartialResult)(this.connection,n)}};ue._LanguagesImpl=fs;var wf=(0,Vb.MonikerFeature)((0,Ub.DiagnosticFeature)((0,Wb.InlayHintFeature)((0,Hb.InlineValueFeature)((0,$b.TypeHierarchyFeature)((0,Mb.LinkedEditingRangeFeature)((0,Fb.SemanticTokensFeature)((0,Ib.CallHierarchyFeature)(fs)))))))),ds=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,J.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,J.attachPartialResult)(this.connection,n)}};ue._NotebooksImpl=ds;var Cf=(0,Bb.NotebookSyncFeature)(ds);function Pf(t,e){return function(n){return e(t(n))}}ue.combineConsoleFeatures=Pf;function Df(t,e){return function(n){return e(t(n))}}ue.combineTelemetryFeatures=Df;function Sf(t,e){return function(n){return e(t(n))}}ue.combineTracerFeatures=Sf;function Tf(t,e){return function(n){return e(t(n))}}ue.combineClientFeatures=Tf;function Af(t,e){return function(n){return e(t(n))}}ue.combineWindowFeatures=Af;function xf(t,e){return function(n){return e(t(n))}}ue.combineWorkspaceFeatures=xf;function qf(t,e){return function(n){return e(t(n))}}ue.combineLanguagesFeatures=qf;function kf(t,e){return function(n){return e(t(n))}}ue.combineNotebooksFeatures=kf;function Kb(t,e){function n(i,s,o){return i&&s?o(i,s):i||s}return{__brand:"features",console:n(t.console,e.console,Pf),tracer:n(t.tracer,e.tracer,Sf),telemetry:n(t.telemetry,e.telemetry,Df),client:n(t.client,e.client,Tf),window:n(t.window,e.window,Af),workspace:n(t.workspace,e.workspace,xf),languages:n(t.languages,e.languages,qf),notebooks:n(t.notebooks,e.notebooks,kf)}}ue.combineFeatures=Kb;function Xb(t,e,n){let r=n&&n.console?new(n.console(os)):new os,i=t(r);r.rawAttach(i);let s=n&&n.tracer?new(n.tracer(us)):new us,o=n&&n.telemetry?new(n.telemetry(ls)):new ls,a=n&&n.client?new(n.client(cs)):new cs,c=n&&n.window?new(n.window(vf)):new vf,d=n&&n.workspace?new(n.workspace(Ef)):new Ef,p=n&&n.languages?new(n.languages(wf)):new wf,m=n&&n.notebooks?new(n.notebooks(Cf)):new Cf,g=[r,s,o,a,c,d,p,m];function C(v){return v instanceof Promise?v:Tt.thenable(v)?new Promise((b,N)=>{v.then(K=>b(K),K=>N(K))}):Promise.resolve(v)}let k,O,M,F={listen:()=>i.listen(),sendRequest:(v,...b)=>i.sendRequest(Tt.string(v)?v:v.method,...b),onRequest:(v,b)=>i.onRequest(v,b),sendNotification:(v,b)=>{let N=Tt.string(v)?v:v.method;return arguments.length===1?i.sendNotification(N):i.sendNotification(N,b)},onNotification:(v,b)=>i.onNotification(v,b),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:v=>(O=v,{dispose:()=>{O=void 0}}),onInitialized:v=>i.onNotification(j.InitializedNotification.type,v),onShutdown:v=>(k=v,{dispose:()=>{k=void 0}}),onExit:v=>(M=v,{dispose:()=>{M=void 0}}),get console(){return r},get telemetry(){return o},get tracer(){return s},get client(){return a},get window(){return c},get workspace(){return d},get languages(){return p},get notebooks(){return m},onDidChangeConfiguration:v=>i.onNotification(j.DidChangeConfigurationNotification.type,v),onDidChangeWatchedFiles:v=>i.onNotification(j.DidChangeWatchedFilesNotification.type,v),__textDocumentSync:void 0,onDidOpenTextDocument:v=>i.onNotification(j.DidOpenTextDocumentNotification.type,v),onDidChangeTextDocument:v=>i.onNotification(j.DidChangeTextDocumentNotification.type,v),onDidCloseTextDocument:v=>i.onNotification(j.DidCloseTextDocumentNotification.type,v),onWillSaveTextDocument:v=>i.onNotification(j.WillSaveTextDocumentNotification.type,v),onWillSaveTextDocumentWaitUntil:v=>i.onRequest(j.WillSaveTextDocumentWaitUntilRequest.type,v),onDidSaveTextDocument:v=>i.onNotification(j.DidSaveTextDocumentNotification.type,v),sendDiagnostics:v=>i.sendNotification(j.PublishDiagnosticsNotification.type,v),onHover:v=>i.onRequest(j.HoverRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),onCompletion:v=>i.onRequest(j.CompletionRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onCompletionResolve:v=>i.onRequest(j.CompletionResolveRequest.type,v),onSignatureHelp:v=>i.onRequest(j.SignatureHelpRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),onDeclaration:v=>i.onRequest(j.DeclarationRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onDefinition:v=>i.onRequest(j.DefinitionRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onTypeDefinition:v=>i.onRequest(j.TypeDefinitionRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onImplementation:v=>i.onRequest(j.ImplementationRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onReferences:v=>i.onRequest(j.ReferencesRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onDocumentHighlight:v=>i.onRequest(j.DocumentHighlightRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onDocumentSymbol:v=>i.onRequest(j.DocumentSymbolRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onWorkspaceSymbol:v=>i.onRequest(j.WorkspaceSymbolRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onWorkspaceSymbolResolve:v=>i.onRequest(j.WorkspaceSymbolResolveRequest.type,v),onCodeAction:v=>i.onRequest(j.CodeActionRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onCodeActionResolve:v=>i.onRequest(j.CodeActionResolveRequest.type,(b,N)=>v(b,N)),onCodeLens:v=>i.onRequest(j.CodeLensRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onCodeLensResolve:v=>i.onRequest(j.CodeLensResolveRequest.type,(b,N)=>v(b,N)),onDocumentFormatting:v=>i.onRequest(j.DocumentFormattingRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),onDocumentRangeFormatting:v=>i.onRequest(j.DocumentRangeFormattingRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),onDocumentOnTypeFormatting:v=>i.onRequest(j.DocumentOnTypeFormattingRequest.type,(b,N)=>v(b,N)),onRenameRequest:v=>i.onRequest(j.RenameRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),onPrepareRename:v=>i.onRequest(j.PrepareRenameRequest.type,(b,N)=>v(b,N)),onDocumentLinks:v=>i.onRequest(j.DocumentLinkRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onDocumentLinkResolve:v=>i.onRequest(j.DocumentLinkResolveRequest.type,(b,N)=>v(b,N)),onDocumentColor:v=>i.onRequest(j.DocumentColorRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onColorPresentation:v=>i.onRequest(j.ColorPresentationRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onFoldingRanges:v=>i.onRequest(j.FoldingRangeRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onSelectionRanges:v=>i.onRequest(j.SelectionRangeRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),(0,J.attachPartialResult)(i,b))),onExecuteCommand:v=>i.onRequest(j.ExecuteCommandRequest.type,(b,N)=>v(b,N,(0,J.attachWorkDone)(i,b),void 0)),dispose:()=>i.dispose()};for(let v of g)v.attach(F);return i.onRequest(j.InitializeRequest.type,v=>{e.initialize(v),Tt.string(v.trace)&&(s.trace=j.Trace.fromString(v.trace));for(let b of g)b.initialize(v.capabilities);if(O){let b=O(v,new j.CancellationTokenSource().token,(0,J.attachWorkDone)(i,v),void 0);return C(b).then(N=>{if(N instanceof j.ResponseError)return N;let K=N;K||(K={capabilities:{}});let le=K.capabilities;le||(le={},K.capabilities=le),le.textDocumentSync===void 0||le.textDocumentSync===null?le.textDocumentSync=Tt.number(F.__textDocumentSync)?F.__textDocumentSync:j.TextDocumentSyncKind.None:!Tt.number(le.textDocumentSync)&&!Tt.number(le.textDocumentSync.change)&&(le.textDocumentSync.change=Tt.number(F.__textDocumentSync)?F.__textDocumentSync:j.TextDocumentSyncKind.None);for(let U of g)U.fillServerCapabilities(le);return K})}else{let b={capabilities:{textDocumentSync:j.TextDocumentSyncKind.None}};for(let N of g)N.fillServerCapabilities(b.capabilities);return b}}),i.onRequest(j.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,k)return k(new j.CancellationTokenSource().token)}),i.onNotification(j.ExitNotification.type,()=>{try{M&&M()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(j.SetTraceNotification.type,v=>{s.trace=j.Trace.fromString(v.value)}),F}ue.createConnection=Xb});var Of=P(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.resolveModulePath=pt.FileSystem=pt.resolveGlobalYarnPath=pt.resolveGlobalNodePath=pt.resolve=pt.uriToFilePath=void 0;var Yb=require("url"),zt=require("path"),Ka=require("fs"),Qa=require("child_process");function Qb(t){let e=Yb.parse(t);if(e.protocol!=="file:"||!e.path)return;let n=e.path.split("/");for(var r=0,i=n.length;r<i;r++)n[r]=decodeURIComponent(n[r]);if(process.platform==="win32"&&n.length>1){let s=n[0],o=n[1];s.length===0&&o.length>1&&o[1]===":"&&n.shift()}return zt.normalize(n.join("/"))}pt.uriToFilePath=Qb;function Xa(){return process.platform==="win32"}function hs(t,e,n,r){let i="NODE_PATH",s=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((o,a)=>{let c=process.env,d=Object.create(null);Object.keys(c).forEach(p=>d[p]=c[p]),e&&Ka.existsSync(e)&&(d[i]?d[i]=e+zt.delimiter+d[i]:d[i]=e,r&&r(`NODE_PATH value is: ${d[i]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let p=(0,Qa.fork)("",[],{cwd:n,env:d,execArgv:["-e",s]});if(p.pid===void 0){a(new Error(`Starting process to resolve node module ${t} failed`));return}p.on("error",g=>{a(g)}),p.on("message",g=>{g.c==="r"&&(p.send({c:"e"}),g.s?o(g.r):a(new Error(`Failed to resolve module: ${t}`)))});let m={c:"rs",a:t};p.send(m)}catch(p){a(p)}})}pt.resolve=hs;function Ya(t){let e="npm",n=Object.create(null);Object.keys(process.env).forEach(s=>n[s]=process.env[s]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};Xa()&&(e="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let s=(0,Qa.spawnSync)(e,["config","get","prefix"],r).stdout;if(!s){t&&t("'npm config get prefix' didn't return a value.");return}let o=s.trim();return t&&t(`'npm config get prefix' value is: ${o}`),o.length>0?Xa()?zt.join(o,"node_modules"):zt.join(o,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}pt.resolveGlobalNodePath=Ya;function Jb(t){let e="yarn",n={encoding:"utf8"};Xa()&&(e="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let i=(0,Qa.spawnSync)(e,["global","dir","--json"],n),s=i.stdout;if(!s){t&&(t("'yarn global dir' didn't return a value."),i.stderr&&t(i.stderr));return}let o=s.trim().split(/\r?\n/);for(let a of o)try{let c=JSON.parse(a);if(c.type==="log")return zt.join(c.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}pt.resolveGlobalYarnPath=Jb;var Nf;(function(t){let e;function n(){return e!==void 0||(process.platform==="win32"?e=!1:e=!Ka.existsSync(__filename.toUpperCase())||!Ka.existsSync(__filename.toLowerCase())),e}t.isCaseSensitive=n;function r(i,s){return n()?zt.normalize(s).indexOf(zt.normalize(i))===0:zt.normalize(s).toLowerCase().indexOf(zt.normalize(i).toLowerCase())===0}t.isParent=r})(Nf=pt.FileSystem||(pt.FileSystem={}));function Zb(t,e,n,r){return n?(zt.isAbsolute(n)||(n=zt.join(t,n)),hs(e,n,n,r).then(i=>Nf.isParent(n,i)?i:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,i=>hs(e,Ya(r),t,r))):hs(e,Ya(r),t,r)}pt.resolveModulePath=Zb});var Ja=P((xA,If)=>{"use strict";If.exports=Fe()});var Lf=P(st=>{"use strict";var ev=st&&st.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Ff=st&&st.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ev(e,t,n)};Object.defineProperty(st,"__esModule",{value:!0});st.ProposedFeatures=st.NotebookDocuments=st.TextDocuments=st.SemanticTokensBuilder=void 0;var tv=Ia();Object.defineProperty(st,"SemanticTokensBuilder",{enumerable:!0,get:function(){return tv.SemanticTokensBuilder}});Ff(Fe(),st);var nv=Ma();Object.defineProperty(st,"TextDocuments",{enumerable:!0,get:function(){return nv.TextDocuments}});var rv=Ha();Object.defineProperty(st,"NotebookDocuments",{enumerable:!0,get:function(){return rv.NotebookDocuments}});Ff(za(),st);var iv;(function(t){t.all={__brand:"features"}})(iv=st.ProposedFeatures||(st.ProposedFeatures={}))});var Hf=P(vt=>{"use strict";var sv=vt&&vt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Mf=vt&&vt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&sv(e,t,n)};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConnection=vt.Files=void 0;var Za=Hi(),ov=za(),Vr=Of(),Wn=Ja();Mf(Ja(),vt);Mf(Lf(),vt);var av;(function(t){t.uriToFilePath=Vr.uriToFilePath,t.resolveGlobalNodePath=Vr.resolveGlobalNodePath,t.resolveGlobalYarnPath=Vr.resolveGlobalYarnPath,t.resolve=Vr.resolve,t.resolveModulePath=Vr.resolveModulePath})(av=vt.Files||(vt.Files={}));var jf;function ps(){if(jf!==void 0)try{jf.end()}catch{}}var cr=!1,$f;function cv(){let t="--clientProcessId";function e(n){try{let r=parseInt(n);isNaN(r)||($f=setInterval(()=>{try{process.kill(r,0)}catch{ps(),process.exit(cr?0:1)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let r=process.argv[n];if(r===t&&n+1<process.argv.length){e(process.argv[n+1]);return}else{let i=r.split("=");i[0]===t&&e(i[1])}}}cv();var uv={initialize:t=>{let e=t.processId;Za.number(e)&&$f===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(cr?0:1)}},3e3)},get shutdownReceived(){return cr},set shutdownReceived(t){cr=t},exit:t=>{ps(),process.exit(t)}};function lv(t,e,n,r){let i,s,o,a;return t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),Wn.ConnectionStrategy.is(t)||Wn.ConnectionOptions.is(t)?a=t:(s=t,o=e,a=n),fv(s,o,a,i)}vt.createConnection=lv;function fv(t,e,n,r){if(!t&&!e&&process.argv.length>2){let a,c,d=process.argv.slice(2);for(let p=0;p<d.length;p++){let m=d[p];if(m==="--node-ipc"){t=new Wn.IPCMessageReader(process),e=new Wn.IPCMessageWriter(process);break}else if(m==="--stdio"){t=process.stdin,e=process.stdout;break}else if(m==="--socket"){a=parseInt(d[p+1]);break}else if(m==="--pipe"){c=d[p+1];break}else{var i=m.split("=");if(i[0]==="--socket"){a=parseInt(i[1]);break}else if(i[0]==="--pipe"){c=i[1];break}}}if(a){let p=(0,Wn.createServerSocketTransport)(a);t=p[0],e=p[1]}else if(c){let p=(0,Wn.createServerPipeTransport)(c);t=p[0],e=p[1]}}var s="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!t)throw new Error("Connection input stream is not set. "+s);if(!e)throw new Error("Connection output stream is not set. "+s);if(Za.func(t.read)&&Za.func(t.on)){let a=t;a.on("end",()=>{ps(),process.exit(cr?0:1)}),a.on("close",()=>{ps(),process.exit(cr?0:1)})}let o=a=>(0,Wn.createProtocolConnection)(t,e,a,n);return(0,ov.createConnection)(o,uv,r)}});var Jr=P((FA,ed)=>{"use strict";var hv="2.0.0",pv=Number.MAX_SAFE_INTEGER||9007199254740991,mv=16,gv=250,yv=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ed.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:mv,MAX_SAFE_BUILD_LENGTH:gv,MAX_SAFE_INTEGER:pv,RELEASE_TYPES:yv,SEMVER_SPEC_VERSION:hv,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Zr=P((LA,td)=>{"use strict";var Rv=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};td.exports=Rv});var lr=P((tn,nd)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:oc,MAX_SAFE_BUILD_LENGTH:_v,MAX_LENGTH:bv}=Jr(),vv=Zr();tn=nd.exports={};var Ev=tn.re=[],wv=tn.safeRe=[],H=tn.src=[],Cv=tn.safeSrc=[],W=tn.t={},Pv=0,ac="[a-zA-Z0-9-]",Dv=[["\\s",1],["\\d",bv],[ac,_v]],Sv=t=>{for(let[e,n]of Dv)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},te=(t,e,n)=>{let r=Sv(e),i=Pv++;vv(t,i,e),W[t]=i,H[i]=e,Cv[i]=r,Ev[i]=new RegExp(e,n?"g":void 0),wv[i]=new RegExp(r,n?"g":void 0)};te("NUMERICIDENTIFIER","0|[1-9]\\d*");te("NUMERICIDENTIFIERLOOSE","\\d+");te("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ac}*`);te("MAINVERSION",`(${H[W.NUMERICIDENTIFIER]})\\.(${H[W.NUMERICIDENTIFIER]})\\.(${H[W.NUMERICIDENTIFIER]})`);te("MAINVERSIONLOOSE",`(${H[W.NUMERICIDENTIFIERLOOSE]})\\.(${H[W.NUMERICIDENTIFIERLOOSE]})\\.(${H[W.NUMERICIDENTIFIERLOOSE]})`);te("PRERELEASEIDENTIFIER",`(?:${H[W.NONNUMERICIDENTIFIER]}|${H[W.NUMERICIDENTIFIER]})`);te("PRERELEASEIDENTIFIERLOOSE",`(?:${H[W.NONNUMERICIDENTIFIER]}|${H[W.NUMERICIDENTIFIERLOOSE]})`);te("PRERELEASE",`(?:-(${H[W.PRERELEASEIDENTIFIER]}(?:\\.${H[W.PRERELEASEIDENTIFIER]})*))`);te("PRERELEASELOOSE",`(?:-?(${H[W.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${H[W.PRERELEASEIDENTIFIERLOOSE]})*))`);te("BUILDIDENTIFIER",`${ac}+`);te("BUILD",`(?:\\+(${H[W.BUILDIDENTIFIER]}(?:\\.${H[W.BUILDIDENTIFIER]})*))`);te("FULLPLAIN",`v?${H[W.MAINVERSION]}${H[W.PRERELEASE]}?${H[W.BUILD]}?`);te("FULL",`^${H[W.FULLPLAIN]}$`);te("LOOSEPLAIN",`[v=\\s]*${H[W.MAINVERSIONLOOSE]}${H[W.PRERELEASELOOSE]}?${H[W.BUILD]}?`);te("LOOSE",`^${H[W.LOOSEPLAIN]}$`);te("GTLT","((?:<|>)?=?)");te("XRANGEIDENTIFIERLOOSE",`${H[W.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);te("XRANGEIDENTIFIER",`${H[W.NUMERICIDENTIFIER]}|x|X|\\*`);te("XRANGEPLAIN",`[v=\\s]*(${H[W.XRANGEIDENTIFIER]})(?:\\.(${H[W.XRANGEIDENTIFIER]})(?:\\.(${H[W.XRANGEIDENTIFIER]})(?:${H[W.PRERELEASE]})?${H[W.BUILD]}?)?)?`);te("XRANGEPLAINLOOSE",`[v=\\s]*(${H[W.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[W.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[W.XRANGEIDENTIFIERLOOSE]})(?:${H[W.PRERELEASELOOSE]})?${H[W.BUILD]}?)?)?`);te("XRANGE",`^${H[W.GTLT]}\\s*${H[W.XRANGEPLAIN]}$`);te("XRANGELOOSE",`^${H[W.GTLT]}\\s*${H[W.XRANGEPLAINLOOSE]}$`);te("COERCEPLAIN",`(^|[^\\d])(\\d{1,${oc}})(?:\\.(\\d{1,${oc}}))?(?:\\.(\\d{1,${oc}}))?`);te("COERCE",`${H[W.COERCEPLAIN]}(?:$|[^\\d])`);te("COERCEFULL",H[W.COERCEPLAIN]+`(?:${H[W.PRERELEASE]})?(?:${H[W.BUILD]})?(?:$|[^\\d])`);te("COERCERTL",H[W.COERCE],!0);te("COERCERTLFULL",H[W.COERCEFULL],!0);te("LONETILDE","(?:~>?)");te("TILDETRIM",`(\\s*)${H[W.LONETILDE]}\\s+`,!0);tn.tildeTrimReplace="$1~";te("TILDE",`^${H[W.LONETILDE]}${H[W.XRANGEPLAIN]}$`);te("TILDELOOSE",`^${H[W.LONETILDE]}${H[W.XRANGEPLAINLOOSE]}$`);te("LONECARET","(?:\\^)");te("CARETTRIM",`(\\s*)${H[W.LONECARET]}\\s+`,!0);tn.caretTrimReplace="$1^";te("CARET",`^${H[W.LONECARET]}${H[W.XRANGEPLAIN]}$`);te("CARETLOOSE",`^${H[W.LONECARET]}${H[W.XRANGEPLAINLOOSE]}$`);te("COMPARATORLOOSE",`^${H[W.GTLT]}\\s*(${H[W.LOOSEPLAIN]})$|^$`);te("COMPARATOR",`^${H[W.GTLT]}\\s*(${H[W.FULLPLAIN]})$|^$`);te("COMPARATORTRIM",`(\\s*)${H[W.GTLT]}\\s*(${H[W.LOOSEPLAIN]}|${H[W.XRANGEPLAIN]})`,!0);tn.comparatorTrimReplace="$1$2$3";te("HYPHENRANGE",`^\\s*(${H[W.XRANGEPLAIN]})\\s+-\\s+(${H[W.XRANGEPLAIN]})\\s*$`);te("HYPHENRANGELOOSE",`^\\s*(${H[W.XRANGEPLAINLOOSE]})\\s+-\\s+(${H[W.XRANGEPLAINLOOSE]})\\s*$`);te("STAR","(<|>)?=?\\s*\\*");te("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");te("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var _s=P((jA,rd)=>{"use strict";var Tv=Object.freeze({loose:!0}),Av=Object.freeze({}),xv=t=>t?typeof t!="object"?Tv:t:Av;rd.exports=xv});var cc=P((MA,od)=>{"use strict";var id=/^[0-9]+$/,sd=(t,e)=>{let n=id.test(t),r=id.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},qv=(t,e)=>sd(e,t);od.exports={compareIdentifiers:sd,rcompareIdentifiers:qv}});var ct=P(($A,cd)=>{"use strict";var bs=Zr(),{MAX_LENGTH:ad,MAX_SAFE_INTEGER:vs}=Jr(),{safeRe:Es,t:ws}=lr(),kv=_s(),{compareIdentifiers:fr}=cc(),uc=class t{constructor(e,n){if(n=kv(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ad)throw new TypeError(`version is longer than ${ad} characters`);bs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?Es[ws.LOOSE]:Es[ws.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>vs||this.major<0)throw new TypeError("Invalid major version");if(this.minor>vs||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>vs||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<vs)return s}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(bs("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),fr(this.major,e.major)||fr(this.minor,e.minor)||fr(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=e.prerelease[n];if(bs("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fr(r,i)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],i=e.build[n];if(bs("build compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fr(r,i)}while(++n)}inc(e,n,r){if(e.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let i=`-${n}`.match(this.options.loose?Es[ws.PRERELEASELOOSE]:Es[ws.PRERELEASE]);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let s=[n,i];r===!1&&(s=[n]),fr(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};cd.exports=uc});var Un=P((HA,ld)=>{"use strict";var ud=ct(),Nv=(t,e,n=!1)=>{if(t instanceof ud)return t;try{return new ud(t,e)}catch(r){if(!n)return null;throw r}};ld.exports=Nv});var dd=P((WA,fd)=>{"use strict";var Ov=Un(),Iv=(t,e)=>{let n=Ov(t,e);return n?n.version:null};fd.exports=Iv});var pd=P((UA,hd)=>{"use strict";var Fv=Un(),Lv=(t,e)=>{let n=Fv(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};hd.exports=Lv});var yd=P((BA,gd)=>{"use strict";var md=ct(),jv=(t,e,n,r,i)=>{typeof n=="string"&&(i=r,r=n,n=void 0);try{return new md(t instanceof md?t.version:t,n).inc(e,r,i).version}catch{return null}};gd.exports=jv});var bd=P((VA,_d)=>{"use strict";var Rd=Un(),Mv=(t,e)=>{let n=Rd(t,null,!0),r=Rd(e,null,!0),i=n.compare(r);if(i===0)return null;let s=i>0,o=s?n:r,a=s?r:n,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let p=c?"pre":"";return n.major!==r.major?p+"major":n.minor!==r.minor?p+"minor":n.patch!==r.patch?p+"patch":"prerelease"};_d.exports=Mv});var Ed=P((GA,vd)=>{"use strict";var $v=ct(),Hv=(t,e)=>new $v(t,e).major;vd.exports=Hv});var Cd=P((zA,wd)=>{"use strict";var Wv=ct(),Uv=(t,e)=>new Wv(t,e).minor;wd.exports=Uv});var Dd=P((KA,Pd)=>{"use strict";var Bv=ct(),Vv=(t,e)=>new Bv(t,e).patch;Pd.exports=Vv});var Td=P((XA,Sd)=>{"use strict";var Gv=Un(),zv=(t,e)=>{let n=Gv(t,e);return n&&n.prerelease.length?n.prerelease:null};Sd.exports=zv});var xt=P((YA,xd)=>{"use strict";var Ad=ct(),Kv=(t,e,n)=>new Ad(t,n).compare(new Ad(e,n));xd.exports=Kv});var kd=P((QA,qd)=>{"use strict";var Xv=xt(),Yv=(t,e,n)=>Xv(e,t,n);qd.exports=Yv});var Od=P((JA,Nd)=>{"use strict";var Qv=xt(),Jv=(t,e)=>Qv(t,e,!0);Nd.exports=Jv});var Cs=P((ZA,Fd)=>{"use strict";var Id=ct(),Zv=(t,e,n)=>{let r=new Id(t,n),i=new Id(e,n);return r.compare(i)||r.compareBuild(i)};Fd.exports=Zv});var jd=P((ex,Ld)=>{"use strict";var eE=Cs(),tE=(t,e)=>t.sort((n,r)=>eE(n,r,e));Ld.exports=tE});var $d=P((tx,Md)=>{"use strict";var nE=Cs(),rE=(t,e)=>t.sort((n,r)=>nE(r,n,e));Md.exports=rE});var ei=P((nx,Hd)=>{"use strict";var iE=xt(),sE=(t,e,n)=>iE(t,e,n)>0;Hd.exports=sE});var Ps=P((rx,Wd)=>{"use strict";var oE=xt(),aE=(t,e,n)=>oE(t,e,n)<0;Wd.exports=aE});var lc=P((ix,Ud)=>{"use strict";var cE=xt(),uE=(t,e,n)=>cE(t,e,n)===0;Ud.exports=uE});var fc=P((sx,Bd)=>{"use strict";var lE=xt(),fE=(t,e,n)=>lE(t,e,n)!==0;Bd.exports=fE});var Ds=P((ox,Vd)=>{"use strict";var dE=xt(),hE=(t,e,n)=>dE(t,e,n)>=0;Vd.exports=hE});var Ss=P((ax,Gd)=>{"use strict";var pE=xt(),mE=(t,e,n)=>pE(t,e,n)<=0;Gd.exports=mE});var dc=P((cx,zd)=>{"use strict";var gE=lc(),yE=fc(),RE=ei(),_E=Ds(),bE=Ps(),vE=Ss(),EE=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return gE(t,n,r);case"!=":return yE(t,n,r);case">":return RE(t,n,r);case">=":return _E(t,n,r);case"<":return bE(t,n,r);case"<=":return vE(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};zd.exports=EE});var Xd=P((ux,Kd)=>{"use strict";var wE=ct(),CE=Un(),{safeRe:Ts,t:As}=lr(),PE=(t,e)=>{if(t instanceof wE)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Ts[As.COERCEFULL]:Ts[As.COERCE]);else{let c=e.includePrerelease?Ts[As.COERCERTLFULL]:Ts[As.COERCERTL],d;for(;(d=c.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||d.index+d[0].length!==n.index+n[0].length)&&(n=d),c.lastIndex=d.index+d[1].length+d[2].length;c.lastIndex=-1}if(n===null)return null;let r=n[2],i=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return CE(`${r}.${i}.${s}${o}${a}`,e)};Kd.exports=PE});var Qd=P((lx,Yd)=>{"use strict";var hc=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}};Yd.exports=hc});var qt=P((fx,th)=>{"use strict";var DE=/\s+/g,pc=class t{constructor(e,n){if(n=TE(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof mc)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(DE," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!Zd(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&IE(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let r=0;r<n.length;r++)r>0&&(this.formatted+=" "),this.formatted+=n[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&NE)|(this.options.loose&&OE))+":"+e,i=Jd.get(r);if(i)return i;let s=this.options.loose,o=s?Rt[mt.HYPHENRANGELOOSE]:Rt[mt.HYPHENRANGE];e=e.replace(o,VE(this.options.includePrerelease)),Te("hyphen replace",e),e=e.replace(Rt[mt.COMPARATORTRIM],xE),Te("comparator trim",e),e=e.replace(Rt[mt.TILDETRIM],qE),Te("tilde trim",e),e=e.replace(Rt[mt.CARETTRIM],kE),Te("caret trim",e);let a=e.split(" ").map(m=>FE(m,this.options)).join(" ").split(/\s+/).map(m=>BE(m,this.options));s&&(a=a.filter(m=>(Te("loose invalid filter",m,this.options),!!m.match(Rt[mt.COMPARATORLOOSE])))),Te("range list",a);let c=new Map,d=a.map(m=>new mc(m,this.options));for(let m of d){if(Zd(m))return[m];c.set(m.value,m)}c.size>1&&c.has("")&&c.delete("");let p=[...c.values()];return Jd.set(r,p),p}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>eh(r,n)&&e.set.some(i=>eh(i,n)&&r.every(s=>i.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AE(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(GE(this.set[n],e,this.options))return!0;return!1}};th.exports=pc;var SE=Qd(),Jd=new SE,TE=_s(),mc=ti(),Te=Zr(),AE=ct(),{safeRe:Rt,t:mt,comparatorTrimReplace:xE,tildeTrimReplace:qE,caretTrimReplace:kE}=lr(),{FLAG_INCLUDE_PRERELEASE:NE,FLAG_LOOSE:OE}=Jr(),Zd=t=>t.value==="<0.0.0-0",IE=t=>t.value==="",eh=(t,e)=>{let n=!0,r=t.slice(),i=r.pop();for(;n&&r.length;)n=r.every(s=>i.intersects(s,e)),i=r.pop();return n},FE=(t,e)=>(Te("comp",t,e),t=ME(t,e),Te("caret",t),t=LE(t,e),Te("tildes",t),t=HE(t,e),Te("xrange",t),t=UE(t,e),Te("stars",t),t),gt=t=>!t||t.toLowerCase()==="x"||t==="*",LE=(t,e)=>t.trim().split(/\s+/).map(n=>jE(n,e)).join(" "),jE=(t,e)=>{let n=e.loose?Rt[mt.TILDELOOSE]:Rt[mt.TILDE];return t.replace(n,(r,i,s,o,a)=>{Te("tilde",t,r,i,s,o,a);let c;return gt(i)?c="":gt(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:gt(o)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:a?(Te("replaceTilde pr",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`,Te("tilde return",c),c})},ME=(t,e)=>t.trim().split(/\s+/).map(n=>$E(n,e)).join(" "),$E=(t,e)=>{Te("caret",t,e);let n=e.loose?Rt[mt.CARETLOOSE]:Rt[mt.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(i,s,o,a,c)=>{Te("caret",t,i,s,o,a,c);let d;return gt(s)?d="":gt(o)?d=`>=${s}.0.0${r} <${+s+1}.0.0-0`:gt(a)?s==="0"?d=`>=${s}.${o}.0${r} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.0${r} <${+s+1}.0.0-0`:c?(Te("replaceCaret pr",c),s==="0"?o==="0"?d=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(Te("no pr"),s==="0"?o==="0"?d=`>=${s}.${o}.${a}${r} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a}${r} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Te("caret return",d),d})},HE=(t,e)=>(Te("replaceXRanges",t,e),t.split(/\s+/).map(n=>WE(n,e)).join(" ")),WE=(t,e)=>{t=t.trim();let n=e.loose?Rt[mt.XRANGELOOSE]:Rt[mt.XRANGE];return t.replace(n,(r,i,s,o,a,c)=>{Te("xRange",t,r,i,s,o,a,c);let d=gt(s),p=d||gt(o),m=p||gt(a),g=m;return i==="="&&g&&(i=""),c=e.includePrerelease?"-0":"",d?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&g?(p&&(o=0),a=0,i===">"?(i=">=",p?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",p?s=+s+1:o=+o+1),i==="<"&&(c="-0"),r=`${i+s}.${o}.${a}${c}`):p?r=`>=${s}.0.0${c} <${+s+1}.0.0-0`:m&&(r=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),Te("xRange return",r),r})},UE=(t,e)=>(Te("replaceStars",t,e),t.trim().replace(Rt[mt.STAR],"")),BE=(t,e)=>(Te("replaceGTE0",t,e),t.trim().replace(Rt[e.includePrerelease?mt.GTE0PRE:mt.GTE0],"")),VE=t=>(e,n,r,i,s,o,a,c,d,p,m,g)=>(gt(r)?n="":gt(i)?n=`>=${r}.0.0${t?"-0":""}`:gt(s)?n=`>=${r}.${i}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,gt(d)?c="":gt(p)?c=`<${+d+1}.0.0-0`:gt(m)?c=`<${d}.${+p+1}.0-0`:g?c=`<=${d}.${p}.${m}-${g}`:t?c=`<${d}.${p}.${+m+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),GE=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(Te(t[r].semver),t[r].semver!==mc.ANY&&t[r].semver.prerelease.length>0){let i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var ti=P((dx,ah)=>{"use strict";var ni=Symbol("SemVer ANY"),Rc=class t{static get ANY(){return ni}constructor(e,n){if(n=nh(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),yc("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===ni?this.value="":this.value=this.operator+this.semver.version,yc("comp",this)}parse(e){let n=this.options.loose?rh[ih.COMPARATORLOOSE]:rh[ih.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new sh(r[2],this.options.loose):this.semver=ni}toString(){return this.value}test(e){if(yc("Comparator.test",e,this.options.loose),this.semver===ni||e===ni)return!0;if(typeof e=="string")try{e=new sh(e,this.options)}catch{return!1}return gc(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new oh(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new oh(this.value,n).test(e.semver):(n=nh(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||gc(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||gc(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ah.exports=Rc;var nh=_s(),{safeRe:rh,t:ih}=lr(),gc=dc(),yc=Zr(),sh=ct(),oh=qt()});var ri=P((hx,ch)=>{"use strict";var zE=qt(),KE=(t,e,n)=>{try{e=new zE(e,n)}catch{return!1}return e.test(t)};ch.exports=KE});var lh=P((px,uh)=>{"use strict";var XE=qt(),YE=(t,e)=>new XE(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));uh.exports=YE});var dh=P((mx,fh)=>{"use strict";var QE=ct(),JE=qt(),ZE=(t,e,n)=>{let r=null,i=null,s=null;try{s=new JE(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!r||i.compare(o)===-1)&&(r=o,i=new QE(r,n))}),r};fh.exports=ZE});var ph=P((gx,hh)=>{"use strict";var ew=ct(),tw=qt(),nw=(t,e,n)=>{let r=null,i=null,s=null;try{s=new tw(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!r||i.compare(o)===1)&&(r=o,i=new ew(r,n))}),r};hh.exports=nw});var yh=P((yx,gh)=>{"use strict";var _c=ct(),rw=qt(),mh=ei(),iw=(t,e)=>{t=new rw(t,e);let n=new _c("0.0.0");if(t.test(n)||(n=new _c("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r<t.set.length;++r){let i=t.set[r],s=null;i.forEach(o=>{let a=new _c(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||mh(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||mh(n,s))&&(n=s)}return n&&t.test(n)?n:null};gh.exports=iw});var _h=P((Rx,Rh)=>{"use strict";var sw=qt(),ow=(t,e)=>{try{return new sw(t,e).range||"*"}catch{return null}};Rh.exports=ow});var xs=P((_x,wh)=>{"use strict";var aw=ct(),Eh=ti(),{ANY:cw}=Eh,uw=qt(),lw=ri(),bh=ei(),vh=Ps(),fw=Ss(),dw=Ds(),hw=(t,e,n,r)=>{t=new aw(t,r),e=new uw(e,r);let i,s,o,a,c;switch(n){case">":i=bh,s=fw,o=vh,a=">",c=">=";break;case"<":i=vh,s=dw,o=bh,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(lw(t,e,r))return!1;for(let d=0;d<e.set.length;++d){let p=e.set[d],m=null,g=null;if(p.forEach(C=>{C.semver===cw&&(C=new Eh(">=0.0.0")),m=m||C,g=g||C,i(C.semver,m.semver,r)?m=C:o(C.semver,g.semver,r)&&(g=C)}),m.operator===a||m.operator===c||(!g.operator||g.operator===a)&&s(t,g.semver))return!1;if(g.operator===c&&o(t,g.semver))return!1}return!0};wh.exports=hw});var Ph=P((bx,Ch)=>{"use strict";var pw=xs(),mw=(t,e,n)=>pw(t,e,">",n);Ch.exports=mw});var Sh=P((vx,Dh)=>{"use strict";var gw=xs(),yw=(t,e,n)=>gw(t,e,"<",n);Dh.exports=yw});var xh=P((Ex,Ah)=>{"use strict";var Th=qt(),Rw=(t,e,n)=>(t=new Th(t,n),e=new Th(e,n),t.intersects(e,n));Ah.exports=Rw});var kh=P((wx,qh)=>{"use strict";var _w=ri(),bw=xt();qh.exports=(t,e,n)=>{let r=[],i=null,s=null,o=t.sort((p,m)=>bw(p,m,n));for(let p of o)_w(p,e,n)?(s=p,i||(i=p)):(s&&r.push([i,s]),s=null,i=null);i&&r.push([i,null]);let a=[];for(let[p,m]of r)p===m?a.push(p):!m&&p===o[0]?a.push("*"):m?p===o[0]?a.push(`<=${m}`):a.push(`${p} - ${m}`):a.push(`>=${p}`);let c=a.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return c.length<d.length?c:e}});var jh=P((Cx,Lh)=>{"use strict";var Nh=qt(),vc=ti(),{ANY:bc}=vc,ii=ri(),Ec=xt(),vw=(t,e,n={})=>{if(t===e)return!0;t=new Nh(t,n),e=new Nh(e,n);let r=!1;e:for(let i of t.set){for(let s of e.set){let o=ww(i,s,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Ew=[new vc(">=0.0.0-0")],Oh=[new vc(">=0.0.0")],ww=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===bc){if(e.length===1&&e[0].semver===bc)return!0;n.includePrerelease?t=Ew:t=Oh}if(e.length===1&&e[0].semver===bc){if(n.includePrerelease)return!0;e=Oh}let r=new Set,i,s;for(let C of t)C.operator===">"||C.operator===">="?i=Ih(i,C,n):C.operator==="<"||C.operator==="<="?s=Fh(s,C,n):r.add(C.semver);if(r.size>1)return null;let o;if(i&&s){if(o=Ec(i.semver,s.semver,n),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let C of r){if(i&&!ii(C,String(i),n)||s&&!ii(C,String(s),n))return null;for(let k of e)if(!ii(C,String(k),n))return!1;return!0}let a,c,d,p,m=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,g=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;m&&m.prerelease.length===1&&s.operator==="<"&&m.prerelease[0]===0&&(m=!1);for(let C of e){if(p=p||C.operator===">"||C.operator===">=",d=d||C.operator==="<"||C.operator==="<=",i){if(g&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===g.major&&C.semver.minor===g.minor&&C.semver.patch===g.patch&&(g=!1),C.operator===">"||C.operator===">="){if(a=Ih(i,C,n),a===C&&a!==i)return!1}else if(i.operator===">="&&!ii(i.semver,String(C),n))return!1}if(s){if(m&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===m.major&&C.semver.minor===m.minor&&C.semver.patch===m.patch&&(m=!1),C.operator==="<"||C.operator==="<="){if(c=Fh(s,C,n),c===C&&c!==s)return!1}else if(s.operator==="<="&&!ii(s.semver,String(C),n))return!1}if(!C.operator&&(s||i)&&o!==0)return!1}return!(i&&d&&!s&&o!==0||s&&p&&!i&&o!==0||g||m)},Ih=(t,e,n)=>{if(!t)return e;let r=Ec(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},Fh=(t,e,n)=>{if(!t)return e;let r=Ec(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};Lh.exports=vw});var Cc=P((Px,Hh)=>{"use strict";var wc=lr(),Mh=Jr(),Cw=ct(),$h=cc(),Pw=Un(),Dw=dd(),Sw=pd(),Tw=yd(),Aw=bd(),xw=Ed(),qw=Cd(),kw=Dd(),Nw=Td(),Ow=xt(),Iw=kd(),Fw=Od(),Lw=Cs(),jw=jd(),Mw=$d(),$w=ei(),Hw=Ps(),Ww=lc(),Uw=fc(),Bw=Ds(),Vw=Ss(),Gw=dc(),zw=Xd(),Kw=ti(),Xw=qt(),Yw=ri(),Qw=lh(),Jw=dh(),Zw=ph(),eC=yh(),tC=_h(),nC=xs(),rC=Ph(),iC=Sh(),sC=xh(),oC=kh(),aC=jh();Hh.exports={parse:Pw,valid:Dw,clean:Sw,inc:Tw,diff:Aw,major:xw,minor:qw,patch:kw,prerelease:Nw,compare:Ow,rcompare:Iw,compareLoose:Fw,compareBuild:Lw,sort:jw,rsort:Mw,gt:$w,lt:Hw,eq:Ww,neq:Uw,gte:Bw,lte:Vw,cmp:Gw,coerce:zw,Comparator:Kw,Range:Xw,satisfies:Yw,toComparators:Qw,maxSatisfying:Jw,minSatisfying:Zw,minVersion:eC,validRange:tC,outside:nC,gtr:rC,ltr:iC,intersects:sC,simplifyRange:oC,subset:aC,SemVer:Cw,re:wc.re,src:wc.src,tokens:wc.t,SEMVER_SPEC_VERSION:Mh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Mh.RELEASE_TYPES,compareIdentifiers:$h.compareIdentifiers,rcompareIdentifiers:$h.rcompareIdentifiers}});var ai=P((Nx,cp)=>{"use strict";var wC=require("path"),rn="\\\\/",ip=`[^${rn}]`,yn="\\.",CC="\\+",PC="\\?",Ls="\\/",DC="(?=.)",sp="[^/]",kc=`(?:${Ls}|$)`,op=`(?:^|${Ls})`,Nc=`${yn}{1,2}${kc}`,SC=`(?!${yn})`,TC=`(?!${op}${Nc})`,AC=`(?!${yn}{0,1}${kc})`,xC=`(?!${Nc})`,qC=`[^.${Ls}]`,kC=`${sp}*?`,ap={DOT_LITERAL:yn,PLUS_LITERAL:CC,QMARK_LITERAL:PC,SLASH_LITERAL:Ls,ONE_CHAR:DC,QMARK:sp,END_ANCHOR:kc,DOTS_SLASH:Nc,NO_DOT:SC,NO_DOTS:TC,NO_DOT_SLASH:AC,NO_DOTS_SLASH:xC,QMARK_NO_DOT:qC,STAR:kC,START_ANCHOR:op},NC={...ap,SLASH_LITERAL:`[${rn}]`,QMARK:ip,STAR:`${ip}*?`,DOTS_SLASH:`${yn}{1,2}(?:[${rn}]|$)`,NO_DOT:`(?!${yn})`,NO_DOTS:`(?!(?:^|[${rn}])${yn}{1,2}(?:[${rn}]|$))`,NO_DOT_SLASH:`(?!${yn}{0,1}(?:[${rn}]|$))`,NO_DOTS_SLASH:`(?!${yn}{1,2}(?:[${rn}]|$))`,QMARK_NO_DOT:`[^.${rn}]`,START_ANCHOR:`(?:^|[${rn}])`,END_ANCHOR:`(?:[${rn}]|$)`},OC={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};cp.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:OC,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:wC.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?NC:ap}}});var js=P(_t=>{"use strict";var IC=require("path"),FC=process.platform==="win32",{REGEX_BACKSLASH:LC,REGEX_REMOVE_BACKSLASH:jC,REGEX_SPECIAL_CHARS:MC,REGEX_SPECIAL_CHARS_GLOBAL:$C}=ai();_t.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);_t.hasRegexChars=t=>MC.test(t);_t.isRegexChar=t=>t.length===1&&_t.hasRegexChars(t);_t.escapeRegex=t=>t.replace($C,"\\$1");_t.toPosixSlashes=t=>t.replace(LC,"/");_t.removeBackslashes=t=>t.replace(jC,e=>e==="\\"?"":e);_t.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};_t.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:FC===!0||IC.sep==="\\";_t.escapeLast=(t,e,n)=>{let r=t.lastIndexOf(e,n);return r===-1?t:t[r-1]==="\\"?_t.escapeLast(t,e,r-1):`${t.slice(0,r)}\\${t.slice(r)}`};_t.removePrefix=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n};_t.wrapOutput=(t,e={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var yp=P((Ix,gp)=>{"use strict";var up=js(),{CHAR_ASTERISK:Oc,CHAR_AT:HC,CHAR_BACKWARD_SLASH:ci,CHAR_COMMA:WC,CHAR_DOT:Ic,CHAR_EXCLAMATION_MARK:lp,CHAR_FORWARD_SLASH:mp,CHAR_LEFT_CURLY_BRACE:Fc,CHAR_LEFT_PARENTHESES:Lc,CHAR_LEFT_SQUARE_BRACKET:UC,CHAR_PLUS:BC,CHAR_QUESTION_MARK:fp,CHAR_RIGHT_CURLY_BRACE:VC,CHAR_RIGHT_PARENTHESES:dp,CHAR_RIGHT_SQUARE_BRACKET:GC}=ai(),hp=t=>t===mp||t===ci,pp=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},zC=(t,e)=>{let n=e||{},r=t.length-1,i=n.parts===!0||n.scanToEnd===!0,s=[],o=[],a=[],c=t,d=-1,p=0,m=0,g=!1,C=!1,k=!1,O=!1,M=!1,F=!1,v=!1,b=!1,N=!1,K=0,le,U,Q={value:"",depth:0,isGlob:!1},nt=()=>d>=r,Le=()=>c.charCodeAt(d+1),D=()=>(le=U,c.charCodeAt(++d));for(;d<r;){U=D();let T;if(U===ci){v=Q.backslashes=!0,U=D(),U===Fc&&(F=!0);continue}if(F===!0||U===Fc){for(K++;nt()!==!0&&(U=D());){if(U===ci){v=Q.backslashes=!0,D();continue}if(U===Fc){K++;continue}if(F!==!0&&U===Ic&&(U=D())===Ic){if(g=Q.isBrace=!0,k=Q.isGlob=!0,N=!0,i===!0)continue;break}if(F!==!0&&U===WC){if(g=Q.isBrace=!0,k=Q.isGlob=!0,N=!0,i===!0)continue;break}if(U===VC&&(K--,K===0)){F=!1,g=Q.isBrace=!0,N=!0;break}}if(i===!0)continue;break}if(U===mp){if(s.push(d),o.push(Q),Q={value:"",depth:0,isGlob:!1},N===!0)continue;if(le===Ic&&d===p+1){p+=2;continue}m=d+1;continue}if(n.noext!==!0&&(U===BC||U===HC||U===Oc||U===fp||U===lp)===!0&&Le()===Lc){if(k=Q.isGlob=!0,O=Q.isExtglob=!0,N=!0,i===!0){for(;nt()!==!0&&(U=D());){if(U===ci){v=Q.backslashes=!0,U=D();continue}if(U===dp){k=Q.isGlob=!0,N=!0;break}}continue}break}if(U===Oc){if(le===Oc&&(M=Q.isGlobstar=!0),k=Q.isGlob=!0,N=!0,i===!0)continue;break}if(U===fp){if(k=Q.isGlob=!0,N=!0,i===!0)continue;break}if(U===UC){for(;nt()!==!0&&(T=D());){if(T===ci){v=Q.backslashes=!0,D();continue}if(T===GC){C=Q.isBracket=!0,k=Q.isGlob=!0,N=!0;break}}if(i===!0)continue;break}if(n.nonegate!==!0&&U===lp&&d===p){b=Q.negated=!0,p++;continue}if(n.noparen!==!0&&U===Lc){if(k=Q.isGlob=!0,i===!0){for(;nt()!==!0&&(U=D());){if(U===Lc){v=Q.backslashes=!0,U=D();continue}if(U===dp){N=!0;break}}continue}break}if(k===!0){if(N=!0,i===!0)continue;break}}n.noext===!0&&(O=!1,k=!1);let ie=c,Ye="",Qe="";p>0&&(Ye=c.slice(0,p),c=c.slice(p),m-=p),ie&&k===!0&&m>0?(ie=c.slice(0,m),Qe=c.slice(m)):k===!0?(ie="",Qe=c):ie=c,ie&&ie!==""&&ie!=="/"&&ie!==c&&hp(ie.charCodeAt(ie.length-1))&&(ie=ie.slice(0,-1)),n.unescape===!0&&(Qe&&(Qe=up.removeBackslashes(Qe)),ie&&v===!0&&(ie=up.removeBackslashes(ie)));let S={prefix:Ye,input:t,start:p,base:ie,glob:Qe,isBrace:g,isBracket:C,isGlob:k,isExtglob:O,isGlobstar:M,negated:b};if(n.tokens===!0&&(S.maxDepth=0,hp(U)||o.push(Q),S.tokens=o),n.parts===!0||n.tokens===!0){let T;for(let ke=0;ke<s.length;ke++){let Ae=T?T+1:p,Je=s[ke],ze=t.slice(Ae,Je);n.tokens&&(ke===0&&p!==0?(o[ke].isPrefix=!0,o[ke].value=Ye):o[ke].value=ze,pp(o[ke]),S.maxDepth+=o[ke].depth),(ke!==0||ze!=="")&&a.push(ze),T=Je}if(T&&T+1<t.length){let ke=t.slice(T+1);a.push(ke),n.tokens&&(o[o.length-1].value=ke,pp(o[o.length-1]),S.maxDepth+=o[o.length-1].depth)}S.slashes=s,S.parts=a}return S};gp.exports=zC});var vp=P((Fx,bp)=>{"use strict";var Ms=ai(),Et=js(),{MAX_LENGTH:$s,POSIX_REGEX_SOURCE:KC,REGEX_NON_SPECIAL_CHARS:XC,REGEX_SPECIAL_CHARS_BACKREF:YC,REPLACEMENTS:Rp}=Ms,QC=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let n=`[${t.join("-")}]`;try{new RegExp(n)}catch{return t.map(i=>Et.escapeRegex(i)).join("..")}return n},dr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,_p=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Rp[t]||t;let n={...e},r=typeof n.maxLength=="number"?Math.min($s,n.maxLength):$s,i=t.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let s={type:"bos",value:"",output:n.prepend||""},o=[s],a=n.capture?"":"?:",c=Et.isWindows(e),d=Ms.globChars(c),p=Ms.extglobChars(d),{DOT_LITERAL:m,PLUS_LITERAL:g,SLASH_LITERAL:C,ONE_CHAR:k,DOTS_SLASH:O,NO_DOT:M,NO_DOT_SLASH:F,NO_DOTS_SLASH:v,QMARK:b,QMARK_NO_DOT:N,STAR:K,START_ANCHOR:le}=d,U=$=>`(${a}(?:(?!${le}${$.dot?O:m}).)*?)`,Q=n.dot?"":M,nt=n.dot?b:N,Le=n.bash===!0?U(n):K;n.capture&&(Le=`(${Le})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let D={input:t,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Et.removePrefix(t,D),i=t.length;let ie=[],Ye=[],Qe=[],S=s,T,ke=()=>D.index===i-1,Ae=D.peek=($=1)=>t[D.index+$],Je=D.advance=()=>t[++D.index],ze=()=>t.slice(D.index+1),lt=($="",Re=0)=>{D.consumed+=$,D.index+=Re},It=$=>{D.output+=$.output!=null?$.output:$.value,lt($.value)},_r=()=>{let $=1;for(;Ae()==="!"&&(Ae(2)!=="("||Ae(3)==="?");)Je(),D.start++,$++;return $%2===0?!1:(D.negated=!0,D.start++,!0)},sn=$=>{D[$]++,Qe.push($)},Ft=$=>{D[$]--,Qe.pop()},re=$=>{if(S.type==="globstar"){let Re=D.braces>0&&($.type==="comma"||$.type==="brace"),I=$.extglob===!0||ie.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!Re&&!I&&(D.output=D.output.slice(0,-S.output.length),S.type="star",S.value="*",S.output=Le,D.output+=S.output)}if(ie.length&&$.type!=="paren"&&!p[$.value]&&(ie[ie.length-1].inner+=$.value),($.value||$.output)&&It($),S&&S.type==="text"&&$.type==="text"){S.value+=$.value,S.output=(S.output||"")+$.value;return}$.prev=S,o.push($),S=$},_n=($,Re)=>{let I={...p[Re],conditions:1,inner:""};I.prev=S,I.parens=D.parens,I.output=D.output;let oe=(n.capture?"(":"")+I.open;sn("parens"),re({type:$,value:Re,output:D.output?"":k}),re({type:"paren",extglob:!0,value:Je(),output:oe}),ie.push(I)},br=$=>{let Re=$.close+(n.capture?")":"");if($.type==="negate"){let I=Le;$.inner&&$.inner.length>1&&$.inner.includes("/")&&(I=U(n)),(I!==Le||ke()||/^\)+$/.test(ze()))&&(Re=$.close=`)$))${I}`),$.prev.type==="bos"&&(D.negatedExtglob=!0)}re({type:"paren",extglob:!0,value:T,output:Re}),Ft("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let $=!1,Re=t.replace(YC,(I,oe,De,je,Ne,on)=>je==="\\"?($=!0,I):je==="?"?oe?oe+je+(Ne?b.repeat(Ne.length):""):on===0?nt+(Ne?b.repeat(Ne.length):""):b.repeat(De.length):je==="."?m.repeat(De.length):je==="*"?oe?oe+je+(Ne?Le:""):Le:oe?I:`\\${I}`);return $===!0&&(n.unescape===!0?Re=Re.replace(/\\/g,""):Re=Re.replace(/\\+/g,I=>I.length%2===0?"\\\\":I?"\\":"")),Re===t&&n.contains===!0?(D.output=t,D):(D.output=Et.wrapOutput(Re,D,e),D)}for(;!ke();){if(T=Je(),T==="\0")continue;if(T==="\\"){let I=Ae();if(I==="/"&&n.bash!==!0||I==="."||I===";")continue;if(!I){T+="\\",re({type:"text",value:T});continue}let oe=/^\\+/.exec(ze()),De=0;if(oe&&oe[0].length>2&&(De=oe[0].length,D.index+=De,De%2!==0&&(T+="\\")),n.unescape===!0?T=Je()||"":T+=Je()||"",D.brackets===0){re({type:"text",value:T});continue}}if(D.brackets>0&&(T!=="]"||S.value==="["||S.value==="[^")){if(n.posix!==!1&&T===":"){let I=S.value.slice(1);if(I.includes("[")&&(S.posix=!0,I.includes(":"))){let oe=S.value.lastIndexOf("["),De=S.value.slice(0,oe),je=S.value.slice(oe+2),Ne=KC[je];if(Ne){S.value=De+Ne,D.backtrack=!0,Je(),!s.output&&o.indexOf(S)===1&&(s.output=k);continue}}}(T==="["&&Ae()!==":"||T==="-"&&Ae()==="]")&&(T=`\\${T}`),T==="]"&&(S.value==="["||S.value==="[^")&&(T=`\\${T}`),n.posix===!0&&T==="!"&&S.value==="["&&(T="^"),S.value+=T,It({value:T});continue}if(D.quotes===1&&T!=='"'){T=Et.escapeRegex(T),S.value+=T,It({value:T});continue}if(T==='"'){D.quotes=D.quotes===1?0:1,n.keepQuotes===!0&&re({type:"text",value:T});continue}if(T==="("){sn("parens"),re({type:"paren",value:T});continue}if(T===")"){if(D.parens===0&&n.strictBrackets===!0)throw new SyntaxError(dr("opening","("));let I=ie[ie.length-1];if(I&&D.parens===I.parens+1){br(ie.pop());continue}re({type:"paren",value:T,output:D.parens?")":"\\)"}),Ft("parens");continue}if(T==="["){if(n.nobracket===!0||!ze().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(dr("closing","]"));T=`\\${T}`}else sn("brackets");re({type:"bracket",value:T});continue}if(T==="]"){if(n.nobracket===!0||S&&S.type==="bracket"&&S.value.length===1){re({type:"text",value:T,output:`\\${T}`});continue}if(D.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(dr("opening","["));re({type:"text",value:T,output:`\\${T}`});continue}Ft("brackets");let I=S.value.slice(1);if(S.posix!==!0&&I[0]==="^"&&!I.includes("/")&&(T=`/${T}`),S.value+=T,It({value:T}),n.literalBrackets===!1||Et.hasRegexChars(I))continue;let oe=Et.escapeRegex(S.value);if(D.output=D.output.slice(0,-S.value.length),n.literalBrackets===!0){D.output+=oe,S.value=oe;continue}S.value=`(${a}${oe}|${S.value})`,D.output+=S.value;continue}if(T==="{"&&n.nobrace!==!0){sn("braces");let I={type:"brace",value:T,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};Ye.push(I),re(I);continue}if(T==="}"){let I=Ye[Ye.length-1];if(n.nobrace===!0||!I){re({type:"text",value:T,output:T});continue}let oe=")";if(I.dots===!0){let De=o.slice(),je=[];for(let Ne=De.length-1;Ne>=0&&(o.pop(),De[Ne].type!=="brace");Ne--)De[Ne].type!=="dots"&&je.unshift(De[Ne].value);oe=QC(je,n),D.backtrack=!0}if(I.comma!==!0&&I.dots!==!0){let De=D.output.slice(0,I.outputIndex),je=D.tokens.slice(I.tokensIndex);I.value=I.output="\\{",T=oe="\\}",D.output=De;for(let Ne of je)D.output+=Ne.output||Ne.value}re({type:"brace",value:T,output:oe}),Ft("braces"),Ye.pop();continue}if(T==="|"){ie.length>0&&ie[ie.length-1].conditions++,re({type:"text",value:T});continue}if(T===","){let I=T,oe=Ye[Ye.length-1];oe&&Qe[Qe.length-1]==="braces"&&(oe.comma=!0,I="|"),re({type:"comma",value:T,output:I});continue}if(T==="/"){if(S.type==="dot"&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",o.pop(),S=s;continue}re({type:"slash",value:T,output:C});continue}if(T==="."){if(D.braces>0&&S.type==="dot"){S.value==="."&&(S.output=m);let I=Ye[Ye.length-1];S.type="dots",S.output+=T,S.value+=T,I.dots=!0;continue}if(D.braces+D.parens===0&&S.type!=="bos"&&S.type!=="slash"){re({type:"text",value:T,output:m});continue}re({type:"dot",value:T,output:m});continue}if(T==="?"){if(!(S&&S.value==="(")&&n.noextglob!==!0&&Ae()==="("&&Ae(2)!=="?"){_n("qmark",T);continue}if(S&&S.type==="paren"){let oe=Ae(),De=T;if(oe==="<"&&!Et.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(S.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(ze()))&&(De=`\\${T}`),re({type:"text",value:T,output:De});continue}if(n.dot!==!0&&(S.type==="slash"||S.type==="bos")){re({type:"qmark",value:T,output:N});continue}re({type:"qmark",value:T,output:b});continue}if(T==="!"){if(n.noextglob!==!0&&Ae()==="("&&(Ae(2)!=="?"||!/[!=<:]/.test(Ae(3)))){_n("negate",T);continue}if(n.nonegate!==!0&&D.index===0){_r();continue}}if(T==="+"){if(n.noextglob!==!0&&Ae()==="("&&Ae(2)!=="?"){_n("plus",T);continue}if(S&&S.value==="("||n.regex===!1){re({type:"plus",value:T,output:g});continue}if(S&&(S.type==="bracket"||S.type==="paren"||S.type==="brace")||D.parens>0){re({type:"plus",value:T});continue}re({type:"plus",value:g});continue}if(T==="@"){if(n.noextglob!==!0&&Ae()==="("&&Ae(2)!=="?"){re({type:"at",extglob:!0,value:T,output:""});continue}re({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);let I=XC.exec(ze());I&&(T+=I[0],D.index+=I[0].length),re({type:"text",value:T});continue}if(S&&(S.type==="globstar"||S.star===!0)){S.type="star",S.star=!0,S.value+=T,S.output=Le,D.backtrack=!0,D.globstar=!0,lt(T);continue}let $=ze();if(n.noextglob!==!0&&/^\([^?]/.test($)){_n("star",T);continue}if(S.type==="star"){if(n.noglobstar===!0){lt(T);continue}let I=S.prev,oe=I.prev,De=I.type==="slash"||I.type==="bos",je=oe&&(oe.type==="star"||oe.type==="globstar");if(n.bash===!0&&(!De||$[0]&&$[0]!=="/")){re({type:"star",value:T,output:""});continue}let Ne=D.braces>0&&(I.type==="comma"||I.type==="brace"),on=ie.length&&(I.type==="pipe"||I.type==="paren");if(!De&&I.type!=="paren"&&!Ne&&!on){re({type:"star",value:T,output:""});continue}for(;$.slice(0,3)==="/**";){let bn=t[D.index+4];if(bn&&bn!=="/")break;$=$.slice(3),lt("/**",3)}if(I.type==="bos"&&ke()){S.type="globstar",S.value+=T,S.output=U(n),D.output=S.output,D.globstar=!0,lt(T);continue}if(I.type==="slash"&&I.prev.type!=="bos"&&!je&&ke()){D.output=D.output.slice(0,-(I.output+S.output).length),I.output=`(?:${I.output}`,S.type="globstar",S.output=U(n)+(n.strictSlashes?")":"|$)"),S.value+=T,D.globstar=!0,D.output+=I.output+S.output,lt(T);continue}if(I.type==="slash"&&I.prev.type!=="bos"&&$[0]==="/"){let bn=$[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(I.output+S.output).length),I.output=`(?:${I.output}`,S.type="globstar",S.output=`${U(n)}${C}|${C}${bn})`,S.value+=T,D.output+=I.output+S.output,D.globstar=!0,lt(T+Je()),re({type:"slash",value:"/",output:""});continue}if(I.type==="bos"&&$[0]==="/"){S.type="globstar",S.value+=T,S.output=`(?:^|${C}|${U(n)}${C})`,D.output=S.output,D.globstar=!0,lt(T+Je()),re({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-S.output.length),S.type="globstar",S.output=U(n),S.value+=T,D.output+=S.output,D.globstar=!0,lt(T);continue}let Re={type:"star",value:T,output:Le};if(n.bash===!0){Re.output=".*?",(S.type==="bos"||S.type==="slash")&&(Re.output=Q+Re.output),re(Re);continue}if(S&&(S.type==="bracket"||S.type==="paren")&&n.regex===!0){Re.output=T,re(Re);continue}(D.index===D.start||S.type==="slash"||S.type==="dot")&&(S.type==="dot"?(D.output+=F,S.output+=F):n.dot===!0?(D.output+=v,S.output+=v):(D.output+=Q,S.output+=Q),Ae()!=="*"&&(D.output+=k,S.output+=k)),re(Re)}for(;D.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(dr("closing","]"));D.output=Et.escapeLast(D.output,"["),Ft("brackets")}for(;D.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(dr("closing",")"));D.output=Et.escapeLast(D.output,"("),Ft("parens")}for(;D.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(dr("closing","}"));D.output=Et.escapeLast(D.output,"{"),Ft("braces")}if(n.strictSlashes!==!0&&(S.type==="star"||S.type==="bracket")&&re({type:"maybe_slash",value:"",output:`${C}?`}),D.backtrack===!0){D.output="";for(let $ of D.tokens)D.output+=$.output!=null?$.output:$.value,$.suffix&&(D.output+=$.suffix)}return D};_p.fastpaths=(t,e)=>{let n={...e},r=typeof n.maxLength=="number"?Math.min($s,n.maxLength):$s,i=t.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);t=Rp[t]||t;let s=Et.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:C,START_ANCHOR:k}=Ms.globChars(s),O=n.dot?m:p,M=n.dot?g:p,F=n.capture?"":"?:",v={negated:!1,prefix:""},b=n.bash===!0?".*?":C;n.capture&&(b=`(${b})`);let N=Q=>Q.noglobstar===!0?b:`(${F}(?:(?!${k}${Q.dot?d:o}).)*?)`,K=Q=>{switch(Q){case"*":return`${O}${c}${b}`;case".*":return`${o}${c}${b}`;case"*.*":return`${O}${b}${o}${c}${b}`;case"*/*":return`${O}${b}${a}${c}${M}${b}`;case"**":return O+N(n);case"**/*":return`(?:${O}${N(n)}${a})?${M}${c}${b}`;case"**/*.*":return`(?:${O}${N(n)}${a})?${M}${b}${o}${c}${b}`;case"**/.*":return`(?:${O}${N(n)}${a})?${o}${c}${b}`;default:{let nt=/^(.*?)\.(\w+)$/.exec(Q);if(!nt)return;let Le=K(nt[1]);return Le?Le+o+nt[2]:void 0}}},le=Et.removePrefix(t,v),U=K(le);return U&&n.strictSlashes!==!0&&(U+=`${a}?`),U};bp.exports=_p});var wp=P((Lx,Ep)=>{"use strict";var JC=require("path"),ZC=yp(),jc=vp(),Mc=js(),eP=ai(),tP=t=>t&&typeof t=="object"&&!Array.isArray(t),He=(t,e,n=!1)=>{if(Array.isArray(t)){let p=t.map(g=>He(g,e,n));return g=>{for(let C of p){let k=C(g);if(k)return k}return!1}}let r=tP(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=Mc.isWindows(e),o=r?He.compileRe(t,e):He.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let p={...e,ignore:null,onMatch:null,onResult:null};c=He(i.ignore,p,n)}let d=(p,m=!1)=>{let{isMatch:g,match:C,output:k}=He.test(p,o,e,{glob:t,posix:s}),O={glob:t,state:a,regex:o,posix:s,input:p,output:k,match:C,isMatch:g};return typeof i.onResult=="function"&&i.onResult(O),g===!1?(O.isMatch=!1,m?O:!1):c(p)?(typeof i.onIgnore=="function"&&i.onIgnore(O),O.isMatch=!1,m?O:!1):(typeof i.onMatch=="function"&&i.onMatch(O),m?O:!0)};return n&&(d.state=a),d};He.test=(t,e,n,{glob:r,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=n||{},o=s.format||(i?Mc.toPosixSlashes:null),a=t===r,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===r),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=He.matchBase(t,e,n,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};He.matchBase=(t,e,n,r=Mc.isWindows(n))=>(e instanceof RegExp?e:He.makeRe(e,n)).test(JC.basename(t));He.isMatch=(t,e,n)=>He(e,n)(t);He.parse=(t,e)=>Array.isArray(t)?t.map(n=>He.parse(n,e)):jc(t,{...e,fastpaths:!1});He.scan=(t,e)=>ZC(t,e);He.compileRe=(t,e,n=!1,r=!1)=>{if(n===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=He.toRegex(a,e);return r===!0&&(c.state=t),c};He.makeRe=(t,e,n=!1,r=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i=e||{},s={negated:!1,fastpaths:!0},o="",a;return t.startsWith("./")&&(t=t.slice(2),o=s.prefix="./"),i.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a=jc.fastpaths(t,e)),a===void 0?(s=jc(t,e),s.prefix=o+(s.prefix||"")):s.output=a,He.compileRe(s,e,n,r)};He.toRegex=(t,e)=>{try{let n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(n){if(e&&e.debug===!0)throw n;return/$^/}};He.constants=eP;Ep.exports=He});var $c=P((jx,Cp)=>{"use strict";Cp.exports=wp()});var qp=P((Mx,xp)=>{"use strict";var li=require("fs"),{Readable:nP}=require("stream"),ui=require("path"),{promisify:Bs}=require("util"),Hc=$c(),rP=Bs(li.readdir),Pp=Bs(li.stat),Dp=Bs(li.lstat),iP=Bs(li.realpath),sP="!",oP=new Set(["ENOENT","EPERM","EACCES","ELOOP"]),Wc="files",Ap="directories",Ws="files_directories",Hs="all",Sp=[Wc,Ap,Ws,Hs],aP=t=>oP.has(t.code),Tp=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){let e=Hc(t.trim());return n=>e(n.basename)}if(Array.isArray(t)){let e=[],n=[];for(let r of t){let i=r.trim();i.charAt(0)===sP?n.push(Hc(i.slice(1))):e.push(Hc(i))}return n.length>0?e.length>0?r=>e.some(i=>i(r.basename))&&!n.some(i=>i(r.basename)):r=>!n.some(i=>i(r.basename)):r=>e.some(i=>i(r.basename))}}},Us=class t extends nP{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Wc,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});let n={...t.defaultOptions,...e},{root:r,type:i}=n;this._fileFilter=Tp(n.fileFilter),this._directoryFilter=Tp(n.directoryFilter);let s=n.lstat?Dp:Pp;process.platform==="win32"&&Pp.length===3?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=n.depth,this._wantsDir=[Ap,Ws,Hs].includes(i),this._wantsFile=[Wc,Ws,Hs].includes(i),this._wantsEverything=i===Hs,this._root=ui.resolve(r),this._isDirent="Dirent"in li&&!n.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let{path:n,depth:r,files:i=[]}=this.parent||{};if(i.length>0){let s=i.splice(0,e).map(o=>this._formatEntry(o,n));for(let o of await Promise.all(s)){if(this.destroyed)return;let a=await this._getEntryType(o);a==="directory"&&this._directoryFilter(o)?(r<=this._maxDepth&&this.parents.push(this._exploreDir(o.fullPath,r+1)),this._wantsDir&&(this.push(o),e--)):(a==="file"||this._includeAsFile(o))&&this._fileFilter(o)&&this._wantsFile&&(this.push(o),e--)}}else{let s=this.parents.pop();if(!s){this.push(null);break}if(this.parent=await s,this.destroyed)return}}}catch(n){this.destroy(n)}finally{this.reading=!1}}}async _exploreDir(e,n){let r;try{r=await rP(e,this._rdOptions)}catch(i){this._onError(i)}return{files:r,depth:n,path:e}}async _formatEntry(e,n){let r;try{let i=this._isDirent?e.name:e,s=ui.resolve(ui.join(n,i));r={path:ui.relative(this._root,s),fullPath:s,basename:i},r[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(i){this._onError(i)}return r}_onError(e){aP(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){let n=e&&e[this._statsProp];if(n){if(n.isFile())return"file";if(n.isDirectory())return"directory";if(n&&n.isSymbolicLink()){let r=e.fullPath;try{let i=await iP(r),s=await Dp(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;return r.startsWith(i)&&r.substr(o,1)===ui.sep?this._onError(new Error(`Circular symlink detected: "${r}" points to "${i}"`)):"directory"}}catch(i){this._onError(i)}}}}_includeAsFile(e){let n=e&&e[this._statsProp];return n&&this._wantsEverything&&!n.isDirectory()}},hr=(t,e={})=>{let n=e.entryType||e.type;if(n==="both"&&(n=Ws),n&&(e.type=n),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(n&&!Sp.includes(n))throw new Error(`readdirp: Invalid type passed. Use one of ${Sp.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new Us(e)},cP=(t,e={})=>new Promise((n,r)=>{let i=[];hr(t,e).on("data",s=>i.push(s)).on("end",()=>n(i)).on("error",s=>r(s))});hr.promise=cP;hr.ReaddirpStream=Us;hr.default=hr;xp.exports=hr});var Uc=P(($x,kp)=>{kp.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var n=t.length;if(n<=1)return t;var r="";if(n>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var s=t.split(/[/\\]+/);return e!==!1&&s[s.length-1]===""&&s.pop(),r+s.join("/")}});var jp=P((Fp,Lp)=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var Ip=$c(),uP=Uc(),Np="!",lP={returnIndex:!1},fP=t=>Array.isArray(t)?t:[t],dP=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=Ip(t,e);return r=>t===r||n(r)}return t instanceof RegExp?n=>t.test(n):n=>!1},Op=(t,e,n,r)=>{let i=Array.isArray(n),s=i?n[0]:n;if(!i&&typeof s!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(s));let o=uP(s);for(let c=0;c<e.length;c++){let d=e[c];if(d(o))return r?-1:!1}let a=i&&[o].concat(n.slice(1));for(let c=0;c<t.length;c++){let d=t[c];if(i?d(...a):d(o))return r?c:!0}return r?-1:!1},Bc=(t,e,n=lP)=>{if(t==null)throw new TypeError("anymatch: specify first argument");let r=typeof n=="boolean"?{returnIndex:n}:n,i=r.returnIndex||!1,s=fP(t),o=s.filter(c=>typeof c=="string"&&c.charAt(0)===Np).map(c=>c.slice(1)).map(c=>Ip(c,r)),a=s.filter(c=>typeof c!="string"||typeof c=="string"&&c.charAt(0)!==Np).map(c=>dP(c,r));return e==null?(c,d=!1)=>Op(a,o,c,typeof d=="boolean"?d:!1):Op(a,o,e,i)};Bc.default=Bc;Lp.exports=Bc});var $p=P((Hx,Mp)=>{Mp.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(n[2])return!0;e=e.slice(n.index+n[0].length)}return!1}});var Vc=P((Wx,Hp)=>{var hP=$p(),pP={"{":"}","(":")","[":"]"},mP=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,gP=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;Hp.exports=function(e,n){if(typeof e!="string"||e==="")return!1;if(hP(e))return!0;var r=mP,i;for(n&&n.strict===!1&&(r=gP);i=r.exec(e);){if(i[2])return!0;var s=i.index+i[0].length,o=i[1],a=o?pP[o]:null;if(o&&a){var c=e.indexOf(a,s);c!==-1&&(s=c+1)}e=e.slice(s)}return!1}});var Up=P((Ux,Wp)=>{"use strict";var yP=Vc(),RP=require("path").posix.dirname,_P=require("os").platform()==="win32",Gc="/",bP=/\\/g,vP=/[\{\[].*[\}\]]$/,EP=/(^|[^\\])([\{\[]|\([^\)]+$)/,wP=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Wp.exports=function(e,n){var r=Object.assign({flipBackslashes:!0},n);r.flipBackslashes&&_P&&e.indexOf(Gc)<0&&(e=e.replace(bP,Gc)),vP.test(e)&&(e+=Gc),e+="a";do e=RP(e);while(yP(e)||EP.test(e));return e.replace(wP,"$1")}});var Vs=P(Ot=>{"use strict";Ot.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ot.find=(t,e)=>t.nodes.find(n=>n.type===e);Ot.exceedsLimit=(t,e,n=1,r)=>r===!1||!Ot.isInteger(t)||!Ot.isInteger(e)?!1:(Number(e)-Number(t))/Number(n)>=r;Ot.escapeNode=(t,e=0,n)=>{let r=t.nodes[e];r&&(n&&r.type===n||r.type==="open"||r.type==="close")&&r.escaped!==!0&&(r.value="\\"+r.value,r.escaped=!0)};Ot.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Ot.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ot.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ot.reduce=t=>t.reduce((e,n)=>(n.type==="text"&&e.push(n.value),n.type==="range"&&(n.type="text"),e),[]);Ot.flatten=(...t)=>{let e=[],n=r=>{for(let i=0;i<r.length;i++){let s=r[i];Array.isArray(s)?n(s,e):s!==void 0&&e.push(s)}return e};return n(t),e}});var Gs=P((Vx,Vp)=>{"use strict";var Bp=Vs();Vp.exports=(t,e={})=>{let n=(r,i={})=>{let s=e.escapeInvalid&&Bp.isInvalidBrace(i),o=r.invalid===!0&&e.escapeInvalid===!0,a="";if(r.value)return(s||o)&&Bp.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let c of r.nodes)a+=n(c);return a};return n(t)}});var zp=P((Gx,Gp)=>{"use strict";Gp.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var nm=P((zx,tm)=>{"use strict";var Kp=zp(),Bn=(t,e,n)=>{if(Kp(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Kp(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let i=String(r.relaxZeros),s=String(r.shorthand),o=String(r.capture),a=String(r.wrap),c=t+":"+e+"="+i+s+o+a;if(Bn.cache.hasOwnProperty(c))return Bn.cache[c].result;let d=Math.min(t,e),p=Math.max(t,e);if(Math.abs(d-p)===1){let O=t+"|"+e;return r.capture?`(${O})`:r.wrap===!1?O:`(?:${O})`}let m=em(t)||em(e),g={min:t,max:e,a:d,b:p},C=[],k=[];if(m&&(g.isPadded=m,g.maxLen=String(g.max).length),d<0){let O=p<0?Math.abs(p):1;k=Xp(O,Math.abs(d),g,r),d=g.a=0}return p>=0&&(C=Xp(d,p,g,r)),g.negatives=k,g.positives=C,g.result=CP(k,C,r),r.capture===!0?g.result=`(${g.result})`:r.wrap!==!1&&C.length+k.length>1&&(g.result=`(?:${g.result})`),Bn.cache[c]=g,g.result};function CP(t,e,n){let r=zc(t,e,"-",!1,n)||[],i=zc(e,t,"",!1,n)||[],s=zc(t,e,"-?",!0,n)||[];return r.concat(s).concat(i).join("|")}function PP(t,e){let n=1,r=1,i=Qp(t,n),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),n+=1,i=Qp(t,n);for(i=Jp(e+1,r)-1;t<i&&i<=e;)s.add(i),r+=1,i=Jp(e+1,r)-1;return s=[...s],s.sort(TP),s}function DP(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=SP(t,e),i=r.length,s="",o=0;for(let a=0;a<i;a++){let[c,d]=r[a];c===d?s+=c:c!=="0"||d!=="9"?s+=AP(c,d,n):o++}return o&&(s+=n.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function Xp(t,e,n,r){let i=PP(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let d=i[c],p=DP(String(o),String(d),r),m="";if(!n.isPadded&&a&&a.pattern===p.pattern){a.count.length>1&&a.count.pop(),a.count.push(p.count[0]),a.string=a.pattern+Zp(a.count),o=d+1;continue}n.isPadded&&(m=xP(d,n,r)),p.string=m+p.pattern+Zp(p.count),s.push(p),o=d+1,a=p}return s}function zc(t,e,n,r,i){let s=[];for(let o of t){let{string:a}=o;!r&&!Yp(e,"string",a)&&s.push(n+a),r&&Yp(e,"string",a)&&s.push(n+a)}return s}function SP(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}function TP(t,e){return t>e?1:e>t?-1:0}function Yp(t,e,n){return t.some(r=>r[e]===n)}function Qp(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Jp(t,e){return t-t%Math.pow(10,e)}function Zp(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function AP(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function em(t){return/^-?(0+)\d/.test(t)}function xP(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),i=n.relaxZeros!==!1;switch(r){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${r}}`:`0{${r}}`}}Bn.cache={};Bn.clearCache=()=>Bn.cache={};tm.exports=Bn});var Yc=P((Kx,lm)=>{"use strict";var qP=require("util"),sm=nm(),rm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),kP=t=>e=>t===!0?Number(e):String(e),Kc=t=>typeof t=="number"||typeof t=="string"&&t!=="",fi=t=>Number.isInteger(+t),Xc=t=>{let e=`${t}`,n=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++n]==="0";);return n>0},NP=(t,e,n)=>typeof t=="string"||typeof e=="string"?!0:n.stringify===!0,OP=(t,e,n)=>{if(e>0){let r=t[0]==="-"?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return n===!1?String(t):t},im=(t,e)=>{let n=t[0]==="-"?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},IP=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let n=e.capture?"":"?:",r="",i="",s;return t.positives.length&&(r=t.positives.join("|")),t.negatives.length&&(i=`-(${n}${t.negatives.join("|")})`),r&&i?s=`${r}|${i}`:s=r||i,e.wrap?`(${n}${s})`:s},om=(t,e,n,r)=>{if(n)return sm(t,e,{wrap:!1,...r});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},am=(t,e,n)=>{if(Array.isArray(t)){let r=n.wrap===!0,i=n.capture?"":"?:";return r?`(${i}${t.join("|")})`:t.join("|")}return sm(t,e,n)},cm=(...t)=>new RangeError("Invalid range arguments: "+qP.inspect(...t)),um=(t,e,n)=>{if(n.strictRanges===!0)throw cm([t,e]);return[]},FP=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},LP=(t,e,n=1,r={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(r.strictRanges===!0)throw cm([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),d=String(n);n=Math.max(Math.abs(n),1);let p=Xc(a)||Xc(c)||Xc(d),m=p?Math.max(a.length,c.length,d.length):0,g=p===!1&&NP(t,e,r)===!1,C=r.transform||kP(g);if(r.toRegex&&n===1)return om(im(t,m),im(e,m),!0,r);let k={negatives:[],positives:[]},O=v=>k[v<0?"negatives":"positives"].push(Math.abs(v)),M=[],F=0;for(;o?i>=s:i<=s;)r.toRegex===!0&&n>1?O(i):M.push(OP(C(i,F),m,g)),i=o?i-n:i+n,F++;return r.toRegex===!0?n>1?IP(k,r):am(M,null,{wrap:!1,...r}):M},jP=(t,e,n=1,r={})=>{if(!fi(t)&&t.length>1||!fi(e)&&e.length>1)return um(t,e,r);let i=r.transform||(g=>String.fromCharCode(g)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),d=Math.max(s,o);if(r.toRegex&&n===1)return om(c,d,!1,r);let p=[],m=0;for(;a?s>=o:s<=o;)p.push(i(s,m)),s=a?s-n:s+n,m++;return r.toRegex===!0?am(p,null,{wrap:!1,options:r}):p},zs=(t,e,n,r={})=>{if(e==null&&Kc(t))return[t];if(!Kc(t)||!Kc(e))return um(t,e,r);if(typeof n=="function")return zs(t,e,1,{transform:n});if(rm(n))return zs(t,e,0,n);let i={...r};return i.capture===!0&&(i.wrap=!0),n=n||i.step||1,fi(n)?fi(t)&&fi(e)?LP(t,e,n,i):jP(t,e,Math.max(Math.abs(n),1),i):n!=null&&!rm(n)?FP(n,i):zs(t,e,1,n)};lm.exports=zs});var hm=P((Xx,dm)=>{"use strict";var MP=Yc(),fm=Vs(),$P=(t,e={})=>{let n=(r,i={})=>{let s=fm.isInvalidBrace(i),o=r.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",d="";if(r.isOpen===!0||r.isClose===!0)return c+r.value;if(r.type==="open")return a?c+r.value:"(";if(r.type==="close")return a?c+r.value:")";if(r.type==="comma")return r.prev.type==="comma"?"":a?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){let p=fm.reduce(r.nodes),m=MP(...p,{...e,wrap:!1,toRegex:!0});if(m.length!==0)return p.length>1&&m.length>1?`(${m})`:m}if(r.nodes)for(let p of r.nodes)d+=n(p,r);return d};return n(t)};dm.exports=$P});var gm=P((Yx,mm)=>{"use strict";var HP=Yc(),pm=Gs(),pr=Vs(),Vn=(t="",e="",n=!1)=>{let r=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return n?pr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)r.push(Vn(s,e,n));else for(let s of e)n===!0&&typeof s=="string"&&(s=`{${s}}`),r.push(Array.isArray(s)?Vn(i,s,n):i+s);return pr.flatten(r)},WP=(t,e={})=>{let n=e.rangeLimit===void 0?1e3:e.rangeLimit,r=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Vn(a.pop(),pm(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Vn(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let m=pr.reduce(i.nodes);if(pr.exceedsLimit(...m,e.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=HP(...m,e);g.length===0&&(g=pm(i,e)),a.push(Vn(a.pop(),g)),i.nodes=[];return}let c=pr.encloseBrace(i),d=i.queue,p=i;for(;p.type!=="brace"&&p.type!=="root"&&p.parent;)p=p.parent,d=p.queue;for(let m=0;m<i.nodes.length;m++){let g=i.nodes[m];if(g.type==="comma"&&i.type==="brace"){m===1&&d.push(""),d.push("");continue}if(g.type==="close"){a.push(Vn(a.pop(),d,c));continue}if(g.value&&g.type!=="open"){d.push(Vn(d.pop(),g.value));continue}g.nodes&&r(g,i)}return d};return pr.flatten(r(t))};mm.exports=WP});var Rm=P((Qx,ym)=>{"use strict";ym.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
35
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var wm=P((Jx,Em)=>{"use strict";var UP=Gs(),{MAX_LENGTH:_m,CHAR_BACKSLASH:Qc,CHAR_BACKTICK:BP,CHAR_COMMA:VP,CHAR_DOT:GP,CHAR_LEFT_PARENTHESES:zP,CHAR_RIGHT_PARENTHESES:KP,CHAR_LEFT_CURLY_BRACE:XP,CHAR_RIGHT_CURLY_BRACE:YP,CHAR_LEFT_SQUARE_BRACKET:bm,CHAR_RIGHT_SQUARE_BRACKET:vm,CHAR_DOUBLE_QUOTE:QP,CHAR_SINGLE_QUOTE:JP,CHAR_NO_BREAK_SPACE:ZP,CHAR_ZERO_WIDTH_NOBREAK_SPACE:eD}=Rm(),tD=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let n=e||{},r=typeof n.maxLength=="number"?Math.min(_m,n.maxLength):_m;if(t.length>r)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${r})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,d=t.length,p=0,m=0,g,C={},k=()=>t[p++],O=M=>{if(M.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&M.type==="text"){a.value+=M.value;return}return o.nodes.push(M),M.parent=o,M.prev=a,a=M,M};for(O({type:"bos"});p<d;)if(o=s[s.length-1],g=k(),!(g===eD||g===ZP)){if(g===Qc){O({type:"text",value:(e.keepEscaping?g:"")+k()});continue}if(g===vm){O({type:"text",value:"\\"+g});continue}if(g===bm){c++;let M=!0,F;for(;p<d&&(F=k());){if(g+=F,F===bm){c++;continue}if(F===Qc){g+=k();continue}if(F===vm&&(c--,c===0))break}O({type:"text",value:g});continue}if(g===zP){o=O({type:"paren",nodes:[]}),s.push(o),O({type:"text",value:g});continue}if(g===KP){if(o.type!=="paren"){O({type:"text",value:g});continue}o=s.pop(),O({type:"text",value:g}),o=s[s.length-1];continue}if(g===QP||g===JP||g===BP){let M=g,F;for(e.keepQuotes!==!0&&(g="");p<d&&(F=k());){if(F===Qc){g+=F+k();continue}if(F===M){e.keepQuotes===!0&&(g+=F);break}g+=F}O({type:"text",value:g});continue}if(g===XP){m++;let F={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:m,commas:0,ranges:0,nodes:[]};o=O(F),s.push(o),O({type:"open",value:g});continue}if(g===YP){if(o.type!=="brace"){O({type:"text",value:g});continue}let M="close";o=s.pop(),o.close=!0,O({type:M,value:g}),m--,o=s[s.length-1];continue}if(g===VP&&m>0){if(o.ranges>0){o.ranges=0;let M=o.nodes.shift();o.nodes=[M,{type:"text",value:UP(o)}]}O({type:"comma",value:g}),o.commas++;continue}if(g===GP&&m>0&&o.commas===0){let M=o.nodes;if(m===0||M.length===0){O({type:"text",value:g});continue}if(a.type==="dot"){if(o.range=[],a.value+=g,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){M.pop();let F=M[M.length-1];F.value+=a.value+g,a=F,o.ranges--;continue}O({type:"dot",value:g});continue}O({type:"text",value:g})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let M=s[s.length-1],F=M.nodes.indexOf(o);M.nodes.splice(F,1,...o.nodes)}while(s.length>0);return O({type:"eos"}),i};Em.exports=tD});var Dm=P((Zx,Pm)=>{"use strict";var Cm=Gs(),nD=hm(),rD=gm(),iD=wm(),wt=(t,e={})=>{let n=[];if(Array.isArray(t))for(let r of t){let i=wt.create(r,e);Array.isArray(i)?n.push(...i):n.push(i)}else n=[].concat(wt.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(n=[...new Set(n)]),n};wt.parse=(t,e={})=>iD(t,e);wt.stringify=(t,e={})=>Cm(typeof t=="string"?wt.parse(t,e):t,e);wt.compile=(t,e={})=>(typeof t=="string"&&(t=wt.parse(t,e)),nD(t,e));wt.expand=(t,e={})=>{typeof t=="string"&&(t=wt.parse(t,e));let n=rD(t,e);return e.noempty===!0&&(n=n.filter(Boolean)),e.nodupes===!0&&(n=[...new Set(n)]),n};wt.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?wt.compile(t,e):wt.expand(t,e);Pm.exports=wt});var Sm=P((eq,sD)=>{sD.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var Am=P((tq,Tm)=>{Tm.exports=Sm()});var qm=P((nq,xm)=>{"use strict";var oD=require("path"),aD=Am(),cD=new Set(aD);xm.exports=t=>cD.has(oD.extname(t).slice(1).toLowerCase())});var Ks=P(z=>{"use strict";var{sep:uD}=require("path"),{platform:Jc}=process;z.EV_ALL="all";z.EV_READY="ready";z.EV_ADD="add";z.EV_CHANGE="change";z.EV_ADD_DIR="addDir";z.EV_UNLINK="unlink";z.EV_UNLINK_DIR="unlinkDir";z.EV_RAW="raw";z.EV_ERROR="error";z.STR_DATA="data";z.STR_END="end";z.STR_CLOSE="close";z.FSEVENT_CREATED="created";z.FSEVENT_MODIFIED="modified";z.FSEVENT_DELETED="deleted";z.FSEVENT_MOVED="moved";z.FSEVENT_CLONED="cloned";z.FSEVENT_UNKNOWN="unknown";z.FSEVENT_TYPE_FILE="file";z.FSEVENT_TYPE_DIRECTORY="directory";z.FSEVENT_TYPE_SYMLINK="symlink";z.KEY_LISTENERS="listeners";z.KEY_ERR="errHandlers";z.KEY_RAW="rawEmitters";z.HANDLER_KEYS=[z.KEY_LISTENERS,z.KEY_ERR,z.KEY_RAW];z.DOT_SLASH=`.${uD}`;z.BACK_SLASH_RE=/\\/g;z.DOUBLE_SLASH_RE=/\/\//;z.SLASH_OR_BACK_SLASH_RE=/[/\\]/;z.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;z.REPLACER_RE=/^\.[/\\]/;z.SLASH="/";z.SLASH_SLASH="//";z.BRACE_START="{";z.BANG="!";z.ONE_DOT=".";z.TWO_DOTS="..";z.STAR="*";z.GLOBSTAR="**";z.ROOT_GLOBSTAR="/**/*";z.SLASH_GLOBSTAR="/**";z.DIR_SUFFIX="Dir";z.ANYMATCH_OPTS={dot:!0};z.STRING_TYPE="string";z.FUNCTION_TYPE="function";z.EMPTY_STR="";z.EMPTY_FN=()=>{};z.IDENTITY_FN=t=>t;z.isWindows=Jc==="win32";z.isMacos=Jc==="darwin";z.isLinux=Jc==="linux"});var Lm=P((iq,Fm)=>{"use strict";var Rn=require("fs"),et=require("path"),{promisify:mi}=require("util"),lD=qm(),{isWindows:fD,isLinux:dD,EMPTY_FN:hD,EMPTY_STR:pD,KEY_LISTENERS:mr,KEY_ERR:Zc,KEY_RAW:di,HANDLER_KEYS:mD,EV_CHANGE:Ys,EV_ADD:Xs,EV_ADD_DIR:gD,EV_ERROR:Nm,STR_DATA:yD,STR_END:RD,BRACE_START:_D,STAR:bD}=Ks(),vD="watch",ED=mi(Rn.open),Om=mi(Rn.stat),wD=mi(Rn.lstat),CD=mi(Rn.close),eu=mi(Rn.realpath),PD={lstat:wD,stat:Om},nu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},hi=(t,e,n)=>{let r=t[e];r instanceof Set||(t[e]=r=new Set([r])),r.add(n)},DD=t=>e=>{let n=t[e];n instanceof Set?n.clear():delete t[e]},pi=(t,e,n)=>{let r=t[e];r instanceof Set?r.delete(n):r===n&&delete t[e]},Im=t=>t instanceof Set?t.size===0:!t,Qs=new Map;function km(t,e,n,r,i){let s=(o,a)=>{n(t),i(o,a,{watchedPath:t}),a&&t!==a&&Js(et.resolve(t,a),mr,et.join(t,a))};try{return Rn.watch(t,e,s)}catch(o){r(o)}}var Js=(t,e,n,r,i)=>{let s=Qs.get(t);s&&nu(s[e],o=>{o(n,r,i)})},SD=(t,e,n,r)=>{let{listener:i,errHandler:s,rawEmitter:o}=r,a=Qs.get(e),c;if(!n.persistent)return c=km(t,n,i,s,o),c.close.bind(c);if(a)hi(a,mr,i),hi(a,Zc,s),hi(a,di,o);else{if(c=km(t,n,Js.bind(null,e,mr),s,Js.bind(null,e,di)),!c)return;c.on(Nm,async d=>{let p=Js.bind(null,e,Zc);if(a.watcherUnusable=!0,fD&&d.code==="EPERM")try{let m=await ED(t,"r");await CD(m),p(d)}catch{}else p(d)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:c},Qs.set(e,a)}return()=>{pi(a,mr,i),pi(a,Zc,s),pi(a,di,o),Im(a.listeners)&&(a.watcher.close(),Qs.delete(e),mD.forEach(DD(a)),a.watcher=void 0,Object.freeze(a))}},tu=new Map,TD=(t,e,n,r)=>{let{listener:i,rawEmitter:s}=r,o=tu.get(e),a=new Set,c=new Set,d=o&&o.options;return d&&(d.persistent<n.persistent||d.interval>n.interval)&&(a=o.listeners,c=o.rawEmitters,Rn.unwatchFile(e),o=void 0),o?(hi(o,mr,i),hi(o,di,s)):(o={listeners:i,rawEmitters:s,options:n,watcher:Rn.watchFile(e,n,(p,m)=>{nu(o.rawEmitters,C=>{C(Ys,e,{curr:p,prev:m})});let g=p.mtimeMs;(p.size!==m.size||g>m.mtimeMs||g===0)&&nu(o.listeners,C=>C(t,p))})},tu.set(e,o)),()=>{pi(o,mr,i),pi(o,di,s),Im(o.listeners)&&(tu.delete(e),Rn.unwatchFile(e),o.options=o.watcher=void 0,Object.freeze(o))}},ru=class{constructor(e){this.fsw=e,this._boundHandleError=n=>e._handleError(n)}_watchWithNodeFs(e,n){let r=this.fsw.options,i=et.dirname(e),s=et.basename(e);this.fsw._getWatchedDir(i).add(s);let a=et.resolve(e),c={persistent:r.persistent};n||(n=hD);let d;return r.usePolling?(c.interval=r.enableBinaryInterval&&lD(s)?r.binaryInterval:r.interval,d=TD(e,a,c,{listener:n,rawEmitter:this.fsw._emitRaw})):d=SD(e,a,c,{listener:n,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),d}_handleFile(e,n,r){if(this.fsw.closed)return;let i=et.dirname(e),s=et.basename(e),o=this.fsw._getWatchedDir(i),a=n;if(o.has(s))return;let c=async(p,m)=>{if(this.fsw._throttle(vD,e,5)){if(!m||m.mtimeMs===0)try{let g=await Om(e);if(this.fsw.closed)return;let C=g.atimeMs,k=g.mtimeMs;(!C||C<=k||k!==a.mtimeMs)&&this.fsw._emit(Ys,e,g),dD&&a.ino!==g.ino?(this.fsw._closeFile(p),a=g,this.fsw._addPathCloser(p,this._watchWithNodeFs(e,c))):a=g}catch{this.fsw._remove(i,s)}else if(o.has(s)){let g=m.atimeMs,C=m.mtimeMs;(!g||g<=C||C!==a.mtimeMs)&&this.fsw._emit(Ys,e,m),a=m}}},d=this._watchWithNodeFs(e,c);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Xs,e,0))return;this.fsw._emit(Xs,e,n)}return d}async _handleSymlink(e,n,r,i){if(this.fsw.closed)return;let s=e.fullPath,o=this.fsw._getWatchedDir(n);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a=await eu(r);return this.fsw.closed?void 0:(o.has(i)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Ys,r,e.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Xs,r,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,n,r,i,s,o,a){if(e=et.join(e,pD),!r.hasGlob&&(a=this.fsw._throttle("readdir",e,1e3),!a))return;let c=this.fsw._getWatchedDir(r.path),d=new Set,p=this.fsw._readdirp(e,{fileFilter:m=>r.filterPath(m),directoryFilter:m=>r.filterDir(m),depth:0}).on(yD,async m=>{if(this.fsw.closed){p=void 0;return}let g=m.path,C=et.join(e,g);if(d.add(g),!(m.stats.isSymbolicLink()&&await this._handleSymlink(m,e,C,g))){if(this.fsw.closed){p=void 0;return}(g===i||!i&&!c.has(g))&&(this.fsw._incrReadyCount(),C=et.join(s,et.relative(s,C)),this._addToNodeFs(C,n,r,o+1))}}).on(Nm,this._boundHandleError);return new Promise(m=>p.once(RD,()=>{if(this.fsw.closed){p=void 0;return}let g=a?a.clear():!1;m(),c.getChildren().filter(C=>C!==e&&!d.has(C)&&(!r.hasGlob||r.filterPath({fullPath:et.resolve(e,C)}))).forEach(C=>{this.fsw._remove(e,C)}),p=void 0,g&&this._handleRead(e,!1,r,i,s,o,a)}))}async _handleDir(e,n,r,i,s,o,a){let c=this.fsw._getWatchedDir(et.dirname(e)),d=c.has(et.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!s&&!d&&(!o.hasGlob||o.globFilter(e))&&this.fsw._emit(gD,e,n),c.add(et.basename(e)),this.fsw._getWatchedDir(e);let p,m,g=this.fsw.options.depth;if((g==null||i<=g)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,r,o,s,e,i,p),this.fsw.closed))return;m=this._watchWithNodeFs(e,(C,k)=>{k&&k.mtimeMs===0||this._handleRead(C,!1,o,s,e,i,p)})}return m}async _addToNodeFs(e,n,r,i,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(e,i);!a.hasGlob&&r&&(a.hasGlob=r.hasGlob,a.globFilter=r.globFilter,a.filterPath=c=>r.filterPath(c),a.filterDir=c=>r.filterDir(c));try{let c=await PD[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,c))return o(),!1;let d=this.fsw.options.followSymlinks&&!e.includes(bD)&&!e.includes(_D),p;if(c.isDirectory()){let m=et.resolve(e),g=d?await eu(e):e;if(this.fsw.closed||(p=await this._handleDir(a.watchPath,c,n,i,s,a,g),this.fsw.closed))return;m!==g&&g!==void 0&&this.fsw._symlinkPaths.set(m,g)}else if(c.isSymbolicLink()){let m=d?await eu(e):e;if(this.fsw.closed)return;let g=et.dirname(a.watchPath);if(this.fsw._getWatchedDir(g).add(a.watchPath),this.fsw._emit(Xs,a.watchPath,c),p=await this._handleDir(g,c,n,i,e,a,m),this.fsw.closed)return;m!==void 0&&this.fsw._symlinkPaths.set(et.resolve(e),m)}else p=this._handleFile(a.watchPath,c,n);return o(),this.fsw._addPathCloser(e,p),!1}catch(c){if(this.fsw._handleError(c))return o(),e}}};Fm.exports=ru});var Bm=P((sq,fu)=>{"use strict";var uu=require("fs"),tt=require("path"),{promisify:lu}=require("util"),gr;try{gr=require("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(gr){let t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){let e=Number.parseInt(t[1],10),n=Number.parseInt(t[2],10);e===8&&n<16&&(gr=void 0)}}var{EV_ADD:iu,EV_CHANGE:AD,EV_ADD_DIR:jm,EV_UNLINK:Zs,EV_ERROR:xD,STR_DATA:qD,STR_END:kD,FSEVENT_CREATED:ND,FSEVENT_MODIFIED:OD,FSEVENT_DELETED:ID,FSEVENT_MOVED:FD,FSEVENT_UNKNOWN:LD,FSEVENT_TYPE_FILE:jD,FSEVENT_TYPE_DIRECTORY:gi,FSEVENT_TYPE_SYMLINK:Um,ROOT_GLOBSTAR:Mm,DIR_SUFFIX:MD,DOT_SLASH:$m,FUNCTION_TYPE:su,EMPTY_FN:$D,IDENTITY_FN:HD}=Ks(),WD=t=>isNaN(t)?{}:{depth:t},au=lu(uu.stat),UD=lu(uu.lstat),Hm=lu(uu.realpath),BD={stat:au,lstat:UD},Gn=new Map,VD=10,GD=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),zD=(t,e)=>({stop:gr.watch(t,e)});function KD(t,e,n,r){let i=tt.extname(t)?tt.dirname(t):t,s=tt.dirname(i),o=Gn.get(i);XD(s)&&(i=s);let a=tt.resolve(t),c=a!==e,d=(m,g,C)=>{c&&(m=m.replace(e,a)),(m===a||!m.indexOf(a+tt.sep))&&n(m,g,C)},p=!1;for(let m of Gn.keys())if(e.indexOf(tt.resolve(m)+tt.sep)===0){i=m,o=Gn.get(i),p=!0;break}return o||p?o.listeners.add(d):(o={listeners:new Set([d]),rawEmitter:r,watcher:zD(i,(m,g)=>{if(!o.listeners.size)return;let C=gr.getInfo(m,g);o.listeners.forEach(k=>{k(m,g,C)}),o.rawEmitter(C.event,m,C)})},Gn.set(i,o)),()=>{let m=o.listeners;if(m.delete(d),!m.size&&(Gn.delete(i),o.watcher))return o.watcher.stop().then(()=>{o.rawEmitter=o.watcher=void 0,Object.freeze(o)})}}var XD=t=>{let e=0;for(let n of Gn.keys())if(n.indexOf(t)===0&&(e++,e>=VD))return!0;return!1},YD=()=>gr&&Gn.size<128,ou=(t,e)=>{let n=0;for(;!t.indexOf(e)&&(t=tt.dirname(t))!==e;)n++;return n},Wm=(t,e)=>t.type===gi&&e.isDirectory()||t.type===Um&&e.isSymbolicLink()||t.type===jD&&e.isFile(),cu=class{constructor(e){this.fsw=e}checkIgnored(e,n){let r=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,n))return r.add(e),n&&n.isDirectory()&&r.add(e+Mm),!0;r.delete(e),r.delete(e+Mm)}addOrChange(e,n,r,i,s,o,a,c){let d=s.has(o)?AD:iu;this.handleEvent(d,e,n,r,i,s,o,a,c)}async checkExists(e,n,r,i,s,o,a,c){try{let d=await au(e);if(this.fsw.closed)return;Wm(a,d)?this.addOrChange(e,n,r,i,s,o,a,c):this.handleEvent(Zs,e,n,r,i,s,o,a,c)}catch(d){d.code==="EACCES"?this.addOrChange(e,n,r,i,s,o,a,c):this.handleEvent(Zs,e,n,r,i,s,o,a,c)}}handleEvent(e,n,r,i,s,o,a,c,d){if(!(this.fsw.closed||this.checkIgnored(n)))if(e===Zs){let p=c.type===gi;(p||o.has(a))&&this.fsw._remove(s,a,p)}else{if(e===iu){if(c.type===gi&&this.fsw._getWatchedDir(n),c.type===Um&&d.followSymlinks){let m=d.depth===void 0?void 0:ou(r,i)+1;return this._addToFsEvents(n,!1,!0,m)}this.fsw._getWatchedDir(s).add(a)}let p=c.type===gi?e+MD:e;this.fsw._emit(p,n),p===jm&&this._addToFsEvents(n,!1,!0)}}_watchWithFsEvents(e,n,r,i){if(this.fsw.closed||this.fsw._isIgnored(e))return;let s=this.fsw.options,a=KD(e,n,async(c,d,p)=>{if(this.fsw.closed||s.depth!==void 0&&ou(c,n)>s.depth)return;let m=r(tt.join(e,tt.relative(e,c)));if(i&&!i(m))return;let g=tt.dirname(m),C=tt.basename(m),k=this.fsw._getWatchedDir(p.type===gi?m:g);if(GD.has(d)||p.event===LD)if(typeof s.ignored===su){let O;try{O=await au(m)}catch{}if(this.fsw.closed||this.checkIgnored(m,O))return;Wm(p,O)?this.addOrChange(m,c,n,g,k,C,p,s):this.handleEvent(Zs,m,c,n,g,k,C,p,s)}else this.checkExists(m,c,n,g,k,C,p,s);else switch(p.event){case ND:case OD:return this.addOrChange(m,c,n,g,k,C,p,s);case ID:case FD:return this.checkExists(m,c,n,g,k,C,p,s)}},this.fsw._emitRaw);return this.fsw._emitReady(),a}async _handleFsEventsSymlink(e,n,r,i){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(n))){this.fsw._symlinkPaths.set(n,!0),this.fsw._incrReadyCount();try{let s=await Hm(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||e,o=>{let a=e;return s&&s!==$m?a=o.replace(s,e):o!==$m&&(a=tt.join(e,o)),r(a)},!1,i)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(e,n,r,i,s){let o=r(e),a=n.isDirectory(),c=this.fsw._getWatchedDir(tt.dirname(o)),d=tt.basename(o);a&&this.fsw._getWatchedDir(o),!c.has(d)&&(c.add(d),(!i.ignoreInitial||s===!0)&&this.fsw._emit(a?jm:iu,o,n))}initWatch(e,n,r,i){if(this.fsw.closed)return;let s=this._watchWithFsEvents(r.watchPath,tt.resolve(e||r.watchPath),i,r.globFilter);this.fsw._addPathCloser(n,s)}async _addToFsEvents(e,n,r,i){if(this.fsw.closed)return;let s=this.fsw.options,o=typeof n===su?n:HD,a=this.fsw._getWatchHelpers(e);try{let c=await BD[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,c))throw null;if(c.isDirectory()){if(a.globFilter||this.emitAdd(o(e),c,o,s,r),i&&i>s.depth)return;this.fsw._readdirp(a.watchPath,{fileFilter:d=>a.filterPath(d),directoryFilter:d=>a.filterDir(d),...WD(s.depth-(i||0))}).on(qD,d=>{if(this.fsw.closed||d.stats.isDirectory()&&!a.filterPath(d))return;let p=tt.join(a.watchPath,d.path),{fullPath:m}=d;if(a.followSymlinks&&d.stats.isSymbolicLink()){let g=s.depth===void 0?void 0:ou(p,tt.resolve(a.watchPath))+1;this._handleFsEventsSymlink(p,m,o,g)}else this.emitAdd(p,d.stats,o,s,r)}).on(xD,$D).on(kD,()=>{this.fsw._emitReady()})}else this.emitAdd(a.watchPath,c,o,s,r),this.fsw._emitReady()}catch(c){(!c||this.fsw._handleError(c))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&r!==!0)if(typeof n===su)this.initWatch(void 0,e,a,o);else{let c;try{c=await Hm(a.watchPath)}catch{}this.initWatch(c,e,a,o)}}};fu.exports=cu;fu.exports.canUse=YD});var Su=P(Du=>{"use strict";var{EventEmitter:QD}=require("events"),Cu=require("fs"),ye=require("path"),{promisify:Qm}=require("util"),JD=qp(),yu=jp().default,ZD=Up(),du=Vc(),eS=Dm(),tS=Uc(),nS=Lm(),Vm=Bm(),{EV_ALL:hu,EV_READY:rS,EV_ADD:eo,EV_CHANGE:yi,EV_UNLINK:Gm,EV_ADD_DIR:iS,EV_UNLINK_DIR:sS,EV_RAW:oS,EV_ERROR:pu,STR_CLOSE:aS,STR_END:cS,BACK_SLASH_RE:uS,DOUBLE_SLASH_RE:zm,SLASH_OR_BACK_SLASH_RE:lS,DOT_RE:fS,REPLACER_RE:dS,SLASH:mu,SLASH_SLASH:hS,BRACE_START:pS,BANG:Ru,ONE_DOT:Jm,TWO_DOTS:mS,GLOBSTAR:gS,SLASH_GLOBSTAR:gu,ANYMATCH_OPTS:_u,STRING_TYPE:Pu,FUNCTION_TYPE:yS,EMPTY_STR:bu,EMPTY_FN:RS,isWindows:_S,isMacos:bS}=Ks(),vS=Qm(Cu.stat),ES=Qm(Cu.readdir),vu=(t=[])=>Array.isArray(t)?t:[t],Zm=(t,e=[])=>(t.forEach(n=>{Array.isArray(n)?Zm(n,e):e.push(n)}),e),Km=t=>{let e=Zm(vu(t));if(!e.every(n=>typeof n===Pu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(eg)},Xm=t=>{let e=t.replace(uS,mu),n=!1;for(e.startsWith(hS)&&(n=!0);e.match(zm);)e=e.replace(zm,mu);return n&&(e=mu+e),e},eg=t=>Xm(ye.normalize(Xm(t))),Ym=(t=bu)=>e=>typeof e!==Pu?e:eg(ye.isAbsolute(e)?e:ye.join(t,e)),wS=(t,e)=>ye.isAbsolute(t)?t:t.startsWith(Ru)?Ru+ye.join(e,t.slice(1)):ye.join(e,t),Xt=(t,e)=>t[e]===void 0,Eu=class{constructor(e,n){this.path=e,this._removeWatcher=n,this.items=new Set}add(e){let{items:n}=this;n&&e!==Jm&&e!==mS&&n.add(e)}async remove(e){let{items:n}=this;if(!n||(n.delete(e),n.size>0))return;let r=this.path;try{await ES(r)}catch{this._removeWatcher&&this._removeWatcher(ye.dirname(r),ye.basename(r))}}has(e){let{items:n}=this;if(n)return n.has(e)}getChildren(){let{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},CS="stat",PS="lstat",wu=class{constructor(e,n,r,i){this.fsw=i,this.path=e=e.replace(dS,bu),this.watchPath=n,this.fullWatchPath=ye.resolve(n),this.hasGlob=n!==e,e===bu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&r?void 0:!1,this.globFilter=this.hasGlob?yu(e,void 0,_u):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?CS:PS}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return ye.join(this.watchPath,ye.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){let{stats:n}=e;if(n&&n.isSymbolicLink())return this.filterDir(e);let r=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===yS?this.globFilter(r):!0)&&this.fsw._isntIgnored(r,n)&&this.fsw._hasReadPermissions(n)}getDirParts(e){if(!this.hasGlob)return[];let n=[];return(e.includes(pS)?eS.expand(e):[e]).forEach(i=>{n.push(ye.relative(this.watchPath,i).split(lS))}),n}filterDir(e){if(this.hasGlob){let n=this.getDirParts(this.checkGlobSymlink(e)),r=!1;this.unmatchedGlob=!this.dirParts.some(i=>i.every((s,o)=>(s===gS&&(r=!0),r||!n[0][o]||yu(s,n[0][o],_u))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}},to=class extends QD{constructor(e){super();let n={};e&&Object.assign(n,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,Xt(n,"persistent")&&(n.persistent=!0),Xt(n,"ignoreInitial")&&(n.ignoreInitial=!1),Xt(n,"ignorePermissionErrors")&&(n.ignorePermissionErrors=!1),Xt(n,"interval")&&(n.interval=100),Xt(n,"binaryInterval")&&(n.binaryInterval=300),Xt(n,"disableGlobbing")&&(n.disableGlobbing=!1),n.enableBinaryInterval=n.binaryInterval!==n.interval,Xt(n,"useFsEvents")&&(n.useFsEvents=!n.usePolling),Vm.canUse()||(n.useFsEvents=!1),Xt(n,"usePolling")&&!n.useFsEvents&&(n.usePolling=bS);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let c=i.toLowerCase();c==="false"||c==="0"?n.usePolling=!1:c==="true"||c==="1"?n.usePolling=!0:n.usePolling=!!c}let s=process.env.CHOKIDAR_INTERVAL;s&&(n.interval=Number.parseInt(s,10)),Xt(n,"atomic")&&(n.atomic=!n.usePolling&&!n.useFsEvents),n.atomic&&(this._pendingUnlinks=new Map),Xt(n,"followSymlinks")&&(n.followSymlinks=!0),Xt(n,"awaitWriteFinish")&&(n.awaitWriteFinish=!1),n.awaitWriteFinish===!0&&(n.awaitWriteFinish={});let o=n.awaitWriteFinish;o&&(o.stabilityThreshold||(o.stabilityThreshold=2e3),o.pollInterval||(o.pollInterval=100),this._pendingWrites=new Map),n.ignored&&(n.ignored=vu(n.ignored));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=RS,this._readyEmitted=!0,process.nextTick(()=>this.emit(rS)))},this._emitRaw=(...c)=>this.emit(oS,...c),this._readyEmitted=!1,this.options=n,n.useFsEvents?this._fsEventsHandler=new Vm(this):this._nodeFsHandler=new nS(this),Object.freeze(n)}add(e,n,r){let{cwd:i,disableGlobbing:s}=this.options;this.closed=!1;let o=Km(e);return i&&(o=o.map(a=>{let c=wS(a,i);return s||!du(a)?c:tS(c)})),o=o.filter(a=>a.startsWith(Ru)?(this._ignoredPaths.add(a.slice(1)),!1):(this._ignoredPaths.delete(a),this._ignoredPaths.delete(a+gu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=o.length),this.options.persistent&&(this._readyCount*=2),o.forEach(a=>this._fsEventsHandler._addToFsEvents(a))):(this._readyCount||(this._readyCount=0),this._readyCount+=o.length,Promise.all(o.map(async a=>{let c=await this._nodeFsHandler._addToNodeFs(a,!r,0,0,n);return c&&this._emitReady(),c})).then(a=>{this.closed||a.filter(c=>c).forEach(c=>{this.add(ye.dirname(c),ye.basename(n||c))})})),this}unwatch(e){if(this.closed)return this;let n=Km(e),{cwd:r}=this.options;return n.forEach(i=>{!ye.isAbsolute(i)&&!this._closers.has(i)&&(r&&(i=ye.join(r,i)),i=ye.resolve(i)),this._closePath(i),this._ignoredPaths.add(i),this._watched.has(i)&&this._ignoredPaths.add(i+gu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(n=>n.forEach(r=>{let i=r();i instanceof Promise&&e.push(i)})),this._streams.forEach(n=>n.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(n=>n.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(n=>{this[`_${n}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((n,r)=>{let i=this.options.cwd?ye.relative(this.options.cwd,r):r;e[i||Jm]=n.getChildren().sort()}),e}emitWithAll(e,n){this.emit(...n),e!==pu&&this.emit(hu,...n)}async _emit(e,n,r,i,s){if(this.closed)return;let o=this.options;_S&&(n=ye.normalize(n)),o.cwd&&(n=ye.relative(o.cwd,n));let a=[e,n];s!==void 0?a.push(r,i,s):i!==void 0?a.push(r,i):r!==void 0&&a.push(r);let c=o.awaitWriteFinish,d;if(c&&(d=this._pendingWrites.get(n)))return d.lastChange=new Date,this;if(o.atomic){if(e===Gm)return this._pendingUnlinks.set(n,a),setTimeout(()=>{this._pendingUnlinks.forEach((p,m)=>{this.emit(...p),this.emit(hu,...p),this._pendingUnlinks.delete(m)})},typeof o.atomic=="number"?o.atomic:100),this;e===eo&&this._pendingUnlinks.has(n)&&(e=a[0]=yi,this._pendingUnlinks.delete(n))}if(c&&(e===eo||e===yi)&&this._readyEmitted){let p=(m,g)=>{m?(e=a[0]=pu,a[1]=m,this.emitWithAll(e,a)):g&&(a.length>2?a[2]=g:a.push(g),this.emitWithAll(e,a))};return this._awaitWriteFinish(n,c.stabilityThreshold,e,p),this}if(e===yi&&!this._throttle(yi,n,50))return this;if(o.alwaysStat&&r===void 0&&(e===eo||e===iS||e===yi)){let p=o.cwd?ye.join(o.cwd,n):n,m;try{m=await vS(p)}catch{}if(!m||this.closed)return;a.push(m)}return this.emitWithAll(e,a),this}_handleError(e){let n=e&&e.code;return e&&n!=="ENOENT"&&n!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||n!=="EPERM"&&n!=="EACCES")&&this.emit(pu,e),e||this.closed}_throttle(e,n,r){this._throttled.has(e)||this._throttled.set(e,new Map);let i=this._throttled.get(e),s=i.get(n);if(s)return s.count++,!1;let o,a=()=>{let d=i.get(n),p=d?d.count:0;return i.delete(n),clearTimeout(o),d&&clearTimeout(d.timeoutObject),p};o=setTimeout(a,r);let c={timeoutObject:o,clear:a,count:0};return i.set(n,c),c}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,n,r,i){let s,o=e;this.options.cwd&&!ye.isAbsolute(e)&&(o=ye.join(this.options.cwd,e));let a=new Date,c=d=>{Cu.stat(o,(p,m)=>{if(p||!this._pendingWrites.has(e)){p&&p.code!=="ENOENT"&&i(p);return}let g=Number(new Date);d&&m.size!==d.size&&(this._pendingWrites.get(e).lastChange=g);let C=this._pendingWrites.get(e);g-C.lastChange>=n?(this._pendingWrites.delete(e),i(void 0,m)):s=setTimeout(c,this.options.awaitWriteFinish.pollInterval,m)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:a,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(s),r)}),s=setTimeout(c,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,n){if(this.options.atomic&&fS.test(e))return!0;if(!this._userIgnored){let{cwd:r}=this.options,i=this.options.ignored,s=i&&i.map(Ym(r)),o=vu(s).filter(c=>typeof c===Pu&&!du(c)).map(c=>c+gu),a=this._getGlobIgnored().map(Ym(r)).concat(s,o);this._userIgnored=yu(a,void 0,_u)}return this._userIgnored([e,n])}_isntIgnored(e,n){return!this._isIgnored(e,n)}_getWatchHelpers(e,n){let r=n||this.options.disableGlobbing||!du(e)?e:ZD(e),i=this.options.followSymlinks;return new wu(e,r,i,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));let n=ye.resolve(e);return this._watched.has(n)||this._watched.set(n,new Eu(n,this._boundRemove)),this._watched.get(n)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;let r=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(r.toString(8)[0],10))}_remove(e,n,r){let i=ye.join(e,n),s=ye.resolve(i);if(r=r??(this._watched.has(i)||this._watched.has(s)),!this._throttle("remove",i,100))return;!r&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,n,!0),this._getWatchedDir(i).getChildren().forEach(g=>this._remove(i,g));let c=this._getWatchedDir(e),d=c.has(n);c.remove(n),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let p=i;if(this.options.cwd&&(p=ye.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(p)&&this._pendingWrites.get(p).cancelWait()===eo)return;this._watched.delete(i),this._watched.delete(s);let m=r?sS:Gm;d&&!this._isIgnored(i)&&this._emit(m,i),this.options.useFsEvents||this._closePath(i)}_closePath(e){this._closeFile(e);let n=ye.dirname(e);this._getWatchedDir(n).remove(ye.basename(e))}_closeFile(e){let n=this._closers.get(e);n&&(n.forEach(r=>r()),this._closers.delete(e))}_addPathCloser(e,n){if(!n)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(n)}_readdirp(e,n){if(this.closed)return;let r={type:hu,alwaysStat:!0,lstat:!0,...n},i=JD(e,r);return this._streams.add(i),i.once(aS,()=>{i=void 0}),i.once(cS,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};Du.FSWatcher=to;var DS=(t,e)=>{let n=new to(e);return n.add(t),n};Du.watch=DS});var Cg=_e(require("fs")),Pg=_e(require("path"));var Kn=_e(require("process")),G=_e(Fe()),bi=_e(Hf()),io=_e(Fi()),me=_e(require("path")),We=_e(require("fs")),An=_e(Fe());var Qr=_e(require("fs")),Ze=_e(require("path"));var At=_e(require("path"));var ec=process.arch=="arm64"?process.platform+process.arch:process.platform,ne="2.0",Wf="rescript-editor-analysis.exe",tc=At.join(At.dirname(__dirname),"..",Wf),nc=At.join(At.dirname(__dirname),"analysis_binaries",ec,Wf);var Uf=At.join("node_modules",".bin"),Bf=".bsb.lock",Gr="bsconfig.json",zr="rescript.json",ur=At.join("lib","bs"),Vf=At.join("lib","ocaml"),ms=At.join("lib","bs",".compiler.log"),Kr=At.join("lib","bs","build.ninja"),rc=At.join("lib","rewatch.lock"),en=".res",Xr=".resi",Gf=".cmi",ic="Start Build",zf="commonjs",Kf=".js",sc="rescript_configuration_request",Xf=1e4;var dv=t=>{switch(t){case"esmodule":case"es6":return"es6";case"es6-global":return"es6_global";case"commonjs":default:return"js"}},ys=(t,e)=>{let n=Ze.basename(t,Ze.extname(t));return Ze.format({dir:Ze.dirname(t),name:n,ext:e})},Yr=(t,e)=>{if(t==null)return null;let n=Ze.join(t,e);if(Qr.existsSync(n))return n;let r=Ze.dirname(t);return r===t?null:Yr(r,e)},Rs=t=>{try{let e=Ze.join(t,zr),n=Ze.join(t,Gr),r=Qr.readFileSync(Qr.existsSync(e)?e:n,{encoding:"utf-8"});return JSON.parse(r)}catch{return null}},Yf=t=>{let e=t["package-specs"],n="",r=zf,i={module:r},s=Kf;return e&&(!Array.isArray(e)&&typeof e!="string"&&e.module?i=e:typeof e=="string"?r=e:Array.isArray(e)&&e[0]&&(typeof e[0]=="string"?r=e[0]:i=e[0])),i.module&&(r=i.module),i["in-source"]||(n="lib/"+dv(r)),i.suffix?s=i.suffix:t.suffix&&(s=t.suffix),[s,n]},Qf=(t,e)=>{let n=Rs(t);if(!n)return null;let[r,i]=Yf(n),s=ys(e,r);return Ze.join(t,i,s)},Jf=(t,e)=>{let n=Yr(Ze.join("..",t),zr);if(n||(n=Yr(Ze.join("..",t),Gr)),!n)return null;let r=Rs(Ze.dirname(n));if(!r)return null;let[i,s]=Yf(r),o=ys(e,i);return Ze.join(t,s,o)};var mn=_e(require("child_process")),ut=_e(require("path")),kt=_e(Sr()),pn=_e(require("fs")),Yh=_e(require("fs/promises")),Is=_e(require("os")),Ns=_e(Cc());var hn=_e(Fe());var Bh=require("url"),qs=(t,e,n)=>{let r=t.start.line===t.end.line&&t.start.character===t.end.character?1:0,i={start:{line:t.start.line,character:t.start.character-r},end:{line:t.start.line,character:t.start.character-r}},s={start:{line:t.end.line,character:t.end.character},end:{line:t.end.line,character:t.end.character}};return[{range:i,newText:e},{range:s,newText:n}]},cC=(t,e)=>{let n={line:t.end.line,character:t.end.character-1};return[{range:{start:n,end:n},newText:e}]},uC=(t,e)=>[{range:t,newText:e}],Wh=t=>{let e=t.trim();return e.endsWith(",")?e.slice(0,e.length-1):e},Uh=t=>{let e=[];for(let n=0;n<=t.length-1;n+=1){let r=t[n];if(r.includes("(defined as")){let[i,s]=r.split("(defined as");e.push(Wh(i));break}else e.push(Wh(r))}return e.join("").trim()},lC=(t,e)=>{let n=[],r=t.slice(),i=!1;return r.forEach(s=>{i||(s.startsWith(e)?i=!0:n.push(s))}),n},Vh=async({diagnostic:t,diagnosticMessage:e,file:n,range:r,addFoundActionsHere:i})=>{for(let[s,o]of e.entries()){let a=[RC,fC,hC,pC,mC,gC,yC,dC];for(let c of a){let d=!1;try{d=await c({array:e,codeActions:i,diagnostic:t,file:n,index:s,line:o,range:r})}catch(p){console.error(p)}if(d)break}}},fC=async({codeActions:t,diagnostic:e,file:n,line:r,range:i})=>{if(r.startsWith("Hint: Did you mean")){let s=/Did you mean ([A-Za-z0-9_]*)?/,o=r.match(s);if(o===null)return!1;let[a,c]=o;if(c!=null){t[n]=t[n]||[];let d={title:`Replace with '${c}'`,edit:{changes:{[n]:[{range:i,newText:c}]}},diagnostics:[e],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return t[n].push({range:i,codeAction:d}),!0}}return!1},dC=async({codeActions:t,diagnostic:e,file:n,line:r,range:i,array:s,index:o})=>{if(r.startsWith("This pattern matches values of type")){let a=/This pattern matches values of type (.*)$/,c=r.match(a);if(c===null)return!1;let[d,p]=c;if(!p.startsWith("option<")){let m=s.slice(o+1),g=m.findIndex(O=>O.trim().startsWith("but a pattern was expected which matches values of type"));if(g===-1)return!1;let[C,k=""]=m[g].split("but a pattern was expected which matches values of type");if(k.trim()===""&&(k=(m[g+1]??"").trim()),k.trim().startsWith("option<")){t[n]=t[n]||[];let O={title:"Wrap in option Some",edit:{changes:{[n]:qs(i,"Some(",")")}},diagnostics:[e],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return t[n].push({range:i,codeAction:O}),!0}}}return!1},Gh=({recordFieldNames:t,codeActions:e,file:n,range:r,diagnostic:i,todoValue:s})=>{if(t!=null){e[n]=e[n]||[];let o=r.start.line!==r.end.line,a="";if(o){let d=o?r.end.character+2:0,p=Array.from({length:d}).join(" "),m=Array.from({length:r.end.character}).join(" ");t.forEach((g,C)=>{C===0?a+=" ":a+=p,a+=`${g}: ${s},
36
+ `}),a+=`${m}`}else r.end.character-r.start.character>2&&(a+=", "),a+=t.map(d=>`${d}: ${s}`).join(", ");let c={title:"Add missing record fields",edit:{changes:{[n]:cC(r,a)}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:c}),!0}return!1},hC=async({array:t,codeActions:e,diagnostic:n,file:r,index:i,line:s,range:o})=>{if(s.startsWith("Some record fields are undefined:")){let a=s.trim().split("Some record fields are undefined: ")[1]?.split(" ");return t.slice(i+1).forEach(c=>{a.push(...c.trim().split(" "))}),Gh({recordFieldNames:a,codeActions:e,diagnostic:n,file:r,range:o,todoValue:'failwith("TODO")'})}return!1},pC=async({array:t,codeActions:e,diagnostic:n,file:r,index:i,line:s,range:o})=>{if(s.startsWith("Some required record fields are missing:")){let a=s;a.endsWith(".")&&(a=a.slice(0,a.length-1));let c=a.trim().split("Some required record fields are missing: ")[1]?.split(" "),d=!1;return t.slice(i+1).forEach(p=>{d||(c.push(...p.trim().split(".")[0].split(" ")),p.includes(".")&&(d=!0))}),Gh({recordFieldNames:c,codeActions:e,diagnostic:n,file:r,range:o,todoValue:"%todo"})}return!1},mC=async({line:t,codeActions:e,file:n,range:r,diagnostic:i})=>{if(t.startsWith("You can convert ")){let s=/You can convert (\w*) to (\w*) with ([\w.]*).$/,o=t.match(s);if(o===null)return!1;let[a,c,d,p]=o;if(c!=null&&d!=null&&p!=null){e[n]=e[n]||[];let m={title:`Convert ${c} to ${d} with ${p}`,edit:{changes:{[n]:qs(r,`${p}(`,")")}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:m}),!0}}return!1},gC=async({line:t,codeActions:e,file:n,range:r,diagnostic:i})=>{if(t.startsWith("This is an uncurried ReScript function. It must be applied with a dot.")){let s={line:r.end.line,character:r.end.character+1};e[n]=e[n]||[];let o={title:"Apply uncurried function call with dot",edit:{changes:{[n]:[{range:{start:s,end:s},newText:". "}]}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:o}),!0}return!1},yC=async({line:t,codeActions:e,file:n,range:r,diagnostic:i,array:s,index:o})=>{if(t.startsWith("You forgot to handle a possible case here, for example:")){let a=s.slice(o+1).join("").trim(),c=(0,Bh.fileURLToPath)(n),d=await nn(c,["codemod",c,r.start.line,r.start.character,"add-missing-cases",a]);e[n]=e[n]||[];let p={title:"Insert missing cases",edit:{changes:{[n]:uC(r,d)}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:p}),!0}return!1},RC=async({line:t,codeActions:e,file:n,range:r,diagnostic:i,array:s,index:o})=>{let a="This has type:";if(t.startsWith(a)){let c=lC([t.slice(a.length),...s.slice(o+1)],"Somewhere wanted:"),d=s.slice(o+c.length).map(g=>g.replace("Somewhere wanted:","")),p=Uh(c),m=Uh(d);if(p===`option<${m}>`){e[n]=e[n]||[];let g="assert false";switch(m){case"string":{g='"-"';break}case"bool":{g="false";break}case"int":{g="-1";break}case"float":{g="-1.";break}}let C={title:"Unwrap optional value",edit:{changes:{[n]:qs(r,"switch ",` { | None => ${g} | Some(v) => v }`)}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:C}),!0}if(`option<${p}>`===m){e[n]=e[n]||[];let g={title:"Wrap value in Some",edit:{changes:{[n]:qs(r,"Some(",")")}},diagnostics:[i],kind:hn.CodeActionKind.QuickFix,isPreferred:!0};return e[n].push({range:r,codeAction:g}),!0}}return!1};var ks=[],Dc={},zh=t=>(ks.push(t),()=>{ks=ks.filter(e=>e!==t)}),Kh=(t,e)=>{(Dc[t]==null||Dc[t]<Date.now()-9e5)&&(Dc[t]=Date.now(),ks.forEach(n=>n(e)))};var bC={extensionConfiguration:{askToStartBuild:!0,inlayHints:{enable:!1,maxLength:25},codeLens:!1,binaryPath:null,platformPath:null,signatureHelp:{enabled:!0,forConstructorPayloads:!0},incrementalTypechecking:{enable:!0,acrossFiles:!1,debugLogging:!1},cache:{projectConfig:{enable:!0}}}},de=bC;var Xe=new Map;var vC="rescript_format_file_"+process.pid+"_",Sc=0,gn=(t="")=>{let e=vC+Sc+t;return Sc=Sc+1,ut.join(Is.tmpdir(),e)},Qh=t=>{let e=ut.dirname(t);return pn.default.existsSync(ut.join(e,zr))||pn.default.existsSync(ut.join(e,Gr))?e:e===t?null:Qh(e)},Kt=(t,e)=>{let n=null;for(let r of Xe.keys())t.startsWith(r)&&(!e||t!==r)&&(n==null||r.length>n.length)&&(n=r);if(n!=null)return n;{let r=ut.extname(t)==="";return Qh(r&&!e?ut.join(t,"dummy.res"):t)}},Tc=async(t,e)=>{if(de.extensionConfiguration.platformPath!=null)return ut.join(de.extensionConfiguration.platformPath,e);let n=Yr(t,ut.join("node_modules","rescript"));if(n==null)return null;let r=null,i=null;try{let o=ut.join(n,"package.json"),a=JSON.parse(await Yh.default.readFile(o,"utf-8"));r=a.version,i=a.bin.rescript}catch{return null}let s=null;if(e=="rescript")s=ut.join(n,i);else if(Ns.default.gte(r,"12.0.0-alpha.13")){let o=`${process.platform}-${process.arch}`,a=ut.join(n,"..",`@rescript/${o}/bin.js`),{binPaths:c}=await import(a);e=="bsc.exe"?s=c.bsc_exe:e=="rescript-editor-analysis.exe"&&(s=c.rescript_editor_analysis_exe)}else s=ut.join(n,ec,e);return s!=null&&pn.default.existsSync(s)?s:null},Jh=t=>Tc(t,"rescript"),Ac=t=>Tc(t,"bsc.exe"),Zh=t=>Tc(t,"rescript-editor-analysis.exe"),ep=(t,e,n)=>{let r=ut.extname(e),i=gn(r);pn.default.writeFileSync(i,n,{encoding:"utf-8"});try{if(t!=null)return{kind:"success",result:mn.execFileSync(t,["-color","never","-format",i]).toString()};throw new Error("Could not find ReScript compiler for project.")}catch(s){return{kind:"error",error:s instanceof Error?s.message:String(s)}}finally{pn.default.unlink(i,()=>null)}};async function xc(t){if(t==null)return;let e=await Ac(t);if(e!=null)try{return mn.execSync(`${e} -v`).toString().replace(/rescript/gi,"").trim()}catch{return}}var Os=null;pn.default.existsSync(tc)?Os=tc:pn.default.existsSync(nc)&&(Os=nc);var nn=async(t,e,n=!1)=>{let r=Kt(t);if(r==null&&n)return null;let i=Xe.get(r??"")?.rescriptVersion??await xc(r),s=Os,o=r?Xe.get(r):null,a=Ns.default.valid(i)&&Ns.default.lt(i,"12.0.0-alpha.5");if(!a&&o!=null)s=o.editorAnalysisLocation;else{if(!a&&o==null)return null;s=Os}let c={cwd:r||void 0,maxBuffer:1/0,env:{...process.env,RESCRIPT_VERSION:i,RESCRIPT_INCREMENTAL_TYPECHECKING:de.extensionConfiguration.incrementalTypechecking?.enable===!0?"true":void 0,RESCRIPT_PROJECT_CONFIG_CACHE:de.extensionConfiguration.cache?.projectConfig?.enable===!0?"true":void 0}};if(s==null)return null;let d="";try{return d=mn.execFileSync(s,e,c).toString(),JSON.parse(d)}catch(p){return console.error(p),console.error("Original response: ",d),console.error("Args: ",e),Kh(String(e[0]),String(p)),null}},Nt=async(t,e,n,r=!0)=>{let i=await nn(t,e,r);return{jsonrpc:ne,id:n.id,result:i}},qc=async(t,e)=>await nn(t,["references",t,e.line,e.character]),Xh=t=>t.replace(/(?:^\w|[A-Z]|\b\w)/g,e=>e.toUpperCase()).replace(/(\s|-)+/g,""),oi=t=>{let e=Rs(t),n="";return e?(e.namespace===!0?n=Xh(e.name):typeof e.namespace=="string"&&(n=Xh(e.namespace)),{kind:"success",result:n}):{kind:"error",error:"Could not read ReScript config file"}},tp=(t,e)=>{let n={kind:"error",error:"Could not read ReScript config file"},r=t.split(e)[1],i=Qf(e,r);if(!i)return n;let s=i;if(!pn.default.existsSync(s)){let o=Jf(e,r);if(!o)return n;s=o}return{kind:"success",result:s}},np=(t,e)=>{let n={cwd:e};return process.platform==="win32"?mn.exec(`"${t}".cmd build -w`,n):mn.execFile(t,["build","-w"],n)},si=t=>process.platform==="win32"?`file:\\\\\\${t}`:`file://${t}`,EC=t=>{let e=/(.+)\:(\d+)\:(\d+)(-(\d+)(\:(\d+))?)?$/,n=t.trim(),r=n.match(e);if(r===null)return{file:si(n),range:{start:{line:0,character:0},end:{line:0,character:0}}};let[i,s,o,a,c,d,p,m]=r,g;if(c==null){let C={line:parseInt(o)-1,character:parseInt(a)};g={start:C,end:C}}else{let C=m==null,[k,O]=C?[o,d]:[d,m];g={start:{line:parseInt(o)-1,character:parseInt(a)-1},end:{line:parseInt(k)-1,character:parseInt(O)}}}return{file:si(s),range:g}},Fs=async t=>{let e=[],n=[],r=t.split(Is.EOL),i=!1;for(let a=0;a<r.length;a++){let c=r[a];if(c.startsWith(" We've found a bug for you!"))e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[]});else if(c.startsWith("FAILED:"))e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[c]});else if(c.startsWith("Fatal error:"))e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[c]});else if(c.startsWith(" Warning number ")){let d=parseInt(c.slice(17)),p;switch(d){case 11:case 20:case 26:case 27:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 60:case 66:case 67:case 101:p=kt.DiagnosticTag.Unnecessary;break;case 3:p=kt.DiagnosticTag.Deprecated;break}let m=c.includes("(configured as error)")?kt.DiagnosticSeverity.Error:kt.DiagnosticSeverity.Warning;e.push({code:Number.isNaN(d)?void 0:d,severity:m,tag:p,content:[]})}else c.startsWith(" Syntax error!")?e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[]}):c.startsWith(" Warning genType")?e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[]}):c.startsWith("#Start(")||(c.startsWith("#Done(")?i=!0:c.startsWith("File ")&&a+1<r.length&&r[a+1].startsWith("Warning ")?a++:c.startsWith("File ")&&a+1<r.length&&r[a+1].startsWith("Error: Syntax error")?(e.push({code:void 0,severity:kt.DiagnosticSeverity.Error,tag:void 0,content:[r[a],r[a+1]]}),a++):/^ +([0-9]+| +|\.) (│|┆)/.test(c)||(c.startsWith(" ")?e[e.length-1]==null?n.push(c):e[e.length-1].content.push(c.slice(2)):c.trim()!=""&&(e[e.length-1]==null?n.push(c):e[e.length-1].content.push(c))))}let s={},o={};for(let a of e){let[c,...d]=a.content,{file:p,range:m}=EC(c);s[p]==null&&(s[p]=[]);let g={severity:a.severity,tags:a.tag===void 0?[]:[a.tag],code:a.code,range:m,source:"ReScript",message:d.join(`
37
+ `).trim()};await Vh({addFoundActionsHere:o,diagnostic:g,diagnosticMessage:d,file:p,range:m}),s[p].push(g)}return{done:i,result:s,codeActions:o,linesWithParseErrors:n}},rp=(t,e)=>!(e.start.line<t.start.line||e.end.line<t.start.line||e.start.line>t.end.line||e.end.line>t.end.line||e.start.line===t.start.line&&e.start.character<t.start.character||e.end.line===t.end.line&&e.end.character>t.end.character);var yg=_e(Su()),Lu=require("console"),qe=require("url");var be=_e(require("path")),Ct=_e(require("fs"));var Tu=require("url"),rg=_e(require("readline")),no=require("perf_hooks"),ig=_e(Fe()),ro=_e(require("node:child_process")),Au=_e(Cc());var sg=_e(Su());function bt(){return de.extensionConfiguration.incrementalTypechecking?.debugLogging??!1}var og="___incremental",yr=be.join(ur,og),zn=new Map,tg=new Set,qu=new Map,ag=sg.watch([],{awaitWriteFinish:{stabilityThreshold:1}}).on("all",(t,e)=>{if(t!=="change"&&t!=="unlink")return;let n=qu.get(e);if(n!=null){let r=zn.get(n);r!=null&&(bt()&&console.log("[watcher] Cleaning up incremental files for "+n),r.compilation!=null&&(bt()&&console.log("[watcher] Was compiling, killing"),clearTimeout(r.compilation.timeout),r.killCompilationListeners.forEach(i=>i()),r.compilation=null),ug(r.file.sourceFilePath,r.project.rootPath))}});function ku(t,e){Ct.default.rm(be.resolve(t,yr),{force:!0,recursive:!0},n=>{e?.()})}function cg(t){bt()&&console.log("Recreating incremental file folder"),ku(t,()=>{Ct.default.mkdir(be.resolve(t,yr),{recursive:!0},e=>{})})}function ug(t,e){let n=t.endsWith(".resi")?".resi":".res",r=oi(e),i=be.basename(t,n),s=r.kind==="success"&&r.result!==""?`${i}-${r.result}`:i;bt()&&console.log("Cleaning up incremental file assets for: "+i),Ct.default.unlink(be.resolve(e,yr,be.basename(t)),o=>{}),[s+".ast",s+".cmt",s+".cmti",s+".cmi",s+".cmj"].forEach(o=>{Ct.default.unlink(be.resolve(e,yr,o),a=>{})})}function SS(t){let e=be.resolve(t.project.rootPath,Kr),n=be.resolve(t.project.workspaceRootPath,rc),r=null,i=null;try{i=Ct.default.statSync(e),r="bsb"}catch{}try{i=Ct.default.statSync(n),r="rewatch"}catch{}if(r==null)return console.log("Did not find build.ninja or rewatch.lock, cannot proceed.."),Promise.resolve(null);let s=t.buildNinja,o=t.buildRewatch;return r==="bsb"&&s!=null&&i!=null&&s.fileMtime>=i.mtimeMs?Promise.resolve(s.rawExtracted):r==="rewatch"&&o!=null&&o.lastFile===t.file.sourceFilePath?Promise.resolve(o.compilerArgs):new Promise((a,c)=>{function d(p){i!=null&&Array.isArray(p)?t.buildNinja={fileMtime:i.mtimeMs,rawExtracted:p}:Array.isArray(p)||(t.buildRewatch={lastFile:t.file.sourceFilePath,compilerArgs:p}),a(p)}if(r==="bsb"){let p=Ct.default.createReadStream(e,{encoding:"utf8"});p.on("error",M=>{console.error("File stream error:",M),d([])});let m=rg.default.createInterface({input:p,crlfDelay:1/0}),g=!1,C=!1,k=!1,O=[];m.on("line",M=>{if(M=M.trim(),!k){if(g&&(O.push(M),g=!1),C){m.close(),d(O),k=!0;return}M.startsWith("rule astj")&&(g=!0),M.startsWith("rule mij")&&(g=!0,C=!0)}}),m.on("error",M=>{console.error("Readline error:",M),d([])}),m.on("close",()=>{d(O)})}else if(r==="rewatch")try{let p=Xe.get(t.project.rootPath);if(p?.rescriptVersion==null)return;let m=be.resolve(t.project.workspaceRootPath,"node_modules/@rolandpeelen/rewatch/rewatch"),g=JSON.parse(ro.execFileSync(m,["--rescript-version",p.rescriptVersion,"--compiler-args",t.file.sourceFilePath]).toString().trim());d(g)}catch(p){console.error(p)}})}function xu(t){let e=[];for(let n=0;n<=t.length-1;n++){let r=t[n],i=n+1,s=t[i]??"";if(r.startsWith("-")&&s.startsWith("-"))e.push([r]);else if(r.startsWith("-")&&s.startsWith("'")){let o=[s.slice(1)];for(let a=i+1;a<=t.length-1;a++){let c=t[a],d=!1;if(c.endsWith("'")&&(c=c.slice(0,c.length-1),n=a,d=!0),o.push(c),d)break}e.push([r,o.join(" ")])}else r.startsWith("-")&&e.push([r,s])}return e}function ng(t){let e=t.trim().split("command = ")[1].split(" ").map(n=>n.trim()).filter(n=>n!=="");return xu(e)}function TS(t){let e=/\x1B[@-_][0-?]*[ -/]*[@-~]/g;return t.replace(e,"")}function AS(t,e,n,r){let i=zn.get(t);if(i==null){let c=Kt(t);if(c==null){bt()&&console.log("Did not find project root path for "+t);return}let d=Xe.get(c);if(d==null){bt()&&console.log("Did not find open project for "+t);return}let p=be.resolve(c,rc),m=!1;Ct.default.existsSync(p)&&(m=!0);let g=c&&!m?Kt(c,!0):null,C=d.bscBinaryLocation;if(C==null){bt()&&console.log("Could not find bsc binary location for "+t);return}let k=t.endsWith(".resi")?".resi":".res",O=be.basename(t,k),M=d.namespaceName!=null?`${O}-${d.namespaceName}`:O,F=be.join(c,yr),v=be.resolve(c,ur,be.relative(c,t)),b=be.parse(v);b.ext=k===".res"?".cmt":".cmti",b.base="",v=be.format(b),i={file:{originalTypeFileLocation:v,extension:k,moduleName:O,moduleNameNamespaced:M,sourceFileName:O+k,sourceFilePath:t,incrementalFilePath:be.join(F,O+k)},project:{workspaceRootPath:g??c,rootPath:c,callArgs:Promise.resolve([]),bscBinaryLocation:C,incrementalFolderPath:F},buildRewatch:null,buildNinja:null,compilation:null,killCompilationListeners:[],codeActions:[]},i.project.callArgs=lg(i),ag.add([i.file.originalTypeFileLocation]),qu.set(i.file.originalTypeFileLocation,i.file.sourceFilePath),zn.set(t,i)}if(i==null)return;let s=i;s.compilation!=null&&(clearTimeout(s.compilation.timeout),s.killCompilationListeners.forEach(c=>c()),s.killCompilationListeners=[]);let o=no.performance.now(),a=setTimeout(()=>{qS(s,e,n,r)},20);s.compilation!=null?(s.compilation.timeout=a,s.compilation.triggerToken=o):s.compilation={timeout:a,triggerToken:o}}function xS(t,e){return zn.get(t)?.compilation?.triggerToken===e}async function lg(t){let e=Xe.get(t.project.rootPath);if(e?.rescriptVersion==null)return bt()&&console.log("Found no project (or ReScript version) for "+t.file.sourceFilePath),null;let n=await SS(t);if(n==null)return null;let r=[],i=[],s=Array.isArray(n);if(Array.isArray(n)){let[a,c]=n;r=ng(a),i=ng(c)}else r=xu(n.parser_args),i=xu(n.compiler_args);let o=[];return de.extensionConfiguration.incrementalTypechecking?.acrossFiles&&o.push("-I",be.resolve(t.project.rootPath,yr)),i.forEach(([a,c])=>{if(a==="-I")s?o.push("-I",be.resolve(t.project.rootPath,ur,c)):c==="."?o.push("-I",be.resolve(t.project.rootPath,Vf)):o.push("-I",c);else if(a==="-bs-v")o.push("-bs-v",Date.now().toString());else{if(a==="-bs-package-output")return;c==null||c===""?o.push(a):o.push(a,c)}}),r.forEach(([a,c])=>{(a.startsWith("-bs-jsx")||a.startsWith("-ppx"))&&o.push(a,c)}),o.push("-color","never"),Au.default.valid(e.rescriptVersion)&&Au.default.satisfies(e.rescriptVersion,">=11",{includePrerelease:!0})&&o.push("-ignore-parse-errors"),o=o.filter(a=>a!=null&&a!==""),o.push(t.file.incrementalFilePath),o}async function qS(t,e,n,r){let i=t.compilation?.triggerToken,s=await t.project.callArgs;if(s==null){let a=await lg(t);if(a!=null)s=a,t.project.callArgs=Promise.resolve(a);else{bt()&&console.log("Could not figure out call args. Maybe build.ninja does not exist yet?");return}}let o=no.performance.now();if(!Ct.default.existsSync(t.project.incrementalFolderPath))try{Ct.default.mkdirSync(t.project.incrementalFolderPath,{recursive:!0})}catch{}try{Ct.default.writeFileSync(t.file.incrementalFilePath,e);let a=ro.execFile(t.project.bscBinaryLocation,s,{cwd:t.project.rootPath},async(c,d,p)=>{c?.killed?bt()&&console.log(`Compilation of ${t.file.sourceFileName} was killed.`):bt()&&console.log(`Recompiled ${t.file.sourceFileName} in ${(no.performance.now()-o)/1e3}s`);let m=!1;if(!c?.killed&&i!=null&&xS(t.file.sourceFilePath,i)){bt()&&console.log("Resetting compilation status."),t.compilation=null;let{result:g,codeActions:C}=await Fs(`${p}
38
+ #Done()`),k=Object.values(C)[0]??[];k.forEach(F=>{if(F.codeAction.edit!=null&&F.codeAction.edit.changes!=null){let v=Object.values(F.codeAction.edit.changes)[0];F.codeAction.edit.changes={[(0,Tu.pathToFileURL)(t.file.sourceFilePath).toString()]:v}}}),t.codeActions=k;let O=(Object.values(g)[0]??[]).map(F=>({...F,message:TS(F.message)})).filter(F=>!F.message.startsWith("Uninterpreted extension 'rescript.")&&(!F.message.includes(`/${og}/${t.file.sourceFileName}`)||F.message.startsWith("Multiple definition of the")||F.message.startsWith("Signature mismatch")||F.message.startsWith("In this `with' constraint")||F.message.startsWith("This `with' constraint on"))?(m=!0,!0):!1);if(O.length===0&&p!==""&&!m&&!tg.has(t.project.rootPath))try{tg.add(t.project.rootPath);let F=be.resolve(t.project.incrementalFolderPath,"error.log");Ct.default.writeFileSync(F,`== BSC ARGS ==
39
+ ${s?.join(" ")}
40
40
 
41
41
  == OUTPUT ==
42
- ${h}`);let v={type:yh.MessageType.Warning,message:`[Incremental typechecking] Something might have gone wrong with incremental type checking. Check out the [error log](file://${j}) and report this issue please.`};n({jsonrpc:Z,method:"window/showMessage",params:v})}catch(j){console.error(j)}let M={jsonrpc:Z,method:"textDocument/publishDiagnostics",params:{uri:(0,qc.pathToFileURL)(t.file.sourceFilePath),diagnostics:q}};n(M)}r?.()});t.killCompilationListeners.push(()=>{a.kill("SIGKILL")})}catch(a){console.error(a)}}function Dh(t,e,n,r){ht()&&console.log("Updated: "+t),Qv(t,e,n,r)}function Ph(t){ht()&&console.log("Closed: "+t);let e=jn.get(t);e!=null&&(wh(t,e.project.rootPath),jn.delete(t),Fc.delete(e.file.originalTypeFileLocation),bh.unwatch([e.file.originalTypeFileLocation]))}function Eh(t){let e=jn.get(t);return e!=null?e.codeActions:null}var Mc={},jc=null,Ic=!1,Wc=0,Lc=!1,Zr=new Map,Ah={},ne=t=>{},qh=t=>le.extensionConfiguration.binaryPath==null?qn(t,pe.join(Zi,Ji)):Zn(le.extensionConfiguration.binaryPath,Ji),ew=new ti.RequestType("textDocument/createInterface"),tw=new ti.RequestType("textDocument/openCompiled"),nw=t=>{let e=null;return Ve.forEach((n,r)=>{e==null&&n.filesDiagnostics[t]!=null&&(e=n.filesDiagnostics[t].slice())}),e??[]},rw=()=>{Ve.forEach((t,e)=>{let{filesWithDiagnostics:n}=t,r=pe.join(e,eo),i=$e.default.readFileSync(r,{encoding:"utf-8"}),{done:o,result:s,codeActions:a,linesWithParseErrors:u}=co(i);if(u.length>0){let p={type:B.MessageType.Warning,message:`There are more compiler warning/errors that we could not parse. You can help us fix this by opening an [issue on the repository](https://github.com/rescript-lang/rescript-vscode/issues/new?title=Compiler%20log%20parse%20error), pasting the contents of the file [lib/bs/.compiler.log](file://${r}).`};ne({jsonrpc:Z,method:"window/showMessage",params:p})}t.filesDiagnostics=s,Ah=a,Object.keys(s).forEach(p=>{let h={uri:p,diagnostics:s[p]};ne({jsonrpc:Z,method:"textDocument/publishDiagnostics",params:h}),n.add(p)}),o&&n.forEach(p=>{s[p]==null&&(ne({jsonrpc:Z,method:"textDocument/publishDiagnostics",params:{uri:p,diagnostics:[]}}),n.delete(p))})})},iw=t=>{let e=Ve.get(t);e!=null&&(e.filesWithDiagnostics.forEach(n=>{ne({jsonrpc:Z,method:"textDocument/publishDiagnostics",params:{uri:n,diagnostics:[]}})}),Ve.delete(t),le.extensionConfiguration.incrementalTypechecking?.enable&&Oc(t))},ow=()=>{ne({jsonrpc:Z,method:"rescript/compilationFinished"})},sr=!1,Nh=t=>{try{sr&&console.log("syncing project config cache for "+t),zt(t,["cache-project",t]),sr&&console.log("OK - synced project config cache for "+t)}catch(e){sr&&console.error(e)}},sw=t=>{try{sr&&console.log("deleting project config cache for "+t),zt(t,["cache-delete",t]),sr&&console.log("OK - deleted project config cache for "+t)}catch(e){sr&&console.error(e)}},ei=kh.watch([],{awaitWriteFinish:{stabilityThreshold:1}}).on("all",(t,e)=>{if(e.includes("build.ninja")){if(le.extensionConfiguration.cache?.projectConfig?.enable===!0){let n=Ct(e);n!=null&&Nh(n)}}else try{rw(),ow(),le.extensionConfiguration.inlayHints?.enable===!0&&Fh(),le.extensionConfiguration.codeLens===!0&&Oh()}catch{console.log("Error while sending updated diagnostics")}}),aw=()=>{ei.close()},cw=(t,e)=>{let n=(0,Se.fileURLToPath)(t);Zr.set(n,e);let r=Ct(n);if(r!=null){let i=Ve.get(r);if(i==null){le.extensionConfiguration.incrementalTypechecking?.enable&&vh(r);let a=Wr(r);i={openFiles:new Set,filesWithDiagnostics:new Set,filesDiagnostics:{},namespaceName:a.kind==="success"?a.result:null,rescriptVersion:ld(r),bsbWatcherByEditor:null,bscBinaryLocation:pd(r),editorAnalysisLocation:md(r),hasPromptedToStartBuild:/(\/|\\)node_modules(\/|\\)/.test(r)?"never":!1},Ve.set(r,i),ei.add(pe.join(r,eo)),le.extensionConfiguration.cache?.projectConfig?.enable===!0&&(ei.add(pe.join(r,Ir)),Nh(r))}Ve.get(r).openFiles.add(n);let s=pe.join(r,Bl);if(i.hasPromptedToStartBuild===!1&&le.extensionConfiguration.askToStartBuild===!0&&!$e.default.existsSync(s))if(qh(r)!=null){let a={title:ka,projectRootPath:r},u={type:B.MessageType.Info,message:"Start a build for this project to get the freshest data?",actions:[a]},p={jsonrpc:Z,id:Wc++,method:"window/showMessageRequest",params:u};ne(p),i.hasPromptedToStartBuild=!0}else{let a={jsonrpc:Z,method:"window/showMessage",params:{type:B.MessageType.Error,message:le.extensionConfiguration.binaryPath==null?`Can't find ReScript binary in ${pe.join(r,Zi)} or parent directories. Did you install it? It's required to use "rescript" > 9.1`:`Can't find ReScript binary in the directory ${le.extensionConfiguration.binaryPath}`}};ne(a)}}},uw=t=>{let e=(0,Se.fileURLToPath)(t);le.extensionConfiguration.incrementalTypechecking?.enable&&Ph(e),Zr.delete(e);let n=Ct(e);if(n!=null){let r=Ve.get(n);r!=null&&(r.openFiles.delete(e),r.openFiles.size===0&&(ei.unwatch(pe.join(n,eo)),ei.unwatch(pe.join(n,Ir)),sw(n),iw(n),r.bsbWatcherByEditor!==null&&(r.bsbWatcherByEditor.kill(),r.bsbWatcherByEditor=null)))}},lw=(t,e)=>{let n=(0,Se.fileURLToPath)(t);(0,Hc.assert)(Zr.has(n)),Zr.set(n,e),le.extensionConfiguration.incrementalTypechecking?.enable&&Dh(n,e,ne,()=>{le.extensionConfiguration.codeLens&&Oh(),le.extensionConfiguration.inlayHints&&Fh()})},Ln=t=>{let e=(0,Se.fileURLToPath)(t),n=Zr.get(e);return(0,Hc.assert)(n!=null),n};function No(t=!1){if(t){let e=new qo.StreamMessageWriter(In.default.stdout),n=new qo.StreamMessageReader(In.default.stdin);ne=r=>e.write(r),n.listen(xh)}else ne=e=>In.default.send(e),In.default.on("message",xh)}function dw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Ln(e.textDocument.uri),i=on();$e.default.writeFileSync(i,r,{encoding:"utf-8"});let o=Dt(n,["hover",n,e.position.line,e.position.character,i,!!Mc.supportsMarkdownLinks],t);return $e.default.unlink(i,()=>null),o}function fw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri);return Dt(n,["inlayHint",n,e.range.start.line,e.range.end.line,le.extensionConfiguration.inlayHints?.maxLength],t)}function Fh(){let t={jsonrpc:Z,method:B.InlayHintRefreshRequest.method,id:Wc++};ne(t)}function hw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri);return Dt(n,["codeLens",n],t)}function Oh(){let t={jsonrpc:Z,method:B.CodeLensRefreshRequest.method,id:Wc++};ne(t)}function pw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Ln(e.textDocument.uri),i=on();$e.default.writeFileSync(i,r,{encoding:"utf-8"});let o=Dt(n,["signatureHelp",n,e.position.line,e.position.character,i,le.extensionConfiguration.signatureHelp?.forConstructorPayloads?"true":"false"],t);return $e.default.unlink(i,()=>null),o}function mw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri);return Dt(n,["definition",n,e.position.line,e.position.character],t)}function gw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri);return Dt(n,["typeDefinition",n,e.position.line,e.position.character],t)}function yw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Oa(n,e.position);return{jsonrpc:Z,id:t.id,result:r}}function _w(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Oa(n,e.position),i=null;return r!==null&&r.forEach(o=>{if(pe.normalize((0,Se.fileURLToPath)(o.uri))===pe.normalize((0,Se.fileURLToPath)(e.textDocument.uri))){let{start:s,end:a}=o.range,u=e.position;s.character<=u.character&&s.line<=u.line&&a.character>=u.character&&a.line>=u.line&&(i=o.range)}}),{jsonrpc:Z,id:t.id,result:i}}function Rw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=zt(n,["rename",n,e.position.line,e.position.character,e.newName]),i=null;return r!==null&&(i={documentChanges:r}),{jsonrpc:Z,id:t.id,result:i}}function bw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=pe.extname(e.textDocument.uri),i=Ln(e.textDocument.uri),o=on(r);$e.default.writeFileSync(o,i,{encoding:"utf-8"});let s=Dt(n,["documentSymbol",o],t,!1);return $e.default.unlink(o,()=>null),s}function Sh(){let t={items:[{section:"rescript.settings"}]},e={jsonrpc:Z,id:Aa,method:B.ConfigurationRequest.type.method,params:t};ne(e)}function vw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=pe.extname(e.textDocument.uri),i=Ln(e.textDocument.uri),o=on(r);$e.default.writeFileSync(o,i,{encoding:"utf-8"});let s=Dt(n,["semanticTokens",o],t,!1);return $e.default.unlink(o,()=>null),s}function ww(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Ln(e.textDocument.uri),i=on();$e.default.writeFileSync(i,r,{encoding:"utf-8"});let o=Dt(n,["completion",n,e.position.line,e.position.character,i],t);return $e.default.unlink(i,()=>null),o}function Cw(t){let e=t.params,n={jsonrpc:Z,id:t.id,result:e};if(e.documentation==null&&e.data!=null){let r=e.data,i=zt(r.filePath,["completionResolve",r.filePath,r.modulePath],!0);e.documentation={kind:"markdown",value:i}}return n}function Dw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.textDocument.uri),r=Ln(e.textDocument.uri),i=pe.extname(e.textDocument.uri),o=on(i),s=[],a=Ah[e.textDocument.uri]??[],u=Eh(n)??[];[...a,...u].forEach(({range:N,codeAction:A})=>{hd(N,e.range)&&s.push(A)}),$e.default.writeFileSync(o,r,{encoding:"utf-8"});let p=Dt(n,["codeAction",n,e.range.start.line,e.range.start.character,e.range.end.line,e.range.end.character,o],t);$e.default.unlink(o,()=>null);let{result:h}=p,y=h!=null&&Array.isArray(h)?[...s,...h]:s;return{jsonrpc:Z,id:t.id,result:y.length>0?y:null}}function Pw(t){let e={jsonrpc:Z,id:t.id,result:[]},n=t.params,r=(0,Se.fileURLToPath)(n.textDocument.uri),i=pe.extname(n.textDocument.uri);if(i!==Vt&&i!==Lr){let o={type:B.MessageType.Error,message:`Not a ${Vt} or ${Lr} file. Cannot format it.`};return[e,{jsonrpc:Z,method:"window/showMessage",params:o}]}else{let o=Ln(n.textDocument.uri),s=Ct(r),u=(s!=null?Ve.get(s):null)?.bscBinaryLocation??null,p=ud(u,r,o);if(p.kind==="success"){let h=o.length,y=[{range:{start:{line:0,character:0},end:{line:h,character:h}},newText:p.result}];return[{jsonrpc:Z,id:t.id,result:y}]}else return[e]}}var Th=(t,e)=>{if(le.extensionConfiguration.incrementalTypechecking?.enable)return;let n=(0,Se.fileURLToPath)(t),r=pe.extname(n),i=on(r);$e.default.writeFileSync(i,e,{encoding:"utf-8"});let o=nw(t),s=zt(n,["diagnosticSyntax",i]),a={jsonrpc:Z,method:"textDocument/publishDiagnostics",params:{uri:t,diagnostics:[...s,...o]}};$e.default.unlink(i,()=>null),ne(a)};function Ew(t){let e=t.params,n=pe.extname(e.uri),r=(0,Se.fileURLToPath)(e.uri),i=Ct(r);if(i===null){let A={type:B.MessageType.Error,message:"Cannot locate project directory to generate the interface file."};return{jsonrpc:Z,method:"window/showMessage",params:A}}if(n!==Vt){let A={type:B.MessageType.Error,message:`Not a ${Vt} file. Cannot create an interface for it.`};return{jsonrpc:Z,method:"window/showMessage",params:A}}let o=r.split(i)[1],s=Wr(i);if(s.kind==="error"){let A={type:B.MessageType.Error,message:"Error reading ReScript config file."};return{jsonrpc:Z,method:"window/showMessage",params:A}}let a=s.result,u=a.length>0?"-"+a:"",p=pe.join(pe.dirname(o),pe.basename(o,Vt)+u+zl),h=pe.join(i,Jn,p);if(!$e.default.existsSync(h)){let A={type:B.MessageType.Error,message:"No compiled interface file found. Please compile your project first."};return{jsonrpc:Z,method:"window/showMessage",params:A}}let g=Dt(r,["createInterface",r,h],t),N=typeof g.result=="string"?g.result:"";try{let A=no(r,Lr);return $e.default.writeFileSync(A,N,{encoding:"utf-8"}),{jsonrpc:Z,id:t.id,result:{uri:Hr(A)}}}catch{return{jsonrpc:Z,id:t.id,error:{code:B.ErrorCodes.InternalError,message:"Unable to create interface file."}}}}function Sw(t){let e=t.params,n=(0,Se.fileURLToPath)(e.uri),r=Ct(n);if(r===null){let s={type:B.MessageType.Error,message:"Cannot locate project directory."};return{jsonrpc:Z,method:"window/showMessage",params:s}}let i=dd(n,r);if(i.kind==="error"||!$e.default.existsSync(i.result)){let s=i.kind==="success"?`No compiled file found. Expected it at: ${i.result}`:"No compiled file found. Please compile your project first.",a={type:B.MessageType.Error,message:s};return{jsonrpc:Z,method:"window/showMessage",params:a}}return{jsonrpc:Z,id:t.id,result:{uri:Hr(i.result)}}}function xh(t){if(B.Message.isNotification(t)){if(!(!Ic&&t.method!=="exit"))if(t.method==="exit")Lc?In.default.exit(0):In.default.exit(1);else if(t.method===_n.DidOpenTextDocumentNotification.method){let e=t.params;cw(e.textDocument.uri,e.textDocument.text),Th(e.textDocument.uri,e.textDocument.text)}else if(t.method===_n.DidChangeTextDocumentNotification.method){let e=t.params,n=pe.extname(e.textDocument.uri);if(n===Vt||n===Lr){let r=e.contentChanges;r.length===0||(lw(e.textDocument.uri,r[r.length-1].text),Th(e.textDocument.uri,r[r.length-1].text))}}else if(t.method===_n.DidCloseTextDocumentNotification.method){let e=t.params;uw(e.textDocument.uri)}else t.method===_n.DidChangeConfigurationNotification.type.method&&Sh()}else if(B.Message.isRequest(t))if(!Ic&&t.method!=="initialize"){let e={jsonrpc:Z,id:t.id,error:{code:B.ErrorCodes.ServerNotInitialized,message:"Server not initialized."}};ne(e)}else if(t.method==="initialize"){let e=t.params,n=e.initializationOptions?.extensionConfiguration;n!=null&&(le.extensionConfiguration=n);let r=e.initializationOptions?.extensionClientCapabilities;r!=null&&(Mc=r),Mc.supportsSnippetSyntax=!!e.capabilities.textDocument?.completion?.completionItem?.snippetSupport;let i={capabilities:{textDocumentSync:ti.TextDocumentSyncKind.Full,documentFormattingProvider:!0,hoverProvider:!0,definitionProvider:!0,typeDefinitionProvider:!0,referencesProvider:!0,codeActionProvider:!0,renameProvider:{prepareProvider:!0},documentSymbolProvider:!0,completionProvider:{triggerCharacters:[".",">","@","~",'"',"=","("],resolveProvider:!0},semanticTokensProvider:{legend:{tokenTypes:["operator","variable","type","modifier","namespace","enumMember","property","interface"],tokenModifiers:[]},documentSelector:[{scheme:"file",language:"rescript"}],full:!0},inlayHintProvider:le.extensionConfiguration.inlayHints?.enable,codeLensProvider:le.extensionConfiguration.codeLens?{workDoneProgress:!1}:void 0,signatureHelpProvider:le.extensionConfiguration.signatureHelp?.enabled?{triggerCharacters:["("],retriggerCharacters:["=",","]}:void 0}},o={jsonrpc:Z,id:t.id,result:i};Ic=!0,jc=setInterval(()=>{Sh()},Yl),ne(o)}else if(t.method==="initialized"){let e={jsonrpc:Z,id:t.id,result:null};ne(e)}else if(t.method==="shutdown")if(Lc){let e={jsonrpc:Z,id:t.id,error:{code:B.ErrorCodes.InvalidRequest,message:"Language server already received the shutdown request"}};ne(e)}else{Lc=!0,aw(),jc!=null&&clearInterval(jc);let e={jsonrpc:Z,id:t.id,result:null};ne(e)}else if(t.method===B.HoverRequest.method)ne(dw(t));else if(t.method===B.DefinitionRequest.method)ne(mw(t));else if(t.method===B.TypeDefinitionRequest.method)ne(gw(t));else if(t.method===B.ReferencesRequest.method)ne(yw(t));else if(t.method===B.PrepareRenameRequest.method)ne(_w(t));else if(t.method===B.RenameRequest.method)ne(Rw(t));else if(t.method===B.DocumentSymbolRequest.method)ne(bw(t));else if(t.method===B.CompletionRequest.method)ne(ww(t));else if(t.method===B.CompletionResolveRequest.method)ne(Cw(t));else if(t.method===B.SemanticTokensRequest.method)ne(vw(t));else if(t.method===B.CodeActionRequest.method)ne(Dw(t));else if(t.method===B.DocumentFormattingRequest.method)Pw(t).forEach(n=>ne(n));else if(t.method===ew.method)ne(Ew(t));else if(t.method===tw.method)ne(Sw(t));else if(t.method===B.InlayHintRequest.method){let e=t.params;pe.extname(e.textDocument.uri)===Vt&&ne(fw(t))}else if(t.method===B.CodeLensRequest.method){let e=t.params;pe.extname(e.textDocument.uri)===Vt&&ne(hw(t))}else if(t.method===B.SignatureHelpRequest.method){let e=t.params;pe.extname(e.textDocument.uri)===Vt&&ne(pw(t))}else{let e={jsonrpc:Z,id:t.id,error:{code:B.ErrorCodes.InvalidRequest,message:"Unrecognized editor request."}};ne(e)}else if(B.Message.isResponse(t)){if(t.id===Aa){if(t.result!=null){let[e]=t.result;e!=null&&(le.extensionConfiguration=e)}}else if(t.result!=null&&t.result.title!=null&&t.result.title===ka){let n=t.result.projectRootPath,r=qh(n);if(r!=null){let i=fd(r,n),o=Ve.get(n);o.bsbWatcherByEditor=i}}}}od(t=>{let e={type:B.MessageType.Warning,message:`ReScript tooling: Internal error. Something broke. Here's the error message that you can report if you want:
43
-
42
+ ${p}`);let v={type:ig.MessageType.Warning,message:`[Incremental typechecking] Something might have gone wrong with incremental type checking. Check out the [error log](file://${F}) and report this issue please.`};n({jsonrpc:ne,method:"window/showMessage",params:v})}catch(F){console.error(F)}let M={jsonrpc:ne,method:"textDocument/publishDiagnostics",params:{uri:(0,Tu.pathToFileURL)(t.file.sourceFilePath),diagnostics:O}};n(M)}r?.()});t.killCompilationListeners.push(()=>{a.kill("SIGKILL")})}catch(a){console.error(a)}}function fg(t,e,n,r){bt()&&console.log("Updated: "+t),AS(t,e,n,r)}function dg(t){bt()&&console.log("Closed: "+t);let e=zn.get(t);e!=null&&(ug(t,e.project.rootPath),zn.delete(t),qu.delete(e.file.originalTypeFileLocation),ag.unwatch([e.file.originalTypeFileLocation]))}function hg(t){let e=zn.get(t);return e!=null?e.codeActions:null}var Fu={},Nu=null,Ou=!1,ju=0,Iu=!1,Ri=new Map,Rg={},se=t=>{},_g=async t=>de.extensionConfiguration.binaryPath!=null&&We.default.existsSync(me.join(de.extensionConfiguration.binaryPath,"rescript"))?me.join(de.extensionConfiguration.binaryPath,"rescript"):Jh(t),NS=new bi.RequestType("textDocument/createInterface"),OS=new bi.RequestType("textDocument/openCompiled"),IS=t=>{let e=null;return Xe.forEach((n,r)=>{e==null&&n.filesDiagnostics[t]!=null&&(e=n.filesDiagnostics[t].slice())}),e??[]},FS=async()=>{for(let[t,e]of Xe){let{filesWithDiagnostics:n}=e,r=me.join(t,ms),i=We.default.readFileSync(r,{encoding:"utf-8"}),{done:s,result:o,codeActions:a,linesWithParseErrors:c}=await Fs(i);if(c.length>0){let d={type:G.MessageType.Warning,message:`There are more compiler warning/errors that we could not parse. You can help us fix this by opening an [issue on the repository](https://github.com/rescript-lang/rescript-vscode/issues/new?title=Compiler%20log%20parse%20error), pasting the contents of the file [lib/bs/.compiler.log](file://${r}).`};se({jsonrpc:ne,method:"window/showMessage",params:d})}e.filesDiagnostics=o,Rg=a,Object.keys(o).forEach(d=>{let p={uri:d,diagnostics:o[d]};se({jsonrpc:ne,method:"textDocument/publishDiagnostics",params:p}),n.add(d)}),s&&n.forEach(d=>{o[d]==null&&(se({jsonrpc:ne,method:"textDocument/publishDiagnostics",params:{uri:d,diagnostics:[]}}),n.delete(d))})}},LS=t=>{let e=Xe.get(t);e!=null&&(e.filesWithDiagnostics.forEach(n=>{se({jsonrpc:ne,method:"textDocument/publishDiagnostics",params:{uri:n,diagnostics:[]}})}),Xe.delete(t),de.extensionConfiguration.incrementalTypechecking?.enable&&ku(t))},jS=()=>{se({jsonrpc:ne,method:"rescript/compilationFinished"})},Rr=!1,bg=async t=>{try{Rr&&console.log("syncing project config cache for "+t),await nn(t,["cache-project",t]),Rr&&console.log("OK - synced project config cache for "+t)}catch(e){Rr&&console.error(e)}},MS=async t=>{try{Rr&&console.log("deleting project config cache for "+t),await nn(t,["cache-delete",t]),Rr&&console.log("OK - deleted project config cache for "+t)}catch(e){Rr&&console.error(e)}},_i=yg.watch([],{awaitWriteFinish:{stabilityThreshold:1}}).on("all",async(t,e)=>{if(e.includes("build.ninja")){if(de.extensionConfiguration.cache?.projectConfig?.enable===!0){let n=Kt(e);n!=null&&await bg(n)}}else try{await FS(),jS(),de.extensionConfiguration.inlayHints?.enable===!0&&vg(),de.extensionConfiguration.codeLens===!0&&Eg()}catch{console.log("Error while sending updated diagnostics")}}),$S=()=>{_i.close()},HS=async(t,e)=>{let n=(0,qe.fileURLToPath)(t);Ri.set(n,e);let r=Kt(n);if(r!=null){let i=Xe.get(r);if(i==null){de.extensionConfiguration.incrementalTypechecking?.enable&&cg(r);let a=oi(r);i={openFiles:new Set,filesWithDiagnostics:new Set,filesDiagnostics:{},namespaceName:a.kind==="success"?a.result:null,rescriptVersion:await xc(r),bsbWatcherByEditor:null,bscBinaryLocation:await Ac(r),editorAnalysisLocation:await Zh(r),hasPromptedToStartBuild:/(\/|\\)node_modules(\/|\\)/.test(r)?"never":!1},Xe.set(r,i),_i.add(me.join(r,ms)),de.extensionConfiguration.cache?.projectConfig?.enable===!0&&(_i.add(me.join(r,Kr)),await bg(r))}Xe.get(r).openFiles.add(n);let o=me.join(r,Bf);if(i.hasPromptedToStartBuild===!1&&de.extensionConfiguration.askToStartBuild===!0&&!We.default.existsSync(o))if(await _g(r)!=null){let a={title:ic,projectRootPath:r},c={type:G.MessageType.Info,message:"Start a build for this project to get the freshest data?",actions:[a]},d={jsonrpc:ne,id:ju++,method:"window/showMessageRequest",params:c};se(d),i.hasPromptedToStartBuild=!0}else{let a={jsonrpc:ne,method:"window/showMessage",params:{type:G.MessageType.Error,message:de.extensionConfiguration.binaryPath==null?`Can't find ReScript binary in ${me.join(r,Uf)} or parent directories. Did you install it? It's required to use "rescript" > 9.1`:`Can't find ReScript binary in the directory ${de.extensionConfiguration.binaryPath}`}};se(a)}}},WS=async t=>{let e=(0,qe.fileURLToPath)(t);de.extensionConfiguration.incrementalTypechecking?.enable&&dg(e),Ri.delete(e);let n=Kt(e);if(n!=null){let r=Xe.get(n);r!=null&&(r.openFiles.delete(e),r.openFiles.size===0&&(_i.unwatch(me.join(n,ms)),_i.unwatch(me.join(n,Kr)),await MS(n),LS(n),r.bsbWatcherByEditor!==null&&(r.bsbWatcherByEditor.kill(),r.bsbWatcherByEditor=null)))}},US=(t,e)=>{let n=(0,qe.fileURLToPath)(t);(0,Lu.assert)(Ri.has(n)),Ri.set(n,e),de.extensionConfiguration.incrementalTypechecking?.enable&&fg(n,e,se,()=>{de.extensionConfiguration.codeLens&&Eg(),de.extensionConfiguration.inlayHints&&vg()})},Xn=t=>{let e=(0,qe.fileURLToPath)(t),n=Ri.get(e);return(0,Lu.assert)(n!=null),n};function so(t=!1){if(t){let e=new io.StreamMessageWriter(Kn.default.stdout),n=new io.StreamMessageReader(Kn.default.stdin);se=r=>e.write(r),n.listen(gg)}else se=e=>Kn.default.send(e),Kn.default.on("message",gg)}async function BS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=Xn(e.textDocument.uri),i=gn();We.default.writeFileSync(i,r,{encoding:"utf-8"});let s=await Nt(n,["hover",n,e.position.line,e.position.character,i,!!Fu.supportsMarkdownLinks],t);return We.default.unlink(i,()=>null),s}async function VS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri);return await Nt(n,["inlayHint",n,e.range.start.line,e.range.end.line,de.extensionConfiguration.inlayHints?.maxLength],t)}function vg(){let t={jsonrpc:ne,method:G.InlayHintRefreshRequest.method,id:ju++};se(t)}async function GS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri);return await Nt(n,["codeLens",n],t)}function Eg(){let t={jsonrpc:ne,method:G.CodeLensRefreshRequest.method,id:ju++};se(t)}async function zS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=Xn(e.textDocument.uri),i=gn();We.default.writeFileSync(i,r,{encoding:"utf-8"});let s=await Nt(n,["signatureHelp",n,e.position.line,e.position.character,i,de.extensionConfiguration.signatureHelp?.forConstructorPayloads?"true":"false"],t);return We.default.unlink(i,()=>null),s}async function KS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri);return await Nt(n,["definition",n,e.position.line,e.position.character],t)}async function XS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri);return await Nt(n,["typeDefinition",n,e.position.line,e.position.character],t)}async function YS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=await qc(n,e.position);return{jsonrpc:ne,id:t.id,result:r}}async function QS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=await qc(n,e.position),i=null;return r!==null&&r.forEach(s=>{if(me.normalize((0,qe.fileURLToPath)(s.uri))===me.normalize((0,qe.fileURLToPath)(e.textDocument.uri))){let{start:o,end:a}=s.range,c=e.position;o.character<=c.character&&o.line<=c.line&&a.character>=c.character&&a.line>=c.line&&(i=s.range)}}),{jsonrpc:ne,id:t.id,result:i}}async function JS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=await nn(n,["rename",n,e.position.line,e.position.character,e.newName]),i=null;return r!==null&&(i={documentChanges:r}),{jsonrpc:ne,id:t.id,result:i}}async function ZS(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=me.extname(e.textDocument.uri),i=Xn(e.textDocument.uri),s=gn(r);We.default.writeFileSync(s,i,{encoding:"utf-8"});let o=await Nt(n,["documentSymbol",s],t,!1);return We.default.unlink(s,()=>null),o}function pg(){let t={items:[{section:"rescript.settings"}]},e={jsonrpc:ne,id:sc,method:G.ConfigurationRequest.type.method,params:t};se(e)}async function eT(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=me.extname(e.textDocument.uri),i=Xn(e.textDocument.uri),s=gn(r);We.default.writeFileSync(s,i,{encoding:"utf-8"});let o=await Nt(n,["semanticTokens",s],t,!1);return We.default.unlink(s,()=>null),o}async function tT(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=Xn(e.textDocument.uri),i=gn();We.default.writeFileSync(i,r,{encoding:"utf-8"});let s=await Nt(n,["completion",n,e.position.line,e.position.character,i],t);return We.default.unlink(i,()=>null),s}async function nT(t){let e=t.params,n={jsonrpc:ne,id:t.id,result:e};if(e.documentation==null&&e.data!=null){let r=e.data,i=await nn(r.filePath,["completionResolve",r.filePath,r.modulePath],!0);e.documentation={kind:"markdown",value:i}}return n}async function rT(t){let e=t.params,n=(0,qe.fileURLToPath)(e.textDocument.uri),r=Xn(e.textDocument.uri),i=me.extname(e.textDocument.uri),s=gn(i),o=[],a=Rg[e.textDocument.uri]??[],c=hg(n)??[];[...a,...c].forEach(({range:C,codeAction:k})=>{rp(C,e.range)&&o.push(k)}),We.default.writeFileSync(s,r,{encoding:"utf-8"});let d=await Nt(n,["codeAction",n,e.range.start.line,e.range.start.character,e.range.end.line,e.range.end.character,s],t);We.default.unlink(s,()=>null);let{result:p}=d,m=p!=null&&Array.isArray(p)?[...o,...p]:o;return{jsonrpc:ne,id:t.id,result:m.length>0?m:null}}function iT(t){let e={jsonrpc:ne,id:t.id,result:[]},n=t.params,r=(0,qe.fileURLToPath)(n.textDocument.uri),i=me.extname(n.textDocument.uri);if(i!==en&&i!==Xr){let s={type:G.MessageType.Error,message:`Not a ${en} or ${Xr} file. Cannot format it.`};return[e,{jsonrpc:ne,method:"window/showMessage",params:s}]}else{let s=Xn(n.textDocument.uri),o=Kt(r),c=(o!=null?Xe.get(o):null)?.bscBinaryLocation??null,d=ep(c,r,s);if(d.kind==="success"){let p=s.length,m=[{range:{start:{line:0,character:0},end:{line:p,character:p}},newText:d.result}];return[{jsonrpc:ne,id:t.id,result:m}]}else return[e]}}var mg=async(t,e)=>{if(de.extensionConfiguration.incrementalTypechecking?.enable)return;let n=(0,qe.fileURLToPath)(t),r=me.extname(n),i=gn(r);We.default.writeFileSync(i,e,{encoding:"utf-8"});let s=IS(t),o=await nn(n,["diagnosticSyntax",i]),a={jsonrpc:ne,method:"textDocument/publishDiagnostics",params:{uri:t,diagnostics:[...o,...s]}};We.default.unlink(i,()=>null),se(a)};async function sT(t){let e=t.params,n=me.extname(e.uri),r=(0,qe.fileURLToPath)(e.uri),i=Kt(r);if(i===null){let k={type:G.MessageType.Error,message:"Cannot locate project directory to generate the interface file."};return{jsonrpc:ne,method:"window/showMessage",params:k}}if(n!==en){let k={type:G.MessageType.Error,message:`Not a ${en} file. Cannot create an interface for it.`};return{jsonrpc:ne,method:"window/showMessage",params:k}}let s=r.split(i)[1],o=oi(i);if(o.kind==="error"){let k={type:G.MessageType.Error,message:"Error reading ReScript config file."};return{jsonrpc:ne,method:"window/showMessage",params:k}}let a=o.result,c=a.length>0?"-"+a:"",d=me.join(me.dirname(s),me.basename(s,en)+c+Gf),p=me.join(i,ur,d);if(!We.default.existsSync(p)){let k={type:G.MessageType.Error,message:"No compiled interface file found. Please compile your project first."};return{jsonrpc:ne,method:"window/showMessage",params:k}}let g=await Nt(r,["createInterface",r,p],t),C=typeof g.result=="string"?g.result:"";try{let k=ys(r,Xr);return We.default.writeFileSync(k,C,{encoding:"utf-8"}),{jsonrpc:ne,id:t.id,result:{uri:si(k)}}}catch{return{jsonrpc:ne,id:t.id,error:{code:G.ErrorCodes.InternalError,message:"Unable to create interface file."}}}}function oT(t){let e=t.params,n=(0,qe.fileURLToPath)(e.uri),r=Kt(n);if(r===null){let o={type:G.MessageType.Error,message:"Cannot locate project directory."};return{jsonrpc:ne,method:"window/showMessage",params:o}}let i=tp(n,r);if(i.kind==="error"||!We.default.existsSync(i.result)){let o=i.kind==="success"?`No compiled file found. Expected it at: ${i.result}`:"No compiled file found. Please compile your project first.",a={type:G.MessageType.Error,message:o};return{jsonrpc:ne,method:"window/showMessage",params:a}}return{jsonrpc:ne,id:t.id,result:{uri:si(i.result)}}}async function gg(t){if(G.Message.isNotification(t)){if(!(!Ou&&t.method!=="exit"))if(t.method==="exit")Iu?Kn.default.exit(0):Kn.default.exit(1);else if(t.method===An.DidOpenTextDocumentNotification.method){let e=t.params;await HS(e.textDocument.uri,e.textDocument.text),await mg(e.textDocument.uri,e.textDocument.text)}else if(t.method===An.DidChangeTextDocumentNotification.method){let e=t.params,n=me.extname(e.textDocument.uri);if(n===en||n===Xr){let r=e.contentChanges;r.length===0||(US(e.textDocument.uri,r[r.length-1].text),await mg(e.textDocument.uri,r[r.length-1].text))}}else if(t.method===An.DidCloseTextDocumentNotification.method){let e=t.params;await WS(e.textDocument.uri)}else t.method===An.DidChangeConfigurationNotification.type.method&&pg()}else if(G.Message.isRequest(t))if(!Ou&&t.method!=="initialize"){let e={jsonrpc:ne,id:t.id,error:{code:G.ErrorCodes.ServerNotInitialized,message:"Server not initialized."}};se(e)}else if(t.method==="initialize"){let e=t.params,n=e.initializationOptions?.extensionConfiguration;n!=null&&(de.extensionConfiguration=n);let r=e.initializationOptions?.extensionClientCapabilities;r!=null&&(Fu=r),Fu.supportsSnippetSyntax=!!e.capabilities.textDocument?.completion?.completionItem?.snippetSupport;let i={capabilities:{textDocumentSync:bi.TextDocumentSyncKind.Full,documentFormattingProvider:!0,hoverProvider:!0,definitionProvider:!0,typeDefinitionProvider:!0,referencesProvider:!0,codeActionProvider:!0,renameProvider:{prepareProvider:!0},documentSymbolProvider:!0,completionProvider:{triggerCharacters:[".",">","@","~",'"',"=","("],resolveProvider:!0},semanticTokensProvider:{legend:{tokenTypes:["operator","variable","type","modifier","namespace","enumMember","property","interface"],tokenModifiers:[]},documentSelector:[{scheme:"file",language:"rescript"}],full:!0},inlayHintProvider:de.extensionConfiguration.inlayHints?.enable,codeLensProvider:de.extensionConfiguration.codeLens?{workDoneProgress:!1}:void 0,signatureHelpProvider:de.extensionConfiguration.signatureHelp?.enabled?{triggerCharacters:["("],retriggerCharacters:["=",","]}:void 0}},s={jsonrpc:ne,id:t.id,result:i};Ou=!0,Nu=setInterval(()=>{pg()},Xf),se(s)}else if(t.method==="initialized"){let e={jsonrpc:ne,id:t.id,result:null};se(e)}else if(t.method==="shutdown")if(Iu){let e={jsonrpc:ne,id:t.id,error:{code:G.ErrorCodes.InvalidRequest,message:"Language server already received the shutdown request"}};se(e)}else{Iu=!0,$S(),Nu!=null&&clearInterval(Nu);let e={jsonrpc:ne,id:t.id,result:null};se(e)}else if(t.method===G.HoverRequest.method)se(await BS(t));else if(t.method===G.DefinitionRequest.method)se(await KS(t));else if(t.method===G.TypeDefinitionRequest.method)se(await XS(t));else if(t.method===G.ReferencesRequest.method)se(await YS(t));else if(t.method===G.PrepareRenameRequest.method)se(await QS(t));else if(t.method===G.RenameRequest.method)se(await JS(t));else if(t.method===G.DocumentSymbolRequest.method)se(await ZS(t));else if(t.method===G.CompletionRequest.method)se(await tT(t));else if(t.method===G.CompletionResolveRequest.method)se(await nT(t));else if(t.method===G.SemanticTokensRequest.method)se(await eT(t));else if(t.method===G.CodeActionRequest.method)se(await rT(t));else if(t.method===G.DocumentFormattingRequest.method)iT(t).forEach(n=>se(n));else if(t.method===NS.method)se(await sT(t));else if(t.method===OS.method)se(oT(t));else if(t.method===G.InlayHintRequest.method){let e=t.params;me.extname(e.textDocument.uri)===en&&se(await VS(t))}else if(t.method===G.CodeLensRequest.method){let e=t.params;me.extname(e.textDocument.uri)===en&&se(await GS(t))}else if(t.method===G.SignatureHelpRequest.method){let e=t.params;me.extname(e.textDocument.uri)===en&&se(await zS(t))}else{let e={jsonrpc:ne,id:t.id,error:{code:G.ErrorCodes.InvalidRequest,message:"Unrecognized editor request."}};se(e)}else if(G.Message.isResponse(t)){if(t.id===sc){if(t.result!=null){let[e]=t.result;e!=null&&(de.extensionConfiguration=e)}}else if(t.result!=null&&t.result.title!=null&&t.result.title===ic){let n=t.result.projectRootPath,r=await _g(n);if(r!=null){let i=np(r,n),s=Xe.get(n);s.bsbWatcherByEditor=i}}}}zh(t=>{let e={type:G.MessageType.Warning,message:`ReScript tooling: Internal error. Something broke. Here's the error message that you can report if you want:
43
+
44
44
  ${t}
45
45
 
46
- (this message will only be reported once every 15 minutes)`};ne({jsonrpc:Z,method:"window/showMessage",params:e})});var Tw=process.argv.slice(2),jh=`ReScript Language Server
46
+ (this message will only be reported once every 15 minutes)`};se({jsonrpc:ne,method:"window/showMessage",params:e})});var aT=process.argv.slice(2),wg=`ReScript Language Server
47
47
 
48
48
  Usage: rescript-language-server [options]
49
49
 
@@ -52,7 +52,7 @@ Options:
52
52
  --stdio Use stdio
53
53
  --node-ipc Use node-ipc
54
54
  -v, --version Print version
55
- -h, --help Print help`;(()=>{switch(Tw[0]){case"--stdio":return No(!0);case"--node-ipc":return No(!1);case"--version":case"-v":let{version:t}=JSON.parse(Ih.default.readFileSync(Lh.default.join(__dirname,"..","package.json")).toString());console.log(t),process.exit(0);case"--help":case"-h":console.log(jh),process.exit(0);default:console.log(jh),process.exit(1)}})();
55
+ -h, --help Print help`;(()=>{switch(aT[0]){case"--stdio":return so(!0);case"--node-ipc":return so(!1);case"--version":case"-v":let{version:t}=JSON.parse(Cg.default.readFileSync(Pg.default.join(__dirname,"..","package.json")).toString());console.log(t),process.exit(0);case"--help":case"-h":console.log(wg),process.exit(0);default:console.log(wg),process.exit(1)}})();
56
56
  /*! Bundled license information:
57
57
 
58
58
  normalize-path/index.js: