sveld 0.36.7 → 0.36.9

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.
@@ -0,0 +1,13 @@
1
+ import{Ba as je,ya as gT,za as ee}from"./chunk-ptdfswsv.js";var lt=ee(function(Sc){Object.defineProperty(Sc,"__esModule",{value:!0});Sc.boolean=Kh;Sc.string=wc;Sc.number=ed;Sc.error=td;Sc.func=rd;Sc.array=Dc;Sc.stringArray=nd;function Kh(e){return e===!0||e===!1}function wc(e){return typeof e==="string"||e instanceof String}function ed(e){return typeof e==="number"||e instanceof Number}function td(e){return e instanceof Error}function rd(e){return typeof e==="function"}function Dc(e){return Array.isArray(e)}function nd(e){return Dc(e)&&e.every((t)=>wc(t))}});var rn=ee(function(w){var ld=w&&w.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),fd=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),md=w&&w.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")ld(r,t,i[s])}return fd(r,t),r}}();Object.defineProperty(w,"__esModule",{value:!0});w.Message=w.NotificationType9=w.NotificationType8=w.NotificationType7=w.NotificationType6=w.NotificationType5=w.NotificationType4=w.NotificationType3=w.NotificationType2=w.NotificationType1=w.NotificationType0=w.NotificationType=w.RequestType9=w.RequestType8=w.RequestType7=w.RequestType6=w.RequestType5=w.RequestType4=w.RequestType3=w.RequestType2=w.RequestType1=w.RequestType=w.RequestType0=w.AbstractMessageSignature=w.ParameterStructures=w.ResponseError=w.ErrorCodes=void 0;var Ke=md(lt()),en;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32000,e.serverErrorEnd=-32000})(en||(w.ErrorCodes=en={}));class tn extends Error{code;data;constructor(e,t,r){super(t);this.code=Ke.number(e)?e:en.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,tn.prototype)}toJson(){let e={code:this.code,message:this.message};if(this.data!==void 0)e.data=this.data;return e}}w.ResponseError=tn;class pe{kind;static auto=new pe("auto");static byPosition=new pe("byPosition");static byName=new pe("byName");constructor(e){this.kind=e}static is(e){return e===pe.auto||e===pe.byName||e===pe.byPosition}toString(){return this.kind}}w.ParameterStructures=pe;class U{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return pe.auto}}w.AbstractMessageSignature=U;class Pc extends U{_;constructor(e){super(e,0)}}w.RequestType0=Pc;class Ac extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.RequestType=Ac;class bc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.RequestType1=bc;class Ic extends U{_;constructor(e){super(e,2)}}w.RequestType2=Ic;class Cc extends U{_;constructor(e){super(e,3)}}w.RequestType3=Cc;class Nc extends U{_;constructor(e){super(e,4)}}w.RequestType4=Nc;class Lc extends U{_;constructor(e){super(e,5)}}w.RequestType5=Lc;class Jc extends U{_;constructor(e){super(e,6)}}w.RequestType6=Jc;class Rc extends U{_;constructor(e){super(e,7)}}w.RequestType7=Rc;class Oc extends U{_;constructor(e){super(e,8)}}w.RequestType8=Oc;class vc extends U{_;constructor(e){super(e,9)}}w.RequestType9=vc;class Mc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.NotificationType=Mc;class qc extends U{_;constructor(e){super(e,0)}}w.NotificationType0=qc;class Bc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.NotificationType1=Bc;class Uc extends U{_;constructor(e){super(e,2)}}w.NotificationType2=Uc;class jc extends U{_;constructor(e){super(e,3)}}w.NotificationType3=jc;class Vc extends U{_;constructor(e){super(e,4)}}w.NotificationType4=Vc;class Wc extends U{_;constructor(e){super(e,5)}}w.NotificationType5=Wc;class zc extends U{_;constructor(e){super(e,6)}}w.NotificationType6=zc;class Hc extends U{_;constructor(e){super(e,7)}}w.NotificationType7=Hc;class Gc extends U{_;constructor(e){super(e,8)}}w.NotificationType8=Gc;class $c extends U{_;constructor(e){super(e,9)}}w.NotificationType9=$c;var _c;(function(e){function t(s){let o=s;return o&&Ke.string(o.method)&&(Ke.string(o.id)||Ke.number(o.id))}e.isRequest=t;function r(s){let o=s;return o&&Ke.string(o.method)&&s.id===void 0}e.isNotification=r;function i(s){let o=s;return o&&(o.result!==void 0||!!o.error)&&(Ke.string(o.id)||Ke.number(o.id)||o.id===null)}e.isResponse=i})(_c||(w.Message=_c={}))});var sn=ee(function(Qc){Object.defineProperty(Qc,"__esModule",{value:!0});Qc.LRUCache=Qc.LinkedMap=Qc.Touch=void 0;var te;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(te||(Qc.Touch=te={}));class nn{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=te.None){let r=this._map.get(e);if(!r)return;if(t!==te.None)this.touch(r,t);return r.value}set(e,t,r=te.None){let i=this._map.get(e);if(i){if(i.value=t,r!==te.None)this.touch(i,r)}else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case te.None:this.addItemLast(i);break;case te.First:this.addItemFirst(i);break;case te.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 t=this._map.get(e);if(!t)return;return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;while(i){if(t)e.bind(t)(i.value,i.key,this);else e(i.value,i.key,this);if(this._state!==r)throw Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;while(t&&r>e)this._map.delete(t.key),t=t.next,r--;if(this._head=t,this._size=r,t)t.previous=void 0;this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(!this._head)throw Error("Invalid list");else e.next=this._head,this._head.previous=e;this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(!this._tail)throw Error("Invalid list");else e.previous=this._tail,this._tail.next=e;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 Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let{next:t,previous:r}=e;if(!t||!r)throw Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error("Invalid list");if(t!==te.First&&t!==te.Last)return;if(t===te.First){if(e===this._head)return;let{next:r,previous:i}=e;if(e===this._tail)i.next=void 0,this._tail=i;else 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(t===te.Last){if(e===this._tail)return;let{next:r,previous:i}=e;if(e===this._head)r.previous=void 0,this._head=r;else 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((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}}Qc.LinkedMap=nn;class Fc extends nn{_limit;_ratio;constructor(e,t=1){super();this._limit=e,this._ratio=Math.min(Math.max(0,t),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,t=te.AsNew){return super.get(e,t)}peek(e){return super.get(e,te.None)}set(e,t){return super.set(e,t,te.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}}Qc.LRUCache=Fc});var eu=ee(function(Zc){Object.defineProperty(Zc,"__esModule",{value:!0});Zc.Disposable=void 0;var Xc;(function(e){function t(r){return{dispose:r}}e.create=t})(Xc||(Zc.Disposable=Xc={}))});var Be=ee(function(tu){Object.defineProperty(tu,"__esModule",{value:!0});var on;function an(){if(on===void 0)throw Error("No runtime abstraction layer installed");return on}(function(e){function t(r){if(r===void 0)throw Error("No runtime abstraction layer provided");on=r}e.install=t})(an||(an={}));tu.default=an});var ft=ee(function(Ue){var gd=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Emitter=Ue.Event=void 0;var yd=gd(Be()),ru;(function(e){let t={dispose(){}};e.None=function(){return t}})(ru||(Ue.Event=ru={}));class nu{_callbacks;_contexts;add(e,t=null,r){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(e),this._contexts.push(t),Array.isArray(r))r.push({dispose:()=>this.remove(e,t)})}remove(e,t=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]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{t.push(r[s].apply(i[s],e))}catch(u){(0,yd.default)().console.error(u)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class cn{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){if(!this._event)this._event=(e,t,r)=>{if(!this._callbacks)this._callbacks=new nu;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(e,t);let i={dispose:()=>{if(!this._callbacks)return;if(this._callbacks.remove(e,t),i.dispose=cn._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)}};if(Array.isArray(r))r.push(i);return i};return this._event}fire(e){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,e)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}}Ue.Emitter=cn});var lr=ee(function(ae){var xd=ae&&ae.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Ed=ae&&ae.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),kd=ae&&ae.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")xd(r,t,i[s])}return Ed(r,t),r}}(),wd=ae&&ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ae,"__esModule",{value:!0});ae.CancellationTokenSource=ae.CancellationToken=void 0;var Dd=wd(Be()),Sd=kd(lt()),un=ft(),pr;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:un.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:un.Event.None});function t(r){let i=r;return i&&(i===e.None||i===e.Cancelled||Sd.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}e.is=t})(pr||(ae.CancellationToken=pr={}));var _d=Object.freeze(function(e,t){let r=(0,Dd.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}});class pn{_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return _d;if(!this._emitter)this._emitter=new un.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}}class iu{_token;get token(){if(!this._token)this._token=new pn;return this._token}cancel(){if(!this._token)this._token=pr.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=pr.None;else if(this._token instanceof pn)this._token.dispose()}}ae.CancellationTokenSource=iu});var lu=ee(function(uu){Object.defineProperty(uu,"__esModule",{value:!0});uu.SharedArrayReceiverStrategy=uu.SharedArraySenderStrategy=void 0;var Pd=lr(),Jt;(function(e){e.Continue=0,e.Cancelled=1})(Jt||(Jt={}));class su{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=Jt.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Jt.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}uu.SharedArraySenderStrategy=su;class ou{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Jt.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class au{token;constructor(e){this.token=new ou(e)}cancel(){}dispose(){}}class cu{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;if(t===void 0)return new Pd.CancellationTokenSource;return new au(t)}}uu.SharedArrayReceiverStrategy=cu});var ln=ee(function(mt){var bd=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.Semaphore=void 0;var Id=bd(Be());class fu{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,Id.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 Error("Too many thunks active");try{let t=e.thunk();if(t instanceof Promise)t.then((r)=>{this._active--,e.resolve(r),this.runNext()},(r)=>{this._active--,e.reject(r),this.runNext()});else this._active--,e.resolve(t),this.runNext()}catch(t){this._active--,e.reject(t),this.runNext()}}}mt.Semaphore=fu});var du=ee(function(re){var Cd=re&&re.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Nd=re&&re.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ld=re&&re.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Cd(r,t,i[s])}return Nd(r,t),r}}(),Jd=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(re,"__esModule",{value:!0});re.ReadableStreamMessageReader=re.AbstractMessageReader=re.MessageReader=void 0;var mn=Jd(Be()),ht=Ld(lt()),fn=ft(),Rd=ln(),mu;(function(e){function t(r){let i=r;return i&&ht.func(i.listen)&&ht.func(i.dispose)&&ht.func(i.onError)&&ht.func(i.onClose)&&ht.func(i.onPartialMessage)}e.is=t})(mu||(re.MessageReader=mu={}));class dn{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new fn.Emitter,this.closeEmitter=new fn.Emitter,this.partialMessageEmitter=new fn.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.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){if(e instanceof Error)return e;else return Error(`Reader received error. Reason: ${ht.string(e.message)?e.message:"unknown"}`)}}re.AbstractMessageReader=dn;var hn;(function(e){function t(r){let i,s,o,u=new Map,d,x=new Map;if(r===void 0||typeof r==="string")i=r??"utf-8";else{if(i=r.charset??"utf-8",r.contentDecoder!==void 0)o=r.contentDecoder,u.set(o.name,o);if(r.contentDecoders!==void 0)for(let _ of r.contentDecoders)u.set(_.name,_);if(r.contentTypeDecoder!==void 0)d=r.contentTypeDecoder,x.set(d.name,d);if(r.contentTypeDecoders!==void 0)for(let _ of r.contentTypeDecoders)x.set(_.name,_)}if(d===void 0)d=(0,mn.default)().applicationJson.decoder,x.set(d.name,d);return{charset:i,contentDecoder:o,contentDecoders:u,contentTypeDecoder:d,contentTypeDecoders:x}}e.fromOptions=t})(hn||(hn={}));class hu extends dn{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super();this.readable=e,this.options=hn.fromOptions(t),this.buffer=(0,mn.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Rd.Semaphore(1)}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 t=this.readable.onData((r)=>{this.onData(r)});return this.readable.onError((r)=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{this.buffer.append(e);while(!0){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(Error(`Header must provide a Content-Length property.
2
+ ${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch((r)=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,mn.default)().timer.setTimeout((e,t)=>{if(this.partialMessageTimer=void 0,e===this.messageToken)this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}}re.ReadableStreamMessageReader=hu});var ku=ee(function(ne){var Od=ne&&ne.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),vd=ne&&ne.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Md=ne&&ne.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Od(r,t,i[s])}return vd(r,t),r}}(),qd=ne&&ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0});ne.WriteableStreamMessageWriter=ne.AbstractMessageWriter=ne.MessageWriter=void 0;var Tu=qd(Be()),Rt=Md(lt()),Bd=ln(),gu=ft(),Ud="Content-Length: ",yu=`\r
3
+ `,xu;(function(e){function t(r){let i=r;return i&&Rt.func(i.dispose)&&Rt.func(i.onClose)&&Rt.func(i.onError)&&Rt.func(i.write)}e.is=t})(xu||(ne.MessageWriter=xu={}));class gn{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new gu.Emitter,this.closeEmitter=new gu.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){if(e instanceof Error)return e;else return Error(`Writer received error. Reason: ${Rt.string(e.message)?e.message:"unknown"}`)}}ne.AbstractMessageWriter=gn;var Tn;(function(e){function t(r){if(r===void 0||typeof r==="string")return{charset:r??"utf-8",contentTypeEncoder:(0,Tu.default)().applicationJson.encoder};else return{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,Tu.default)().applicationJson.encoder}}e.fromOptions=t})(Tn||(Tn={}));class Eu extends gn{writable;options;errorCount;writeSemaphore;constructor(e,t){super();this.writable=e,this.options=Tn.fromOptions(t),this.errorCount=0,this.writeSemaphore=new Bd.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)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(r);else return r}).then((r)=>{let i=[];return i.push(Ud,r.byteLength.toString(),yu),i.push(yu),this.doWrite(e,i,r)},(r)=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}ne.WriteableStreamMessageWriter=Eu});var _u=ee(function(Du){Object.defineProperty(Du,"__esModule",{value:!0});Du.AbstractMessageBuffer=void 0;var jd=13,Vd=10,Wd=`\r
4
+ `;class wu{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,s=0;e:while(r<this._chunks.length){let x=this._chunks[r];i=0;while(i<x.length){switch(x[i]){case jd:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case Vd:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}s+=x.byteLength,r++}if(t!==4)return;let o=this._read(s+i),u=new Map,d=this.toString(o,"ascii").split(Wd);if(d.length<2)return u;for(let x=0;x<d.length-2;x++){let _=d[x],I=_.indexOf(":");if(I===-1)throw Error(`Message header must separate key and value using ':'
5
+ ${_}`);let q=_.substr(0,I),O=_.substr(I+1).trim();u.set(e?q.toLowerCase():q,O)}return u}tryReadBody(e){if(this._totalLength<e)return;return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw 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 t=this.allocNative(e),r=0,i=0;while(e>0){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}}Du.AbstractMessageBuffer=wu});var Cu=ee(function(P){var zd=P&&P.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Hd=P&&P.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gd=P&&P.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")zd(r,t,i[s])}return Hd(r,t),r}}(),$d=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P,"__esModule",{value:!0});P.ConnectionOptions=P.MessageStrategy=P.CancellationStrategy=P.CancellationSenderStrategy=P.CancellationReceiverStrategy=P.RequestCancellationReceiverStrategy=P.IdCancellationReceiverStrategy=P.ConnectionStrategy=P.ConnectionError=P.ConnectionErrors=P.LogTraceNotification=P.SetTraceNotification=P.TraceFormat=P.TraceValues=P.TraceValue=P.Trace=P.NullLogger=P.ProgressType=P.ProgressToken=void 0;P.createMessageConnection=Fd;var Pu=$d(Be()),V=Gd(lt()),b=rn(),Au=sn(),Ot=ft(),yn=lr(),qt;(function(e){e.type=new b.NotificationType("$/cancelRequest")})(qt||(qt={}));var xn;(function(e){function t(r){return typeof r==="string"||typeof r==="number"}e.is=t})(xn||(P.ProgressToken=xn={}));var vt;(function(e){e.type=new b.NotificationType("$/progress")})(vt||(vt={}));class Iu{__;_pr;constructor(){}}P.ProgressType=Iu;var En;(function(e){function t(r){return V.func(r)}e.is=t})(En||(En={}));P.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var J;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(J||(P.Trace=J={}));var kn;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(kn||(P.TraceValue=kn={}));P.TraceValues=kn;(function(e){function t(i){if(!V.string(i))return e.Off;switch(i=i.toLowerCase(),i){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function r(i){switch(i){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=r})(J||(P.Trace=J={}));var le;(function(e){e.Text="text",e.JSON="json"})(le||(P.TraceFormat=le={}));(function(e){function t(r){if(!V.string(r))return e.Text;if(r=r.toLowerCase(),r==="json")return e.JSON;else return e.Text}e.fromString=t})(le||(P.TraceFormat=le={}));var wn;(function(e){e.type=new b.NotificationType("$/setTrace")})(wn||(P.SetTraceNotification=wn={}));var fr;(function(e){e.type=new b.NotificationType("$/logTrace")})(fr||(P.LogTraceNotification=fr={}));var Mt;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Mt||(P.ConnectionErrors=Mt={}));class dt extends Error{code;constructor(e,t){super(t);this.code=e,Object.setPrototypeOf(this,dt.prototype)}}P.ConnectionError=dt;var Dn;(function(e){function t(r){let i=r;return i&&V.func(i.cancelUndispatched)}e.is=t})(Dn||(P.ConnectionStrategy=Dn={}));var mr;(function(e){function t(r){let i=r;return i&&(i.kind===void 0||i.kind==="id")&&V.func(i.createCancellationTokenSource)&&(i.dispose===void 0||V.func(i.dispose))}e.is=t})(mr||(P.IdCancellationReceiverStrategy=mr={}));var Sn;(function(e){function t(r){let i=r;return i&&i.kind==="request"&&V.func(i.createCancellationTokenSource)&&(i.dispose===void 0||V.func(i.dispose))}e.is=t})(Sn||(P.RequestCancellationReceiverStrategy=Sn={}));var hr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new yn.CancellationTokenSource}});function t(r){return mr.is(r)||Sn.is(r)}e.is=t})(hr||(P.CancellationReceiverStrategy=hr={}));var dr;(function(e){e.Message=Object.freeze({sendCancellation(r,i){return r.sendNotification(qt.type,{id:i})},cleanup(r){}});function t(r){let i=r;return i&&V.func(i.sendCancellation)&&V.func(i.cleanup)}e.is=t})(dr||(P.CancellationSenderStrategy=dr={}));var Tr;(function(e){e.Message=Object.freeze({receiver:hr.Message,sender:dr.Message});function t(r){let i=r;return i&&hr.is(i.receiver)&&dr.is(i.sender)}e.is=t})(Tr||(P.CancellationStrategy=Tr={}));var gr;(function(e){function t(r){let i=r;return i&&V.func(i.handleMessage)}e.is=t})(gr||(P.MessageStrategy=gr={}));var bu;(function(e){function t(r){let i=r;return i&&(Tr.is(i.cancellationStrategy)||Dn.is(i.connectionStrategy)||gr.is(i.messageStrategy)||V.number(i.maxParallelism))}e.is=t})(bu||(P.ConnectionOptions=bu={}));var Ee;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(Ee||(Ee={}));function Fd(e,t,r,i){let s=r!==void 0?r:P.NullLogger,o=0,u=0,d=0,x="2.0",_=i?.maxParallelism??-1,I=0,q=void 0,O=new Map,F=void 0,ce=new Map,Ae=new Map,et,de=new Au.LinkedMap,ke=new Map,tt=new Set,Oe=new Map,R=J.Off,Te=le.Text,W,me=Ee.New,we=new Ot.Emitter,Ut=new Ot.Emitter,be=new Ot.Emitter,N=new Ot.Emitter,ue=new Ot.Emitter,se=i&&i.cancellationStrategy?i.cancellationStrategy:Tr.Message;function Ie(p){return}function Ce(){return me===Ee.Listening}function Bn(){return me===Ee.Closed}function rt(){return me===Ee.Disposed}function Un(){if(me===Ee.New||me===Ee.Listening)me=Ee.Closed,Ut.fire(void 0)}function fp(p){we.fire([p,void 0,void 0])}function mp(p){we.fire(p)}e.onClose(Un),e.onError(fp),t.onClose(Un),t.onError(mp);function jn(p){if(p===null)throw Error("Can't send requests with id null since the response can't be correlated.");return"req-"+p.toString()}function hp(p){if(p===null)return"res-unknown-"+(++d).toString();else return"res-"+p.toString()}function dp(){return"not-"+(++u).toString()}function Tp(p,g){if(b.Message.isRequest(g))p.set(jn(g.id),g);else if(b.Message.isResponse(g))if(_===-1)p.set(hp(g.id),g);else Wn(g);else p.set(dp(),g)}function kr(){if(et||de.size===0)return;if(_!==-1&&I>=_)return;et=(0,Pu.default)().timer.setImmediate(async()=>{if(et=void 0,de.size===0)return;if(_!==-1&&I>=_)return;let p=de.shift(),g;try{I++;let y=i?.messageStrategy;if(gr.is(y))g=y.handleMessage(p,Vn);else g=Vn(p)}catch(y){s.error(`Processing message queue failed: ${y.toString()}`)}finally{if(g instanceof Promise)g.then(()=>{I--,kr()}).catch((y)=>{s.error(`Processing message queue failed: ${y.toString()}`)});else I--;kr()}})}async function Vn(p){if(b.Message.isRequest(p))return yp(p);else if(b.Message.isNotification(p))return xp(p);else if(b.Message.isResponse(p))return Wn(p);else return Ep(p)}let gp=(p)=>{try{if(b.Message.isNotification(p)&&p.method===qt.type.method){let g=p.params.id,y=jn(g),D=de.get(y);if(b.Message.isRequest(D)){let j=i?.connectionStrategy,v=j&&j.cancelUndispatched?j.cancelUndispatched(D,Ie):Ie(D);if(v&&(v.error!==void 0||v.result!==void 0)){de.delete(y),Oe.delete(g),v.id=D.id,wr(v,p.method,Date.now()),t.write(v).catch(()=>s.error("Sending response for canceled message failed."));return}}let L=Oe.get(g);if(L!==void 0){L.cancel(),Dr(p);return}else tt.add(g)}Tp(de,p)}finally{kr()}};async function yp(p){if(rt())return Promise.resolve();function g(X,K,z){let H={jsonrpc:x,id:p.id};if(X instanceof b.ResponseError)H.error=X.toJson();else H.result=X===void 0?null:X;return wr(H,K,z),t.write(H)}function y(X,K,z){let H={jsonrpc:x,id:p.id,error:X.toJson()};return wr(H,K,z),t.write(H)}Dp(p);let D=O.get(p.method),L,j;if(D)L=D.type,j=D.handler;let v=Date.now();if(j||q){let X=p.id??String(Date.now()),K=mr.is(se.receiver)?se.receiver.createCancellationTokenSource(X):se.receiver.createCancellationTokenSource(p);if(p.id!==null&&tt.has(p.id))K.cancel();if(p.id!==null)Oe.set(X,K);try{let z;if(j)if(p.params===void 0){if(L!==void 0&&L.numberOfParams!==0)return y(new b.ResponseError(b.ErrorCodes.InvalidParams,`Request ${p.method} defines ${L.numberOfParams} params but received none.`),p.method,v);z=j(K.token)}else if(Array.isArray(p.params)){if(L!==void 0&&L.parameterStructures===b.ParameterStructures.byName)return y(new b.ResponseError(b.ErrorCodes.InvalidParams,`Request ${p.method} defines parameters by name but received parameters by position`),p.method,v);z=j(...p.params,K.token)}else{if(L!==void 0&&L.parameterStructures===b.ParameterStructures.byPosition)return y(new b.ResponseError(b.ErrorCodes.InvalidParams,`Request ${p.method} defines parameters by position but received parameters by name`),p.method,v);z=j(p.params,K.token)}else if(q)z=q(p.method,p.params,K.token);let H=await z;await g(H,p.method,v)}catch(z){if(z instanceof b.ResponseError)await g(z,p.method,v);else if(z&&V.string(z.message))await y(new b.ResponseError(b.ErrorCodes.InternalError,`Request ${p.method} failed with message: ${z.message}`),p.method,v);else await y(new b.ResponseError(b.ErrorCodes.InternalError,`Request ${p.method} failed unexpectedly without providing any details.`),p.method,v)}finally{Oe.delete(X)}}else await y(new b.ResponseError(b.ErrorCodes.MethodNotFound,`Unhandled method ${p.method}`),p.method,v)}function Wn(p){if(rt())return;if(p.id===null)if(p.error)s.error(`Received response message without id: Error is:
6
+ ${JSON.stringify(p.error,void 0,4)}`);else s.error("Received response message without id. No further error information provided.");else{let g=p.id,y=ke.get(g);if(Sp(p,y),y!==void 0){ke.delete(g);try{if(p.error){let D=p.error;y.reject(new b.ResponseError(D.code,D.message,D.data))}else if(p.result!==void 0)y.resolve(p.result);else throw Error("Should never happen.")}catch(D){if(D.message)s.error(`Response handler '${y.method}' failed with message: ${D.message}`);else s.error(`Response handler '${y.method}' failed unexpectedly.`)}}}}async function xp(p){if(rt())return;let g=void 0,y;if(p.method===qt.type.method){let D=p.params.id;tt.delete(D),Dr(p);return}else{let D=ce.get(p.method);if(D)y=D.handler,g=D.type}if(y||F)try{if(Dr(p),y)if(p.params===void 0){if(g!==void 0){if(g.numberOfParams!==0&&g.parameterStructures!==b.ParameterStructures.byName)s.error(`Notification ${p.method} defines ${g.numberOfParams} params but received none.`)}await y()}else if(Array.isArray(p.params)){let D=p.params;if(p.method===vt.type.method&&D.length===2&&xn.is(D[0]))await y({token:D[0],value:D[1]});else{if(g!==void 0){if(g.parameterStructures===b.ParameterStructures.byName)s.error(`Notification ${p.method} defines parameters by name but received parameters by position`);if(g.numberOfParams!==p.params.length)s.error(`Notification ${p.method} defines ${g.numberOfParams} params but received ${D.length} arguments`)}await y(...D)}}else{if(g!==void 0&&g.parameterStructures===b.ParameterStructures.byPosition)s.error(`Notification ${p.method} defines parameters by position but received parameters by name`);await y(p.params)}else if(F)await F(p.method,p.params)}catch(D){if(D.message)s.error(`Notification handler '${p.method}' failed with message: ${D.message}`);else s.error(`Notification handler '${p.method}' failed unexpectedly.`)}else be.fire(p)}function Ep(p){if(!p){s.error("Received empty message.");return}s.error(`Received message which is neither a response nor a notification message:
7
+ ${JSON.stringify(p,null,4)}`);let g=p;if(V.string(g.id)||V.number(g.id)){let y=g.id,D=ke.get(y);if(D)D.reject(Error("The received response has neither a result nor an error property."))}}function ve(p){if(p===void 0||p===null)return;switch(R){case J.Verbose:return JSON.stringify(p,null,4);case J.Compact:return JSON.stringify(p);default:return}}function kp(p){if(R===J.Off||!W)return;if(Te===le.Text){let g=void 0;if((R===J.Verbose||R===J.Compact)&&p.params)g=`Params: ${ve(p.params)}`;W.log(`Sending request '${p.method} - (${p.id})'.`,g)}else nt("send-request",p)}function wp(p){if(R===J.Off||!W)return;if(Te===le.Text){let g=void 0;if(R===J.Verbose||R===J.Compact)if(p.params)g=`Params: ${ve(p.params)}`;else g="No parameters provided.";W.log(`Sending notification '${p.method}'.`,g)}else nt("send-notification",p)}function wr(p,g,y){if(R===J.Off||!W)return;if(Te===le.Text){let D=void 0;if(R===J.Verbose||R===J.Compact){if(p.error&&p.error.data)D=`Error data: ${ve(p.error.data)}`;else if(p.result)D=`Result: ${ve(p.result)}`;else if(p.error===void 0)D="No result returned."}W.log(`Sending response '${g} - (${p.id})'. Processing request took ${Date.now()-y}ms`,D)}else nt("send-response",p)}function Dp(p){if(R===J.Off||!W)return;if(Te===le.Text){let g=void 0;if((R===J.Verbose||R===J.Compact)&&p.params)g=`Params: ${ve(p.params)}`;W.log(`Received request '${p.method} - (${p.id})'.`,g)}else nt("receive-request",p)}function Dr(p){if(R===J.Off||!W||p.method===fr.type.method)return;if(Te===le.Text){let g=void 0;if(R===J.Verbose||R===J.Compact)if(p.params)g=`Params: ${ve(p.params)}`;else g="No parameters provided.";W.log(`Received notification '${p.method}'.`,g)}else nt("receive-notification",p)}function Sp(p,g){if(R===J.Off||!W)return;if(Te===le.Text){let y=void 0;if(R===J.Verbose||R===J.Compact){if(p.error&&p.error.data)y=`Error data: ${ve(p.error.data)}`;else if(p.result)y=`Result: ${ve(p.result)}`;else if(p.error===void 0)y="No result returned."}if(g){let D=p.error?` Request failed: ${p.error.message} (${p.error.code}).`:"";W.log(`Received response '${g.method} - (${p.id})' in ${Date.now()-g.timerStart}ms.${D}`,y)}else W.log(`Received response ${p.id} without active response promise.`,y)}else nt("receive-response",p)}function nt(p,g){if(!W||R===J.Off)return;let y={isLSPMessage:!0,type:p,message:g,timestamp:Date.now()};W.log(y)}function yt(){if(Bn())throw new dt(Mt.Closed,"Connection is closed.");if(rt())throw new dt(Mt.Disposed,"Connection is disposed.")}function _p(){if(Ce())throw new dt(Mt.AlreadyListening,"Connection is already listening")}function Pp(){if(!Ce())throw Error("Call listen() first.")}function xt(p){if(p===void 0)return null;else return p}function zn(p){if(p===null)return;else return p}function Hn(p){return p!==void 0&&p!==null&&!Array.isArray(p)&&typeof p==="object"}function Sr(p,g){switch(p){case b.ParameterStructures.auto:if(Hn(g))return zn(g);else return[xt(g)];case b.ParameterStructures.byName:if(!Hn(g))throw Error("Received parameters by name but param is not an object literal.");return zn(g);case b.ParameterStructures.byPosition:return[xt(g)];default:throw Error(`Unknown parameter structure ${p.toString()}`)}}function Gn(p,g){let y,D=p.numberOfParams;switch(D){case 0:y=void 0;break;case 1:y=Sr(p.parameterStructures,g[0]);break;default:y=[];for(let L=0;L<g.length&&L<D;L++)y.push(xt(g[L]));if(g.length<D)for(let L=g.length;L<D;L++)y.push(null);break}return y}let Ve={sendNotification:(p,...g)=>{yt();let y,D;if(V.string(p)){y=p;let j=g[0],v=0,X=b.ParameterStructures.auto;if(b.ParameterStructures.is(j))v=1,X=j;let K=g.length,z=K-v;switch(z){case 0:D=void 0;break;case 1:D=Sr(X,g[v]);break;default:if(X===b.ParameterStructures.byName)throw Error(`Received ${z} parameters for 'by Name' notification parameter structure.`);D=g.slice(v,K).map((H)=>xt(H));break}}else{let j=g;y=p.method,D=Gn(p,j)}let L={jsonrpc:x,method:y,params:D};return wp(L),t.write(L).catch((j)=>{throw s.error("Sending notification failed."),j})},onNotification:(p,g)=>{yt();let y;if(V.func(p))F=p;else if(g)if(V.string(p))y=p,ce.set(p,{type:void 0,handler:g});else y=p.method,ce.set(p.method,{type:p,handler:g});return{dispose:()=>{if(y!==void 0){if(ce.get(y)?.handler===g)ce.delete(y)}else if(F===p)F=void 0}}},onProgress:(p,g,y)=>{if(Ae.has(g))throw Error(`Progress handler for token ${g} already registered`);return Ae.set(g,y),{dispose:()=>{if(Ae.get(g)===y)Ae.delete(g)}}},sendProgress:(p,g,y)=>Ve.sendNotification(vt.type,{token:g,value:y}),onUnhandledProgress:N.event,sendRequest:(p,...g)=>{yt(),Pp();function y(H,ge){let Ne=se.sender.sendCancellation(H,ge);if(Ne===void 0)s.log(`Received no promise from cancellation strategy when cancelling id ${ge}`);else Ne.catch(()=>{s.log(`Sending cancellation messages for id ${ge} failed.`)})}let D,L,j=void 0;if(V.string(p)){D=p;let H=g[0],ge=g[g.length-1],Ne=0,Et=b.ParameterStructures.auto;if(b.ParameterStructures.is(H))Ne=1,Et=H;let We=g.length;if(yn.CancellationToken.is(ge))We=We-1,j=ge;let De=We-Ne;switch(De){case 0:L=void 0;break;case 1:L=Sr(Et,g[Ne]);break;default:if(Et===b.ParameterStructures.byName)throw Error(`Received ${De} parameters for 'by Name' request parameter structure.`);L=g.slice(Ne,We).map((Ap)=>xt(Ap));break}}else{let H=g;D=p.method,L=Gn(p,H);let ge=p.numberOfParams;j=yn.CancellationToken.is(H[ge])?H[ge]:void 0}let v=o++,X,K=!1;if(j!==void 0)if(j.isCancellationRequested)K=!0;else X=j.onCancellationRequested(()=>{y(Ve,v)});let z={jsonrpc:x,id:v,method:D,params:L};if(kp(z),typeof se.sender.enableCancellation==="function")se.sender.enableCancellation(z);return new Promise(async(H,ge)=>{let Ne=(De)=>{H(De),se.sender.cleanup(v),X?.dispose()},Et=(De)=>{ge(De),se.sender.cleanup(v),X?.dispose()},We={method:D,timerStart:Date.now(),resolve:Ne,reject:Et};try{if(ke.set(v,We),await t.write(z),K)y(Ve,v)}catch(De){throw ke.delete(v),We.reject(new b.ResponseError(b.ErrorCodes.MessageWriteError,De.message?De.message:"Unknown reason")),s.error("Sending request failed."),De}})},onRequest:(p,g)=>{yt();let y=null;if(En.is(p))y=void 0,q=p;else if(V.string(p)){if(y=null,g!==void 0)y=p,O.set(p,{handler:g,type:void 0})}else if(g!==void 0)y=p.method,O.set(p.method,{type:p,handler:g});return{dispose:()=>{if(y===null)return;if(y!==void 0){if(O.get(y)?.handler===g)O.delete(y)}else if(q===p)q=void 0}}},hasPendingResponse:()=>ke.size>0,trace:async(p,g,y)=>{let D=!1,L=le.Text;if(y!==void 0)if(V.boolean(y))D=y;else D=y.sendNotification||!1,L=y.traceFormat||le.Text;if(R=p,Te=L,R===J.Off)W=void 0;else W=g;if(D&&!Bn()&&!rt())await Ve.sendNotification(wn.type,{value:J.toString(p)})},onError:we.event,onClose:Ut.event,onUnhandledNotification:be.event,onDispose:ue.event,end:()=>{t.end()},dispose:()=>{if(rt())return;me=Ee.Disposed,ue.fire(void 0);let p=new b.ResponseError(b.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let g of ke.values())g.reject(p);if(ke=new Map,Oe=new Map,tt=new Set,de=new Au.LinkedMap,V.func(t.dispose))t.dispose();if(V.func(e.dispose))e.dispose()},listen:()=>{yt(),_p(),me=Ee.Listening,e.listen(gp)},inspect:()=>{(0,Pu.default)().console.log("inspect")}};return Ve.onNotification(fr.type,(p)=>{if(R===J.Off||!W)return;let g=R===J.Verbose||R===J.Compact;W.log(p.message,g?p.verbose:void 0)}),Ve.onNotification(vt.type,async(p)=>{let g=Ae.get(p.token);if(g)await g(p.value);else N.fire(p)}),Ve}});var yr=ee(function(h){var Qd=h&&h.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h,"__esModule",{value:!0});h.ProgressType=h.ProgressToken=h.createMessageConnection=h.NullLogger=h.ConnectionOptions=h.ConnectionStrategy=h.AbstractMessageBuffer=h.WriteableStreamMessageWriter=h.AbstractMessageWriter=h.MessageWriter=h.ReadableStreamMessageReader=h.AbstractMessageReader=h.MessageReader=h.SharedArrayReceiverStrategy=h.SharedArraySenderStrategy=h.CancellationToken=h.CancellationTokenSource=h.Emitter=h.Event=h.Disposable=h.LRUCache=h.Touch=h.LinkedMap=h.ParameterStructures=h.NotificationType9=h.NotificationType8=h.NotificationType7=h.NotificationType6=h.NotificationType5=h.NotificationType4=h.NotificationType3=h.NotificationType2=h.NotificationType1=h.NotificationType0=h.NotificationType=h.ErrorCodes=h.ResponseError=h.RequestType9=h.RequestType8=h.RequestType7=h.RequestType6=h.RequestType5=h.RequestType4=h.RequestType3=h.RequestType2=h.RequestType1=h.RequestType0=h.RequestType=h.Message=h.RAL=void 0;h.MessageStrategy=h.CancellationStrategy=h.CancellationSenderStrategy=h.RequestCancellationReceiverStrategy=h.IdCancellationReceiverStrategy=h.CancellationReceiverStrategy=h.ConnectionError=h.ConnectionErrors=h.LogTraceNotification=h.SetTraceNotification=h.TraceFormat=h.TraceValues=h.TraceValue=h.Trace=void 0;var M=rn();Object.defineProperty(h,"Message",{enumerable:!0,get:function(){return M.Message}});Object.defineProperty(h,"RequestType",{enumerable:!0,get:function(){return M.RequestType}});Object.defineProperty(h,"RequestType0",{enumerable:!0,get:function(){return M.RequestType0}});Object.defineProperty(h,"RequestType1",{enumerable:!0,get:function(){return M.RequestType1}});Object.defineProperty(h,"RequestType2",{enumerable:!0,get:function(){return M.RequestType2}});Object.defineProperty(h,"RequestType3",{enumerable:!0,get:function(){return M.RequestType3}});Object.defineProperty(h,"RequestType4",{enumerable:!0,get:function(){return M.RequestType4}});Object.defineProperty(h,"RequestType5",{enumerable:!0,get:function(){return M.RequestType5}});Object.defineProperty(h,"RequestType6",{enumerable:!0,get:function(){return M.RequestType6}});Object.defineProperty(h,"RequestType7",{enumerable:!0,get:function(){return M.RequestType7}});Object.defineProperty(h,"RequestType8",{enumerable:!0,get:function(){return M.RequestType8}});Object.defineProperty(h,"RequestType9",{enumerable:!0,get:function(){return M.RequestType9}});Object.defineProperty(h,"ResponseError",{enumerable:!0,get:function(){return M.ResponseError}});Object.defineProperty(h,"ErrorCodes",{enumerable:!0,get:function(){return M.ErrorCodes}});Object.defineProperty(h,"NotificationType",{enumerable:!0,get:function(){return M.NotificationType}});Object.defineProperty(h,"NotificationType0",{enumerable:!0,get:function(){return M.NotificationType0}});Object.defineProperty(h,"NotificationType1",{enumerable:!0,get:function(){return M.NotificationType1}});Object.defineProperty(h,"NotificationType2",{enumerable:!0,get:function(){return M.NotificationType2}});Object.defineProperty(h,"NotificationType3",{enumerable:!0,get:function(){return M.NotificationType3}});Object.defineProperty(h,"NotificationType4",{enumerable:!0,get:function(){return M.NotificationType4}});Object.defineProperty(h,"NotificationType5",{enumerable:!0,get:function(){return M.NotificationType5}});Object.defineProperty(h,"NotificationType6",{enumerable:!0,get:function(){return M.NotificationType6}});Object.defineProperty(h,"NotificationType7",{enumerable:!0,get:function(){return M.NotificationType7}});Object.defineProperty(h,"NotificationType8",{enumerable:!0,get:function(){return M.NotificationType8}});Object.defineProperty(h,"NotificationType9",{enumerable:!0,get:function(){return M.NotificationType9}});Object.defineProperty(h,"ParameterStructures",{enumerable:!0,get:function(){return M.ParameterStructures}});var _n=sn();Object.defineProperty(h,"LinkedMap",{enumerable:!0,get:function(){return _n.LinkedMap}});Object.defineProperty(h,"LRUCache",{enumerable:!0,get:function(){return _n.LRUCache}});Object.defineProperty(h,"Touch",{enumerable:!0,get:function(){return _n.Touch}});var Yd=eu();Object.defineProperty(h,"Disposable",{enumerable:!0,get:function(){return Yd.Disposable}});var Nu=ft();Object.defineProperty(h,"Event",{enumerable:!0,get:function(){return Nu.Event}});Object.defineProperty(h,"Emitter",{enumerable:!0,get:function(){return Nu.Emitter}});var Lu=lr();Object.defineProperty(h,"CancellationTokenSource",{enumerable:!0,get:function(){return Lu.CancellationTokenSource}});Object.defineProperty(h,"CancellationToken",{enumerable:!0,get:function(){return Lu.CancellationToken}});var Ju=lu();Object.defineProperty(h,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ju.SharedArraySenderStrategy}});Object.defineProperty(h,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ju.SharedArrayReceiverStrategy}});var Pn=du();Object.defineProperty(h,"MessageReader",{enumerable:!0,get:function(){return Pn.MessageReader}});Object.defineProperty(h,"AbstractMessageReader",{enumerable:!0,get:function(){return Pn.AbstractMessageReader}});Object.defineProperty(h,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Pn.ReadableStreamMessageReader}});var An=ku();Object.defineProperty(h,"MessageWriter",{enumerable:!0,get:function(){return An.MessageWriter}});Object.defineProperty(h,"AbstractMessageWriter",{enumerable:!0,get:function(){return An.AbstractMessageWriter}});Object.defineProperty(h,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return An.WriteableStreamMessageWriter}});var Xd=_u();Object.defineProperty(h,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Xd.AbstractMessageBuffer}});var Y=Cu();Object.defineProperty(h,"ConnectionStrategy",{enumerable:!0,get:function(){return Y.ConnectionStrategy}});Object.defineProperty(h,"ConnectionOptions",{enumerable:!0,get:function(){return Y.ConnectionOptions}});Object.defineProperty(h,"NullLogger",{enumerable:!0,get:function(){return Y.NullLogger}});Object.defineProperty(h,"createMessageConnection",{enumerable:!0,get:function(){return Y.createMessageConnection}});Object.defineProperty(h,"ProgressToken",{enumerable:!0,get:function(){return Y.ProgressToken}});Object.defineProperty(h,"ProgressType",{enumerable:!0,get:function(){return Y.ProgressType}});Object.defineProperty(h,"Trace",{enumerable:!0,get:function(){return Y.Trace}});Object.defineProperty(h,"TraceValue",{enumerable:!0,get:function(){return Y.TraceValue}});Object.defineProperty(h,"TraceFormat",{enumerable:!0,get:function(){return Y.TraceFormat}});Object.defineProperty(h,"SetTraceNotification",{enumerable:!0,get:function(){return Y.SetTraceNotification}});Object.defineProperty(h,"LogTraceNotification",{enumerable:!0,get:function(){return Y.LogTraceNotification}});Object.defineProperty(h,"ConnectionErrors",{enumerable:!0,get:function(){return Y.ConnectionErrors}});Object.defineProperty(h,"ConnectionError",{enumerable:!0,get:function(){return Y.ConnectionError}});Object.defineProperty(h,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.CancellationReceiverStrategy}});Object.defineProperty(h,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.IdCancellationReceiverStrategy}});Object.defineProperty(h,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.RequestCancellationReceiverStrategy}});Object.defineProperty(h,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Y.CancellationSenderStrategy}});Object.defineProperty(h,"CancellationStrategy",{enumerable:!0,get:function(){return Y.CancellationStrategy}});Object.defineProperty(h,"MessageStrategy",{enumerable:!0,get:function(){return Y.MessageStrategy}});Object.defineProperty(h,"TraceValues",{enumerable:!0,get:function(){return Y.TraceValues}});var Zd=Qd(Be());h.RAL=Zd.default});var Bu=ee(function(qu){Object.defineProperty(qu,"__esModule",{value:!0});var Ru=je("util"),Je=yr();class In extends Je.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return In.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){if(e instanceof Buffer)return e.toString(t);else return new Ru.TextDecoder(t).decode(e)}asNative(e,t){if(t===void 0)return e instanceof Buffer?e:Buffer.from(e);else return e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}class Ou{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),Je.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),Je.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),Je.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),Je.Disposable.create(()=>this.stream.off("data",e))}}class vu{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),Je.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),Je.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),Je.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=(o)=>{if(o===void 0||o===null)r();else i(o)};if(typeof e==="string")this.stream.write(e,t,s);else this.stream.write(e,s)})}end(){this.stream.end()}}var Mu=Object.freeze({messageBuffer:Object.freeze({create:(e)=>new In(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(r){return Promise.reject(r)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{if(e instanceof Buffer)return Promise.resolve(JSON.parse(e.toString(t.charset)));else return Promise.resolve(JSON.parse(new Ru.TextDecoder(t.charset).decode(e)))}catch(r){return Promise.reject(r)}}})}),stream:Object.freeze({asReadableStream:(e)=>new Ou(e),asWritableStream:(e)=>new vu(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){let r=setImmediate(e,...t);return{dispose:()=>clearImmediate(r)}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:()=>clearInterval(i)}}})});function bn(){return Mu}(function(e){function t(){Je.RAL.install(Mu)}e.install=t})(bn||(bn={}));qu.default=bn});var Gu=ee(function(C){var ju=C&&C.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),eT=C&&C.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cn=C&&C.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")ju(r,t,i[s])}return eT(r,t),r}}(),tT=C&&C.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))ju(t,e,r)},rT=C&&C.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(C,"__esModule",{value:!0});C.StreamMessageWriter=C.StreamMessageReader=C.SocketMessageWriter=C.SocketMessageReader=C.PortMessageWriter=C.PortMessageReader=C.IPCMessageWriter=C.IPCMessageReader=void 0;C.generateRandomPipeName=cT;C.createClientPipeTransport=uT;C.createServerPipeTransport=pT;C.createClientSocketTransport=lT;C.createServerSocketTransport=fT;C.createMessageConnection=dT;var Bt=rT(Bu());Bt.default.install();var nT=Cn(je("path")),iT=Cn(je("os")),sT=Cn(je("fs")),Uu=je("crypto"),xr=je("net"),fe=yr();tT(yr(),C);class Vu extends fe.AbstractMessageReader{process;constructor(e){super();this.process=e;let t=this.process;t.on("error",(r)=>this.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),fe.Disposable.create(()=>this.process.off("message",e))}}C.IPCMessageReader=Vu;class Wu extends fe.AbstractMessageWriter{process;errorCount;constructor(e){super();this.process=e,this.errorCount=0;let t=this.process;t.on("error",(r)=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{if(typeof this.process.send==="function")this.process.send(e,void 0,void 0,(t)=>{if(t)this.errorCount++,this.handleError(t,e);else this.errorCount=0});return Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}C.IPCMessageWriter=Wu;class zu extends fe.AbstractMessageReader{onData;constructor(e){super();this.onData=new fe.Emitter,e.on("close",()=>this.fireClose),e.on("error",(t)=>this.fireError(t)),e.on("message",(t)=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}}C.PortMessageReader=zu;class Hu extends fe.AbstractMessageWriter{port;errorCount;constructor(e){super();this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",(t)=>this.fireError(t))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}C.PortMessageWriter=Hu;class Tt extends fe.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,Bt.default)().stream.asReadableStream(e),t)}}C.SocketMessageReader=Tt;class gt extends fe.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,Bt.default)().stream.asWritableStream(e),t);this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}C.SocketMessageWriter=gt;class Nn extends fe.ReadableStreamMessageReader{constructor(e,t){super((0,Bt.default)().stream.asReadableStream(e),t)}}C.StreamMessageReader=Nn;class Ln extends fe.WriteableStreamMessageWriter{constructor(e,t){super((0,Bt.default)().stream.asWritableStream(e),t)}}C.StreamMessageWriter=Ln;var oT=process.env.XDG_RUNTIME_DIR,aT=new Map([["linux",107],["darwin",103]]);function cT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,Uu.randomBytes)(16).toString("hex")}-sock`;let e=32,t=10,r=sT.realpathSync(oT??iT.tmpdir()),i=aT.get(process.platform);if(i!==void 0)e=Math.min(i-r.length-t,e);if(e<16)throw Error(`Unable to generate a random pipe name with ${e} characters.`);let s=(0,Uu.randomBytes)(Math.floor(e/2)).toString("hex");return nT.join(r,`lsp-${s}.sock`)}function uT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=(0,xr.createServer)((d)=>{u.close(),r([new Tt(d,t),new gt(d,t)])});u.on("error",o),u.listen(e,()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function pT(e,t="utf-8"){let r=(0,xr.createConnection)(e);return[new Tt(r,t),new gt(r,t)]}function lT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=(0,xr.createServer)((d)=>{u.close(),r([new Tt(d,t),new gt(d,t)])});u.on("error",o),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function fT(e,t="utf-8"){let r=(0,xr.createConnection)(e,"127.0.0.1");return[new Tt(r,t),new gt(r,t)]}function mT(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function hT(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function dT(e,t,r,i){if(!r)r=fe.NullLogger;let s=mT(e)?new Nn(e):e,o=hT(t)?new Ln(t):t;if(fe.ConnectionStrategy.is(i))i={connectionStrategy:i};return(0,fe.createMessageConnection)(s,o,r,i)}});var _r;(function(e){e[e.Text=1]="Text",e[e.Method=2]="Method",e[e.Function=3]="Function",e[e.Constructor=4]="Constructor",e[e.Field=5]="Field",e[e.Variable=6]="Variable",e[e.Class=7]="Class",e[e.Interface=8]="Interface",e[e.Module=9]="Module",e[e.Property=10]="Property",e[e.Unit=11]="Unit",e[e.Value=12]="Value",e[e.Enum=13]="Enum",e[e.Keyword=14]="Keyword",e[e.Snippet=15]="Snippet",e[e.Color=16]="Color",e[e.File=17]="File",e[e.Reference=18]="Reference",e[e.Folder=19]="Folder",e[e.EnumMember=20]="EnumMember",e[e.Constant=21]="Constant",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(_r||(_r={}));var Pr;(function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"})(Pr||(Pr={}));var Ar;(function(e){e[e.None=0]="None",e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest"})(Ar||(Ar={}));var br;(function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ES2020=6]="ES2020",e[e.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.Node18=101]="Node18",e[e.Node20=102]="Node20",e[e.NodeNext=199]="NodeNext",e[e.Preserve=200]="Preserve"})(br||(br={}));var Ir;(function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.UseInstantiationExpressions=1073741824]="UseInstantiationExpressions",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.WriteCallStyleSignature=134217728]="WriteCallStyleSignature",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName"})(Ir||(Ir={}));var it;(function(e){e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.MembersResolved=2097152]="MembersResolved",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.InstantiationExpressionType=16777216]="InstantiationExpressionType",e[e.SingleSignatureType=33554432]="SingleSignatureType",e[e.ObjectTypeKindMask=50332991]="ObjectTypeKindMask",e[e.ContainsSpread=4194304]="ContainsSpread",e[e.ObjectRestType=8388608]="ObjectRestType",e[e.IsClassInstanceClone=67108864]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=134217728]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=268435456]="IdenticalBaseTypeExists",e[e.UnresolvedMembers=536870912]="UnresolvedMembers",e[e.FromTypeNode=1073741824]="FromTypeNode",e[e.IsGenericTypeComputed=4194304]="IsGenericTypeComputed",e[e.IsGenericObjectType=8388608]="IsGenericObjectType",e[e.IsGenericIndexType=16777216]="IsGenericIndexType",e[e.IsGenericType=25165824]="IsGenericType",e[e.ContainsIntersections=33554432]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=67108864]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=134217728]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=33554432]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=67108864]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=134217728]="IsConstrainedTypeVariable"})(it||(it={}));var st;(function(e){e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Construct=4]="Construct",e[e.Abstract=8]="Abstract",e[e.IsInnerCallChain=16]="IsInnerCallChain",e[e.IsOuterCallChain=32]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=64]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=128]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=256]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=335]="PropagatingFlags",e[e.CallChainFlags=48]="CallChainFlags"})(st||(st={}));var Cr;(function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"})(Cr||(Cr={}));var kt;(function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.ConstEnumOnlyModule=268435456]="ConstEnumOnlyModule",e[e.ReplaceableByMethod=536870912]="ReplaceableByMethod",e[e.GlobalLookup=1073741824]="GlobalLookup",e[e.All=536870912]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=13243]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46011]="GetAccessorExcludes",e[e.SetAccessorExcludes=78779]="SetAccessorExcludes",e[e.AccessorExcludes=111547]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer"})(kt||(kt={}));var G;(function(e){e[e.None=0]="None",e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.Undefined=4]="Undefined",e[e.Null=8]="Null",e[e.Void=16]="Void",e[e.String=32]="String",e[e.Number=64]="Number",e[e.BigInt=128]="BigInt",e[e.Boolean=256]="Boolean",e[e.ESSymbol=512]="ESSymbol",e[e.StringLiteral=1024]="StringLiteral",e[e.NumberLiteral=2048]="NumberLiteral",e[e.BigIntLiteral=4096]="BigIntLiteral",e[e.BooleanLiteral=8192]="BooleanLiteral",e[e.UniqueESSymbol=16384]="UniqueESSymbol",e[e.EnumLiteral=32768]="EnumLiteral",e[e.Enum=65536]="Enum",e[e.NonPrimitive=131072]="NonPrimitive",e[e.Never=262144]="Never",e[e.TypeParameter=524288]="TypeParameter",e[e.Object=1048576]="Object",e[e.Index=2097152]="Index",e[e.TemplateLiteral=4194304]="TemplateLiteral",e[e.StringMapping=8388608]="StringMapping",e[e.Substitution=16777216]="Substitution",e[e.IndexedAccess=33554432]="IndexedAccess",e[e.Conditional=67108864]="Conditional",e[e.Union=134217728]="Union",e[e.Intersection=268435456]="Intersection",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.Reserved3=-2147483648]="Reserved3",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=12]="Nullable",e[e.Literal=15360]="Literal",e[e.Unit=97292]="Unit",e[e.Freshable=80896]="Freshable",e[e.StringOrNumberLiteral=3072]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=19456]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=15388]="DefinitelyFalsy",e[e.PossiblyFalsy=15868]="PossiblyFalsy",e[e.Intrinsic=393983]="Intrinsic",e[e.StringLike=12583968]="StringLike",e[e.NumberLike=67648]="NumberLike",e[e.BigIntLike=4224]="BigIntLike",e[e.BooleanLike=8448]="BooleanLike",e[e.EnumLike=98304]="EnumLike",e[e.ESSymbolLike=16896]="ESSymbolLike",e[e.VoidLike=20]="VoidLike",e[e.Primitive=12713980]="Primitive",e[e.DefinitelyNonNullable=13893600]="DefinitelyNonNullable",e[e.DisjointDomains=12812284]="DisjointDomains",e[e.UnionOrIntersection=402653184]="UnionOrIntersection",e[e.StructuredType=403701760]="StructuredType",e[e.TypeVariable=34078720]="TypeVariable",e[e.InstantiableNonPrimitive=117964800]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=14680064]="InstantiablePrimitive",e[e.Instantiable=132644864]="Instantiable",e[e.StructuredOrInstantiable=536346624]="StructuredOrInstantiable",e[e.ObjectFlagsType=403963917]="ObjectFlagsType",e[e.Simplifiable=102760448]="Simplifiable",e[e.Singleton=394239]="Singleton",e[e.Narrowable=536575971]="Narrowable",e[e.IncludesMask=416808959]="IncludesMask",e[e.IncludesMissingType=524288]="IncludesMissingType",e[e.IncludesNonWideningType=2097152]="IncludesNonWideningType",e[e.IncludesWildcard=33554432]="IncludesWildcard",e[e.IncludesEmptyObject=67108864]="IncludesEmptyObject",e[e.IncludesInstantiable=16777216]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=286523411]="NotPrimitiveUnion"})(G||(G={}));var Nr;(function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier"})(Nr||(Nr={}));var E;(function(e){e[e.EOF=-1]="EOF",e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5765]="ogham",e[e.replacementCharacter=65533]="replacementCharacter",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"})(E||(E={}));var jt;(function(e){e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore"})(jt||(jt={}));var Lr;(function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.AssignmentDeclaration="__assignment",e.InstantiationExpression="__instantiationExpression",e.ImportAttributes="__importAttributes",e.ExportEquals="export=",e.Default="default",e.This="this",e.ModuleExports="module.exports"})(Lr||(Lr={}));var Vt;(function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"})(Vt||(Vt={}));var B;(function(e){e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e[e.JavaScript=3872]="JavaScript"})(B||(B={}));var Se;(function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.Reparsed=8]="Reparsed",e[e.Synthesized=16]="Synthesized",e[e.OptionalChain=32]="OptionalChain",e[e.ExportContext=64]="ExportContext",e[e.ContainsThis=128]="ContainsThis",e[e.HasImplicitReturn=256]="HasImplicitReturn",e[e.HasExplicitReturn=512]="HasExplicitReturn",e[e.DisallowInContext=1024]="DisallowInContext",e[e.YieldContext=2048]="YieldContext",e[e.DecoratorContext=4096]="DecoratorContext",e[e.AwaitContext=8192]="AwaitContext",e[e.DisallowConditionalTypesContext=16384]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=32768]="ThisNodeHasError",e[e.JavaScriptFile=65536]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=131072]="ThisNodeOrAnySubNodesHasError",e[e.HasAsyncFunctions=262144]="HasAsyncFunctions",e[e.PossiblyContainsDynamicImport=524288]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=1048576]="PossiblyContainsImportMeta",e[e.HasJSDoc=2097152]="HasJSDoc",e[e.JSDoc=4194304]="JSDoc",e[e.Ambient=8388608]="Ambient",e[e.InWithStatement=16777216]="InWithStatement",e[e.JsonFile=33554432]="JsonFile",e[e.PossiblyContainsDeprecatedTag=67108864]="PossiblyContainsDeprecatedTag",e[e.Unreachable=134217728]="Unreachable",e[e.ReparserTransformedLiteral=268435456]="ReparserTransformedLiteral",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.AwaitUsing=6]="AwaitUsing",e[e.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=262912]="ReachabilityAndEmitFlags",e[e.ContextFlags=25263104]="ContextFlags",e[e.TypeExcludesFlags=10240]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=1572864]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=128]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=262144]="IdentifierIsInJSDocNamespace",e[e.NestedNamespace=32]="NestedNamespace"})(Se||(Se={}));var he;(function(e){e[e.None=0]="None",e[e.HasIndices=1]="HasIndices",e[e.Global=2]="Global",e[e.IgnoreCase=4]="IgnoreCase",e[e.Multiline=8]="Multiline",e[e.DotAll=16]="DotAll",e[e.Unicode=32]="Unicode",e[e.UnicodeSets=64]="UnicodeSets",e[e.Sticky=128]="Sticky",e[e.AnyUnicodeMode=96]="AnyUnicodeMode"})(he||(he={}));var ot;(function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"})(ot||(ot={}));var Wt;(function(e){e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ES2025=12]="ES2025",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"})(Wt||(Wt={}));var n;(function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFile=1]="EndOfFile",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ConflictMarkerTrivia=6]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=7]="NonTextFileMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.QuestionDotToken=28]="QuestionDotToken",e[e.LessThanToken=29]="LessThanToken",e[e.LessThanSlashToken=30]="LessThanSlashToken",e[e.GreaterThanToken=31]="GreaterThanToken",e[e.LessThanEqualsToken=32]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=34]="EqualsEqualsToken",e[e.ExclamationEqualsToken=35]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",e[e.PlusToken=39]="PlusToken",e[e.MinusToken=40]="MinusToken",e[e.AsteriskToken=41]="AsteriskToken",e[e.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",e[e.SlashToken=43]="SlashToken",e[e.PercentToken=44]="PercentToken",e[e.PlusPlusToken=45]="PlusPlusToken",e[e.MinusMinusToken=46]="MinusMinusToken",e[e.LessThanLessThanToken=47]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=50]="AmpersandToken",e[e.BarToken=51]="BarToken",e[e.CaretToken=52]="CaretToken",e[e.ExclamationToken=53]="ExclamationToken",e[e.TildeToken=54]="TildeToken",e[e.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",e[e.BarBarToken=56]="BarBarToken",e[e.QuestionToken=57]="QuestionToken",e[e.ColonToken=58]="ColonToken",e[e.AtToken=59]="AtToken",e[e.QuestionQuestionToken=60]="QuestionQuestionToken",e[e.BacktickToken=61]="BacktickToken",e[e.HashToken=62]="HashToken",e[e.EqualsToken=63]="EqualsToken",e[e.PlusEqualsToken=64]="PlusEqualsToken",e[e.MinusEqualsToken=65]="MinusEqualsToken",e[e.AsteriskEqualsToken=66]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=67]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=68]="SlashEqualsToken",e[e.PercentEqualsToken=69]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=70]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=73]="AmpersandEqualsToken",e[e.BarEqualsToken=74]="BarEqualsToken",e[e.BarBarEqualsToken=75]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=76]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=77]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=78]="CaretEqualsToken",e[e.Identifier=79]="Identifier",e[e.PrivateIdentifier=80]="PrivateIdentifier",e[e.JSDocCommentTextToken=81]="JSDocCommentTextToken",e[e.BreakKeyword=82]="BreakKeyword",e[e.CaseKeyword=83]="CaseKeyword",e[e.CatchKeyword=84]="CatchKeyword",e[e.ClassKeyword=85]="ClassKeyword",e[e.ConstKeyword=86]="ConstKeyword",e[e.ContinueKeyword=87]="ContinueKeyword",e[e.DebuggerKeyword=88]="DebuggerKeyword",e[e.DefaultKeyword=89]="DefaultKeyword",e[e.DeleteKeyword=90]="DeleteKeyword",e[e.DoKeyword=91]="DoKeyword",e[e.ElseKeyword=92]="ElseKeyword",e[e.EnumKeyword=93]="EnumKeyword",e[e.ExportKeyword=94]="ExportKeyword",e[e.ExtendsKeyword=95]="ExtendsKeyword",e[e.FalseKeyword=96]="FalseKeyword",e[e.FinallyKeyword=97]="FinallyKeyword",e[e.ForKeyword=98]="ForKeyword",e[e.FunctionKeyword=99]="FunctionKeyword",e[e.IfKeyword=100]="IfKeyword",e[e.ImportKeyword=101]="ImportKeyword",e[e.InKeyword=102]="InKeyword",e[e.InstanceOfKeyword=103]="InstanceOfKeyword",e[e.NewKeyword=104]="NewKeyword",e[e.NullKeyword=105]="NullKeyword",e[e.ReturnKeyword=106]="ReturnKeyword",e[e.SuperKeyword=107]="SuperKeyword",e[e.SwitchKeyword=108]="SwitchKeyword",e[e.ThisKeyword=109]="ThisKeyword",e[e.ThrowKeyword=110]="ThrowKeyword",e[e.TrueKeyword=111]="TrueKeyword",e[e.TryKeyword=112]="TryKeyword",e[e.TypeOfKeyword=113]="TypeOfKeyword",e[e.VarKeyword=114]="VarKeyword",e[e.VoidKeyword=115]="VoidKeyword",e[e.WhileKeyword=116]="WhileKeyword",e[e.WithKeyword=117]="WithKeyword",e[e.ImplementsKeyword=118]="ImplementsKeyword",e[e.InterfaceKeyword=119]="InterfaceKeyword",e[e.LetKeyword=120]="LetKeyword",e[e.PackageKeyword=121]="PackageKeyword",e[e.PrivateKeyword=122]="PrivateKeyword",e[e.ProtectedKeyword=123]="ProtectedKeyword",e[e.PublicKeyword=124]="PublicKeyword",e[e.StaticKeyword=125]="StaticKeyword",e[e.YieldKeyword=126]="YieldKeyword",e[e.AbstractKeyword=127]="AbstractKeyword",e[e.AccessorKeyword=128]="AccessorKeyword",e[e.AsKeyword=129]="AsKeyword",e[e.AssertsKeyword=130]="AssertsKeyword",e[e.AssertKeyword=131]="AssertKeyword",e[e.AnyKeyword=132]="AnyKeyword",e[e.AsyncKeyword=133]="AsyncKeyword",e[e.AwaitKeyword=134]="AwaitKeyword",e[e.BooleanKeyword=135]="BooleanKeyword",e[e.ConstructorKeyword=136]="ConstructorKeyword",e[e.DeclareKeyword=137]="DeclareKeyword",e[e.GetKeyword=138]="GetKeyword",e[e.ImmediateKeyword=139]="ImmediateKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.DeferKeyword=166]="DeferKeyword",e[e.QualifiedName=167]="QualifiedName",e[e.ComputedPropertyName=168]="ComputedPropertyName",e[e.TypeParameter=169]="TypeParameter",e[e.Parameter=170]="Parameter",e[e.Decorator=171]="Decorator",e[e.PropertySignature=172]="PropertySignature",e[e.PropertyDeclaration=173]="PropertyDeclaration",e[e.MethodSignature=174]="MethodSignature",e[e.MethodDeclaration=175]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=176]="ClassStaticBlockDeclaration",e[e.Constructor=177]="Constructor",e[e.GetAccessor=178]="GetAccessor",e[e.SetAccessor=179]="SetAccessor",e[e.CallSignature=180]="CallSignature",e[e.ConstructSignature=181]="ConstructSignature",e[e.IndexSignature=182]="IndexSignature",e[e.TypePredicate=183]="TypePredicate",e[e.TypeReference=184]="TypeReference",e[e.FunctionType=185]="FunctionType",e[e.ConstructorType=186]="ConstructorType",e[e.TypeQuery=187]="TypeQuery",e[e.TypeLiteral=188]="TypeLiteral",e[e.ArrayType=189]="ArrayType",e[e.TupleType=190]="TupleType",e[e.OptionalType=191]="OptionalType",e[e.RestType=192]="RestType",e[e.UnionType=193]="UnionType",e[e.IntersectionType=194]="IntersectionType",e[e.ConditionalType=195]="ConditionalType",e[e.InferType=196]="InferType",e[e.ParenthesizedType=197]="ParenthesizedType",e[e.ThisType=198]="ThisType",e[e.TypeOperator=199]="TypeOperator",e[e.IndexedAccessType=200]="IndexedAccessType",e[e.MappedType=201]="MappedType",e[e.LiteralType=202]="LiteralType",e[e.NamedTupleMember=203]="NamedTupleMember",e[e.TemplateLiteralType=204]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=205]="TemplateLiteralTypeSpan",e[e.ImportType=206]="ImportType",e[e.ObjectBindingPattern=207]="ObjectBindingPattern",e[e.ArrayBindingPattern=208]="ArrayBindingPattern",e[e.BindingElement=209]="BindingElement",e[e.ArrayLiteralExpression=210]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=211]="ObjectLiteralExpression",e[e.PropertyAccessExpression=212]="PropertyAccessExpression",e[e.ElementAccessExpression=213]="ElementAccessExpression",e[e.CallExpression=214]="CallExpression",e[e.NewExpression=215]="NewExpression",e[e.TaggedTemplateExpression=216]="TaggedTemplateExpression",e[e.TypeAssertionExpression=217]="TypeAssertionExpression",e[e.ParenthesizedExpression=218]="ParenthesizedExpression",e[e.FunctionExpression=219]="FunctionExpression",e[e.ArrowFunction=220]="ArrowFunction",e[e.DeleteExpression=221]="DeleteExpression",e[e.TypeOfExpression=222]="TypeOfExpression",e[e.VoidExpression=223]="VoidExpression",e[e.AwaitExpression=224]="AwaitExpression",e[e.PrefixUnaryExpression=225]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=226]="PostfixUnaryExpression",e[e.BinaryExpression=227]="BinaryExpression",e[e.ConditionalExpression=228]="ConditionalExpression",e[e.TemplateExpression=229]="TemplateExpression",e[e.YieldExpression=230]="YieldExpression",e[e.SpreadElement=231]="SpreadElement",e[e.ClassExpression=232]="ClassExpression",e[e.OmittedExpression=233]="OmittedExpression",e[e.ExpressionWithTypeArguments=234]="ExpressionWithTypeArguments",e[e.AsExpression=235]="AsExpression",e[e.NonNullExpression=236]="NonNullExpression",e[e.MetaProperty=237]="MetaProperty",e[e.SyntheticExpression=238]="SyntheticExpression",e[e.SatisfiesExpression=239]="SatisfiesExpression",e[e.TemplateSpan=240]="TemplateSpan",e[e.SemicolonClassElement=241]="SemicolonClassElement",e[e.Block=242]="Block",e[e.EmptyStatement=243]="EmptyStatement",e[e.VariableStatement=244]="VariableStatement",e[e.ExpressionStatement=245]="ExpressionStatement",e[e.IfStatement=246]="IfStatement",e[e.DoStatement=247]="DoStatement",e[e.WhileStatement=248]="WhileStatement",e[e.ForStatement=249]="ForStatement",e[e.ForInStatement=250]="ForInStatement",e[e.ForOfStatement=251]="ForOfStatement",e[e.ContinueStatement=252]="ContinueStatement",e[e.BreakStatement=253]="BreakStatement",e[e.ReturnStatement=254]="ReturnStatement",e[e.WithStatement=255]="WithStatement",e[e.SwitchStatement=256]="SwitchStatement",e[e.LabeledStatement=257]="LabeledStatement",e[e.ThrowStatement=258]="ThrowStatement",e[e.TryStatement=259]="TryStatement",e[e.DebuggerStatement=260]="DebuggerStatement",e[e.VariableDeclaration=261]="VariableDeclaration",e[e.VariableDeclarationList=262]="VariableDeclarationList",e[e.FunctionDeclaration=263]="FunctionDeclaration",e[e.ClassDeclaration=264]="ClassDeclaration",e[e.InterfaceDeclaration=265]="InterfaceDeclaration",e[e.TypeAliasDeclaration=266]="TypeAliasDeclaration",e[e.EnumDeclaration=267]="EnumDeclaration",e[e.ModuleDeclaration=268]="ModuleDeclaration",e[e.ModuleBlock=269]="ModuleBlock",e[e.CaseBlock=270]="CaseBlock",e[e.NamespaceExportDeclaration=271]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=272]="ImportEqualsDeclaration",e[e.ImportDeclaration=273]="ImportDeclaration",e[e.ImportClause=274]="ImportClause",e[e.NamespaceImport=275]="NamespaceImport",e[e.NamedImports=276]="NamedImports",e[e.ImportSpecifier=277]="ImportSpecifier",e[e.ExportAssignment=278]="ExportAssignment",e[e.ExportDeclaration=279]="ExportDeclaration",e[e.NamedExports=280]="NamedExports",e[e.NamespaceExport=281]="NamespaceExport",e[e.ExportSpecifier=282]="ExportSpecifier",e[e.MissingDeclaration=283]="MissingDeclaration",e[e.ExternalModuleReference=284]="ExternalModuleReference",e[e.JsxElement=285]="JsxElement",e[e.JsxSelfClosingElement=286]="JsxSelfClosingElement",e[e.JsxOpeningElement=287]="JsxOpeningElement",e[e.JsxClosingElement=288]="JsxClosingElement",e[e.JsxFragment=289]="JsxFragment",e[e.JsxOpeningFragment=290]="JsxOpeningFragment",e[e.JsxClosingFragment=291]="JsxClosingFragment",e[e.JsxAttribute=292]="JsxAttribute",e[e.JsxAttributes=293]="JsxAttributes",e[e.JsxSpreadAttribute=294]="JsxSpreadAttribute",e[e.JsxExpression=295]="JsxExpression",e[e.JsxNamespacedName=296]="JsxNamespacedName",e[e.CaseClause=297]="CaseClause",e[e.DefaultClause=298]="DefaultClause",e[e.HeritageClause=299]="HeritageClause",e[e.CatchClause=300]="CatchClause",e[e.ImportAttributes=301]="ImportAttributes",e[e.ImportAttribute=302]="ImportAttribute",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.SourceFile=307]="SourceFile",e[e.JSDocTypeExpression=308]="JSDocTypeExpression",e[e.JSDocNameReference=309]="JSDocNameReference",e[e.JSDocAllType=310]="JSDocAllType",e[e.JSDocNullableType=311]="JSDocNullableType",e[e.JSDocNonNullableType=312]="JSDocNonNullableType",e[e.JSDocOptionalType=313]="JSDocOptionalType",e[e.JSDocVariadicType=314]="JSDocVariadicType",e[e.JSDoc=315]="JSDoc",e[e.JSDocText=316]="JSDocText",e[e.JSDocTypeLiteral=317]="JSDocTypeLiteral",e[e.JSDocSignature=318]="JSDocSignature",e[e.JSDocLink=319]="JSDocLink",e[e.JSDocLinkCode=320]="JSDocLinkCode",e[e.JSDocLinkPlain=321]="JSDocLinkPlain",e[e.JSDocUnknownTag=322]="JSDocUnknownTag",e[e.JSDocAugmentsTag=323]="JSDocAugmentsTag",e[e.JSDocImplementsTag=324]="JSDocImplementsTag",e[e.JSDocDeprecatedTag=325]="JSDocDeprecatedTag",e[e.JSDocPublicTag=326]="JSDocPublicTag",e[e.JSDocPrivateTag=327]="JSDocPrivateTag",e[e.JSDocProtectedTag=328]="JSDocProtectedTag",e[e.JSDocReadonlyTag=329]="JSDocReadonlyTag",e[e.JSDocOverrideTag=330]="JSDocOverrideTag",e[e.JSDocCallbackTag=331]="JSDocCallbackTag",e[e.JSDocOverloadTag=332]="JSDocOverloadTag",e[e.JSDocParameterTag=333]="JSDocParameterTag",e[e.JSDocReturnTag=334]="JSDocReturnTag",e[e.JSDocThisTag=335]="JSDocThisTag",e[e.JSDocTypeTag=336]="JSDocTypeTag",e[e.JSDocTemplateTag=337]="JSDocTemplateTag",e[e.JSDocTypedefTag=338]="JSDocTypedefTag",e[e.JSDocSeeTag=339]="JSDocSeeTag",e[e.JSDocPropertyTag=340]="JSDocPropertyTag",e[e.JSDocThrowsTag=341]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=342]="JSDocSatisfiesTag",e[e.JSDocImportTag=343]="JSDocImportTag",e[e.SyntaxList=344]="SyntaxList",e[e.JSTypeAliasDeclaration=345]="JSTypeAliasDeclaration",e[e.JSImportDeclaration=346]="JSImportDeclaration",e[e.NotEmittedStatement=347]="NotEmittedStatement",e[e.PartiallyEmittedExpression=348]="PartiallyEmittedExpression",e[e.SyntheticReferenceExpression=349]="SyntheticReferenceExpression",e[e.NotEmittedTypeElement=350]="NotEmittedTypeElement",e[e.Count=351]="Count",e[e.FirstAssignment=63]="FirstAssignment",e[e.LastAssignment=78]="LastAssignment",e[e.FirstCompoundAssignment=64]="FirstCompoundAssignment",e[e.LastCompoundAssignment=78]="LastCompoundAssignment",e[e.FirstReservedWord=82]="FirstReservedWord",e[e.LastReservedWord=117]="LastReservedWord",e[e.FirstKeyword=82]="FirstKeyword",e[e.LastKeyword=166]="LastKeyword",e[e.FirstFutureReservedWord=118]="FirstFutureReservedWord",e[e.LastFutureReservedWord=126]="LastFutureReservedWord",e[e.FirstTypeNode=183]="FirstTypeNode",e[e.LastTypeNode=206]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=78]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=166]="LastToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=29]="FirstBinaryOperator",e[e.LastBinaryOperator=78]="LastBinaryOperator",e[e.FirstStatement=244]="FirstStatement",e[e.LastStatement=260]="LastStatement",e[e.FirstNode=167]="FirstNode",e[e.FirstJSDocNode=308]="FirstJSDocNode",e[e.LastJSDocNode=343]="LastJSDocNode",e[e.FirstJSDocTagNode=322]="FirstJSDocTagNode",e[e.LastJSDocTagNode=343]="LastJSDocTagNode",e[e.FirstContextualKeyword=127]="FirstContextualKeyword",e[e.LastContextualKeyword=166]="LastContextualKeyword",e[e.LastUnaryOperator=54]="LastUnaryOperator",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=6]="LastTriviaToken"})(n||(n={}));var Me;(function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.ContainsInvalidEscape=2048]="ContainsInvalidEscape",e[e.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.PrecedingJSDocLeadingAsterisks=32768]="PrecedingJSDocLeadingAsterisks",e[e.SingleQuote=65536]="SingleQuote",e[e.PrecedingJSDocWithDeprecated=131072]="PrecedingJSDocWithDeprecated",e[e.PrecedingJSDocWithSeeOrLink=262144]="PrecedingJSDocWithSeeOrLink",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=72716]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7180]="TemplateLiteralLikeFlags",e[e.RegularExpressionLiteralFlags=4]="RegularExpressionLiteralFlags",e[e.IsInvalid=26656]="IsInvalid"})(Me||(Me={}));function $n(e){let t=e;return t.length>=3&&t.charCodeAt(0)===E._&&t.charCodeAt(1)===E._&&t.charCodeAt(2)===E._?t.slice(1):t}function Fn(e){return{statements:e.statements,endOfFileToken:e.endOfFileToken,text:e.text,fileName:e.fileName,path:e.path,languageVariant:e.languageVariant,scriptKind:e.scriptKind,isDeclarationFile:e.isDeclarationFile,referencedFiles:e.referencedFiles,typeReferenceDirectives:e.typeReferenceDirectives,libReferenceDirectives:e.libReferenceDirectives,imports:e.imports,moduleAugmentations:e.moduleAugmentations,ambientModuleNames:e.ambientModuleNames,externalModuleIndicator:e.externalModuleIndicator,tokenCache:void 0}}var oe;(function(e){e[e.Parentheses=1]="Parentheses",e[e.TypeAssertions=2]="TypeAssertions",e[e.NonNullAssertions=4]="NonNullAssertions",e[e.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",e[e.ExpressionsWithTypeArguments=16]="ExpressionsWithTypeArguments",e[e.Satisfies=32]="Satisfies",e[e.ExcludeJSDocTypeAssertion=64]="ExcludeJSDocTypeAssertion",e[e.Assignments=128]="Assignments",e[e.Comma=256]="Comma",e[e.Assertions=38]="Assertions",e[e.All=63]="All",e[e.AllExceptAssertionsOrExpressionsWithTypeArguments=9]="AllExceptAssertionsOrExpressionsWithTypeArguments",e[e.ExpressionTypePassthrough=385]="ExpressionTypePassthrough"})(oe||(oe={}));function A(e){return e.kind===n.Identifier}function Qn(e){return e.kind===n.CaseBlock}function Yn(e){return e.kind===n.CatchClause}function wt(e){return e.kind===n.Block}function Xn(e){return e.kind===n.VariableDeclaration}function Zn(e){return e.kind===n.VariableDeclarationList}function Jr(e){return e.kind===n.ExpressionWithTypeArguments}function Dt(e){return e.kind===n.ImportAttributes}function Rr(e){return e.kind===n.TemplateHead}function Or(e){return e.kind===n.JsxAttributes}function Kn(e){return e.kind===n.JsxOpeningElement}function ei(e){return e.kind===n.JsxOpeningFragment}function ti(e){return e.kind===n.JsxClosingFragment}function ri(e){return e.kind===n.JsxClosingElement}function vr(e){return e.kind===n.ImportClause}function Mr(e){return e.kind===n.TypeParameter}function ni(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function St(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function ye(e){let t=e.kind;return t===n.Identifier||t===n.StringLiteral||t===n.NoSubstitutionTemplateLiteral||t===n.NumericLiteral||t===n.ComputedPropertyName||t===n.PrivateIdentifier||t===n.BigIntLiteral}function ii(e){return e.kind===n.ModuleBlock||e.kind===n.ModuleDeclaration}function qr(e){return e.kind===n.Identifier||e.kind===n.ModuleDeclaration}function si(e){return e.kind===n.Identifier||e.kind===n.QualifiedName||e.kind===n.ExternalModuleReference}function oi(e){return e.kind===n.NamespaceImport||e.kind===n.NamedImports}function ai(e){return e.kind===n.NamespaceExport||e.kind===n.NamedExports}function ci(e){return e.kind===n.Identifier||e.kind===n.PrivateIdentifier}function xe(e){return e.kind===n.Identifier||e.kind===n.QualifiedName}function zt(e){return e.kind===n.Identifier||e.kind===n.ObjectBindingPattern||e.kind===n.ArrayBindingPattern}function ui(e){return e.kind===n.Identifier||e.kind===n.JsxNamespacedName}function pi(e){let t=e.kind;return t===n.StringLiteral||t===n.JsxExpression||t===n.JsxElement||t===n.JsxSelfClosingElement||t===n.JsxFragment}function Br(e){return e.kind===n.TemplateMiddle||e.kind===n.TemplateTail}function li(e){return e.kind===n.TemplateExpression||e.kind===n.NoSubstitutionTemplateLiteral}function fi(e){return e.kind===n.Identifier||e.kind===n.ThisType}function mi(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function ze(e){return e.kind===n.Block}function bp(e){return e===n.EqualsToken||Hp(e)}function Ip(e){return Gp(e)||e===n.CommaToken}function Cp(e){return e===n.AsteriskAsteriskToken}function Np(e){return e===n.AsteriskToken||e===n.SlashToken||e===n.PercentToken}function Lp(e){return Cp(e)||Np(e)}function Jp(e){return e===n.PlusToken||e===n.MinusToken}function Rp(e){return Lp(e)||Jp(e)}function Op(e){return e===n.LessThanLessThanToken||e===n.GreaterThanGreaterThanToken||e===n.GreaterThanGreaterThanGreaterThanToken}function vp(e){return Rp(e)||Op(e)}function Mp(e){return e===n.LessThanToken||e===n.LessThanEqualsToken||e===n.GreaterThanToken||e===n.GreaterThanEqualsToken||e===n.InstanceOfKeyword||e===n.InKeyword}function qp(e){return vp(e)||Mp(e)}function Bp(e){return e===n.EqualsEqualsToken||e===n.EqualsEqualsEqualsToken||e===n.ExclamationEqualsEqualsToken||e===n.ExclamationEqualsToken}function Up(e){return qp(e)||Bp(e)}function jp(e){return e===n.AmpersandToken||e===n.BarToken||e===n.CaretToken}function Vp(e){return Up(e)||jp(e)}function Wp(e){return e===n.AmpersandAmpersandToken||e===n.BarBarToken}function zp(e){return Vp(e)||Wp(e)}function Hp(e){return e===n.PlusEqualsToken||e===n.MinusEqualsToken||e===n.AsteriskAsteriskEqualsToken||e===n.AsteriskEqualsToken||e===n.SlashEqualsToken||e===n.PercentEqualsToken||e===n.AmpersandEqualsToken||e===n.BarEqualsToken||e===n.CaretEqualsToken||e===n.LessThanLessThanEqualsToken||e===n.GreaterThanGreaterThanGreaterThanEqualsToken||e===n.GreaterThanGreaterThanEqualsToken||e===n.BarBarEqualsToken||e===n.AmpersandAmpersandEqualsToken||e===n.QuestionQuestionEqualsToken}function Gp(e){return e===n.QuestionQuestionToken||zp(e)||bp(e)}function hi(e){return e>=n.FirstJSDocNode&&e<=n.LastJSDocNode}function di(e){return e.kind===n.EndOfFile}function _t(e){return e.kind===n.DotDotDotToken}function Ht(e){return e.kind===n.QuestionToken}function Ti(e){return e.kind===n.ExclamationToken}function gi(e){return e.kind===n.ColonToken}function yi(e){return e.kind===n.EqualsToken}function Pt(e){return e.kind===n.AsteriskToken}function xi(e){return e.kind===n.EqualsGreaterThanToken}function At(e){return e.kind===n.QuestionDotToken}function Ei(e){return e.kind===n.AssertsKeyword}function Ur(e){return e.kind===n.AwaitKeyword}function ki(e){return Ip(e.kind)}function S(e){return $p(e.kind)}function $p(e){return e>=n.FirstTypeNode&&e<=n.LastTypeNode||e===n.AnyKeyword||e===n.UnknownKeyword||e===n.NumberKeyword||e===n.BigIntKeyword||e===n.ObjectKeyword||e===n.BooleanKeyword||e===n.StringKeyword||e===n.SymbolKeyword||e===n.VoidKeyword||e===n.UndefinedKeyword||e===n.NeverKeyword||e===n.IntrinsicKeyword||e===n.ExpressionWithTypeArguments||e===n.JSDocAllType||e===n.JSDocNullableType||e===n.JSDocNonNullableType||e===n.JSDocOptionalType||e===n.JSDocVariadicType||e===n.JSDocTypeExpression||e===n.JSDocTypeLiteral||e===n.JSDocSignature}function _e(e){let t=e.kind;return t===n.VariableStatement||t===n.EmptyStatement||t===n.ExpressionStatement||t===n.IfStatement||t===n.DoStatement||t===n.WhileStatement||t===n.ForStatement||t===n.ForInStatement||t===n.ForOfStatement||t===n.ContinueStatement||t===n.BreakStatement||t===n.ReturnStatement||t===n.WithStatement||t===n.SwitchStatement||t===n.LabeledStatement||t===n.ThrowStatement||t===n.TryStatement||t===n.DebuggerStatement||t===n.InterfaceDeclaration||t===n.TypeAliasDeclaration||t===n.EnumDeclaration||t===n.ModuleDeclaration||t===n.ImportDeclaration||t===n.ImportEqualsDeclaration||t===n.ExportDeclaration||t===n.ExportAssignment||t===n.NamespaceExportDeclaration||t===n.FunctionDeclaration||t===n.ClassDeclaration||t===n.MissingDeclaration||t===n.NotEmittedStatement||t===n.Block}function k(e){let t=e.kind;return t===n.ConditionalExpression||t===n.YieldExpression||t===n.ArrowFunction||t===n.BinaryExpression||t===n.SpreadElement||t===n.AsExpression||t===n.OmittedExpression||t===n.SatisfiesExpression||t===n.PrefixUnaryExpression||t===n.PostfixUnaryExpression||t===n.DeleteExpression||t===n.TypeOfExpression||t===n.VoidExpression||t===n.AwaitExpression||t===n.TypeAssertionExpression||t===n.CallExpression||t===n.NewExpression||t===n.TaggedTemplateExpression||t===n.NonNullExpression||t===n.MetaProperty||t===n.JsxExpression||t===n.PropertyAccessExpression||t===n.ElementAccessExpression||t===n.FunctionExpression||t===n.ClassExpression||t===n.ParenthesizedExpression||t===n.ArrayLiteralExpression||t===n.ObjectLiteralExpression||t===n.TemplateExpression||t===n.Identifier||t===n.PrivateIdentifier||t===n.NumericLiteral||t===n.BigIntLiteral||t===n.StringLiteral||t===n.RegularExpressionLiteral||t===n.NoSubstitutionTemplateLiteral||t===n.JsxElement||t===n.JsxSelfClosingElement||t===n.JsxFragment||t===n.NullKeyword||t===n.TrueKeyword||t===n.FalseKeyword||t===n.ThisKeyword||t===n.SuperKeyword||t===n.ImportKeyword||t===n.ExpressionWithTypeArguments}function wi(e){return Qp(Fp(e).kind)}function Fp(e){return Xp(e,oe.PartiallyEmittedExpressions)}function Qp(e){switch(e){case n.PropertyAccessExpression:case n.ElementAccessExpression:case n.NewExpression:case n.CallExpression:case n.JsxElement:case n.JsxSelfClosingElement:case n.JsxFragment:case n.TaggedTemplateExpression:case n.ArrayLiteralExpression:case n.ParenthesizedExpression:case n.ObjectLiteralExpression:case n.ClassExpression:case n.FunctionExpression:case n.Identifier:case n.PrivateIdentifier:case n.RegularExpressionLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.StringLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateExpression:case n.FalseKeyword:case n.NullKeyword:case n.ThisKeyword:case n.TrueKeyword:case n.SuperKeyword:case n.NonNullExpression:case n.ExpressionWithTypeArguments:case n.MetaProperty:case n.ImportKeyword:case n.MissingDeclaration:return!0;default:return!1}}function Yp(e,t=oe.All){switch(e.kind){case n.ParenthesizedExpression:if(t&oe.ExcludeJSDocTypeAssertion&&Zp(e))return!1;return(t&oe.Parentheses)!==0;case n.TypeAssertionExpression:case n.AsExpression:return(t&oe.TypeAssertions)!==0;case n.SatisfiesExpression:return(t&(oe.ExpressionsWithTypeArguments|oe.Satisfies))!==0;case n.ExpressionWithTypeArguments:return(t&oe.ExpressionsWithTypeArguments)!==0;case n.NonNullExpression:return(t&oe.NonNullAssertions)!==0;case n.PartiallyEmittedExpression:return(t&oe.PartiallyEmittedExpressions)!==0}return!1}function Xp(e,t=oe.All){while(Yp(e,t))e=e.expression;return e}function Zp(e){let t=e.getSourceFile();if(t.scriptKind!==ot.JS&&t.scriptKind!==ot.JSX)return!1;let r=e.expression;if(r.kind!==n.AsExpression)return!1;let i=r;return!!i.type&&(i.type.flags&Se.Reparsed)!==0}function Di(e){return e.kind===n.Block||k(e)}function Gt(e){return e.kind===n.VariableDeclarationList||k(e)}function He(e){return e.kind===n.QuestionToken||e.kind===n.ExclamationToken}function Si(e){return e.kind===n.ReadonlyKeyword||e.kind===n.PlusToken||e.kind===n.MinusToken}function _i(e){return e.kind===n.QuestionToken||e.kind===n.PlusToken||e.kind===n.MinusToken}function $t(e){let t=e.kind;return t===n.ThisKeyword||t===n.Identifier||t===n.PropertyAccessExpression||t===n.JsxNamespacedName}function a(e,t,r){if(e===void 0)return;let i=t(e);if(i!==void 0&&r!==void 0&&!r(i))throw Error("Visited node failed test assertion.");return i}function T(e,t){if(e===void 0)return;let r=Ft(e,t);if(r===e)return e;return f(r,e.pos,e.end)}function Ft(e,t){if(e===void 0)return;let r;for(let i=0;i<e.length;i++){let s=e[i],o=t(s);if(r){if(o)r.push(o)}else if(o!==s){r=[];for(let u=0;u<i;u++)r.push(e[u]);if(o)r.push(o)}}return r??e}var Ig={[n.QualifiedName]:(e,t)=>{let r=a(e.left,t,xe),i=a(e.right,t,A);return Pi(e,r,i)},[n.ComputedPropertyName]:(e,t)=>{let r=a(e.expression,t,k);return Ai(e,r)},[n.Decorator]:(e,t)=>{let r=a(e.expression,t,wi);return bi(e,r)},[n.IfStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.thenStatement,t,_e),s=a(e.elseStatement,t,_e);return Ii(e,r,i,s)},[n.DoStatement]:(e,t)=>{let r=a(e.statement,t,_e),i=a(e.expression,t,k);return Ci(e,r,i)},[n.WhileStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.statement,t,_e);return Ni(e,r,i)},[n.ForStatement]:(e,t)=>{let r=a(e.initializer,t,Gt),i=a(e.condition,t,k),s=a(e.incrementor,t,k),o=a(e.statement,t,_e);return Li(e,r,i,s,o)},[n.BreakStatement]:(e,t)=>{let r=a(e.label,t,A);return Ji(e,r)},[n.ContinueStatement]:(e,t)=>{let r=a(e.label,t,A);return Ri(e,r)},[n.ReturnStatement]:(e,t)=>{let r=a(e.expression,t,k);return Oi(e,r)},[n.WithStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.statement,t,_e);return vi(e,r,i)},[n.SwitchStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.caseBlock,t,Qn);return Mi(e,r,i)},[n.CaseBlock]:(e,t)=>{let r=T(e.clauses,t);return qi(e,r)},[n.ThrowStatement]:(e,t)=>{let r=a(e.expression,t,k);return Bi(e,r)},[n.TryStatement]:(e,t)=>{let r=a(e.tryBlock,t,wt),i=a(e.catchClause,t,Yn),s=a(e.finallyBlock,t,wt);return Ui(e,r,i,s)},[n.CatchClause]:(e,t)=>{let r=a(e.variableDeclaration,t,Xn),i=a(e.block,t,wt);return ji(e,r,i)},[n.LabeledStatement]:(e,t)=>{let r=a(e.label,t,A),i=a(e.statement,t,_e);return Vi(e,r,i)},[n.ExpressionStatement]:(e,t)=>{let r=a(e.expression,t,k);return Wi(e,r)},[n.Block]:(e,t)=>{let r=T(e.statements,t);return zi(e,r)},[n.VariableStatement]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.declarationList,t,Zn);return Hi(e,r,i)},[n.VariableDeclaration]:(e,t)=>{let r=a(e.name,t,zt),i=a(e.exclamationToken,t,Ti),s=a(e.type,t,S),o=a(e.initializer,t,k);return Gi(e,r,i,s,o)},[n.VariableDeclarationList]:(e,t)=>{let r=T(e.declarations,t);return $i(e,r)},[n.Parameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.dotDotDotToken,t,_t),s=a(e.name,t,zt),o=a(e.questionToken,t,Ht),u=a(e.type,t,S),d=a(e.initializer,t,k);return Fi(e,r,i,s,o,u,d)},[n.BindingElement]:(e,t)=>{let r=a(e.dotDotDotToken,t,_t),i=a(e.propertyName,t,ye),s=a(e.name,t,zt),o=a(e.initializer,t,k);return Qi(e,r,i,s,o)},[n.MissingDeclaration]:(e,t)=>{let r=T(e.modifiers,t);return Yi(e,r)},[n.FunctionDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Pt),s=a(e.name,t,A),o=T(e.typeParameters,t),u=T(e.parameters,t),d=a(e.type,t,S),x=a(e.body,t,ze);return Xi(e,r,i,s,o,u,d,x)},[n.ClassDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return Zi(e,r,i,s,o,u)},[n.ClassExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return Ki(e,r,i,s,o,u)},[n.HeritageClause]:(e,t)=>{let r=T(e.types,t);return es(e,r)},[n.InterfaceDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return ts(e,r,i,s,o,u)},[n.TypeAliasDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=T(e.typeParameters,t),o=a(e.type,t,S);return rs(e,r,i,s,o)},[n.EnumMember]:(e,t)=>{let r=a(e.name,t,ye),i=a(e.initializer,t,k);return ns(e,r,i)},[n.EnumDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=T(e.members,t);return is(e,r,i,s)},[n.ModuleBlock]:(e,t)=>{let r=T(e.statements,t);return ss(e,r)},[n.ImportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.importClause,t,vr),s=a(e.moduleSpecifier,t,k),o=a(e.attributes,t,Dt);return os(e,r,i,s,o)},[n.ExternalModuleReference]:(e,t)=>{let r=a(e.expression,t,k);return as(e,r)},[n.NamespaceImport]:(e,t)=>{let r=a(e.name,t,A);return cs(e,r)},[n.NamedImports]:(e,t)=>{let r=T(e.elements,t);return us(e,r)},[n.ExportAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.type,t,S),s=a(e.expression,t,k);return ps(e,r,i,s)},[n.NamespaceExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A);return ls(e,r,i)},[n.NamespaceExport]:(e,t)=>{let r=a(e.name,t,St);return fs(e,r)},[n.NamedExports]:(e,t)=>{let r=T(e.elements,t);return ms(e,r)},[n.ExportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,St),i=a(e.name,t,St);return hs(e,r,i)},[n.CallSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,S);return ds(e,r,i,s)},[n.ConstructSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,S);return Ts(e,r,i,s)},[n.Constructor]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,S),u=a(e.body,t,ze);return gs(e,r,i,s,o,u)},[n.GetAccessor]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=T(e.typeParameters,t),o=T(e.parameters,t),u=a(e.type,t,S),d=a(e.body,t,ze);return ys(e,r,i,s,o,u,d)},[n.SetAccessor]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=T(e.typeParameters,t),o=T(e.parameters,t),u=a(e.type,t,S),d=a(e.body,t,ze);return xs(e,r,i,s,o,u,d)},[n.IndexSignature]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.parameters,t),s=a(e.type,t,S);return Es(e,r,i,s)},[n.MethodSignature]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,He),o=T(e.typeParameters,t),u=T(e.parameters,t),d=a(e.type,t,S);return ks(e,r,i,s,o,u,d)},[n.MethodDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Pt),s=a(e.name,t,ye),o=a(e.postfixToken,t,He),u=T(e.typeParameters,t),d=T(e.parameters,t),x=a(e.type,t,S),_=a(e.body,t,ze);return ws(e,r,i,s,o,u,d,x,_)},[n.PropertySignature]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,He),o=a(e.type,t,S),u=a(e.initializer,t,k);return Ds(e,r,i,s,o,u)},[n.PropertyDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,He),o=a(e.type,t,S),u=a(e.initializer,t,k);return Ss(e,r,i,s,o,u)},[n.ClassStaticBlockDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.body,t,wt);return _s(e,r,i)},[n.BinaryExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.left,t,k),s=a(e.type,t,S),o=a(e.operatorToken,t,ki),u=a(e.right,t,k);return Ps(e,r,i,s,o,u)},[n.PrefixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,k);return As(e,r)},[n.PostfixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,k);return bs(e,r)},[n.YieldExpression]:(e,t)=>{let r=a(e.asteriskToken,t,Pt),i=a(e.expression,t,k);return Is(e,r,i)},[n.ArrowFunction]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,S),u=a(e.equalsGreaterThanToken,t,xi),d=a(e.body,t,Di);return Cs(e,r,i,s,o,u,d)},[n.FunctionExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Pt),s=a(e.name,t,A),o=T(e.typeParameters,t),u=T(e.parameters,t),d=a(e.type,t,S),x=a(e.body,t,ze);return Ns(e,r,i,s,o,u,d,x)},[n.AsExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.type,t,S);return Ls(e,r,i)},[n.SatisfiesExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.type,t,S);return Js(e,r,i)},[n.ConditionalExpression]:(e,t)=>{let r=a(e.condition,t,k),i=a(e.questionToken,t,Ht),s=a(e.whenTrue,t,k),o=a(e.colonToken,t,gi),u=a(e.whenFalse,t,k);return Rs(e,r,i,s,o,u)},[n.PropertyAccessExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.questionDotToken,t,At),s=a(e.name,t,ci);return Os(e,r,i,s)},[n.ElementAccessExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.questionDotToken,t,At),s=a(e.argumentExpression,t,k);return vs(e,r,i,s)},[n.CallExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.questionDotToken,t,At),s=T(e.typeArguments,t),o=T(e.arguments,t);return Ms(e,r,i,s,o)},[n.NewExpression]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.typeArguments,t),s=T(e.arguments,t);return qs(e,r,i,s)},[n.MetaProperty]:(e,t)=>{let r=a(e.name,t,A);return Bs(e,r)},[n.NonNullExpression]:(e,t)=>{let r=a(e.expression,t,k);return Us(e,r)},[n.SpreadElement]:(e,t)=>{let r=a(e.expression,t,k);return js(e,r)},[n.TemplateExpression]:(e,t)=>{let r=a(e.head,t,Rr),i=T(e.templateSpans,t);return Vs(e,r,i)},[n.TemplateSpan]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.literal,t,Br);return Ws(e,r,i)},[n.TaggedTemplateExpression]:(e,t)=>{let r=a(e.tag,t,k),i=a(e.questionDotToken,t,At),s=T(e.typeArguments,t),o=a(e.template,t,li);return zs(e,r,i,s,o)},[n.ParenthesizedExpression]:(e,t)=>{let r=a(e.expression,t,k);return Hs(e,r)},[n.ArrayLiteralExpression]:(e,t)=>{let r=T(e.elements,t);return Gs(e,r)},[n.ObjectLiteralExpression]:(e,t)=>{let r=T(e.properties,t);return $s(e,r)},[n.SpreadAssignment]:(e,t)=>{let r=a(e.expression,t,k);return Fs(e,r)},[n.PropertyAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,He),o=a(e.type,t,S),u=a(e.initializer,t,k);return Qs(e,r,i,s,o,u)},[n.ShorthandPropertyAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,He),o=a(e.type,t,S),u=a(e.equalsToken,t,yi),d=a(e.objectAssignmentInitializer,t,k);return Ys(e,r,i,s,o,u,d)},[n.DeleteExpression]:(e,t)=>{let r=a(e.expression,t,k);return Xs(e,r)},[n.TypeOfExpression]:(e,t)=>{let r=a(e.expression,t,k);return Zs(e,r)},[n.VoidExpression]:(e,t)=>{let r=a(e.expression,t,k);return Ks(e,r)},[n.AwaitExpression]:(e,t)=>{let r=a(e.expression,t,k);return eo(e,r)},[n.TypeAssertionExpression]:(e,t)=>{let r=a(e.type,t,S),i=a(e.expression,t,k);return to(e,r,i)},[n.UnionType]:(e,t)=>{let r=T(e.types,t);return ro(e,r)},[n.IntersectionType]:(e,t)=>{let r=T(e.types,t);return no(e,r)},[n.ConditionalType]:(e,t)=>{let r=a(e.checkType,t,S),i=a(e.extendsType,t,S),s=a(e.trueType,t,S),o=a(e.falseType,t,S);return io(e,r,i,s,o)},[n.TypeOperator]:(e,t)=>{let r=a(e.type,t,S);return so(e,r)},[n.InferType]:(e,t)=>{let r=a(e.typeParameter,t,Mr);return oo(e,r)},[n.ArrayType]:(e,t)=>{let r=a(e.elementType,t,S);return ao(e,r)},[n.IndexedAccessType]:(e,t)=>{let r=a(e.objectType,t,S),i=a(e.indexType,t,S);return co(e,r,i)},[n.TypeReference]:(e,t)=>{let r=a(e.typeName,t,xe),i=T(e.typeArguments,t);return uo(e,r,i)},[n.ExpressionWithTypeArguments]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.typeArguments,t);return po(e,r,i)},[n.LiteralType]:(e,t)=>{let r=a(e.literal,t);return lo(e,r)},[n.TypePredicate]:(e,t)=>{let r=a(e.assertsModifier,t,Ei),i=a(e.parameterName,t,fi),s=a(e.type,t,S);return fo(e,r,i,s)},[n.ImportAttribute]:(e,t)=>{let r=a(e.name,t,mi),i=a(e.value,t,k);return mo(e,r,i)},[n.ImportAttributes]:(e,t)=>{let r=T(e.attributes,t);return ho(e,r)},[n.TypeQuery]:(e,t)=>{let r=a(e.exprName,t,xe),i=T(e.typeArguments,t);return To(e,r,i)},[n.MappedType]:(e,t)=>{let r=a(e.readonlyToken,t,Si),i=a(e.typeParameter,t,Mr),s=a(e.nameType,t,S),o=a(e.questionToken,t,_i),u=a(e.type,t,S),d=T(e.members,t);return go(e,r,i,s,o,u,d)},[n.TypeLiteral]:(e,t)=>{let r=T(e.members,t);return yo(e,r)},[n.TupleType]:(e,t)=>{let r=T(e.elements,t);return xo(e,r)},[n.NamedTupleMember]:(e,t)=>{let r=a(e.dotDotDotToken,t,_t),i=a(e.name,t,A),s=a(e.questionToken,t,Ht),o=a(e.type,t,S);return Eo(e,r,i,s,o)},[n.OptionalType]:(e,t)=>{let r=a(e.type,t,S);return ko(e,r)},[n.RestType]:(e,t)=>{let r=a(e.type,t,S);return wo(e,r)},[n.ParenthesizedType]:(e,t)=>{let r=a(e.type,t,S);return Do(e,r)},[n.FunctionType]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,S);return So(e,r,i,s)},[n.ConstructorType]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,S);return _o(e,r,i,s,o)},[n.TemplateLiteralType]:(e,t)=>{let r=a(e.head,t,Rr),i=T(e.templateSpans,t);return Po(e,r,i)},[n.TemplateLiteralTypeSpan]:(e,t)=>{let r=a(e.type,t,S),i=a(e.literal,t,Br);return Ao(e,r,i)},[n.SyntheticExpression]:(e,t)=>{let r=a(e.tupleNameSource,t);return bo(e,r)},[n.PartiallyEmittedExpression]:(e,t)=>{let r=a(e.expression,t,k);return Io(e,r)},[n.JsxElement]:(e,t)=>{let r=a(e.openingElement,t,Kn),i=T(e.children,t),s=a(e.closingElement,t,ri);return Co(e,r,i,s)},[n.JsxAttributes]:(e,t)=>{let r=T(e.properties,t);return No(e,r)},[n.JsxNamespacedName]:(e,t)=>{let r=a(e.namespace,t,A),i=a(e.name,t,A);return Lo(e,r,i)},[n.JsxOpeningElement]:(e,t)=>{let r=a(e.tagName,t,$t),i=T(e.typeArguments,t),s=a(e.attributes,t,Or);return Jo(e,r,i,s)},[n.JsxSelfClosingElement]:(e,t)=>{let r=a(e.tagName,t,$t),i=T(e.typeArguments,t),s=a(e.attributes,t,Or);return Ro(e,r,i,s)},[n.JsxFragment]:(e,t)=>{let r=a(e.openingFragment,t,ei),i=T(e.children,t),s=a(e.closingFragment,t,ti);return Oo(e,r,i,s)},[n.JsxAttribute]:(e,t)=>{let r=a(e.name,t,ui),i=a(e.initializer,t,pi);return vo(e,r,i)},[n.JsxSpreadAttribute]:(e,t)=>{let r=a(e.expression,t,k);return Mo(e,r)},[n.JsxClosingElement]:(e,t)=>{let r=a(e.tagName,t,$t);return qo(e,r)},[n.JsxExpression]:(e,t)=>{let r=a(e.dotDotDotToken,t,_t),i=a(e.expression,t,k);return Bo(e,r,i)},[n.SyntaxList]:(e,t)=>{let r=Ft(e.children,t);return Uo(e,r)},[n.JSDoc]:(e,t)=>{let r=T(e.comment,t),i=T(e.tags,t);return jo(e,r,i)},[n.JSDocTypeExpression]:(e,t)=>{let r=a(e.type,t,S);return Vo(e,r)},[n.JSDocNonNullableType]:(e,t)=>{let r=a(e.type,t,S);return Wo(e,r)},[n.JSDocNullableType]:(e,t)=>{let r=a(e.type,t,S);return zo(e,r)},[n.JSDocVariadicType]:(e,t)=>{let r=a(e.type,t,S);return Ho(e,r)},[n.JSDocOptionalType]:(e,t)=>{let r=a(e.type,t,S);return Go(e,r)},[n.JSDocTypeTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t),s=T(e.comment,t);return $o(e,r,i,s)},[n.JSDocUnknownTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Fo(e,r,i)},[n.JSDocTemplateTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.constraint,t),s=T(e.typeParameters,t),o=T(e.comment,t);return Qo(e,r,i,s,o)},[n.JSDocReturnTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=T(e.comment,t);return Yo(e,r,i,s)},[n.JSDocPublicTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Xo(e,r,i)},[n.JSDocPrivateTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Zo(e,r,i)},[n.JSDocProtectedTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Ko(e,r,i)},[n.JSDocReadonlyTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ea(e,r,i)},[n.JSDocOverrideTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ta(e,r,i)},[n.JSDocDeprecatedTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ra(e,r,i)},[n.JSDocSeeTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.nameExpression,t,S),s=T(e.comment,t);return na(e,r,i,s)},[n.JSDocImplementsTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.className,t,Jr),s=T(e.comment,t);return ia(e,r,i,s)},[n.JSDocAugmentsTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.className,t,Jr),s=T(e.comment,t);return sa(e,r,i,s)},[n.JSDocSatisfiesTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=T(e.comment,t);return oa(e,r,i,s)},[n.JSDocThrowsTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=T(e.comment,t);return aa(e,r,i,s)},[n.JSDocThisTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=T(e.comment,t);return ca(e,r,i,s)},[n.JSDocImportTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.importClause,t,vr),s=a(e.moduleSpecifier,t,k),o=a(e.attributes,t,Dt),u=T(e.comment,t);return ua(e,r,i,s,o,u)},[n.JSDocCallbackTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=a(e.name,t,qr),o=T(e.comment,t);return pa(e,r,i,s,o)},[n.JSDocOverloadTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,S),s=T(e.comment,t);return la(e,r,i,s)},[n.JSDocTypedefTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t),s=a(e.name,t,qr),o=T(e.comment,t);return fa(e,r,i,s,o)},[n.JSDocSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,S);return ma(e,r,i,s)},[n.JSDocNameReference]:(e,t)=>{let r=a(e.name,t,xe);return ha(e,r)},[n.SourceFile]:(e,t)=>{let r=T(e.statements,t),i=a(e.endOfFileToken,t,di);return Ja(e,r,i)},[n.ModuleDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ni),s=a(e.body,t,ii);return da(e,r,i,s)},[n.ImportEqualsDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=a(e.moduleReference,t,si);return Ta(e,r,i,s)},[n.ExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.exportClause,t,ai),s=a(e.moduleSpecifier,t,k),o=a(e.attributes,t,Dt);return ga(e,r,i,s,o)},[n.ImportType]:(e,t)=>{let r=a(e.argument,t,S),i=a(e.attributes,t,Dt),s=a(e.qualifier,t,xe),o=T(e.typeArguments,t);return ya(e,r,i,s,o)},[n.ImportClause]:(e,t)=>{let r=a(e.name,t,A),i=a(e.namedBindings,t,oi);return xa(e,r,i)},[n.ImportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,St),i=a(e.name,t,A);return Ea(e,r,i)},[n.JSDocLink]:(e,t)=>{let r=a(e.name,t,xe);return ka(e,r)},[n.JSDocLinkPlain]:(e,t)=>{let r=a(e.name,t,xe);return wa(e,r)},[n.JSDocLinkCode]:(e,t)=>{let r=a(e.name,t,xe);return Da(e,r)},[n.TypeParameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=a(e.constraint,t,S),o=a(e.expression,t,k),u=a(e.defaultType,t,S);return Sa(e,r,i,s,o,u)},[n.SyntheticReferenceExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.thisArg,t,k);return _a(e,r,i)},[n.JSDocTypeLiteral]:(e,t)=>{let r=Ft(e.jsdocPropertyTags,t);return Pa(e,r)},[n.ForInStatement]:(e,t)=>{let r=a(e.awaitModifier,t,Ur),i=a(e.initializer,t,Gt),s=a(e.expression,t,k),o=a(e.statement,t,_e);return Aa(e,r,i,s,o)},[n.ForOfStatement]:(e,t)=>{let r=a(e.awaitModifier,t,Ur),i=a(e.initializer,t,Gt),s=a(e.expression,t,k),o=a(e.statement,t,_e);return ba(e,r,i,s,o)},[n.CaseClause]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.statements,t);return Ia(e,r,i)},[n.DefaultClause]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.statements,t);return Ca(e,r,i)},[n.ObjectBindingPattern]:(e,t)=>{let r=T(e.elements,t);return Na(e,r)},[n.ArrayBindingPattern]:(e,t)=>{let r=T(e.elements,t);return La(e,r)},[n.JSDocParameterTag]:Qt,[n.JSDocPropertyTag]:Qt};function bt(e,t){return t?e(t):void 0}function el(e,t,r){if(!r)return;if(t)return t(r);for(let i of r){let s=e(i);if(s)return s}return}function Yt(e,t,r){return bt(t,e.tagName)||(e.isNameFirst?bt(t,e.name)||bt(t,e.typeExpression):bt(t,e.typeExpression)||bt(t,e.name))||el(t,r,e.comment)}function Qt(e,t){let r=a(e.tagName,t,A),i=a(e.name,t,xe),s=a(e.typeExpression,t,S),o=T(e.comment,t);return e.kind===n.JSDocParameterTag?Ra(e,r,i,s,o):Oa(e,r,i,s,o)}class l{kind;flags=0;pos=-1;end=-1;parent=void 0;_data;constructor(e,t){this.kind=e,this._data=t}get ambientModuleNames(){return this._data?.ambientModuleNames}get argument(){return this._data?.argument}get argumentExpression(){return this._data?.argumentExpression}get arguments(){return this._data?.arguments}get assertsModifier(){return this._data?.assertsModifier}get asteriskToken(){return this._data?.asteriskToken}get attributes(){return this._data?.attributes}get awaitModifier(){return this._data?.awaitModifier}get block(){return this._data?.block}get body(){return this._data?.body}get caseBlock(){return this._data?.caseBlock}get catchClause(){return this._data?.catchClause}get checkType(){return this._data?.checkType}get children(){return this._data?.children}get className(){return this._data?.className}get clauses(){return this._data?.clauses}get closingElement(){return this._data?.closingElement}get closingFragment(){return this._data?.closingFragment}get colonToken(){return this._data?.colonToken}get comment(){return this._data?.comment}get condition(){return this._data?.condition}get constraint(){return this._data?.constraint}get containsOnlyTriviaWhiteSpaces(){return this._data?.containsOnlyTriviaWhiteSpaces}get declarationList(){return this._data?.declarationList}get declarations(){return this._data?.declarations}get defaultType(){return this._data?.defaultType}get dotDotDotToken(){return this._data?.dotDotDotToken}get elementType(){return this._data?.elementType}get elements(){return this._data?.elements}get elseStatement(){return this._data?.elseStatement}get endOfFileToken(){return this._data?.endOfFileToken}get equalsGreaterThanToken(){return this._data?.equalsGreaterThanToken}get equalsToken(){return this._data?.equalsToken}get exclamationToken(){return this._data?.exclamationToken}get exportClause(){return this._data?.exportClause}get exprName(){return this._data?.exprName}get expression(){return this._data?.expression}get extendsType(){return this._data?.extendsType}get externalModuleIndicator(){return this._data?.externalModuleIndicator}get falseType(){return this._data?.falseType}get fileName(){return this._data?.fileName}get finallyBlock(){return this._data?.finallyBlock}get head(){return this._data?.head}get heritageClauses(){return this._data?.heritageClauses}get importClause(){return this._data?.importClause}get imports(){return this._data?.imports}get incrementor(){return this._data?.incrementor}get indexType(){return this._data?.indexType}get initializer(){return this._data?.initializer}get isArrayType(){return this._data?.isArrayType}get isBracketed(){return this._data?.isBracketed}get isDeclarationFile(){return this._data?.isDeclarationFile}get isExportEquals(){return this._data?.isExportEquals}get isNameFirst(){return this._data?.isNameFirst}get isSpread(){return this._data?.isSpread}get isTypeOf(){return this._data?.isTypeOf}get isTypeOnly(){return this._data?.isTypeOnly}get jsdocPropertyTags(){return this._data?.jsdocPropertyTags}get keyword(){return this._data?.keyword}get keywordToken(){return this._data?.keywordToken}get label(){return this._data?.label}get languageVariant(){return this._data?.languageVariant}get left(){return this._data?.left}get libReferenceDirectives(){return this._data?.libReferenceDirectives}get literal(){return this._data?.literal}get members(){return this._data?.members}get modifiers(){return this._data?.modifiers}get moduleAugmentations(){return this._data?.moduleAugmentations}get moduleReference(){return this._data?.moduleReference}get moduleSpecifier(){return this._data?.moduleSpecifier}get multiLine(){return this._data?.multiLine}get name(){return this._data?.name}get nameExpression(){return this._data?.nameExpression}get nameType(){return this._data?.nameType}get namedBindings(){return this._data?.namedBindings}get namespace(){return this._data?.namespace}get objectAssignmentInitializer(){return this._data?.objectAssignmentInitializer}get objectType(){return this._data?.objectType}get openingElement(){return this._data?.openingElement}get openingFragment(){return this._data?.openingFragment}get operand(){return this._data?.operand}get operator(){return this._data?.operator}get operatorToken(){return this._data?.operatorToken}get parameterName(){return this._data?.parameterName}get parameters(){return this._data?.parameters}get path(){return this._data?.path}get phaseModifier(){return this._data?.phaseModifier}get postfixToken(){return this._data?.postfixToken}get properties(){return this._data?.properties}get propertyName(){return this._data?.propertyName}get qualifier(){return this._data?.qualifier}get questionDotToken(){return this._data?.questionDotToken}get questionToken(){return this._data?.questionToken}get rawText(){return this._data?.rawText}get readonlyToken(){return this._data?.readonlyToken}get referencedFiles(){return this._data?.referencedFiles}get right(){return this._data?.right}get scriptKind(){return this._data?.scriptKind}get statement(){return this._data?.statement}get statements(){return this._data?.statements}get tag(){return this._data?.tag}get tagName(){return this._data?.tagName}get tags(){return this._data?.tags}get template(){return this._data?.template}get templateFlags(){return this._data?.templateFlags}get templateSpans(){return this._data?.templateSpans}get text(){return this._data?.text}get thenStatement(){return this._data?.thenStatement}get thisArg(){return this._data?.thisArg}get token(){return this._data?.token}get tokenCache(){return this._data?.tokenCache}get tokenFlags(){return this._data?.tokenFlags}get trueType(){return this._data?.trueType}get tryBlock(){return this._data?.tryBlock}get tupleNameSource(){return this._data?.tupleNameSource}get type(){return this._data?.type}get typeArguments(){return this._data?.typeArguments}get typeExpression(){return this._data?.typeExpression}get typeName(){return this._data?.typeName}get typeParameter(){return this._data?.typeParameter}get typeParameters(){return this._data?.typeParameters}get typeReferenceDirectives(){return this._data?.typeReferenceDirectives}get types(){return this._data?.types}get value(){return this._data?.value}get variableDeclaration(){return this._data?.variableDeclaration}get whenFalse(){return this._data?.whenFalse}get whenTrue(){return this._data?.whenTrue}forEachChild(e,t){let r=rl[this.kind];return r?r(this._data,e,t):void 0}getSourceFile(){let e=this;while(e.parent)e=e.parent;return e}getStart(e,t){return It(this,e??this.getSourceFile(),t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e??this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e??=this.getSourceFile(),e.text.substring(this.getStart(e),this.end)}}function tl(e){return"pos"in e&&"end"in e}function f(e,t=-1,r=-1){if(tl(e))return e;let i=e.slice();return i.pos=t,i.end=r,i}var rl={[n.QualifiedName]:(e,t,r)=>c(t,e.left)||c(t,e.right),[n.ComputedPropertyName]:(e,t,r)=>c(t,e.expression),[n.Decorator]:(e,t,r)=>c(t,e.expression),[n.IfStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.thenStatement)||c(t,e.elseStatement),[n.DoStatement]:(e,t,r)=>c(t,e.statement)||c(t,e.expression),[n.WhileStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.statement),[n.ForStatement]:(e,t,r)=>c(t,e.initializer)||c(t,e.condition)||c(t,e.incrementor)||c(t,e.statement),[n.BreakStatement]:(e,t,r)=>c(t,e.label),[n.ContinueStatement]:(e,t,r)=>c(t,e.label),[n.ReturnStatement]:(e,t,r)=>c(t,e.expression),[n.WithStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.statement),[n.SwitchStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.caseBlock),[n.CaseBlock]:(e,t,r)=>m(t,r,e.clauses),[n.ThrowStatement]:(e,t,r)=>c(t,e.expression),[n.TryStatement]:(e,t,r)=>c(t,e.tryBlock)||c(t,e.catchClause)||c(t,e.finallyBlock),[n.CatchClause]:(e,t,r)=>c(t,e.variableDeclaration)||c(t,e.block),[n.LabeledStatement]:(e,t,r)=>c(t,e.label)||c(t,e.statement),[n.ExpressionStatement]:(e,t,r)=>c(t,e.expression),[n.Block]:(e,t,r)=>m(t,r,e.statements),[n.VariableStatement]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.declarationList),[n.VariableDeclaration]:(e,t,r)=>c(t,e.name)||c(t,e.exclamationToken)||c(t,e.type)||c(t,e.initializer),[n.VariableDeclarationList]:(e,t,r)=>m(t,r,e.declarations),[n.Parameter]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.dotDotDotToken)||c(t,e.name)||c(t,e.questionToken)||c(t,e.type)||c(t,e.initializer),[n.BindingElement]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.propertyName)||c(t,e.name)||c(t,e.initializer),[n.MissingDeclaration]:(e,t,r)=>m(t,r,e.modifiers),[n.FunctionDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.ClassDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.heritageClauses)||m(t,r,e.members),[n.ClassExpression]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.heritageClauses)||m(t,r,e.members),[n.HeritageClause]:(e,t,r)=>m(t,r,e.types),[n.InterfaceDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.heritageClauses)||m(t,r,e.members),[n.TypeAliasDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||c(t,e.type),[n.JSTypeAliasDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||c(t,e.type),[n.EnumMember]:(e,t,r)=>c(t,e.name)||c(t,e.initializer),[n.EnumDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.members),[n.ModuleBlock]:(e,t,r)=>m(t,r,e.statements),[n.ImportDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.JSImportDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.ExternalModuleReference]:(e,t,r)=>c(t,e.expression),[n.NamespaceImport]:(e,t,r)=>c(t,e.name),[n.NamedImports]:(e,t,r)=>m(t,r,e.elements),[n.ExportAssignment]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.type)||c(t,e.expression),[n.NamespaceExportDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name),[n.NamespaceExport]:(e,t,r)=>c(t,e.name),[n.NamedExports]:(e,t,r)=>m(t,r,e.elements),[n.ExportSpecifier]:(e,t,r)=>c(t,e.propertyName)||c(t,e.name),[n.CallSignature]:(e,t,r)=>m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.ConstructSignature]:(e,t,r)=>m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.Constructor]:(e,t,r)=>m(t,r,e.modifiers)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.GetAccessor]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.SetAccessor]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.IndexSignature]:(e,t,r)=>m(t,r,e.modifiers)||m(t,r,e.parameters)||c(t,e.type),[n.MethodSignature]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.MethodDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||c(t,e.postfixToken)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.PropertySignature]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.PropertyDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.ClassStaticBlockDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.body),[n.BinaryExpression]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.left)||c(t,e.type)||c(t,e.operatorToken)||c(t,e.right),[n.PrefixUnaryExpression]:(e,t,r)=>c(t,e.operand),[n.PostfixUnaryExpression]:(e,t,r)=>c(t,e.operand),[n.YieldExpression]:(e,t,r)=>c(t,e.asteriskToken)||c(t,e.expression),[n.ArrowFunction]:(e,t,r)=>m(t,r,e.modifiers)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.equalsGreaterThanToken)||c(t,e.body),[n.FunctionExpression]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.AsExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.type),[n.SatisfiesExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.type),[n.ConditionalExpression]:(e,t,r)=>c(t,e.condition)||c(t,e.questionToken)||c(t,e.whenTrue)||c(t,e.colonToken)||c(t,e.whenFalse),[n.PropertyAccessExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||c(t,e.name),[n.ElementAccessExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||c(t,e.argumentExpression),[n.CallExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||m(t,r,e.typeArguments)||m(t,r,e.arguments),[n.NewExpression]:(e,t,r)=>c(t,e.expression)||m(t,r,e.typeArguments)||m(t,r,e.arguments),[n.MetaProperty]:(e,t,r)=>c(t,e.name),[n.NonNullExpression]:(e,t,r)=>c(t,e.expression),[n.SpreadElement]:(e,t,r)=>c(t,e.expression),[n.TemplateExpression]:(e,t,r)=>c(t,e.head)||m(t,r,e.templateSpans),[n.TemplateSpan]:(e,t,r)=>c(t,e.expression)||c(t,e.literal),[n.TaggedTemplateExpression]:(e,t,r)=>c(t,e.tag)||c(t,e.questionDotToken)||m(t,r,e.typeArguments)||c(t,e.template),[n.ParenthesizedExpression]:(e,t,r)=>c(t,e.expression),[n.ArrayLiteralExpression]:(e,t,r)=>m(t,r,e.elements),[n.ObjectLiteralExpression]:(e,t,r)=>m(t,r,e.properties),[n.SpreadAssignment]:(e,t,r)=>c(t,e.expression),[n.PropertyAssignment]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.ShorthandPropertyAssignment]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.equalsToken)||c(t,e.objectAssignmentInitializer),[n.DeleteExpression]:(e,t,r)=>c(t,e.expression),[n.TypeOfExpression]:(e,t,r)=>c(t,e.expression),[n.VoidExpression]:(e,t,r)=>c(t,e.expression),[n.AwaitExpression]:(e,t,r)=>c(t,e.expression),[n.TypeAssertionExpression]:(e,t,r)=>c(t,e.type)||c(t,e.expression),[n.UnionType]:(e,t,r)=>m(t,r,e.types),[n.IntersectionType]:(e,t,r)=>m(t,r,e.types),[n.ConditionalType]:(e,t,r)=>c(t,e.checkType)||c(t,e.extendsType)||c(t,e.trueType)||c(t,e.falseType),[n.TypeOperator]:(e,t,r)=>c(t,e.type),[n.InferType]:(e,t,r)=>c(t,e.typeParameter),[n.ArrayType]:(e,t,r)=>c(t,e.elementType),[n.IndexedAccessType]:(e,t,r)=>c(t,e.objectType)||c(t,e.indexType),[n.TypeReference]:(e,t,r)=>c(t,e.typeName)||m(t,r,e.typeArguments),[n.ExpressionWithTypeArguments]:(e,t,r)=>c(t,e.expression)||m(t,r,e.typeArguments),[n.LiteralType]:(e,t,r)=>c(t,e.literal),[n.TypePredicate]:(e,t,r)=>c(t,e.assertsModifier)||c(t,e.parameterName)||c(t,e.type),[n.ImportAttribute]:(e,t,r)=>c(t,e.name)||c(t,e.value),[n.ImportAttributes]:(e,t,r)=>m(t,r,e.attributes),[n.TypeQuery]:(e,t,r)=>c(t,e.exprName)||m(t,r,e.typeArguments),[n.MappedType]:(e,t,r)=>c(t,e.readonlyToken)||c(t,e.typeParameter)||c(t,e.nameType)||c(t,e.questionToken)||c(t,e.type)||m(t,r,e.members),[n.TypeLiteral]:(e,t,r)=>m(t,r,e.members),[n.TupleType]:(e,t,r)=>m(t,r,e.elements),[n.NamedTupleMember]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.name)||c(t,e.questionToken)||c(t,e.type),[n.OptionalType]:(e,t,r)=>c(t,e.type),[n.RestType]:(e,t,r)=>c(t,e.type),[n.ParenthesizedType]:(e,t,r)=>c(t,e.type),[n.FunctionType]:(e,t,r)=>m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.ConstructorType]:(e,t,r)=>m(t,r,e.modifiers)||m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.TemplateLiteralType]:(e,t,r)=>c(t,e.head)||m(t,r,e.templateSpans),[n.TemplateLiteralTypeSpan]:(e,t,r)=>c(t,e.type)||c(t,e.literal),[n.SyntheticExpression]:(e,t,r)=>c(t,e.tupleNameSource),[n.PartiallyEmittedExpression]:(e,t,r)=>c(t,e.expression),[n.JsxElement]:(e,t,r)=>c(t,e.openingElement)||m(t,r,e.children)||c(t,e.closingElement),[n.JsxAttributes]:(e,t,r)=>m(t,r,e.properties),[n.JsxNamespacedName]:(e,t,r)=>c(t,e.namespace)||c(t,e.name),[n.JsxOpeningElement]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxSelfClosingElement]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxFragment]:(e,t,r)=>c(t,e.openingFragment)||m(t,r,e.children)||c(t,e.closingFragment),[n.JsxAttribute]:(e,t,r)=>c(t,e.name)||c(t,e.initializer),[n.JsxSpreadAttribute]:(e,t,r)=>c(t,e.expression),[n.JsxClosingElement]:(e,t,r)=>c(t,e.tagName),[n.JsxExpression]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.expression),[n.SyntaxList]:(e,t,r)=>m(t,r,e.children),[n.JSDoc]:(e,t,r)=>m(t,r,e.comment)||m(t,r,e.tags),[n.JSDocTypeExpression]:(e,t,r)=>c(t,e.type),[n.JSDocNonNullableType]:(e,t,r)=>c(t,e.type),[n.JSDocNullableType]:(e,t,r)=>c(t,e.type),[n.JSDocVariadicType]:(e,t,r)=>c(t,e.type),[n.JSDocOptionalType]:(e,t,r)=>c(t,e.type),[n.JSDocTypeTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocUnknownTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocTemplateTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.constraint)||m(t,r,e.typeParameters)||m(t,r,e.comment),[n.JSDocReturnTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocPublicTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocPrivateTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocProtectedTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocReadonlyTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocOverrideTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocDeprecatedTag]:(e,t,r)=>c(t,e.tagName)||m(t,r,e.comment),[n.JSDocSeeTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.nameExpression)||m(t,r,e.comment),[n.JSDocImplementsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||m(t,r,e.comment),[n.JSDocAugmentsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||m(t,r,e.comment),[n.JSDocSatisfiesTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocThrowsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocThisTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocImportTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes)||m(t,r,e.comment),[n.JSDocCallbackTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||m(t,r,e.comment),[n.JSDocOverloadTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||m(t,r,e.comment),[n.JSDocTypedefTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||m(t,r,e.comment),[n.JSDocSignature]:(e,t,r)=>m(t,r,e.typeParameters)||m(t,r,e.parameters)||c(t,e.type),[n.JSDocNameReference]:(e,t,r)=>c(t,e.name),[n.ModuleDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.body),[n.ImportEqualsDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.moduleReference),[n.ExportDeclaration]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.exportClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.ImportType]:(e,t,r)=>c(t,e.argument)||c(t,e.attributes)||c(t,e.qualifier)||m(t,r,e.typeArguments),[n.ImportClause]:(e,t,r)=>c(t,e.name)||c(t,e.namedBindings),[n.ImportSpecifier]:(e,t,r)=>c(t,e.propertyName)||c(t,e.name),[n.JSDocLink]:(e,t,r)=>c(t,e.name),[n.JSDocLinkPlain]:(e,t,r)=>c(t,e.name),[n.JSDocLinkCode]:(e,t,r)=>c(t,e.name),[n.TypeParameter]:(e,t,r)=>m(t,r,e.modifiers)||c(t,e.name)||c(t,e.constraint)||c(t,e.expression)||c(t,e.defaultType),[n.SyntheticReferenceExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.thisArg),[n.JSDocTypeLiteral]:(e,t,r)=>m(t,r,e.jsdocPropertyTags),[n.ForInStatement]:(e,t,r)=>c(t,e.awaitModifier)||c(t,e.initializer)||c(t,e.expression)||c(t,e.statement),[n.ForOfStatement]:(e,t,r)=>c(t,e.awaitModifier)||c(t,e.initializer)||c(t,e.expression)||c(t,e.statement),[n.CaseClause]:(e,t,r)=>c(t,e.expression)||m(t,r,e.statements),[n.DefaultClause]:(e,t,r)=>c(t,e.expression)||m(t,r,e.statements),[n.ObjectBindingPattern]:(e,t,r)=>m(t,r,e.elements),[n.ArrayBindingPattern]:(e,t,r)=>m(t,r,e.elements),[n.JSDocParameterTag]:Yt,[n.JSDocPropertyTag]:Yt,[n.SourceFile]:(e,t,r)=>m(t,r,e.statements)||c(t,e.endOfFileToken)};function c(e,t){return t?e(t):void 0}function m(e,t,r){if(!r)return;if(t)return t(r);for(let i of r){let s=e(i);if(s)return s}return}function nl(e,t){return new l(n.QualifiedName,{left:e,right:t})}function il(e){return new l(n.ComputedPropertyName,{expression:e})}function sl(e){return new l(n.Decorator,{expression:e})}function ol(e,t,r){return new l(n.IfStatement,{expression:e,thenStatement:t,elseStatement:r})}function al(e,t){return new l(n.DoStatement,{statement:e,expression:t})}function cl(e,t){return new l(n.WhileStatement,{expression:e,statement:t})}function ul(e,t,r,i){return new l(n.ForStatement,{initializer:e,condition:t,incrementor:r,statement:i})}function pl(e){return new l(n.BreakStatement,{label:e})}function ll(e){return new l(n.ContinueStatement,{label:e})}function fl(e){return new l(n.ReturnStatement,{expression:e})}function ml(e,t){return new l(n.WithStatement,{expression:e,statement:t})}function hl(e,t){return new l(n.SwitchStatement,{expression:e,caseBlock:t})}function dl(e){return new l(n.CaseBlock,{clauses:f(e)})}function Tl(e){return new l(n.ThrowStatement,{expression:e})}function gl(e,t,r){return new l(n.TryStatement,{tryBlock:e,catchClause:t,finallyBlock:r})}function yl(e,t){return new l(n.CatchClause,{variableDeclaration:e,block:t})}function xl(e,t){return new l(n.LabeledStatement,{label:e,statement:t})}function El(e){return new l(n.ExpressionStatement,{expression:e})}function kl(e,t){return new l(n.Block,{statements:f(e),multiLine:t})}function wl(e,t){return new l(n.VariableStatement,{modifiers:e?f(e):void 0,declarationList:t})}function Dl(e,t,r,i){return new l(n.VariableDeclaration,{name:e,exclamationToken:t,type:r,initializer:i})}function Sl(e,t){let r=new l(n.VariableDeclarationList,{declarations:f(e)});return r.flags=t,r}function _l(e,t,r,i,s,o){return new l(n.Parameter,{modifiers:e?f(e):void 0,dotDotDotToken:t,name:r,questionToken:i,type:s,initializer:o})}function Pl(e,t,r,i){return new l(n.BindingElement,{dotDotDotToken:e,propertyName:t,name:r,initializer:i})}function Al(e){return new l(n.MissingDeclaration,{modifiers:e?f(e):void 0})}function bl(e,t,r,i,s,o,u){return new l(n.FunctionDeclaration,{modifiers:e?f(e):void 0,asteriskToken:t,name:r,typeParameters:i?f(i):void 0,parameters:f(s),type:o,body:u})}function Il(e,t,r,i,s){return new l(n.ClassDeclaration,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,heritageClauses:i?f(i):void 0,members:f(s)})}function Cl(e,t,r,i,s){return new l(n.ClassExpression,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,heritageClauses:i?f(i):void 0,members:f(s)})}function Nl(e,t){return new l(n.HeritageClause,{token:e,types:f(t)})}function Ll(e,t,r,i,s){return new l(n.InterfaceDeclaration,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,heritageClauses:i?f(i):void 0,members:f(s)})}function Jl(e,t,r,i){return new l(n.TypeAliasDeclaration,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,type:i})}function Rl(e,t){return new l(n.EnumMember,{name:e,initializer:t})}function Ol(e,t,r){return new l(n.EnumDeclaration,{modifiers:e?f(e):void 0,name:t,members:f(r)})}function vl(e){return new l(n.ModuleBlock,{statements:f(e)})}function Ml(e,t,r,i){return new l(n.ImportDeclaration,{modifiers:e?f(e):void 0,importClause:t,moduleSpecifier:r,attributes:i})}function ql(e){return new l(n.ExternalModuleReference,{expression:e})}function Bl(e){return new l(n.NamespaceImport,{name:e})}function Ul(e){return new l(n.NamedImports,{elements:f(e)})}function jl(e,t=!1,r,i){return new l(n.ExportAssignment,{modifiers:e?f(e):void 0,isExportEquals:t,type:r,expression:i})}function Vl(e,t){return new l(n.NamespaceExportDeclaration,{modifiers:e?f(e):void 0,name:t})}function Wl(e){return new l(n.NamespaceExport,{name:e})}function zl(e){return new l(n.NamedExports,{elements:f(e)})}function Hl(e=!1,t,r){return new l(n.ExportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function Gl(e,t,r){return new l(n.CallSignature,{typeParameters:e?f(e):void 0,parameters:f(t),type:r})}function $l(e,t,r){return new l(n.ConstructSignature,{typeParameters:e?f(e):void 0,parameters:f(t),type:r})}function Fl(e,t,r,i,s){return new l(n.Constructor,{modifiers:e?f(e):void 0,typeParameters:t?f(t):void 0,parameters:f(r),type:i,body:s})}function Ql(e,t,r,i,s,o){return new l(n.GetAccessor,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,parameters:f(i),type:s,body:o})}function Yl(e,t,r,i,s,o){return new l(n.SetAccessor,{modifiers:e?f(e):void 0,name:t,typeParameters:r?f(r):void 0,parameters:f(i),type:s,body:o})}function Xl(e,t,r){return new l(n.IndexSignature,{modifiers:e?f(e):void 0,parameters:f(t),type:r})}function Zl(e,t,r,i,s,o){return new l(n.MethodSignature,{modifiers:e?f(e):void 0,name:t,postfixToken:r,typeParameters:i?f(i):void 0,parameters:f(s),type:o})}function Kl(e,t,r,i,s,o,u,d){return new l(n.MethodDeclaration,{modifiers:e?f(e):void 0,asteriskToken:t,name:r,postfixToken:i,typeParameters:s?f(s):void 0,parameters:f(o),type:u,body:d})}function ef(e,t,r,i,s){return new l(n.PropertySignature,{modifiers:e?f(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function tf(e,t,r,i,s){return new l(n.PropertyDeclaration,{modifiers:e?f(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function rf(e,t){return new l(n.ClassStaticBlockDeclaration,{modifiers:e?f(e):void 0,body:t})}function nf(e,t,r,i,s){return new l(n.BinaryExpression,{modifiers:e?f(e):void 0,left:t,type:r,operatorToken:i,right:s})}function sf(e,t){return new l(n.PrefixUnaryExpression,{operator:e,operand:t})}function of(e,t){return new l(n.PostfixUnaryExpression,{operand:e,operator:t})}function af(e,t){return new l(n.YieldExpression,{asteriskToken:e,expression:t})}function cf(e,t,r,i,s,o){return new l(n.ArrowFunction,{modifiers:e?f(e):void 0,typeParameters:t?f(t):void 0,parameters:f(r),type:i,equalsGreaterThanToken:s,body:o})}function uf(e,t,r,i,s,o,u){return new l(n.FunctionExpression,{modifiers:e?f(e):void 0,asteriskToken:t,name:r,typeParameters:i?f(i):void 0,parameters:f(s),type:o,body:u})}function pf(e,t){return new l(n.AsExpression,{expression:e,type:t})}function lf(e,t){return new l(n.SatisfiesExpression,{expression:e,type:t})}function ff(e,t,r,i,s){return new l(n.ConditionalExpression,{condition:e,questionToken:t,whenTrue:r,colonToken:i,whenFalse:s})}function mf(e,t,r,i){let s=new l(n.PropertyAccessExpression,{expression:e,questionDotToken:t,name:r});return s.flags=i,s}function hf(e,t,r,i){let s=new l(n.ElementAccessExpression,{expression:e,questionDotToken:t,argumentExpression:r});return s.flags=i,s}function df(e,t,r,i,s){let o=new l(n.CallExpression,{expression:e,questionDotToken:t,typeArguments:r?f(r):void 0,arguments:f(i)});return o.flags=s,o}function Tf(e,t,r){return new l(n.NewExpression,{expression:e,typeArguments:t?f(t):void 0,arguments:r?f(r):void 0})}function gf(e,t){return new l(n.MetaProperty,{keywordToken:e,name:t})}function yf(e,t){let r=new l(n.NonNullExpression,{expression:e});return r.flags=t,r}function xf(e){return new l(n.SpreadElement,{expression:e})}function Ef(e,t){return new l(n.TemplateExpression,{head:e,templateSpans:f(t)})}function kf(e,t){return new l(n.TemplateSpan,{expression:e,literal:t})}function wf(e,t,r,i,s){let o=new l(n.TaggedTemplateExpression,{tag:e,questionDotToken:t,typeArguments:r?f(r):void 0,template:i});return o.flags=s,o}function Df(e){return new l(n.ParenthesizedExpression,{expression:e})}function Sf(e,t){return new l(n.ArrayLiteralExpression,{elements:f(e),multiLine:t})}function _f(e,t){return new l(n.ObjectLiteralExpression,{properties:f(e),multiLine:t})}function Pf(e){return new l(n.SpreadAssignment,{expression:e})}function Af(e,t,r,i,s){return new l(n.PropertyAssignment,{modifiers:e?f(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function bf(e,t,r,i,s,o){return new l(n.ShorthandPropertyAssignment,{modifiers:e?f(e):void 0,name:t,postfixToken:r,type:i,equalsToken:s,objectAssignmentInitializer:o})}function If(e){return new l(n.DeleteExpression,{expression:e})}function Cf(e){return new l(n.TypeOfExpression,{expression:e})}function Nf(e){return new l(n.VoidExpression,{expression:e})}function Lf(e){return new l(n.AwaitExpression,{expression:e})}function Jf(e,t){return new l(n.TypeAssertionExpression,{type:e,expression:t})}function Rf(e){return new l(n.UnionType,{types:f(e)})}function Of(e){return new l(n.IntersectionType,{types:f(e)})}function vf(e,t,r,i){return new l(n.ConditionalType,{checkType:e,extendsType:t,trueType:r,falseType:i})}function Mf(e,t){return new l(n.TypeOperator,{operator:e,type:t})}function qf(e){return new l(n.InferType,{typeParameter:e})}function Bf(e){return new l(n.ArrayType,{elementType:e})}function Uf(e,t){return new l(n.IndexedAccessType,{objectType:e,indexType:t})}function jf(e,t){return new l(n.TypeReference,{typeName:e,typeArguments:t?f(t):void 0})}function Vf(e,t){return new l(n.ExpressionWithTypeArguments,{expression:e,typeArguments:t?f(t):void 0})}function Wf(e){return new l(n.LiteralType,{literal:e})}function zf(e,t,r){return new l(n.TypePredicate,{assertsModifier:e,parameterName:t,type:r})}function Hf(e,t){return new l(n.ImportAttribute,{name:e,value:t})}function Gf(e,t,r){return new l(n.ImportAttributes,{token:e,attributes:f(t),multiLine:r})}function $f(e,t){return new l(n.TypeQuery,{exprName:e,typeArguments:t?f(t):void 0})}function Ff(e,t,r,i,s,o){return new l(n.MappedType,{readonlyToken:e,typeParameter:t,nameType:r,questionToken:i,type:s,members:o?f(o):void 0})}function Qf(e){return new l(n.TypeLiteral,{members:f(e)})}function Yf(e){return new l(n.TupleType,{elements:f(e)})}function Xf(e,t,r,i){return new l(n.NamedTupleMember,{dotDotDotToken:e,name:t,questionToken:r,type:i})}function Zf(e){return new l(n.OptionalType,{type:e})}function Kf(e){return new l(n.RestType,{type:e})}function em(e){return new l(n.ParenthesizedType,{type:e})}function tm(e,t,r){return new l(n.FunctionType,{typeParameters:e?f(e):void 0,parameters:f(t),type:r})}function rm(e,t,r,i){return new l(n.ConstructorType,{modifiers:e?f(e):void 0,typeParameters:t?f(t):void 0,parameters:f(r),type:i})}function nm(e,t){return new l(n.TemplateLiteralType,{head:e,templateSpans:f(t)})}function im(e,t){return new l(n.TemplateLiteralTypeSpan,{type:e,literal:t})}function sm(e,t,r){return new l(n.SyntheticExpression,{type:e,isSpread:t,tupleNameSource:r})}function om(e){return new l(n.PartiallyEmittedExpression,{expression:e})}function am(e,t,r){return new l(n.JsxElement,{openingElement:e,children:f(t),closingElement:r})}function cm(e){return new l(n.JsxAttributes,{properties:f(e)})}function um(e,t){return new l(n.JsxNamespacedName,{namespace:e,name:t})}function pm(e,t,r){return new l(n.JsxOpeningElement,{tagName:e,typeArguments:t?f(t):void 0,attributes:r})}function lm(e,t,r){return new l(n.JsxSelfClosingElement,{tagName:e,typeArguments:t?f(t):void 0,attributes:r})}function fm(e,t,r){return new l(n.JsxFragment,{openingFragment:e,children:f(t),closingFragment:r})}function mm(e,t){return new l(n.JsxAttribute,{name:e,initializer:t})}function hm(e){return new l(n.JsxSpreadAttribute,{expression:e})}function dm(e){return new l(n.JsxClosingElement,{tagName:e})}function Tm(e,t){return new l(n.JsxExpression,{dotDotDotToken:e,expression:t})}function gm(e){return new l(n.SyntaxList,{children:e})}function ym(e,t){return new l(n.JSDoc,{comment:f(e),tags:t?f(t):void 0})}function xm(e){return new l(n.JSDocTypeExpression,{type:e})}function Em(e){return new l(n.JSDocNonNullableType,{type:e})}function km(e){return new l(n.JSDocNullableType,{type:e})}function wm(e){return new l(n.JSDocVariadicType,{type:e})}function Dm(e){return new l(n.JSDocOptionalType,{type:e})}function Sm(e,t,r){return new l(n.JSDocTypeTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function _m(e,t){return new l(n.JSDocUnknownTag,{tagName:e,comment:t?f(t):void 0})}function Pm(e,t,r,i){return new l(n.JSDocTemplateTag,{tagName:e,constraint:t,typeParameters:f(r),comment:i?f(i):void 0})}function Am(e,t,r){return new l(n.JSDocReturnTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function bm(e,t){return new l(n.JSDocPublicTag,{tagName:e,comment:t?f(t):void 0})}function Im(e,t){return new l(n.JSDocPrivateTag,{tagName:e,comment:t?f(t):void 0})}function Cm(e,t){return new l(n.JSDocProtectedTag,{tagName:e,comment:t?f(t):void 0})}function Nm(e,t){return new l(n.JSDocReadonlyTag,{tagName:e,comment:t?f(t):void 0})}function Lm(e,t){return new l(n.JSDocOverrideTag,{tagName:e,comment:t?f(t):void 0})}function Jm(e,t){return new l(n.JSDocDeprecatedTag,{tagName:e,comment:t?f(t):void 0})}function Rm(e,t,r){return new l(n.JSDocSeeTag,{tagName:e,nameExpression:t,comment:r?f(r):void 0})}function Om(e,t,r){return new l(n.JSDocImplementsTag,{tagName:e,className:t,comment:r?f(r):void 0})}function vm(e,t,r){return new l(n.JSDocAugmentsTag,{tagName:e,className:t,comment:r?f(r):void 0})}function Mm(e,t,r){return new l(n.JSDocSatisfiesTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function qm(e,t,r){return new l(n.JSDocThrowsTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function Bm(e,t,r){return new l(n.JSDocThisTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function Um(e,t,r,i,s){return new l(n.JSDocImportTag,{tagName:e,importClause:t,moduleSpecifier:r,attributes:i,comment:s?f(s):void 0})}function jm(e,t,r,i){return new l(n.JSDocCallbackTag,{tagName:e,typeExpression:t,name:r,comment:i?f(i):void 0})}function Vm(e,t,r){return new l(n.JSDocOverloadTag,{tagName:e,typeExpression:t,comment:r?f(r):void 0})}function Wm(e,t,r,i){return new l(n.JSDocTypedefTag,{tagName:e,typeExpression:t,name:r,comment:i?f(i):void 0})}function zm(e,t,r){return new l(n.JSDocSignature,{typeParameters:e?f(e):void 0,parameters:f(t),type:r})}function Hm(e){return new l(n.JSDocNameReference,{name:e})}function Gm(e,t,r,i){return new l(n.ModuleDeclaration,{modifiers:e?f(e):void 0,keyword:t,name:r,body:i})}function $m(e,t=!1,r,i){return new l(n.ImportEqualsDeclaration,{modifiers:e?f(e):void 0,isTypeOnly:t,name:r,moduleReference:i})}function Fm(e,t,r,i,s){return new l(n.ExportDeclaration,{modifiers:e?f(e):void 0,isTypeOnly:t,exportClause:r,moduleSpecifier:i,attributes:s})}function Qm(e=!1,t,r,i,s){return new l(n.ImportType,{isTypeOf:e,argument:t,attributes:r,qualifier:i,typeArguments:s?f(s):void 0})}function Ym(e,t,r){return new l(n.ImportClause,{phaseModifier:e,name:t,namedBindings:r})}function Xm(e=!1,t,r){return new l(n.ImportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function Zm(e,t){return new l(n.JSDocLink,{name:e,text:t})}function Km(e,t){return new l(n.JSDocLinkPlain,{name:e,text:t})}function eh(e,t){return new l(n.JSDocLinkCode,{name:e,text:t})}function th(e,t,r,i,s){return new l(n.TypeParameter,{modifiers:e?f(e):void 0,name:t,constraint:r,expression:i,defaultType:s})}function rh(e,t){return new l(n.SyntheticReferenceExpression,{expression:e,thisArg:t})}function nh(e,t){return new l(n.JSDocTypeLiteral,{jsdocPropertyTags:e,isArrayType:t})}function ih(e,t,r,i){return new l(n.ForInStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function sh(e,t,r,i){return new l(n.ForOfStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function oh(e,t){return new l(n.CaseClause,{expression:e,statements:f(t)})}function ah(e,t){return new l(n.DefaultClause,{expression:e,statements:f(t)})}function ch(e){return new l(n.ObjectBindingPattern,{elements:f(e)})}function uh(e){return new l(n.ArrayBindingPattern,{elements:f(e)})}function ph(e,t,r,i,s,o){return new l(n.JSDocParameterTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?f(o):void 0})}function lh(e,t,r,i,s,o){return new l(n.JSDocPropertyTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?f(o):void 0})}function Pi(e,t,r){return e.left!==t||e.right!==r?nl(t,r):e}function Ai(e,t){return e.expression!==t?il(t):e}function bi(e,t){return e.expression!==t?sl(t):e}function Ii(e,t,r,i){return e.expression!==t||e.thenStatement!==r||e.elseStatement!==i?ol(t,r,i):e}function Ci(e,t,r){return e.statement!==t||e.expression!==r?al(t,r):e}function Ni(e,t,r){return e.expression!==t||e.statement!==r?cl(t,r):e}function Li(e,t,r,i,s){return e.initializer!==t||e.condition!==r||e.incrementor!==i||e.statement!==s?ul(t,r,i,s):e}function Ji(e,t){return e.label!==t?pl(t):e}function Ri(e,t){return e.label!==t?ll(t):e}function Oi(e,t){return e.expression!==t?fl(t):e}function vi(e,t,r){return e.expression!==t||e.statement!==r?ml(t,r):e}function Mi(e,t,r){return e.expression!==t||e.caseBlock!==r?hl(t,r):e}function qi(e,t){return e.clauses!==t?dl(t):e}function Bi(e,t){return e.expression!==t?Tl(t):e}function Ui(e,t,r,i){return e.tryBlock!==t||e.catchClause!==r||e.finallyBlock!==i?gl(t,r,i):e}function ji(e,t,r){return e.variableDeclaration!==t||e.block!==r?yl(t,r):e}function Vi(e,t,r){return e.label!==t||e.statement!==r?xl(t,r):e}function Wi(e,t){return e.expression!==t?El(t):e}function zi(e,t){return e.statements!==t?kl(t,e.multiLine):e}function Hi(e,t,r){return e.modifiers!==t||e.declarationList!==r?wl(t,r):e}function Gi(e,t,r,i,s){return e.name!==t||e.exclamationToken!==r||e.type!==i||e.initializer!==s?Dl(t,r,i,s):e}function $i(e,t){return e.declarations!==t?Sl(t,e.flags):e}function Fi(e,t,r,i,s,o,u){return e.modifiers!==t||e.dotDotDotToken!==r||e.name!==i||e.questionToken!==s||e.type!==o||e.initializer!==u?_l(t,r,i,s,o,u):e}function Qi(e,t,r,i,s){return e.dotDotDotToken!==t||e.propertyName!==r||e.name!==i||e.initializer!==s?Pl(t,r,i,s):e}function Yi(e,t){return e.modifiers!==t?Al(t):e}function Xi(e,t,r,i,s,o,u,d){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==d?bl(t,r,i,s,o,u,d):e}function Zi(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Il(t,r,i,s,o):e}function Ki(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Cl(t,r,i,s,o):e}function es(e,t){return e.types!==t?Nl(e.token,t):e}function ts(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Ll(t,r,i,s,o):e}function rs(e,t,r,i,s){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.type!==s?Jl(t,r,i,s):e}function ns(e,t,r){return e.name!==t||e.initializer!==r?Rl(t,r):e}function is(e,t,r,i){return e.modifiers!==t||e.name!==r||e.members!==i?Ol(t,r,i):e}function ss(e,t){return e.statements!==t?vl(t):e}function os(e,t,r,i,s){return e.modifiers!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s?Ml(t,r,i,s):e}function as(e,t){return e.expression!==t?ql(t):e}function cs(e,t){return e.name!==t?Bl(t):e}function us(e,t){return e.elements!==t?Ul(t):e}function ps(e,t,r,i){return e.modifiers!==t||e.type!==r||e.expression!==i?jl(t,e.isExportEquals,r,i):e}function ls(e,t,r){return e.modifiers!==t||e.name!==r?Vl(t,r):e}function fs(e,t){return e.name!==t?Wl(t):e}function ms(e,t){return e.elements!==t?zl(t):e}function hs(e,t,r){return e.propertyName!==t||e.name!==r?Hl(e.isTypeOnly,t,r):e}function ds(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?Gl(t,r,i):e}function Ts(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?$l(t,r,i):e}function gs(e,t,r,i,s,o){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s||e.body!==o?Fl(t,r,i,s,o):e}function ys(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.parameters!==s||e.type!==o||e.body!==u?Ql(t,r,i,s,o,u):e}function xs(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.parameters!==s||e.type!==o||e.body!==u?Yl(t,r,i,s,o,u):e}function Es(e,t,r,i){return e.modifiers!==t||e.parameters!==r||e.type!==i?Xl(t,r,i):e}function ks(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u?Zl(t,r,i,s,o,u):e}function ws(e,t,r,i,s,o,u,d,x){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.postfixToken!==s||e.typeParameters!==o||e.parameters!==u||e.type!==d||e.body!==x?Kl(t,r,i,s,o,u,d,x):e}function Ds(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?ef(t,r,i,s,o):e}function Ss(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?tf(t,r,i,s,o):e}function _s(e,t,r){return e.modifiers!==t||e.body!==r?rf(t,r):e}function Ps(e,t,r,i,s,o){return e.modifiers!==t||e.left!==r||e.type!==i||e.operatorToken!==s||e.right!==o?nf(t,r,i,s,o):e}function As(e,t){return e.operand!==t?sf(e.operator,t):e}function bs(e,t){return e.operand!==t?of(t,e.operator):e}function Is(e,t,r){return e.asteriskToken!==t||e.expression!==r?af(t,r):e}function Cs(e,t,r,i,s,o,u){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s||e.equalsGreaterThanToken!==o||e.body!==u?cf(t,r,i,s,o,u):e}function Ns(e,t,r,i,s,o,u,d){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==d?uf(t,r,i,s,o,u,d):e}function Ls(e,t,r){return e.expression!==t||e.type!==r?pf(t,r):e}function Js(e,t,r){return e.expression!==t||e.type!==r?lf(t,r):e}function Rs(e,t,r,i,s,o){return e.condition!==t||e.questionToken!==r||e.whenTrue!==i||e.colonToken!==s||e.whenFalse!==o?ff(t,r,i,s,o):e}function Os(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.name!==i?mf(t,r,i,e.flags):e}function vs(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.argumentExpression!==i?hf(t,r,i,e.flags):e}function Ms(e,t,r,i,s){return e.expression!==t||e.questionDotToken!==r||e.typeArguments!==i||e.arguments!==s?df(t,r,i,s,e.flags):e}function qs(e,t,r,i){return e.expression!==t||e.typeArguments!==r||e.arguments!==i?Tf(t,r,i):e}function Bs(e,t){return e.name!==t?gf(e.keywordToken,t):e}function Us(e,t){return e.expression!==t?yf(t,e.flags):e}function js(e,t){return e.expression!==t?xf(t):e}function Vs(e,t,r){return e.head!==t||e.templateSpans!==r?Ef(t,r):e}function Ws(e,t,r){return e.expression!==t||e.literal!==r?kf(t,r):e}function zs(e,t,r,i,s){return e.tag!==t||e.questionDotToken!==r||e.typeArguments!==i||e.template!==s?wf(t,r,i,s,e.flags):e}function Hs(e,t){return e.expression!==t?Df(t):e}function Gs(e,t){return e.elements!==t?Sf(t,e.multiLine):e}function $s(e,t){return e.properties!==t?_f(t,e.multiLine):e}function Fs(e,t){return e.expression!==t?Pf(t):e}function Qs(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?Af(t,r,i,s,o):e}function Ys(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.equalsToken!==o||e.objectAssignmentInitializer!==u?bf(t,r,i,s,o,u):e}function Xs(e,t){return e.expression!==t?If(t):e}function Zs(e,t){return e.expression!==t?Cf(t):e}function Ks(e,t){return e.expression!==t?Nf(t):e}function eo(e,t){return e.expression!==t?Lf(t):e}function to(e,t,r){return e.type!==t||e.expression!==r?Jf(t,r):e}function ro(e,t){return e.types!==t?Rf(t):e}function no(e,t){return e.types!==t?Of(t):e}function io(e,t,r,i,s){return e.checkType!==t||e.extendsType!==r||e.trueType!==i||e.falseType!==s?vf(t,r,i,s):e}function so(e,t){return e.type!==t?Mf(e.operator,t):e}function oo(e,t){return e.typeParameter!==t?qf(t):e}function ao(e,t){return e.elementType!==t?Bf(t):e}function co(e,t,r){return e.objectType!==t||e.indexType!==r?Uf(t,r):e}function uo(e,t,r){return e.typeName!==t||e.typeArguments!==r?jf(t,r):e}function po(e,t,r){return e.expression!==t||e.typeArguments!==r?Vf(t,r):e}function lo(e,t){return e.literal!==t?Wf(t):e}function fo(e,t,r,i){return e.assertsModifier!==t||e.parameterName!==r||e.type!==i?zf(t,r,i):e}function mo(e,t,r){return e.name!==t||e.value!==r?Hf(t,r):e}function ho(e,t){return e.attributes!==t?Gf(e.token,t,e.multiLine):e}function To(e,t,r){return e.exprName!==t||e.typeArguments!==r?$f(t,r):e}function go(e,t,r,i,s,o,u){return e.readonlyToken!==t||e.typeParameter!==r||e.nameType!==i||e.questionToken!==s||e.type!==o||e.members!==u?Ff(t,r,i,s,o,u):e}function yo(e,t){return e.members!==t?Qf(t):e}function xo(e,t){return e.elements!==t?Yf(t):e}function Eo(e,t,r,i,s){return e.dotDotDotToken!==t||e.name!==r||e.questionToken!==i||e.type!==s?Xf(t,r,i,s):e}function ko(e,t){return e.type!==t?Zf(t):e}function wo(e,t){return e.type!==t?Kf(t):e}function Do(e,t){return e.type!==t?em(t):e}function So(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?tm(t,r,i):e}function _o(e,t,r,i,s){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s?rm(t,r,i,s):e}function Po(e,t,r){return e.head!==t||e.templateSpans!==r?nm(t,r):e}function Ao(e,t,r){return e.type!==t||e.literal!==r?im(t,r):e}function bo(e,t){return e.tupleNameSource!==t?sm(e.type,e.isSpread,t):e}function Io(e,t){return e.expression!==t?om(t):e}function Co(e,t,r,i){return e.openingElement!==t||e.children!==r||e.closingElement!==i?am(t,r,i):e}function No(e,t){return e.properties!==t?cm(t):e}function Lo(e,t,r){return e.namespace!==t||e.name!==r?um(t,r):e}function Jo(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?pm(t,r,i):e}function Ro(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?lm(t,r,i):e}function Oo(e,t,r,i){return e.openingFragment!==t||e.children!==r||e.closingFragment!==i?fm(t,r,i):e}function vo(e,t,r){return e.name!==t||e.initializer!==r?mm(t,r):e}function Mo(e,t){return e.expression!==t?hm(t):e}function qo(e,t){return e.tagName!==t?dm(t):e}function Bo(e,t,r){return e.dotDotDotToken!==t||e.expression!==r?Tm(t,r):e}function Uo(e,t){return e.children!==t?gm(t):e}function jo(e,t,r){return e.comment!==t||e.tags!==r?ym(t,r):e}function Vo(e,t){return e.type!==t?xm(t):e}function Wo(e,t){return e.type!==t?Em(t):e}function zo(e,t){return e.type!==t?km(t):e}function Ho(e,t){return e.type!==t?wm(t):e}function Go(e,t){return e.type!==t?Dm(t):e}function $o(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Sm(t,r,i):e}function Fo(e,t,r){return e.tagName!==t||e.comment!==r?_m(t,r):e}function Qo(e,t,r,i,s){return e.tagName!==t||e.constraint!==r||e.typeParameters!==i||e.comment!==s?Pm(t,r,i,s):e}function Yo(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Am(t,r,i):e}function Xo(e,t,r){return e.tagName!==t||e.comment!==r?bm(t,r):e}function Zo(e,t,r){return e.tagName!==t||e.comment!==r?Im(t,r):e}function Ko(e,t,r){return e.tagName!==t||e.comment!==r?Cm(t,r):e}function ea(e,t,r){return e.tagName!==t||e.comment!==r?Nm(t,r):e}function ta(e,t,r){return e.tagName!==t||e.comment!==r?Lm(t,r):e}function ra(e,t,r){return e.tagName!==t||e.comment!==r?Jm(t,r):e}function na(e,t,r,i){return e.tagName!==t||e.nameExpression!==r||e.comment!==i?Rm(t,r,i):e}function ia(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?Om(t,r,i):e}function sa(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?vm(t,r,i):e}function oa(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Mm(t,r,i):e}function aa(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?qm(t,r,i):e}function ca(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Bm(t,r,i):e}function ua(e,t,r,i,s,o){return e.tagName!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s||e.comment!==o?Um(t,r,i,s,o):e}function pa(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?jm(t,r,i,s):e}function la(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Vm(t,r,i):e}function fa(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?Wm(t,r,i,s):e}function ma(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?zm(t,r,i):e}function ha(e,t){return e.name!==t?Hm(t):e}function da(e,t,r,i){return e.modifiers!==t||e.name!==r||e.body!==i?Gm(t,e.keyword,r,i):e}function Ta(e,t,r,i){return e.modifiers!==t||e.name!==r||e.moduleReference!==i?$m(t,e.isTypeOnly,r,i):e}function ga(e,t,r,i,s){return e.modifiers!==t||e.exportClause!==r||e.moduleSpecifier!==i||e.attributes!==s?Fm(t,e.isTypeOnly,r,i,s):e}function ya(e,t,r,i,s){return e.argument!==t||e.attributes!==r||e.qualifier!==i||e.typeArguments!==s?Qm(e.isTypeOf,t,r,i,s):e}function xa(e,t,r){return e.name!==t||e.namedBindings!==r?Ym(e.phaseModifier,t,r):e}function Ea(e,t,r){return e.propertyName!==t||e.name!==r?Xm(e.isTypeOnly,t,r):e}function ka(e,t){return e.name!==t?Zm(t,e.text):e}function wa(e,t){return e.name!==t?Km(t,e.text):e}function Da(e,t){return e.name!==t?eh(t,e.text):e}function Sa(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.constraint!==i||e.expression!==s||e.defaultType!==o?th(t,r,i,s,o):e}function _a(e,t,r){return e.expression!==t||e.thisArg!==r?rh(t,r):e}function Pa(e,t){return e.jsdocPropertyTags!==t?nh(t,e.isArrayType):e}function Aa(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?ih(t,r,i,s):e}function ba(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?sh(t,r,i,s):e}function Ia(e,t,r){return e.expression!==t||e.statements!==r?oh(t,r):e}function Ca(e,t,r){return e.expression!==t||e.statements!==r?ah(t,r):e}function Na(e,t){return e.elements!==t?ch(t):e}function La(e,t){return e.elements!==t?uh(t):e}function Ra(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?ph(t,r,e.isBracketed,i,e.isNameFirst,s):e}function Oa(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?lh(t,r,e.isBracketed,i,e.isNameFirst,s):e}function fh(e,t,r){return new l(n.SourceFile,{...Fn(e),statements:f(t),endOfFileToken:r})}function Ja(e,t,r){return e.statements!==t||e.endOfFileToken!==r?fh(e,t,r):e}var va={abstract:n.AbstractKeyword,accessor:n.AccessorKeyword,any:n.AnyKeyword,as:n.AsKeyword,asserts:n.AssertsKeyword,assert:n.AssertKeyword,bigint:n.BigIntKeyword,boolean:n.BooleanKeyword,break:n.BreakKeyword,case:n.CaseKeyword,catch:n.CatchKeyword,class:n.ClassKeyword,continue:n.ContinueKeyword,const:n.ConstKeyword,["constructor"]:n.ConstructorKeyword,debugger:n.DebuggerKeyword,declare:n.DeclareKeyword,default:n.DefaultKeyword,defer:n.DeferKeyword,delete:n.DeleteKeyword,do:n.DoKeyword,else:n.ElseKeyword,enum:n.EnumKeyword,export:n.ExportKeyword,extends:n.ExtendsKeyword,false:n.FalseKeyword,finally:n.FinallyKeyword,for:n.ForKeyword,from:n.FromKeyword,function:n.FunctionKeyword,get:n.GetKeyword,if:n.IfKeyword,implements:n.ImplementsKeyword,import:n.ImportKeyword,in:n.InKeyword,infer:n.InferKeyword,instanceof:n.InstanceOfKeyword,interface:n.InterfaceKeyword,intrinsic:n.IntrinsicKeyword,is:n.IsKeyword,keyof:n.KeyOfKeyword,let:n.LetKeyword,module:n.ModuleKeyword,namespace:n.NamespaceKeyword,never:n.NeverKeyword,new:n.NewKeyword,null:n.NullKeyword,number:n.NumberKeyword,object:n.ObjectKeyword,package:n.PackageKeyword,private:n.PrivateKeyword,protected:n.ProtectedKeyword,public:n.PublicKeyword,override:n.OverrideKeyword,out:n.OutKeyword,readonly:n.ReadonlyKeyword,require:n.RequireKeyword,global:n.GlobalKeyword,return:n.ReturnKeyword,satisfies:n.SatisfiesKeyword,set:n.SetKeyword,static:n.StaticKeyword,string:n.StringKeyword,super:n.SuperKeyword,switch:n.SwitchKeyword,symbol:n.SymbolKeyword,this:n.ThisKeyword,throw:n.ThrowKeyword,true:n.TrueKeyword,try:n.TryKeyword,type:n.TypeKeyword,typeof:n.TypeOfKeyword,undefined:n.UndefinedKeyword,unique:n.UniqueKeyword,unknown:n.UnknownKeyword,using:n.UsingKeyword,var:n.VarKeyword,void:n.VoidKeyword,while:n.WhileKeyword,with:n.WithKeyword,yield:n.YieldKeyword,async:n.AsyncKeyword,await:n.AwaitKeyword,of:n.OfKeyword},Xg=new Map(Object.entries(va)),mh=new Map(Object.entries({...va,"{":n.OpenBraceToken,"}":n.CloseBraceToken,"(":n.OpenParenToken,")":n.CloseParenToken,"[":n.OpenBracketToken,"]":n.CloseBracketToken,".":n.DotToken,"...":n.DotDotDotToken,";":n.SemicolonToken,",":n.CommaToken,"<":n.LessThanToken,">":n.GreaterThanToken,"<=":n.LessThanEqualsToken,">=":n.GreaterThanEqualsToken,"==":n.EqualsEqualsToken,"!=":n.ExclamationEqualsToken,"===":n.EqualsEqualsEqualsToken,"!==":n.ExclamationEqualsEqualsToken,"=>":n.EqualsGreaterThanToken,"+":n.PlusToken,"-":n.MinusToken,"**":n.AsteriskAsteriskToken,"*":n.AsteriskToken,"/":n.SlashToken,"%":n.PercentToken,"++":n.PlusPlusToken,"--":n.MinusMinusToken,"<<":n.LessThanLessThanToken,"</":n.LessThanSlashToken,">>":n.GreaterThanGreaterThanToken,">>>":n.GreaterThanGreaterThanGreaterThanToken,"&":n.AmpersandToken,"|":n.BarToken,"^":n.CaretToken,"!":n.ExclamationToken,"~":n.TildeToken,"&&":n.AmpersandAmpersandToken,"||":n.BarBarToken,"?":n.QuestionToken,"??":n.QuestionQuestionToken,"?.":n.QuestionDotToken,":":n.ColonToken,"=":n.EqualsToken,"+=":n.PlusEqualsToken,"-=":n.MinusEqualsToken,"*=":n.AsteriskEqualsToken,"**=":n.AsteriskAsteriskEqualsToken,"/=":n.SlashEqualsToken,"%=":n.PercentEqualsToken,"<<=":n.LessThanLessThanEqualsToken,">>=":n.GreaterThanGreaterThanEqualsToken,">>>=":n.GreaterThanGreaterThanGreaterThanEqualsToken,"&=":n.AmpersandEqualsToken,"|=":n.BarEqualsToken,"^=":n.CaretEqualsToken,"||=":n.BarBarEqualsToken,"&&=":n.AmpersandAmpersandEqualsToken,"??=":n.QuestionQuestionEqualsToken,"@":n.AtToken,"#":n.HashToken,"`":n.BacktickToken})),Zg=new Map([[E.d,he.HasIndices],[E.g,he.Global],[E.i,he.IgnoreCase],[E.m,he.Multiline],[E.s,he.DotAll],[E.u,he.Unicode],[E.v,he.UnicodeSets],[E.y,he.Sticky]]);function hh(e){let t=[];return e.forEach((r,i)=>{t[r]=i}),t}var Kg=hh(mh);function Ma(e){let t=[],r=0,i=0;while(r<e.length){let s=e.charCodeAt(r);switch(r++,s){case E.carriageReturn:if(e.charCodeAt(r)===E.lineFeed)r++;case E.lineFeed:t.push(i),i=r;break;default:if(s>E.maxAsciiCharacter&&at(s))t.push(i),i=r;break}}return t.push(i),t}function dh(e){return Th(e)||at(e)}function Th(e){return e===E.space||e===E.tab||e===E.verticalTab||e===E.formFeed||e===E.nonBreakingSpace||e===E.nextLine||e===E.ogham||e>=E.enQuad&&e<=E.zeroWidthSpace||e===E.narrowNoBreakSpace||e===E.mathematicalSpace||e===E.ideographicSpace||e===E.byteOrderMark}function at(e){return e===E.lineFeed||e===E.carriageReturn||e===E.lineSeparator||e===E.paragraphSeparator}function jr(e,t,r,i,s){if(t<0)return t;let o=!1;while(!0){let u=e.charCodeAt(t);switch(u){case E.carriageReturn:if(e.charCodeAt(t+1)===E.lineFeed)t++;case E.lineFeed:if(t++,r)return t;o=!!s;continue;case E.tab:case E.verticalTab:case E.formFeed:case E.space:t++;continue;case E.slash:if(i)break;if(e.charCodeAt(t+1)===E.slash){t+=2;while(t<e.length){if(at(e.charCodeAt(t)))break;t++}o=!1;continue}if(e.charCodeAt(t+1)===E.asterisk){t+=2;while(t<e.length){if(e.charCodeAt(t)===E.asterisk&&e.charCodeAt(t+1)===E.slash){t+=2;break}t++}o=!1;continue}break;case E.lessThan:case E.bar:case E.equals:case E.greaterThan:if(qa(e,t)){t=gh(e,t),o=!1;continue}break;case E.hash:if(t===0&&yh(e,t)){t=xh(e,t);continue}break;case E.asterisk:if(o){t++,o=!1;continue}break;default:if(u>E.maxAsciiCharacter&&dh(u)){t++;continue}break}return t}}function qa(e,t){if(t>=e.length)return!1;let r=e.charCodeAt(t);if(t===0||at(e.charCodeAt(t-1))){if(r===E.lessThan||r===E.greaterThan||r===E.equals){if(t+6<e.length&&e.charCodeAt(t+1)===r&&e.charCodeAt(t+2)===r&&e.charCodeAt(t+3)===r&&e.charCodeAt(t+4)===r&&e.charCodeAt(t+5)===r&&e.charCodeAt(t+6)===r)return r===E.equals||e.charCodeAt(t+7)===E.space}if(r===E.bar&&t+6<e.length&&e.charCodeAt(t+1)===r&&e.charCodeAt(t+2)===r&&e.charCodeAt(t+3)===r&&e.charCodeAt(t+4)===r&&e.charCodeAt(t+5)===r&&e.charCodeAt(t+6)===r)return!0}return!1}function gh(e,t){let r=e.charCodeAt(t),i=e.length;if(r===E.lessThan||r===E.greaterThan)while(t<i&&!at(e.charCodeAt(t)))t++;else{t+=7;while(t<i){let s=e.charCodeAt(t);if((s===E.equals||s===E.greaterThan)&&qa(e,t))break;t++}}return t}function yh(e,t){return t===0&&e.charCodeAt(0)===E.hash&&e.charCodeAt(1)===E.exclamation}function xh(e,t){t+=2;while(t<e.length){if(at(e.charCodeAt(t)))break;t++}return t}function It(e,t,r){if(kh(e))return e.pos;if(hi(e.kind)||e.kind===n.JsxText)return jr(t.text,e.pos,!1,!0);if(r&&e.jsDoc&&e.jsDoc.length>0)return It(e.jsDoc[0],t,!1);return jr(t.text,e.pos,!1,!1,!!(e.flags&Se.JSDoc))}function kh(e){return e.pos===e.end&&e.pos>=0&&e.kind!==n.EndOfFile}var Ge={[n.QualifiedName]:["left","right"],[n.ComputedPropertyName]:["expression"],[n.Decorator]:["expression"],[n.IfStatement]:["expression","thenStatement","elseStatement"],[n.DoStatement]:["statement","expression"],[n.WhileStatement]:["expression","statement"],[n.ForStatement]:["initializer","condition","incrementor","statement"],[n.ForInStatement]:["awaitModifier","initializer","expression","statement"],[n.ForOfStatement]:["awaitModifier","initializer","expression","statement"],[n.BreakStatement]:["label"],[n.ContinueStatement]:["label"],[n.ReturnStatement]:["expression"],[n.WithStatement]:["expression","statement"],[n.SwitchStatement]:["expression","caseBlock"],[n.CaseBlock]:["clauses"],[n.CaseClause]:["expression","statements"],[n.DefaultClause]:["expression","statements"],[n.ThrowStatement]:["expression"],[n.TryStatement]:["tryBlock","catchClause","finallyBlock"],[n.CatchClause]:["variableDeclaration","block"],[n.LabeledStatement]:["label","statement"],[n.ExpressionStatement]:["expression"],[n.Block]:["statements"],[n.VariableStatement]:["modifiers","declarationList"],[n.VariableDeclaration]:["name","exclamationToken","type","initializer"],[n.VariableDeclarationList]:["declarations"],[n.ObjectBindingPattern]:["elements"],[n.ArrayBindingPattern]:["elements"],[n.Parameter]:["modifiers","dotDotDotToken","name","questionToken","type","initializer"],[n.BindingElement]:["dotDotDotToken","propertyName","name","initializer"],[n.MissingDeclaration]:["modifiers"],[n.FunctionDeclaration]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[n.ClassDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[n.ClassExpression]:["modifiers","name","typeParameters","heritageClauses","members"],[n.HeritageClause]:["types"],[n.InterfaceDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[n.TypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[n.JSTypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[n.EnumMember]:["name","initializer"],[n.EnumDeclaration]:["modifiers","name","members"],[n.ModuleBlock]:["statements"],[n.ImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[n.JSImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[n.ExternalModuleReference]:["expression"],[n.NamespaceImport]:["name"],[n.NamedImports]:["elements"],[n.ExportAssignment]:["modifiers","type","expression"],[n.NamespaceExportDeclaration]:["modifiers","name"],[n.NamespaceExport]:["name"],[n.NamedExports]:["elements"],[n.ExportSpecifier]:["propertyName","name"],[n.CallSignature]:["typeParameters","parameters","type"],[n.ConstructSignature]:["typeParameters","parameters","type"],[n.Constructor]:["modifiers","typeParameters","parameters","type","body"],[n.GetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[n.SetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[n.IndexSignature]:["modifiers","parameters","type"],[n.MethodSignature]:["modifiers","name","postfixToken","typeParameters","parameters","type"],[n.MethodDeclaration]:["modifiers","asteriskToken","name","postfixToken","typeParameters","parameters","type","body"],[n.PropertySignature]:["modifiers","name","postfixToken","type","initializer"],[n.PropertyDeclaration]:["modifiers","name","postfixToken","type","initializer"],[n.ClassStaticBlockDeclaration]:["modifiers","body"],[n.BinaryExpression]:["modifiers","left","type","operatorToken","right"],[n.PrefixUnaryExpression]:["operand"],[n.PostfixUnaryExpression]:["operand"],[n.YieldExpression]:["asteriskToken","expression"],[n.ArrowFunction]:["modifiers","typeParameters","parameters","type","equalsGreaterThanToken","body"],[n.FunctionExpression]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[n.AsExpression]:["expression","type"],[n.SatisfiesExpression]:["expression","type"],[n.ConditionalExpression]:["condition","questionToken","whenTrue","colonToken","whenFalse"],[n.PropertyAccessExpression]:["expression","questionDotToken","name"],[n.ElementAccessExpression]:["expression","questionDotToken","argumentExpression"],[n.CallExpression]:["expression","questionDotToken","typeArguments","arguments"],[n.NewExpression]:["expression","typeArguments","arguments"],[n.MetaProperty]:["name"],[n.NonNullExpression]:["expression"],[n.SpreadElement]:["expression"],[n.TemplateExpression]:["head","templateSpans"],[n.TemplateSpan]:["expression","literal"],[n.TaggedTemplateExpression]:["tag","questionDotToken","typeArguments","template"],[n.ParenthesizedExpression]:["expression"],[n.ArrayLiteralExpression]:["elements"],[n.ObjectLiteralExpression]:["properties"],[n.SpreadAssignment]:["expression"],[n.PropertyAssignment]:["modifiers","name","postfixToken","type","initializer"],[n.ShorthandPropertyAssignment]:["modifiers","name","postfixToken","type","equalsToken","objectAssignmentInitializer"],[n.DeleteExpression]:["expression"],[n.TypeOfExpression]:["expression"],[n.VoidExpression]:["expression"],[n.AwaitExpression]:["expression"],[n.TypeAssertionExpression]:["type","expression"],[n.UnionType]:["types"],[n.IntersectionType]:["types"],[n.ConditionalType]:["checkType","extendsType","trueType","falseType"],[n.TypeOperator]:["type"],[n.InferType]:["typeParameter"],[n.ArrayType]:["elementType"],[n.IndexedAccessType]:["objectType","indexType"],[n.TypeReference]:["typeName","typeArguments"],[n.ExpressionWithTypeArguments]:["expression","typeArguments"],[n.LiteralType]:["literal"],[n.TypePredicate]:["assertsModifier","parameterName","type"],[n.ImportAttribute]:["name","value"],[n.ImportAttributes]:["attributes"],[n.TypeQuery]:["exprName","typeArguments"],[n.MappedType]:["readonlyToken","typeParameter","nameType","questionToken","type","members"],[n.TypeLiteral]:["members"],[n.TupleType]:["elements"],[n.NamedTupleMember]:["dotDotDotToken","name","questionToken","type"],[n.OptionalType]:["type"],[n.RestType]:["type"],[n.ParenthesizedType]:["type"],[n.FunctionType]:["typeParameters","parameters","type"],[n.ConstructorType]:["modifiers","typeParameters","parameters","type"],[n.TemplateLiteralType]:["head","templateSpans"],[n.TemplateLiteralTypeSpan]:["type","literal"],[n.SyntheticExpression]:["tupleNameSource"],[n.PartiallyEmittedExpression]:["expression"],[n.JsxElement]:["openingElement","children","closingElement"],[n.JsxAttributes]:["properties"],[n.JsxNamespacedName]:["namespace","name"],[n.JsxOpeningElement]:["tagName","typeArguments","attributes"],[n.JsxSelfClosingElement]:["tagName","typeArguments","attributes"],[n.JsxFragment]:["openingFragment","children","closingFragment"],[n.JsxAttribute]:["name","initializer"],[n.JsxSpreadAttribute]:["expression"],[n.JsxClosingElement]:["tagName"],[n.JsxExpression]:["dotDotDotToken","expression"],[n.SyntaxList]:["children"],[n.JSDoc]:["comment","tags"],[n.JSDocTypeExpression]:["type"],[n.JSDocNonNullableType]:["type"],[n.JSDocNullableType]:["type"],[n.JSDocVariadicType]:["type"],[n.JSDocOptionalType]:["type"],[n.JSDocTypeTag]:["tagName","typeExpression","comment"],[n.JSDocUnknownTag]:["tagName","comment"],[n.JSDocTemplateTag]:["tagName","constraint","typeParameters","comment"],[n.JSDocReturnTag]:["tagName","typeExpression","comment"],[n.JSDocPublicTag]:["tagName","comment"],[n.JSDocPrivateTag]:["tagName","comment"],[n.JSDocProtectedTag]:["tagName","comment"],[n.JSDocReadonlyTag]:["tagName","comment"],[n.JSDocOverrideTag]:["tagName","comment"],[n.JSDocDeprecatedTag]:["tagName","comment"],[n.JSDocSeeTag]:["tagName","nameExpression","comment"],[n.JSDocImplementsTag]:["tagName","className","comment"],[n.JSDocAugmentsTag]:["tagName","className","comment"],[n.JSDocSatisfiesTag]:["tagName","typeExpression","comment"],[n.JSDocThrowsTag]:["tagName","typeExpression","comment"],[n.JSDocThisTag]:["tagName","typeExpression","comment"],[n.JSDocImportTag]:["tagName","importClause","moduleSpecifier","attributes","comment"],[n.JSDocCallbackTag]:["tagName","typeExpression","name","comment"],[n.JSDocOverloadTag]:["tagName","typeExpression","comment"],[n.JSDocTypedefTag]:["tagName","typeExpression","name","comment"],[n.JSDocSignature]:["typeParameters","parameters","type"],[n.JSDocNameReference]:["name"],[n.SourceFile]:["statements","endOfFileToken"],[n.ModuleDeclaration]:["modifiers","name","body"],[n.ImportEqualsDeclaration]:["modifiers","name","moduleReference"],[n.ExportDeclaration]:["modifiers","exportClause","moduleSpecifier","attributes"],[n.ImportType]:["argument","attributes","qualifier","typeArguments"],[n.ImportClause]:["name","namedBindings"],[n.ImportSpecifier]:["propertyName","name"],[n.JSDocLink]:["name"],[n.JSDocLinkPlain]:["name"],[n.JSDocLinkCode]:["name"],[n.TypeParameter]:["modifiers","name","constraint","expression","defaultType"],[n.SyntheticReferenceExpression]:["expression","thisArg"],[n.JSDocTypeLiteral]:["jsdocPropertyTags"],[n.JSDocParameterTag]:["tagName","name","typeExpression","comment"],[n.JSDocPropertyTag]:["tagName","name","typeExpression","comment"]},wh={[n.ComputedPropertyName]:"expression",[n.Decorator]:"expression",[n.BreakStatement]:"label",[n.ContinueStatement]:"label",[n.ReturnStatement]:"expression",[n.CaseBlock]:"clauses",[n.ThrowStatement]:"expression",[n.ExpressionStatement]:"expression",[n.Block]:"statements",[n.VariableDeclarationList]:"declarations",[n.ObjectBindingPattern]:"elements",[n.ArrayBindingPattern]:"elements",[n.MissingDeclaration]:"modifiers",[n.HeritageClause]:"types",[n.ModuleBlock]:"statements",[n.ExternalModuleReference]:"expression",[n.NamespaceImport]:"name",[n.NamedImports]:"elements",[n.NamespaceExport]:"name",[n.NamedExports]:"elements",[n.PrefixUnaryExpression]:"operand",[n.PostfixUnaryExpression]:"operand",[n.MetaProperty]:"name",[n.NonNullExpression]:"expression",[n.SpreadElement]:"expression",[n.ParenthesizedExpression]:"expression",[n.ArrayLiteralExpression]:"elements",[n.ObjectLiteralExpression]:"properties",[n.SpreadAssignment]:"expression",[n.DeleteExpression]:"expression",[n.TypeOfExpression]:"expression",[n.VoidExpression]:"expression",[n.AwaitExpression]:"expression",[n.UnionType]:"types",[n.IntersectionType]:"types",[n.TypeOperator]:"type",[n.InferType]:"typeParameter",[n.ArrayType]:"elementType",[n.LiteralType]:"literal",[n.ImportAttributes]:"attributes",[n.TypeLiteral]:"members",[n.TupleType]:"elements",[n.OptionalType]:"type",[n.RestType]:"type",[n.ParenthesizedType]:"type",[n.SyntheticExpression]:"tupleNameSource",[n.PartiallyEmittedExpression]:"expression",[n.JsxAttributes]:"properties",[n.JsxSpreadAttribute]:"expression",[n.JsxClosingElement]:"tagName",[n.SyntaxList]:"children",[n.JSDocTypeExpression]:"type",[n.JSDocNonNullableType]:"type",[n.JSDocNullableType]:"type",[n.JSDocVariadicType]:"type",[n.JSDocOptionalType]:"type",[n.JSDocNameReference]:"name",[n.JSDocLink]:"name",[n.JSDocLinkPlain]:"name",[n.JSDocLinkCode]:"name",[n.JSDocTypeLiteral]:"jsdocPropertyTags"};var Ba=5,Ua=0,ja=4,Va=8,Wa=12,za=16,Ha=20,Xt=24,Zt=28,Kt=32,er=36,tr=40,Ct=44,Z=28,$e=0,rr=4,nr=8,ct=12,Fe=16,ir=20,Ga=24,Qe=4294967295,Le=0,Ye=1073741824,ut=2147483648;function $a(e){switch(e){case n.Identifier:case n.PrivateIdentifier:case n.JsxText:case n.JSDocText:case n.JSDocLink:case n.JSDocLinkPlain:case n.JSDocLinkCode:return Ye;case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:case n.SourceFile:return ut;default:return Le}}function Fa(e){switch(e.kind){case n.Block:return(e.multiLine?1:0)<<24;case n.HeritageClause:return(e.token===n.ImplementsKeyword?1:0)<<24;case n.ExportAssignment:return(e.isExportEquals?1:0)<<24;case n.ExportSpecifier:return(e.isTypeOnly?1:0)<<24;case n.PrefixUnaryExpression:return(e.operator===n.MinusToken?1:e.operator===n.TildeToken?2:e.operator===n.ExclamationToken?3:e.operator===n.PlusPlusToken?4:e.operator===n.MinusMinusToken?5:0)<<24;case n.PostfixUnaryExpression:return(e.operator===n.MinusMinusToken?1:0)<<24;case n.MetaProperty:return(e.keywordToken===n.NewKeyword?1:0)<<24;case n.ArrayLiteralExpression:return(e.multiLine?1:0)<<24;case n.ObjectLiteralExpression:return(e.multiLine?1:0)<<24;case n.TypeOperator:return(e.operator===n.ReadonlyKeyword?1:e.operator===n.UniqueKeyword?2:0)<<24;case n.ImportAttributes:return(e.multiLine?1:0)<<24|(e.token===n.AssertKeyword?1:0)<<25;case n.JsxText:return(e.containsOnlyTriviaWhiteSpaces?1:0)<<24;case n.ModuleDeclaration:return(e.keyword===n.NamespaceKeyword?1:0)<<24;case n.ImportEqualsDeclaration:return(e.isTypeOnly?1:0)<<24;case n.ExportDeclaration:return(e.isTypeOnly?1:0)<<24;case n.ImportType:return(e.isTypeOf?1:0)<<24;case n.ImportClause:return(e.phaseModifier===n.TypeKeyword?1:e.phaseModifier===n.DeferKeyword?2:0)<<24;case n.ImportSpecifier:return(e.isTypeOnly?1:0)<<24;case n.JSDocTypeLiteral:return(e.isArrayType?1:0)<<24;case n.JSDocParameterTag:case n.JSDocPropertyTag:return(e.isBracketed?1:0)<<24|(e.isNameFirst?1:0)<<25}return 0}import{Buffer as Dh}from"node:buffer";var Qa=237,Sh=160,_h=191,Ph=128,Ah=191;function bh(e,t){return t+2<e.length&&e[t]===Qa&&e[t+1]>=Sh&&e[t+1]<=_h&&e[t+2]>=Ph&&e[t+2]<=Ah}function Ih(e,t){return 53248|(e[t+1]&63)<<6|e[t+2]&63}function Ch(e){return Dh.from(e.buffer,e.byteOffset,e.byteLength).indexOf(Qa)>=0}function Nh(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e)}class Xe extends TextDecoder{decode(e,t){if(e===void 0)return super.decode(e,t);let r=Nh(e);if(!Ch(r))return super.decode(r,t);let i=[],s=0;for(let o=0;o<r.length;o++){if(!bh(r,o))continue;if(s<o)i.push(super.decode(r.subarray(s,o),t));i.push(String.fromCharCode(Ih(r,o))),o+=2,s=o+1}if(s===0)return super.decode(r,t);if(s<r.length)i.push(super.decode(r.subarray(s),t));return i.join("")}}var Lh=new TextEncoder,Jh=new Xe;class Vr{buf;view;pos;constructor(e=256){this.buf=new Uint8Array(e),this.view=new DataView(this.buf.buffer),this.pos=0}ensure(e){if(this.pos+e>this.buf.length){let t=this.buf.length*2;while(t<this.pos+e)t*=2;let r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.view=new DataView(this.buf.buffer)}}writeArrayHeader(e){if(e<=15)this.ensure(1),this.buf[this.pos++]=144|e;else if(e<=65535)this.ensure(3),this.buf[this.pos++]=220,this.view.setUint16(this.pos,e,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=221,this.view.setUint32(this.pos,e,!1),this.pos+=4}writeUint(e){if(e<=127)this.ensure(1),this.buf[this.pos++]=e;else if(e<=255)this.ensure(2),this.buf[this.pos++]=204,this.buf[this.pos++]=e;else if(e<=65535)this.ensure(3),this.buf[this.pos++]=205,this.view.setUint16(this.pos,e,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=206,this.view.setUint32(this.pos,e,!1),this.pos+=4}writeString(e){let t=Lh.encode(e),r=t.length;if(r<=31)this.ensure(1+r),this.buf[this.pos++]=160|r;else if(r<=255)this.ensure(2+r),this.buf[this.pos++]=217,this.buf[this.pos++]=r;else if(r<=65535)this.ensure(3+r),this.buf[this.pos++]=218,this.view.setUint16(this.pos,r,!1),this.pos+=2;else this.ensure(5+r),this.buf[this.pos++]=219,this.view.setUint32(this.pos,r,!1),this.pos+=4;this.buf.set(t,this.pos),this.pos+=r}writeBool(e){this.ensure(1),this.buf[this.pos++]=e?195:194}finish(){return this.buf.subarray(0,this.pos)}}class Nt{buf;view;pos;constructor(e,t=0){this.buf=e,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.pos=t}readArrayHeader(){let e=this.buf[this.pos++];if((e&240)===144)return e&15;if(e===220){let t=this.view.getUint16(this.pos,!1);return this.pos+=2,t}if(e===221){let t=this.view.getUint32(this.pos,!1);return this.pos+=4,t}throw Error(`Expected array header, got 0x${e.toString(16)}`)}readUint(){let e=this.buf[this.pos++];if(e<=127)return e;if(e===204)return this.buf[this.pos++];if(e===205){let t=this.view.getUint16(this.pos,!1);return this.pos+=2,t}if(e===206){let t=this.view.getUint32(this.pos,!1);return this.pos+=4,t}throw Error(`Expected uint, got 0x${e.toString(16)}`)}readString(){let e=this.buf[this.pos++],t;if((e&224)===160)t=e&31;else if(e===217)t=this.buf[this.pos++];else if(e===218)t=this.view.getUint16(this.pos,!1),this.pos+=2;else if(e===219)t=this.view.getUint32(this.pos,!1),this.pos+=4;else throw Error(`Expected string, got 0x${e.toString(16)}`);let r=Jh.decode(this.buf.subarray(this.pos,this.pos+t));return this.pos+=t,r}readBool(){let e=this.buf[this.pos++];if(e===195)return!0;if(e===194)return!1;throw Error(`Expected bool, got 0x${e.toString(16)}`)}}var Ya=Z/4,Xa=3,sr=4294967295;class ec{parts;byteLen;offsets;constructor(){this.parts=[],this.byteLen=0,this.offsets=[]}add(e){let t=this.offsets.length,i=Za().encode(e).length,s=this.byteLen;return this.parts.push(e),this.byteLen+=i,this.offsets.push(s,s+i),t}encode(){let t=Za().encode(this.parts.join("")),r=new Uint8Array(this.offsets.length*4),i=new DataView(r.buffer);for(let o=0;o<this.offsets.length;o++)i.setUint32(o*4,this.offsets[o],!0);let s=new Uint8Array(r.length+t.length);return s.set(r,0),s.set(t,r.length),s}stringByteLength(){return this.byteLen}offsetsCount(){return this.offsets.length}}var Rh;function Za(){return Rh??=new TextEncoder}function Oh(e){let t=e.kind,r=Ge[t];if(!r)return 0;let i=e,s=0;for(let o=0;o<r.length;o++){let u=r[o];if(u!==void 0&&vh(i[u]))s|=1<<o}return s}function vh(e){if(e===void 0||e===null)return!1;return!0}function Mh(e,t){return t.add(e.text??"")}function Wr(e,t){if(!e||e.length===0)return sr;let r=t.finish().length;t.writeArrayHeader(e.length);for(let i of e)t.writeArrayHeader(5),t.writeUint(i.pos),t.writeUint(i.end),t.writeString(i.fileName),t.writeUint(i.resolutionMode??0),t.writeBool(i.preserve??!1);return r}function qh(e,t,r,i){let s=r.length*4;if(e.kind===n.SourceFile){let o=e,u=t.add(o.text),d=t.add(o.fileName),x=t.add(o.path),_=Wr(o.referencedFiles,i),I=Wr(o.typeReferenceDirectives,i),q=Wr(o.libReferenceDirectives,i);r.push(u,d,x,o.languageVariant,o.scriptKind,_,I,q,sr,sr,sr,0)}else if(e.kind===n.TemplateHead||e.kind===n.TemplateMiddle||e.kind===n.TemplateTail){let o=e,u=o.text??"",d=o.rawText??"",x=o.templateFlags??0,_=t.add(u),I=t.add(d);r.push(_,I,x)}else{let o=e,u=o.text??"",d=o.tokenFlags??0,x=t.add(u);r.push(x,d)}return s}function Ka(e,t,r,i){let s=$a(e.kind),o=Fa(e);switch(s){case Le:return s|o|Oh(e);case Ye:return s|o|Mh(e,t);case ut:return s|o|qh(e,t,r,i);default:throw Error("unreachable")}}function Bh(e){return Ge[e.kind]}function Uh(e){return Array.isArray(e)&&typeof e.pos==="number"&&typeof e.end==="number"}function tc(e){let t=new ec,r=[],i=new Vr,s=[];s.push(0,0,0,0,0,0,0);let o=0,u=0,d=0;function x(N){o++;let ue=o;if(d!==0)s[d*Ya+Xa]=ue;let se=Ka(N,t,r,i);s.push(N.kind,N.pos>=0?N.pos:0,N.end>=0?N.end:0,0,u,se,N.flags);let Ie=u,Ce=d;u=ue,d=0,I(N),d=ue,u=Ie}function _(N){if(!N)return;o++;let ue=o;if(d!==0)s[d*Ya+Xa]=ue;s.push(Qe,N.pos>=0?N.pos:0,N.end>=0?N.end:0,0,u,N.length,0);let se=u;u=ue,d=0;for(let Ie of N)x(Ie);d=ue,u=se}function I(N){let ue=Bh(N),se=N;if(ue)for(let Ie of ue){if(Ie===void 0)continue;let Ce=se[Ie];if(Ce===void 0||Ce===null)continue;if(Uh(Ce))_(Ce);else x(Ce)}}o++,u++;let q=Ka(e,t,r,i);s.push(e.kind,e.pos>=0?e.pos:0,e.end>=0?e.end:0,0,0,q,e.flags);let O=u;d=0,u=1,I(e),u=O;let F=new Uint8Array(r.length*4),ce=new DataView(F.buffer);for(let N=0;N<r.length;N++)ce.setUint32(N*4,r[N],!0);let Ae=i.finish(),et=t.encode(),de=new Uint8Array(s.length*4),ke=new DataView(de.buffer);for(let N=0;N<s.length;N++)ke.setUint32(N*4,s[N]>>>0,!0);let tt=Ct,Oe=Ct+t.offsetsCount()*4,R=Oe+t.stringByteLength(),Te=R+F.length,W=Te+Ae.length,me=new Uint8Array(Ct),we=new DataView(me.buffer),Ut=Ba<<24;we.setUint32(Ua,Ut,!0),we.setUint32(Xt,tt,!0),we.setUint32(Zt,Oe,!0),we.setUint32(Kt,R,!0),we.setUint32(er,Te,!0),we.setUint32(tr,W,!0);let be=new Uint8Array(me.length+et.length+F.length+Ae.length+de.length);return be.set(me,0),be.set(et,Ct),be.set(F,R),be.set(Ae,Te),be.set(de,W),be}function rc(e){return Buffer.from(e).toString("base64")}var nc=[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8],ic=3221225472,sc=255,oc=16777215,Ze=16777215;function zr(e){let t=e.getUint32(ja,!0),r=e.getUint32(Va,!0),i=e.getUint32(Wa,!0),s=e.getUint32(za,!0);return or(s)+or(i)+or(r)+or(t)}function Hr(e){return e.getUint32(Ha,!0).toString()}function or(e){return(e>>>0).toString(16).padStart(8,"0")}function ac(e){switch(e){case n.StaticKeyword:return B.Static;case n.PublicKeyword:return B.Public;case n.ProtectedKeyword:return B.Protected;case n.PrivateKeyword:return B.Private;case n.AbstractKeyword:return B.Abstract;case n.AccessorKeyword:return B.Accessor;case n.ExportKeyword:return B.Export;case n.DeclareKeyword:return B.Ambient;case n.ConstKeyword:return B.Const;case n.DefaultKeyword:return B.Default;case n.AsyncKeyword:return B.Async;case n.ReadonlyKeyword:return B.Readonly;case n.OverrideKeyword:return B.Override;case n.InKeyword:return B.In;case n.OutKeyword:return B.Out;case n.Decorator:return B.Decorator;default:return B.None}}class ar{parent;view;index;_byteIndex;constructor(e,t,r,i){this.view=e,this.index=t,this.parent=r,this._byteIndex=i}get kind(){return this.view.getUint32(this._byteIndex+$e,!0)}get pos(){return this.view.getInt32(this._byteIndex+rr,!0)}get end(){return this.view.getInt32(this._byteIndex+nr,!0)}get next(){return this.view.getUint32(this._byteIndex+ct,!0)}get parentIndex(){return this.view.getUint32(this._byteIndex+Fe,!0)}get data(){return this.view.getUint32(this._byteIndex+ir,!0)}get dataType(){return this.data&ic}get childMask(){if(this.dataType!==Le)return-1;return this.data&sc}getFileText(e,t){return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer,this.view.byteOffset+this.sourceFile._offsetStringTable+e,t-e))}get sourceFile(){throw Error("sourceFile not available on base")}}class pt extends Array{static get[Symbol.species](){return Array}parent;hasTrailingComma;transformFlags=0;view;index;_byteIndex;_cursorIndex=0;_cursorNodeIndex=0;get pos(){return this.view.getUint32(this._byteIndex+rr,!0)}get end(){return this.view.getUint32(this._byteIndex+nr,!0)}get next(){return this.view.getUint32(this._byteIndex+ct,!0)}get data(){return this.view.getUint32(this._byteIndex+ir,!0)}sourceFile;constructor(e,t,r,i,s){super();this.view=e,this.index=t,this.parent=r,this.sourceFile=i,this._byteIndex=s+t*Z,this.length=this.data,this._cursorNodeIndex=t+1;let o=this.length;for(let u=16;u<o;u++)Object.defineProperty(this,u,{get(){return this.at(u)}})}get 0(){return this.at(0)}get 1(){return this.at(1)}get 2(){return this.at(2)}get 3(){return this.at(3)}get 4(){return this.at(4)}get 5(){return this.at(5)}get 6(){return this.at(6)}get 7(){return this.at(7)}get 8(){return this.at(8)}get 9(){return this.at(9)}get 10(){return this.at(10)}get 11(){return this.at(11)}get 12(){return this.at(12)}get 13(){return this.at(13)}get 14(){return this.at(14)}get 15(){return this.at(15)}*[Symbol.iterator](){if(!this.length)return;let e=this.index+1;while(e){let t=this.getOrCreateChildAtNodeIndex(e);e=t.next,yield t}}forEachNode(e){if(!this.length)return;let t=this.index+1;while(t){let r=this.getOrCreateChildAtNodeIndex(t);t=r.next;let i=e(r);if(i)return i}}at(e){if(!Number.isInteger(e))return;if(e>=this.data||e<0&&-e>this.data)return;if(e<0)e=this.length+e;let t=this.sourceFile._offsetNodes,r,i;if(e>=this._cursorIndex)r=this._cursorIndex,i=this._cursorNodeIndex;else r=0,i=this.index+1;for(;r<e;r++)i=this.view.getUint32(t+i*Z+ct,!0);return this._cursorIndex=e,this._cursorNodeIndex=i,this.getOrCreateChildAtNodeIndex(i)}getOrCreateChildAtNodeIndex(e){let t=this.sourceFile.nodes[e];if(!t){if(this.view.getUint32(this.sourceFile._offsetNodes+e*Z+$e,!0)===Qe)throw Error("NodeList cannot directly contain another NodeList");let i=this.sourceFile;t=new qe(this.view,e,this.parent,i,i._offsetNodes),i.nodes[e]=t,i._timing?.recordMaterialization()}return t}__print(){let e=[];return e.push("kind: NodeList"),e.push(`index: ${this.index}`),e.push(`byteIndex: ${this._byteIndex}`),e.push(`length: ${this.length}`),e.join(`
8
+ `)}}class qe extends ar{static NODE_LEN=Z;get sourceFile(){return this._sourceFile}_sourceFile;get id(){return`${this.index}.${this.kind}.${this.sourceFile.path}`}constructor(e,t,r,i,s){super(e,t,r,s+t*Z);this._sourceFile=i}forEachChild(e,t){if(this.hasChildren()){let r=this.index+1;do{let i=this.getOrCreateChildAtNodeIndex(r);if(i instanceof pt)if(t){let s=t(i);if(s)return s}else{let s=i.forEachNode(e);if(s)return s}else if(i.kind!==n.JSDoc){let s=e(i);if(s)return s}r=i.next}while(r)}}get jsDoc(){if(!this.hasChildren())return;let e,t=this.index+1;do{let r=this.getOrCreateChildAtNodeIndex(t);if(!(r instanceof pt)&&r.kind===n.JSDoc)(e??=[]).push(r);t=r.next}while(t);return e}getSourceFile(){return this.sourceFile}getStart(e,t){return It(this,e??this.getSourceFile(),t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e??this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e??=this.getSourceFile(),e.text.substring(this.getStart(e),this.end)}getString(e){let t=this.sourceFile._offsetStringTableOffsets,r=this.view.getUint32(t+e*4,!0),i=this.view.getUint32(t+(e+1)*4,!0),s=this.sourceFile._offsetStringTable,o=new Uint8Array(this.view.buffer,this.view.byteOffset+s+r,i-r);return this.sourceFile._decoder.decode(o)}getOrCreateChildAtNodeIndex(e){let t=this.sourceFile.nodes[e];if(!t){let r=this.sourceFile,i=r._offsetNodes;t=this.view.getUint32(i+e*Z+$e,!0)===Qe?new pt(this.view,e,this,r,i):new qe(this.view,e,this,r,i),r.nodes[e]=t,r._timing?.recordMaterialization()}return t}hasChildren(){if(this._byteIndex>=this.view.byteLength-Z)return!1;return this.view.getUint32(this.sourceFile._offsetNodes+(this.index+1)*Z+Fe,!0)===this.index}getNamedChild(e){let t=this.kind,r=Ge[t];if(!r)return;let i=r.indexOf(e);if(i===-1)return;return this.getChildAtOrder(i)}getChildAtOrder(e){let t=this.childMask;if(!(t&1<<e))return;let r=e-nc[~(t|255<<e&255)&255],i=this.index+1;for(let s=0;s<r;s++)i=this.view.getUint32(this.sourceFile._offsetNodes+i*Z+ct,!0);return this.getOrCreateChildAtNodeIndex(i)}__print(){let e=[];e.push(`index: ${this.index}`),e.push(`byteIndex: ${this._byteIndex}`),e.push(`kind: ${n[this.kind]}`),e.push(`pos: ${this.pos}`),e.push(`end: ${this.end}`),e.push(`next: ${this.next}`),e.push(`parent: ${this.parentIndex}`),e.push(`data: ${this.data.toString(2).padStart(32,"0")}`);let t=this.dataType===Le?"children":this.dataType===Ye?"string":"extended";if(e.push(`dataType: ${t}`),this.dataType===Le)e.push(`childMask: ${this.childMask.toString(2).padStart(8,"0")}`),e.push(`childProperties: ${Ge[this.kind]?.join(", ")}`);return e.join(`
9
+ `)}__printChildren(){let e=[],t=this.index+1;while(t){let r=this.getOrCreateChildAtNodeIndex(t);t=r.next,e.push(r.__print())}return e.join(`
10
+
11
+ `)}__printSubtree(){let e=[this.__print()];return this.forEachChild(function t(r){e.push(r.__print()),r.forEachChild(t)},(t)=>{e.push(t.__print())}),e.join(`
12
+
13
+ `)}get containsOnlyTriviaWhiteSpaces(){return(this.data&16777216)!==0}get isArrayType(){return(this.data&16777216)!==0}get isBracketed(){return(this.data&16777216)!==0}get isExportEquals(){return(this.data&16777216)!==0}get isNameFirst(){return(this.data&33554432)!==0}get isTypeOf(){return(this.data&16777216)!==0}get isTypeOnly(){return(this.data&16777216)!==0}get multiLine(){return(this.data&16777216)!==0}get keyword(){switch(this.kind){case n.ModuleDeclaration:return this.data>>24&1?n.NamespaceKeyword:n.ModuleKeyword}}get keywordToken(){switch(this.kind){case n.MetaProperty:return this.data>>24&1?n.NewKeyword:n.ImportKeyword}}get operator(){switch(this.kind){case n.PrefixUnaryExpression:{let e=this.data>>24&7;if(e===1)return n.MinusToken;if(e===2)return n.TildeToken;if(e===3)return n.ExclamationToken;if(e===4)return n.PlusPlusToken;if(e===5)return n.MinusMinusToken;return n.PlusToken}case n.PostfixUnaryExpression:return this.data>>24&1?n.MinusMinusToken:n.PlusPlusToken;case n.TypeOperator:{let e=this.data>>24&3;if(e===1)return n.ReadonlyKeyword;if(e===2)return n.UniqueKeyword;return n.KeyOfKeyword}}}get phaseModifier(){switch(this.kind){case n.ImportClause:{let e=this.data>>24&3;if(e===0)return;return e===1?n.TypeKeyword:e===2?n.DeferKeyword:void 0}}}get token(){switch(this.kind){case n.HeritageClause:return this.data>>24&1?n.ImplementsKeyword:n.ExtendsKeyword;case n.ImportAttributes:return this.data>>25&1?n.AssertKeyword:n.WithKeyword}}get templateFlags(){switch(this.kind){case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:let e=this.sourceFile._offsetExtendedData+(this.data&Ze);return this.view.getUint32(e+8,!0)}}get tokenFlags(){switch(this.kind){case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:let e=this.sourceFile._offsetExtendedData+(this.data&Ze);return this.view.getUint32(e+4,!0);default:return 0}}get argument(){return this.getNamedChild("argument")}get argumentExpression(){return this.getNamedChild("argumentExpression")}get arguments(){return this.getNamedChild("arguments")}get assertsModifier(){return this.getNamedChild("assertsModifier")}get asteriskToken(){return this.getNamedChild("asteriskToken")}get attributes(){return this.getNamedChild("attributes")}get awaitModifier(){return this.getNamedChild("awaitModifier")}get block(){return this.getNamedChild("block")}get body(){return this.getNamedChild("body")}get caseBlock(){return this.getNamedChild("caseBlock")}get catchClause(){return this.getNamedChild("catchClause")}get checkType(){return this.getNamedChild("checkType")}get children(){return this.getNamedChild("children")}get className(){return this.getNamedChild("className")}get clauses(){return this.getNamedChild("clauses")}get closingElement(){return this.getNamedChild("closingElement")}get closingFragment(){return this.getNamedChild("closingFragment")}get colonToken(){return this.getNamedChild("colonToken")}get comment(){return this.getNamedChild("comment")}get condition(){return this.getNamedChild("condition")}get constraint(){return this.getNamedChild("constraint")}get declarationList(){return this.getNamedChild("declarationList")}get declarations(){return this.getNamedChild("declarations")}get defaultType(){return this.getNamedChild("defaultType")}get dotDotDotToken(){return this.getNamedChild("dotDotDotToken")}get elements(){return this.getNamedChild("elements")}get elementType(){return this.getNamedChild("elementType")}get elseStatement(){return this.getNamedChild("elseStatement")}get endOfFileToken(){return this.getNamedChild("endOfFileToken")}get equalsGreaterThanToken(){return this.getNamedChild("equalsGreaterThanToken")}get equalsToken(){return this.getNamedChild("equalsToken")}get exclamationToken(){return this.getNamedChild("exclamationToken")}get exportClause(){return this.getNamedChild("exportClause")}get expression(){return this.getNamedChild("expression")}get exprName(){return this.getNamedChild("exprName")}get extendsType(){return this.getNamedChild("extendsType")}get falseType(){return this.getNamedChild("falseType")}get finallyBlock(){return this.getNamedChild("finallyBlock")}get head(){return this.getNamedChild("head")}get heritageClauses(){return this.getNamedChild("heritageClauses")}get importClause(){return this.getNamedChild("importClause")}get incrementor(){return this.getNamedChild("incrementor")}get indexType(){return this.getNamedChild("indexType")}get initializer(){return this.getNamedChild("initializer")}get jsdocPropertyTags(){return this.getNamedChild("jsdocPropertyTags")}get label(){return this.getNamedChild("label")}get left(){return this.getNamedChild("left")}get literal(){return this.getNamedChild("literal")}get members(){return this.getNamedChild("members")}get modifiers(){return this.getNamedChild("modifiers")}get moduleReference(){return this.getNamedChild("moduleReference")}get moduleSpecifier(){return this.getNamedChild("moduleSpecifier")}get name(){return this.getNamedChild("name")}get namedBindings(){return this.getNamedChild("namedBindings")}get nameExpression(){return this.getNamedChild("nameExpression")}get namespace(){return this.getNamedChild("namespace")}get nameType(){return this.getNamedChild("nameType")}get objectAssignmentInitializer(){return this.getNamedChild("objectAssignmentInitializer")}get objectType(){return this.getNamedChild("objectType")}get openingElement(){return this.getNamedChild("openingElement")}get openingFragment(){return this.getNamedChild("openingFragment")}get operand(){return this.getNamedChild("operand")}get operatorToken(){return this.getNamedChild("operatorToken")}get parameterName(){return this.getNamedChild("parameterName")}get parameters(){return this.getNamedChild("parameters")}get postfixToken(){return this.getNamedChild("postfixToken")}get properties(){return this.getNamedChild("properties")}get propertyName(){return this.getNamedChild("propertyName")}get qualifier(){return this.getNamedChild("qualifier")}get questionDotToken(){return this.getNamedChild("questionDotToken")}get questionToken(){return this.getNamedChild("questionToken")}get readonlyToken(){return this.getNamedChild("readonlyToken")}get right(){return this.getNamedChild("right")}get statement(){return this.getNamedChild("statement")}get statements(){return this.getNamedChild("statements")}get tag(){return this.getNamedChild("tag")}get tagName(){return this.getNamedChild("tagName")}get tags(){return this.getNamedChild("tags")}get template(){return this.getNamedChild("template")}get templateSpans(){return this.getNamedChild("templateSpans")}get thenStatement(){return this.getNamedChild("thenStatement")}get thisArg(){return this.getNamedChild("thisArg")}get trueType(){return this.getNamedChild("trueType")}get tryBlock(){return this.getNamedChild("tryBlock")}get tupleNameSource(){return this.getNamedChild("tupleNameSource")}get type(){return this.getNamedChild("type")}get typeArguments(){return this.getNamedChild("typeArguments")}get typeExpression(){return this.getNamedChild("typeExpression")}get typeName(){return this.getNamedChild("typeName")}get typeParameter(){return this.getNamedChild("typeParameter")}get typeParameters(){return this.getNamedChild("typeParameters")}get types(){return this.getNamedChild("types")}get value(){return this.getNamedChild("value")}get variableDeclaration(){return this.getNamedChild("variableDeclaration")}get whenFalse(){return this.getNamedChild("whenFalse")}get whenTrue(){return this.getNamedChild("whenTrue")}get text(){switch(this.kind){case n.Identifier:case n.PrivateIdentifier:case n.JsxText:case n.JSDocText:case n.JSDocLink:case n.JSDocLinkPlain:case n.JSDocLinkCode:{let e=this.data&oc;return this.getString(e)}case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:case n.SourceFile:{let e=this.sourceFile._offsetExtendedData+(this.data&Ze),t=this.view.getUint32(e,!0);return this.getString(t)}}}get rawText(){switch(this.kind){case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:let e=this.sourceFile._offsetExtendedData+(this.data&Ze),t=this.view.getUint32(e+4,!0);return this.getString(t)}}get flags(){return this.view.getUint32(this._byteIndex+Ga,!0)}get modifierFlags(){let e=this.modifiers;if(!e)return B.None;let t=B.None;for(let r of e)t|=ac(r.kind);return t}}var Gr=4294967295;class cr extends qe{nodes;_offsetNodes;_offsetStringTableOffsets;_offsetStringTable;_offsetExtendedData;_offsetStructuredData;_decoder;_timing;_lineStarts;_cachedText;_cachedReferencedFiles;_cachedTypeReferenceDirectives;_cachedLibReferenceDirectives;_cachedImports;_cachedModuleAugmentations;_cachedAmbientModuleNames;constructor(e,t,r){let i=new DataView(e.buffer,e.byteOffset,e.byteLength),s=i.getUint32(tr,!0);super(i,1,void 0,void 0,s);this._sourceFile=this,this._offsetNodes=s,this._offsetStringTableOffsets=i.getUint32(Xt,!0),this._offsetStringTable=i.getUint32(Zt,!0),this._offsetExtendedData=i.getUint32(Kt,!0),this._offsetStructuredData=i.getUint32(er,!0),this._decoder=t,this._timing=r,this.nodes=Array((i.byteLength-s)/Z),this.nodes[1]=this,r?.recordSourceFileFetched(Math.max(0,this.nodes.length-2))}readFileReferences(e){if(e===Gr)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Nt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++){r.readArrayHeader();let u=r.readUint(),d=r.readUint(),x=r.readString(),_=r.readUint(),I=r.readBool();s.push({pos:u,end:d,fileName:x,resolutionMode:_,preserve:I})}return s}readNodeIndexArray(e){if(e===Gr)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Nt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++){let u=r.readUint();s.push(this.getOrCreateNodeAtIndex(u))}return s}readStringArray(e){if(e===Gr)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Nt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++)s.push(r.readString());return s}getOrCreateNodeAtIndex(e){let t=this.nodes[e];if(!t){let r=this.view.getUint32(this._offsetNodes+e*Z+Fe,!0);while(r!==e&&this.view.getUint32(this._offsetNodes+r*Z+$e,!0)===Qe)r=this.view.getUint32(this._offsetNodes+r*Z+Fe,!0);let i=r===e?this:this.getOrCreateNodeAtIndex(r);t=new qe(this.view,e,i,this,this._offsetNodes),this.nodes[e]=t,this._timing?.recordMaterialization()}return t}get extendedDataOffset(){return this._offsetExtendedData+(this.data&Ze)}get fileName(){let e=this.view.getUint32(this.extendedDataOffset+4,!0);return this.getString(e)}get path(){let e=this.view.getUint32(this.extendedDataOffset+8,!0);return this.getString(e)}get languageVariant(){return this.view.getUint32(this.extendedDataOffset+12,!0)}get scriptKind(){return this.view.getUint32(this.extendedDataOffset+16,!0)}get referencedFiles(){if(this._cachedReferencedFiles!==void 0)return this._cachedReferencedFiles;let e=this.view.getUint32(this.extendedDataOffset+20,!0),t=this.readFileReferences(e);return this._cachedReferencedFiles=t,t}get typeReferenceDirectives(){if(this._cachedTypeReferenceDirectives!==void 0)return this._cachedTypeReferenceDirectives;let e=this.view.getUint32(this.extendedDataOffset+24,!0),t=this.readFileReferences(e);return this._cachedTypeReferenceDirectives=t,t}get libReferenceDirectives(){if(this._cachedLibReferenceDirectives!==void 0)return this._cachedLibReferenceDirectives;let e=this.view.getUint32(this.extendedDataOffset+28,!0),t=this.readFileReferences(e);return this._cachedLibReferenceDirectives=t,t}get imports(){if(this._cachedImports!==void 0)return this._cachedImports;let e=this.view.getUint32(this.extendedDataOffset+32,!0),t=this.readNodeIndexArray(e);return this._cachedImports=t,t}get moduleAugmentations(){if(this._cachedModuleAugmentations!==void 0)return this._cachedModuleAugmentations;let e=this.view.getUint32(this.extendedDataOffset+36,!0),t=this.readNodeIndexArray(e);return this._cachedModuleAugmentations=t,t}get ambientModuleNames(){if(this._cachedAmbientModuleNames!==void 0)return this._cachedAmbientModuleNames;let e=this.view.getUint32(this.extendedDataOffset+40,!0),t=this.readStringArray(e);return this._cachedAmbientModuleNames=t,t}get externalModuleIndicator(){let e=this.view.getUint32(this.extendedDataOffset+44,!0);if(e===0)return;if(e===this.index)return!0;return this.getOrCreateNodeAtIndex(e)}get isDeclarationFile(){return(this.flags&Se.Ambient)!==0}get text(){if(this._cachedText!==void 0)return this._cachedText;let e=super.text;return this._cachedText=e,e}getLineStarts(){return this._lineStarts??=Ma(this.text??"")}getLineAndCharacterOfPosition(e){let t=this.getLineStarts(),r=jh(t,e);return{line:r,character:e-t[r]}}getPositionOfLineAndCharacter(e,t){let r=this.getLineStarts();if(e<0||e>=r.length)throw Error(`Bad line number. Line: ${e}, lineStarts.length: ${r.length}`);return r[e]+t}}function jh(e,t){let r=0,i=e.length-1;while(r<=i){let s=r+(i-r>>1),o=e[s];if(o<t)r=s+1;else if(o>t)i=s-1;else return s}return r-1}function cc(e){let t=e.indexOf(".");if(t===-1)throw Error(`Invalid node handle: ${e}`);let r=e.indexOf(".",t+1);if(r===-1)throw Error(`Invalid node handle: ${e}`);return{index:parseInt(e.slice(0,t),10),kind:parseInt(e.slice(t+1,r),10),path:e.slice(r+1)}}function $r(e){return new cr(e,new Xe)}function Q(e){if(!(e instanceof qe))throw Error("getNodeId requires a RemoteNode");return e.id}var Vh=/\\/g,uc=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function Wh(e){return e===47||e===92}function Fr(e){return e>=97&&e<=122||e>=65&&e<=90}function zh(e,t){let r=e.charCodeAt(t);if(r===58)return t+1;if(r===37&&e.charCodeAt(t+1)===51){let i=e.charCodeAt(t+2);if(i===97||i===65)return t+3}return-1}function Qr(e){let t=fc(e);return t<0?~t:t}function fc(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let i=e.indexOf(t===47?"/":"\\",2);if(i<0)return e.length;return i+1}if(Fr(t)&&e.charCodeAt(1)===58){let i=e.charCodeAt(2);if(i===47||i===92)return 3;if(e.length===2)return 2}let r=e.indexOf("://");if(r!==-1){let i=r+3,s=e.indexOf("/",i);if(s!==-1){let o=e.slice(0,r),u=e.slice(i,s);if(o==="file"&&(u===""||u==="localhost")&&Fr(e.charCodeAt(s+1))){let d=zh(e,s+2);if(d!==-1){if(e.charCodeAt(d)===47)return~(d+1);if(d===e.length)return~d}}return~(s+1)}return~e.length}return 0}function Yr(e){return e.length>0&&Wh(e.charCodeAt(e.length-1))}function pc(e){if(Yr(e))return e.substr(0,e.length-1);return e}function mc(e){if(!Yr(e))return e+"/";return e}function ur(e){return e.includes("\\")?e.replace(Vh,"/"):e}function Hh(e,...t){if(e)e=ur(e);for(let r of t){if(!r)continue;if(r=ur(r),!e||Qr(r)!==0)e=r;else e=mc(e)+r}return e}function hc(e){if(!uc.test(e))return e;let t=e.replace(/\/\.\//g,"/");if(t.startsWith("./"))t=t.slice(2);if(t!==e){if(e=t,!uc.test(e))return e}return}function dc(e,t){let r=Qr(e);if(r===0&&t)e=Hh(t,e),r=Qr(e);else e=ur(e);let i=hc(e);if(i!==void 0)return i.length>r?pc(i):i;let s=e.length,o=e.substring(0,r),u,d=r,x=d,_=d,I=r!==0;while(d<s){x=d;let q=e.charCodeAt(d);while(q===47&&d+1<s)d++,q=e.charCodeAt(d);if(d>x)u??=e.substring(0,x-1),x=d;let O=e.indexOf("/",d+1);if(O===-1)O=s;let F=O-x;if(F===1&&e.charCodeAt(d)===46)u??=e.substring(0,_);else if(F===2&&e.charCodeAt(d)===46&&e.charCodeAt(d+1)===46)if(!I)if(u!==void 0)u+=u.length===r?"..":"/..";else _=d+2;else if(u===void 0)if(_-2>=0)u=e.substring(0,Math.max(r,e.lastIndexOf("/",_-2)));else u=e.substring(0,_);else{let ce=u.lastIndexOf("/");if(ce!==-1)u=u.substring(0,Math.max(r,ce));else u=o;if(u.length===r)I=r!==0}else if(u!==void 0){if(u.length!==r)u+="/";I=!0,u+=e.substring(x,O)}else I=!0,_=O;d=O+1}return u??(s>r?pc(e):e)}function Gh(e){e=ur(e);let t=hc(e);if(t!==void 0)return t;return t=dc(e,""),t&&Yr(e)?mc(t):t}function $h(e){return fc(e)>0}function Tc(e,t,r){let i=$h(e)?Gh(e):dc(e,t);return r(i)}function gc(e){return e?Fh:Qh}function Fh(e){return e}function Qh(e){return e.toLowerCase()}var Yh="bundled:///";function yc(e){return e.startsWith(Yh)}function Xh(e){return e.startsWith("^/")}function xc(e){if(e.length>=2&&Fr(e.charCodeAt(0))&&e.charCodeAt(1)===58)return[e.substring(0,2).toLowerCase(),e.substring(2),!0];return["",e,!1]}var Zh={":":"%3A","/":"%2F","?":"%3F","#":"%23","[":"%5B","]":"%5D","@":"%40","!":"%21",$:"%24","&":"%26","'":"%27","(":"%28",")":"%29","*":"%2A","+":"%2B",",":"%2C",";":"%3B","=":"%3D"," ":"%20"};function lc(e){let t=e;for(let[r,i]of Object.entries(Zh))t=t.replaceAll(r,i);return t}function Ec(e){if(yc(e))return e;if(Xh(e)){let o=e.substring(2),u=o.indexOf("/");if(u===-1)throw Error("invalid file name: "+e);let d=o.substring(0,u),x=o.substring(u+1),_=x.indexOf("/");if(_===-1)throw Error("invalid file name: "+e);let I=x.substring(0,_),q=x.substring(_+1);if(I==="ts-nul-authority")return d+":"+q;return d+"://"+I+"/"+q}let[t,r]=xc(e);if(t!=="")t="/"+lc(t);if(r.startsWith("//"))r=r.substring(2);let s=r.split("/").map((o)=>lc(encodeURIComponent(o)));return"file://"+t+s.join("/")}function Xr(e){if(yc(e))return e;if(e.startsWith("file://")){let o;try{o=new URL(e)}catch{throw Error("invalid file URI: "+e)}if(o.host!=="")return"//"+o.host+o.pathname;let u=decodeURIComponent(o.pathname);if(u.length>=3&&u.charCodeAt(0)===47){let[d,x,_]=xc(u.substring(1));if(_)return d+x}return u}let t=e.indexOf(":");if(t===-1)throw Error("invalid URI: "+e);let r=e.substring(0,t),i=e.substring(t+1),s="ts-nul-authority";if(i.startsWith("//")){let o=i.substring(2),u=o.indexOf("/");if(u===-1)throw Error("invalid URI: "+e);s=o.substring(0,u),i=o.substring(u+1)}return"^/"+r+"/"+s+"/"+i}function Zr(e){if(typeof e==="string")return e;return Xr(e.uri)}function kc(e){let{openProject:t,openProjects:r,...i}=e??{},s=t!==void 0?[Zr(t),...r??[]]:r;return{...i,...s!==void 0?{openProjects:s}:{}}}function Lt(e,t){return`${e}:${t}`}class Kr{cache=new Map;snapshotProjectPaths=new Map;getRetained(e,t,r){let i=this.cache.get(e);if(!i)return;let s=Lt(t,r);return i.find((u)=>u.refs.has(s))?.file}set(e,t,r,i,s,o){let u=this.cache.get(e);if(!u)u=[],this.cache.set(e,u);let d=Lt(s,o),x=u.find((_)=>_.parseOptionsKey===r&&_.contentHash===i);if(x)return x.refs.add(d),this.trackPath(s,o,e),x.file;return u.push({file:t,contentHash:i,parseOptionsKey:r,refs:new Set([d])}),this.trackPath(s,o,e),t}retainForSnapshot(e,t,r){let i=this.snapshotProjectPaths.get(t);if(!i)return;let s=new Set(r?.removedProjects??[]),o=r?.changedProjects??{};for(let[u,d]of i){if(s.has(u))continue;let x=o[u],_;if(x){_=new Set;for(let O of x.changedFiles??[])_.add(O);for(let O of x.deletedFiles??[])_.add(O)}let I=Lt(t,u),q=Lt(e,u);for(let O of d){if(_?.has(O))continue;let F=this.cache.get(O);if(!F)continue;for(let ce of F)if(ce.refs.has(I))ce.refs.add(q),this.trackPath(e,u,O)}}}releaseSnapshot(e){let t=this.snapshotProjectPaths.get(e);if(!t)return;for(let[r,i]of t){let s=Lt(e,r);for(let o of i){let u=this.cache.get(o);if(!u)continue;for(let d=u.length-1;d>=0;d--)if(u[d].refs.delete(s),u[d].refs.size===0)u.splice(d,1);if(u.length===0)this.cache.delete(o)}}this.snapshotProjectPaths.delete(e)}trackPath(e,t,r){let i=this.snapshotProjectPaths.get(e);if(!i)i=new Map,this.snapshotProjectPaths.set(e,i);let s=i.get(t);if(!s)s=new Set,i.set(t,s);s.add(r)}clear(){this.cache.clear(),this.snapshotProjectPaths.clear()}get size(){return this.cache.size}has(e){return this.cache.has(e)}}var ie=gT(Gu(),1);var Jn=["readFile","fileExists","directoryExists","getAccessibleEntries","realpath"];import $u from"node:fs";import TT from"node:module";import Re from"node:path";import{fileURLToPath as Fu}from"node:url";function Rn(){let e=Re.dirname(Fu(import.meta.url)),t=e.replace(/\\/g,"/"),r=JSON.parse($u.readFileSync(Re.join(e,"..","package.json"),"utf8")),i=r.name,s=i.startsWith("@")?i.split("/")[1]:i,o=s==="typescript"?"tsc":"tsgo",u=r.bin&&typeof r.bin==="object"?Object.keys(r.bin):[];if(u.length!==1||u[0]!==o)throw Error(`Expected ${i} to declare exactly one bin entry named ${o}.`);let d=o,x,_=s+"-"+process.platform+"-"+process.arch;if(t.endsWith("/_packages/"+s+"/lib"))x=Re.resolve(e,"..","..","..","built","local"),d="tsgo";else if(t.endsWith("/built/npm/"+s+"/lib"))x=Re.resolve(e,"..","..",_,"lib");else{let q="@typescript/"+_;try{if(typeof import.meta.resolve>"u"){let F=TT.createRequire(import.meta.url).resolve(q+"/package.json");x=Re.join(Re.dirname(F),"lib")}else{let O=import.meta.resolve(q+"/package.json"),F=Fu(O);x=Re.join(Re.dirname(F),"lib")}}catch(O){throw Error("Unable to resolve "+q+". Either your platform is unsupported, or you are missing the package on disk.")}}let I=Re.join(x,d);if(process.platform==="win32"){if(I+=".exe",I.length>=248)I="\\\\?\\"+I}if(!$u.existsSync(I))throw Error("Executable not found: "+I);return I}function On(e){return!("pipe"in e)}function Qu(e){return e.tsserverPath??Rn()}function vn(){return{requestCount:0,roundTripMs:0,bytesSent:0,bytesReceived:0,serverTimeMs:0,transportOverheadMs:0,nodesMaterialized:0,sourceFilesFetched:0,nodesFetched:0}}function Yu(){return{enabled:!1,totals:vn(),recentRequests:[]}}function Xu(){return{enabled:!1,totals:{requestCount:0,totalProcessingTimeMs:0},recentRequests:[]}}function Zu(e,t){if(!e.enabled)return e;let r=t.totals.totalProcessingTimeMs,i={...e.totals,serverTimeMs:r,transportOverheadMs:Math.max(0,e.totals.roundTripMs-r)},s=e.recentRequests.map((d)=>({...d})),o=t.recentRequests,u=Math.min(s.length,o.length);for(let d=1;d<=u;d++){let x=s[s.length-d],_=o[o.length-d];if(x.method===_.method)x.serverTimeMs=_.processingTimeMs,x.transportOverheadMs=Math.max(0,x.roundTripMs-_.processingTimeMs)}return{enabled:!0,totals:i,recentRequests:s}}class Mn{totals=vn();ring=[];head=0;record(e){this.totals.requestCount++,this.totals.roundTripMs+=e.roundTripMs,this.totals.bytesSent+=e.bytesSent,this.totals.bytesReceived+=e.bytesReceived;let t={method:e.method,roundTripMs:e.roundTripMs,bytesSent:e.bytesSent,bytesReceived:e.bytesReceived,timestamp:Date.now()};if(this.ring.length<5)this.ring.push(t);else this.ring[this.head]=t,this.head=(this.head+1)%5}recordMaterialization(){this.totals.nodesMaterialized++}recordSourceFileFetched(e){this.totals.sourceFilesFetched++,this.totals.nodesFetched+=e}getInfo(){let e=[];for(let t=0;t<this.ring.length;t++)e.push(this.ring[(this.head+t)%this.ring.length]);return{enabled:!0,totals:{...this.totals},recentRequests:e}}reset(){this.totals=vn(),this.ring=[],this.head=0}}class qn{socket;process;connection;options;connected=!1;timing;constructor(e){if(this.options=e,On(e)&&e.collectTiming)this.timing=new Mn}async connect(){if(this.connected)return;if(On(this.options))await this.connectViaSpawn(this.options);else await this.connectViaSocket(this.options)}async connectViaSpawn(e){let{spawn:t}=await import("node:child_process");return new Promise((r,i)=>{let s=["--api","--async","--cwd",e.cwd??process.cwd()];if(e.collectTiming)s.push("--timing");let o=[];if(e.fs){for(let x of Jn)if(e.fs[x])o.push(x)}if(o.length>0)s.push(`--callbacks=${o.join(",")}`);this.process=t(Qu(e),s,{stdio:["pipe","pipe","inherit"]}),this.process.once("error",(x)=>{i(Error(`Failed to start tsgo process: ${x.message}`))}),this.process.once("spawn",()=>{this.connected=!0,r()});let u=new ie.StreamMessageReader(this.process.stdout),d=new ie.StreamMessageWriter(this.process.stdin);this.connection=ie.createMessageConnection(u,d),this.registerFSCallbacks(this.connection,e.fs),this.connection.listen()})}async connectViaSocket(e){let{createConnection:t}=await import("node:net");return new Promise((r,i)=>{this.socket=t(e.pipe,()=>{let s=new ie.SocketMessageReader(this.socket),o=new ie.SocketMessageWriter(this.socket);this.connection=ie.createMessageConnection(s,o),this.connection.listen(),this.connected=!0,r()}),this.socket.once("error",(s)=>{i(Error(`Socket error: ${s.message}`))})})}registerFSCallbacks(e,t){if(!t)return;for(let r of Jn){let i=t[r];if(i){let s=new ie.RequestType(r);e.onRequest(s,(o)=>{let u=i(o);if(r==="readFile"){if(u===void 0)return null;return{content:u}}return u??null})}}}async apiRequest(e,t){if(!this.connected)await this.connect();if(!this.connection)throw Error("Connection not established");let r=new ie.RequestType(e);if(!this.timing)return this.connection.sendRequest(r,t);let i=t===void 0?0:Buffer.byteLength(JSON.stringify(t),"utf-8"),s=performance.now(),o=await this.connection.sendRequest(r,t),u=performance.now()-s;return this.timing.record({method:e,roundTripMs:u,bytesSent:i,bytesReceived:o===void 0||o===null?0:Buffer.byteLength(JSON.stringify(o),"utf-8")}),o}async apiRequestBinary(e,t){let r=await this.apiRequest(e,t);if(!r)return;let i=Buffer.from(r.data,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}getTimingCollector(){return this.timing}async getTimingInfo(){if(!this.timing)return Yu();let e=this.timing.getInfo();if(!this.connected||!this.connection)return e;return Zu(e,await this.fetchServerTiming())}async resetTimingInfo(){if(!this.timing)return;if(this.timing.reset(),this.connected&&this.connection){let e=new ie.RequestType("resetServerTiming");await this.connection.sendRequest(e,void 0)}}async fetchServerTiming(){if(!this.connection)return Xu();let e=new ie.RequestType("getServerTiming");return this.connection.sendRequest(e,void 0)}async close(){if(this.connection)this.connection.dispose(),this.connection=void 0;if(this.socket)this.socket.destroy(),this.socket=void 0;if(this.process)this.process.stdin?.end(),this.process=void 0;this.connected=!1}}class Ku{client;sourceFileCache;toPath;initialized=!1;activeSnapshots=new Set;latestSnapshot;internal;constructor(e={}){this.client=new qn(e),this.sourceFileCache=new Kr,this.internal=new ep(this.client,()=>this.ensureInitialized())}static async fromLSPConnection(e){let t=new Ku(e);return await t.ensureInitialized(),t}async ensureInitialized(){if(!this.initialized){let e=await this.client.apiRequest("initialize",null),t=gc(e.useCaseSensitiveFileNames),r=e.currentDirectory;this.toPath=(i)=>Tc(i,r,t),this.initialized=!0}}async parseConfigFile(e){return await this.ensureInitialized(),this.client.apiRequest("parseConfigFile",{file:e})}async updateSnapshot(e){await this.ensureInitialized();let t=kc(e),r=await this.client.apiRequest("updateSnapshot",t);if(this.latestSnapshot){if(this.sourceFileCache.retainForSnapshot(r.snapshot,this.latestSnapshot.id,r.changes),this.latestSnapshot.isDisposed())this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id)}let i=new tp(r,this.client,this.sourceFileCache,this.toPath,()=>{if(this.activeSnapshots.delete(i),i!==this.latestSnapshot)this.sourceFileCache.releaseSnapshot(i.id)});return this.latestSnapshot=i,this.activeSnapshots.add(i),i}async close(){for(let e of[...this.activeSnapshots])await e.dispose();if(this.latestSnapshot)this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id),this.latestSnapshot=void 0;await this.client.close(),this.sourceFileCache.clear()}clearSourceFileCache(){this.sourceFileCache.clear()}getTimingInfo(){return this.client.getTimingInfo()}resetTimingInfo(){return this.client.resetTimingInfo()}}class ep{client;ensureInitialized;constructor(e,t){this.client=e,this.ensureInitialized=t}async startCPUProfile(e){await this.ensureInitialized(),await this.client.apiRequest("startCPUProfile",{dir:e})}async stopCPUProfile(){return await this.ensureInitialized(),(await this.client.apiRequest("stopCPUProfile",null)).file}async saveHeapProfile(e){return await this.ensureInitialized(),(await this.client.apiRequest("saveHeapProfile",{dir:e})).file}}class tp{id;projectMap;toPath;client;disposed=!1;onDispose;snapshotRegistry;constructor(e,t,r,i,s){this.id=e.snapshot,this.client=t,this.toPath=i,this.onDispose=s,this.projectMap=new Map,this.snapshotRegistry=new rp(t,this.id,(o)=>this.projectMap.get(o));for(let o of e.projects){let u=new ip(o,this.id,t,r,i,this.snapshotRegistry);this.projectMap.set(i(o.configFileName),u)}}getProjects(){return this.ensureNotDisposed(),[...this.projectMap.values()]}getProject(e){return this.ensureNotDisposed(),this.projectMap.get(this.toPath(e))}async getDefaultProjectForFile(e){this.ensureNotDisposed();let t=await this.client.apiRequest("getDefaultProjectForFile",{snapshot:this.id,file:e});if(!t)return;return this.projectMap.get(this.toPath(t.configFileName))}[globalThis.Symbol.dispose](){this.dispose()}async dispose(){if(this.disposed)return;this.disposed=!0;for(let e of this.projectMap.values())e.dispose();this.projectMap.clear(),this.snapshotRegistry.clear(),this.onDispose(),await this.client.apiRequest("release",{snapshot:this.id})}isDisposed(){return this.disposed}ensureNotDisposed(){if(this.disposed)throw Error("Snapshot is disposed")}}class rp{symbols=new Map;client;snapshotId;resolveProject;constructor(e,t,r){this.client=e,this.snapshotId=t,this.resolveProject=r}getProject(e){return this.resolveProject(e)}getOrCreateSymbol(e){let t=this.symbols.get(e.id);if(!t)t=new cp(e,this),this.symbols.set(e.id,t);return t}getSymbol(e){return this.symbols.get(e)}clear(){this.symbols.clear()}async fetchSymbol(e,t,r,i){if(!r)return;let s=this.getSymbol(r);if(s)return s;let o=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:i,objectId:e.id});if(!o)throw Error(`${t} returned null symbol for ${e.constructor.name} ${e.id}`);return this.getOrCreateSymbol(o)}async fetchSymbols(e,t,r,i){if(r){let o=Array(r.length),u=!0;for(let d=0;d<r.length;d++){let x=this.getSymbol(r[d]);if(!x){u=!1;break}o[d]=x}if(u)return o}let s=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:i,objectId:e.id});if(s==null)return[];else return s.map((o)=>this.getOrCreateSymbol(o))}}class np{client;snapshotId;project;snapshotRegistry;types=new Map;signatures=new Map;constructor(e,t,r,i){this.client=e,this.snapshotId=t,this.project=r,this.snapshotRegistry=i}getOrCreateSymbol(e){return this.snapshotRegistry.getOrCreateSymbol(e)}getSymbol(e){return this.snapshotRegistry.getSymbol(e)}getOrCreateType(e){let t=this.types.get(e.id);if(!t)t=new up(e,this),this.types.set(e.id,t);return t}getType(e){return this.types.get(e)}getOrCreateSignature(e){let t=this.signatures.get(e.id);if(!t)t=new lp(e,this.project,this),this.signatures.set(e.id,t);return t}getSignature(e){return this.signatures.get(e)}clear(){this.types.clear(),this.signatures.clear()}async fetchType(e,t,r){if(r!==!1){if(!r)return;let s=this.getType(r);if(s)return s}let i=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(!i)throw Error(`${t} returned null type for ${e.constructor.name} ${e.id}`);return this.getOrCreateType(i)}async fetchSymbol(e,t,r){return this.snapshotRegistry.fetchSymbol(e,t,r,this.project.id)}async fetchSignature(e,t,r){if(!r)return;let i=this.getSignature(r);if(i)return i;let s=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(!s)throw Error(`${t} returned null signature for ${e.constructor.name} ${e.id}`);return this.getOrCreateSignature(s)}async fetchTypes(e,t,r){if(r){let s=Array(r.length),o=!0;for(let u=0;u<r.length;u++){let d=this.getType(r[u]);if(!d){o=!1;break}s[u]=d}if(o)return s}let i=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(i==null)return[];else return i.map((s)=>this.getOrCreateType(s))}async fetchSymbols(e,t,r){return this.snapshotRegistry.fetchSymbols(e,t,r,this.project.id)}async fetchBaseTypes(e){let t=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:e.id});if(t==null)return[];return t.map((r)=>this.getOrCreateType(r))}}class ip{id;configFileName;compilerOptions;rootFiles;program;checker;emitter;client;constructor(e,t,r,i,s,o){this.id=e.id,this.configFileName=e.configFileName,this.compilerOptions=e.compilerOptions,this.rootFiles=e.rootFiles,this.client=r,this.program=new sp(t,this,r,i,s);let u=new np(r,t,this,o);this.checker=new op(t,this,r,u),this.emitter=new ap(r)}dispose(){this.checker.dispose()}}class sp{snapshotId;project;client;sourceFileCache;toPath;decoder=new Xe;sourceFileMetadataCache=new Map;constructor(e,t,r,i,s){this.snapshotId=e,this.project=t,this.client=r,this.sourceFileCache=i,this.toPath=s}getCompilerOptions(){return this.project.compilerOptions}async getSourceFile(e){let t=Zr(e),r=this.toPath(t),i=this.sourceFileCache.getRetained(r,this.snapshotId,this.project.id);if(i)return i;let s=await this.client.apiRequestBinary("getSourceFile",{snapshot:this.snapshotId,project:this.project.id,file:e});if(!s)return;let o=new DataView(s.buffer,s.byteOffset,s.byteLength),u=zr(o),d=Hr(o),x=new cr(s,this.decoder,this.client.getTimingCollector());return this.sourceFileCache.set(r,x,d,u,this.snapshotId,this.project.id)}async getSourceFileNames(){return await this.client.apiRequest("getSourceFileNames",{snapshot:this.snapshotId,project:this.project.id})??[]}getSourceFileMetadata(e){return this.getSourceFileMetadataByPath(this.toPath(e))}getSourceFileMetadataByPath(e){let t=this.sourceFileMetadataCache.get(e);if(t===void 0)t=this.fetchSourceFileMetadata(e),this.sourceFileMetadataCache.set(e,t);return t}async fetchSourceFileMetadata(e){return await this.client.apiRequest("getSourceFileMetadata",{snapshot:this.snapshotId,project:this.project.id,file:e})??void 0}async isSourceFileFromExternalLibrary(e){return(await this.getSourceFileMetadataByPath(e.path))?.isFromExternalLibrary??!1}async isSourceFileDefaultLibrary(e){return(await this.getSourceFileMetadataByPath(e.path))?.isDefaultLibrary??!1}async getSyntacticDiagnostics(e){return await this.client.apiRequest("getSyntacticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getBindDiagnostics(e){return await this.client.apiRequest("getBindDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getSemanticDiagnostics(e){return await this.client.apiRequest("getSemanticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getSuggestionDiagnostics(e){return await this.client.apiRequest("getSuggestionDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getDeclarationDiagnostics(e){return await this.client.apiRequest("getDeclarationDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getProgramDiagnostics(){return await this.client.apiRequest("getProgramDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}async getGlobalDiagnostics(){return await this.client.apiRequest("getGlobalDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}async getConfigFileParsingDiagnostics(){return await this.client.apiRequest("getConfigFileParsingDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}}class op{snapshotId;project;client;objectRegistry;wellKnownSymbols;constructor(e,t,r,i){this.snapshotId=e,this.project=t,this.client=r,this.objectRegistry=i}dispose(){this.objectRegistry.clear()}async getSymbolAtLocation(e){if(Array.isArray(e))return(await this.client.apiRequest("getSymbolsAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:e.map((i)=>Q(i))})).map((i)=>i?this.objectRegistry.getOrCreateSymbol(i):void 0);let t=await this.client.apiRequest("getSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getSymbolAtPosition(e,t){if(typeof t==="number"){let i=await this.client.apiRequest("getSymbolAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t});return i?this.objectRegistry.getOrCreateSymbol(i):void 0}return(await this.client.apiRequest("getSymbolsAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:e,positions:t})).map((i)=>i?this.objectRegistry.getOrCreateSymbol(i):void 0)}async getTypeOfSymbol(e){if(Array.isArray(e))return(await this.client.apiRequest("getTypesOfSymbols",{snapshot:this.snapshotId,project:this.project.id,symbols:e.map((i)=>i.id)})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0);let t=await this.client.apiRequest("getTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getDeclaredTypeOfSymbol(e){let t=await this.client.apiRequest("getDeclaredTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});if(!t)throw Error(`getDeclaredTypeOfSymbol returned no type for symbol ${e.id}`);return this.objectRegistry.getOrCreateType(t)}async getReferencesToSymbolInFile(e,t){return(await this.client.apiRequest("getReferencesToSymbolInFile",{snapshot:this.snapshotId,project:this.project.id,file:e,symbol:t.id})??[]).map((i)=>new Pe(i,this.project))}async getReferencedSymbolsForNode(e,t){return(await this.client.apiRequest("getReferencedSymbolsForNode",{snapshot:this.snapshotId,project:this.project.id,node:Q(e),position:t})??[]).map((i)=>({definition:new Pe(i.definition,this.project),symbol:i.symbol?this.objectRegistry.getOrCreateSymbol(i.symbol):void 0,references:(i.references??[]).map((s)=>new Pe(s,this.project))}))}async getSignatureUsage(e){return(await this.client.apiRequest("getSignatureUsages",{snapshot:this.snapshotId,project:this.project.id,signatureDecl:Q(e)})??[]).map((r)=>({name:new Pe(r.name,this.project),call:r.call?new Pe(r.call,this.project):void 0}))}async getCompletionsAtPosition(e,t,r){let i=await this.client.apiRequest("getCompletionsAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t,triggerCharacter:r?.triggerCharacter,includeSymbol:r?.includeSymbol});if(!i)return;return{isIncomplete:i.isIncomplete,entries:i.entries.map((s)=>({...s,symbol:s.symbol?this.objectRegistry.getOrCreateSymbol(s.symbol):void 0}))}}async getTypeAtLocation(e){if(Array.isArray(e))return(await this.client.apiRequest("getTypeAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:e.map((i)=>Q(i))})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0);let t=await this.client.apiRequest("getTypeAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getSignaturesOfType(e,t){return(await this.client.apiRequest("getSignaturesOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id,kind:t})).map((i)=>this.objectRegistry.getOrCreateSignature(i))}async getResolvedSignature(e){let t=await this.client.apiRequest("getResolvedSignature",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateSignature(t):void 0}async getTypeAtPosition(e,t){if(typeof t==="number"){let i=await this.client.apiRequest("getTypeAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t});return i?this.objectRegistry.getOrCreateType(i):void 0}return(await this.client.apiRequest("getTypesAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:e,positions:t})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0)}async resolveName(e,t,r,i){let s=r&&"kind"in r,o=await this.client.apiRequest("resolveName",{snapshot:this.snapshotId,project:this.project.id,name:e,meaning:t,location:s?Q(r):void 0,file:!s&&r?r.document:void 0,position:!s&&r?r.position:void 0,excludeGlobals:i});return o?this.objectRegistry.getOrCreateSymbol(o):void 0}async getResolvedSymbol(e){let t=e.text;if(!t)return;return this.resolveName(t,kt.Value|kt.ExportValue,e)}async getContextualType(e){let t=await this.client.apiRequest("getContextualType",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getBaseTypeOfLiteralType(e){let t=await this.client.apiRequest("getBaseTypeOfLiteralType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getNonNullableType(e){let t=await this.client.apiRequest("getNonNullableType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getTypeFromTypeNode(e){let t=await this.client.apiRequest("getTypeFromTypeNode",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getWidenedType(e){let t=await this.client.apiRequest("getWidenedType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getParameterType(e,t){let r=await this.client.apiRequest("getParameterType",{snapshot:this.snapshotId,project:this.project.id,signature:e.id,index:t});return r?this.objectRegistry.getOrCreateType(r):void 0}async isArrayLikeType(e){return this.client.apiRequest("isArrayLikeType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async isTypeAssignableTo(e,t){return this.client.apiRequest("isTypeAssignableTo",{snapshot:this.snapshotId,project:this.project.id,source:e.id,target:t.id})}async getShorthandAssignmentValueSymbol(e){let t=await this.client.apiRequest("getShorthandAssignmentValueSymbol",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getTypeOfSymbolAtLocation(e,t){let r=await this.client.apiRequest("getTypeOfSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id,location:Q(t)});if(!r)throw Error(`getTypeOfSymbolAtLocation returned no type for symbol ${e.id}`);return this.objectRegistry.getOrCreateType(r)}async getIntrinsicType(e){let t=await this.client.apiRequest(e,{snapshot:this.snapshotId,project:this.project.id});return this.objectRegistry.getOrCreateType(t)}async getAnyType(){return this.getIntrinsicType("getAnyType")}async getStringType(){return this.getIntrinsicType("getStringType")}async getNumberType(){return this.getIntrinsicType("getNumberType")}async getBooleanType(){return this.getIntrinsicType("getBooleanType")}async getVoidType(){return this.getIntrinsicType("getVoidType")}async getUndefinedType(){return this.getIntrinsicType("getUndefinedType")}async getNullType(){return this.getIntrinsicType("getNullType")}async getNeverType(){return this.getIntrinsicType("getNeverType")}async getUnknownType(){return this.getIntrinsicType("getUnknownType")}async getBigIntType(){return this.getIntrinsicType("getBigIntType")}async getESSymbolType(){return this.getIntrinsicType("getESSymbolType")}async typeToTypeNode(e,t,r){let i=await this.client.apiRequestBinary("typeToTypeNode",{snapshot:this.snapshotId,project:this.project.id,type:e.id,location:t?Q(t):void 0,flags:r});if(!i)return;return $r(i)}async signatureToSignatureDeclaration(e,t,r,i){let s=await this.client.apiRequestBinary("signatureToSignatureDeclaration",{snapshot:this.snapshotId,project:this.project.id,signature:e.id,kind:t,location:r?Q(r):void 0,flags:i});if(!s)return;return $r(s)}async typeToString(e,t,r){return this.client.apiRequest("typeToString",{snapshot:this.snapshotId,project:this.project.id,type:e.id,location:t?Q(t):void 0,flags:r})}async isContextSensitive(e){return this.client.apiRequest("isContextSensitive",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)})}async isArrayType(e){return this.client.apiRequest("isArrayType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async isTupleType(e){return this.client.apiRequest("isTupleType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async getReturnTypeOfSignature(e){let t=await this.client.apiRequest("getReturnTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getRestTypeOfSignature(e){let t=await this.client.apiRequest("getRestTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getTypePredicateOfSignature(e){let t=await this.client.apiRequest("getTypePredicateOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});if(!t)return;return{kind:t.kind,parameterIndex:t.parameterIndex,parameterName:t.parameterName,type:t.type?this.objectRegistry.getOrCreateType(t.type):void 0}}async getBaseTypes(e){let t=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateType(r)):[]}async getApparentType(e){let t=await this.client.apiRequest("getApparentType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getPropertiesOfType(e){let t=await this.client.apiRequest("getPropertiesOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateSymbol(r)):[]}async getIndexInfosOfType(e){let t=await this.client.apiRequest("getIndexInfosOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});if(!t)return[];return t.map((r)=>({keyType:this.objectRegistry.getOrCreateType(r.keyType),valueType:this.objectRegistry.getOrCreateType(r.valueType),isReadonly:r.isReadonly??!1,declaration:r.declaration?new Pe(r.declaration,this.project):void 0}))}async getConstraintOfTypeParameter(e){let t=await this.client.apiRequest("getConstraintOfTypeParameter",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getBaseConstraintOfType(e){let t=await this.client.apiRequest("getBaseConstraintOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getPropertyOfType(e,t){let r=await this.client.apiRequest("getPropertyOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id,name:t});return r?this.objectRegistry.getOrCreateSymbol(r):void 0}async getConstantValue(e){return await this.client.apiRequest("getConstantValue",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)})??void 0}async getSignatureFromDeclaration(e){let t=await this.client.apiRequest("getSignatureFromDeclaration",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateSignature(t):void 0}async getExportSpecifierLocalTargetSymbol(e){let t=await this.client.apiRequest("getExportSpecifierLocalTargetSymbol",{snapshot:this.snapshotId,project:this.project.id,location:Q(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getAliasedSymbol(e){let t=await this.client.apiRequest("getAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});if(!t)throw Error(`getAliasedSymbol returned no symbol for symbol ${e.id}`);return this.objectRegistry.getOrCreateSymbol(t)}async getImmediateAliasedSymbol(e){let t=await this.client.apiRequest("getImmediateAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}getWellKnownSymbols(){return this.wellKnownSymbols??=this.client.apiRequest("getWellKnownSymbols",{snapshot:this.snapshotId,project:this.project.id})}async isUnknownSymbol(e){return e.id===(await this.getWellKnownSymbols()).unknown}async isUndefinedSymbol(e){return e.id===(await this.getWellKnownSymbols()).undefined}async isArgumentsSymbol(e){return e.id===(await this.getWellKnownSymbols()).arguments}async getExportsOfModule(e){let t=await this.client.apiRequest("getExportsOfModule",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateSymbol(r)):[]}async getMemberInModuleExports(e,t){let r=await this.client.apiRequest("getMemberInModuleExports",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id,name:t});return r?this.objectRegistry.getOrCreateSymbol(r):void 0}async getJsDocTagsOfSymbol(e){return await this.client.apiRequest("getJsDocTags",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id})??[]}async getDocumentationCommentOfSymbol(e){return this.client.apiRequest("getDocumentationComment",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id})}async getTypeArguments(e){let t=await this.client.apiRequest("getTypeArguments",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateType(r)):[]}}class ap{client;constructor(e){this.client=e}async printNode(e,t={}){let r=tc(e),i=rc(r);return this.client.apiRequest("printNode",{data:i,...t})}}class Pe{canonicalProject;index;kind;path;constructor(e,t){let r=cc(e);this.index=r.index,this.kind=r.kind,this.path=r.path,this.canonicalProject=t}async resolve(e=this.canonicalProject){let t=await e.program.getSourceFile(this.path);if(!t)return;return t.getOrCreateNodeAtIndex(this.index)}}class cp{objectRegistry;canonicalProject;id;escapedName;name;flags;checkFlags;declarations;valueDeclaration;parent;exportSymbol;membersCache;exportsCache;constructor(e,t){this.objectRegistry=t,this.id=e.id,this.escapedName=e.name,this.name=$n(e.name),this.flags=e.flags,this.checkFlags=e.checkFlags;let r=t.getProject(e.project);if(!r)throw Error(`Symbol ${e.id} references unknown canonical project '${e.project}'`);if(this.canonicalProject=r,this.declarations=(e.declarations??[]).map((i)=>new Pe(i,r)),this.valueDeclaration=e.valueDeclaration?new Pe(e.valueDeclaration,r):void 0,e.parent!==void 0)this.parent=e.parent;if(e.exportSymbol!==void 0)this.exportSymbol=e.exportSymbol}async getParent(){return this.objectRegistry.fetchSymbol(this,"getParentOfSymbol",this.parent,this.canonicalProject.id)}getMembers(){return this.membersCache??=this.fetchSymbolTable("getMembersOfSymbol")}getExports(){return this.exportsCache??=this.fetchSymbolTable("getExportsOfSymbol")}async fetchSymbolTable(e){let t=await this.objectRegistry.fetchSymbols(this,e,void 0,this.canonicalProject.id),r=new Map;for(let i of t)r.set(i.escapedName,i);return r}async getExportSymbol(){if(!this.exportSymbol)return this;return this.objectRegistry.fetchSymbol(this,"getExportSymbolOfSymbol",this.exportSymbol,this.canonicalProject.id)}async getJsDocTags(e){return e.getJsDocTagsOfSymbol(this)}async getDocumentationComment(e){return e.getDocumentationCommentOfSymbol(this)}}class up{objectRegistry;id;flags;objectFlags;symbol;value;intrinsicName;isThisType;freshType;regularType;target;typeParameters;outerTypeParameters;localTypeParameters;aliasTypeArguments;aliasSymbol;elementFlags;fixedLength;readonly;texts;objectType;indexType;checkType;extendsType;baseType;substConstraint;trueType;falseType;constructor(e,t){if(this.objectRegistry=t,this.id=e.id,this.flags=e.flags,e.objectFlags!==void 0)this.objectFlags=e.objectFlags;if(e.symbol!==void 0)this.symbol=e.symbol;if(e.value!=null)this.value=e.flags&G.BigIntLiteral?BigInt(e.value):e.value;if(e.intrinsicName!==void 0)this.intrinsicName=e.intrinsicName;if(e.isThisType!==void 0)this.isThisType=e.isThisType;if(e.freshType!==void 0)this.freshType=e.freshType;if(e.regularType!==void 0)this.regularType=e.regularType;if(e.target!==void 0)this.target=e.target;if(this.typeParameters=e.typeParameters??[],this.outerTypeParameters=e.outerTypeParameters??[],this.localTypeParameters=e.localTypeParameters??[],this.aliasTypeArguments=e.aliasTypeArguments??[],e.aliasSymbol!==void 0)this.aliasSymbol=e.aliasSymbol;if(e.elementFlags!==void 0)this.elementFlags=e.elementFlags;if(e.fixedLength!==void 0)this.fixedLength=e.fixedLength;if(e.readonly!==void 0)this.readonly=e.readonly;if(e.texts!==void 0)this.texts=e.texts;if(e.objectType!==void 0)this.objectType=e.objectType;if(e.indexType!==void 0)this.indexType=e.indexType;if(e.checkType!==void 0)this.checkType=e.checkType;if(e.extendsType!==void 0)this.extendsType=e.extendsType;if(e.baseType!==void 0)this.baseType=e.baseType;if(e.substConstraint!==void 0)this.substConstraint=e.substConstraint;this.trueType=!1,this.falseType=!1}async getSymbol(){return this.objectRegistry.fetchSymbol(this,"getSymbolOfType",this.symbol)}async getAliasSymbol(){return this.objectRegistry.fetchSymbol(this,"getAliasSymbolOfType",this.aliasSymbol)}async getTarget(){return this.objectRegistry.fetchType(this,"getTargetOfType",this.target)}async getFreshType(){return this.objectRegistry.fetchType(this,"getFreshTypeOfType",this.freshType)}async getRegularType(){return this.objectRegistry.fetchType(this,"getRegularTypeOfType",this.regularType)}async getTypes(){if(!(this.flags&(G.UnionOrIntersection|G.TemplateLiteral)))return;return this.objectRegistry.fetchTypes(this,"getTypesOfType")}async getTypeParameters(){return this.objectRegistry.fetchTypes(this,"getTypeParametersOfType",this.typeParameters)}async getOuterTypeParameters(){return this.objectRegistry.fetchTypes(this,"getOuterTypeParametersOfType",this.outerTypeParameters)}async getLocalTypeParameters(){return this.objectRegistry.fetchTypes(this,"getLocalTypeParametersOfType",this.localTypeParameters)}async getAliasTypeArguments(){return this.objectRegistry.fetchTypes(this,"getAliasTypeArgumentsOfType",this.aliasTypeArguments)}async getObjectType(){return this.objectRegistry.fetchType(this,"getObjectTypeOfType",this.objectType)}async getIndexType(){return this.objectRegistry.fetchType(this,"getIndexTypeOfType",this.indexType)}async getCheckType(){return this.objectRegistry.fetchType(this,"getCheckTypeOfType",this.checkType)}async getExtendsType(){return this.objectRegistry.fetchType(this,"getExtendsTypeOfType",this.extendsType)}async getBaseType(){return this.objectRegistry.fetchType(this,"getBaseTypeOfType",this.baseType)}async getConstraint(){return this.objectRegistry.fetchType(this,"getConstraintOfType",this.substConstraint)}async getTrueType(){let e=await this.objectRegistry.fetchType(this,"getTrueTypeOfConditionalType",this.trueType);return this.trueType=e.id,e}async getFalseType(){let e=await this.objectRegistry.fetchType(this,"getFalseTypeOfConditionalType",this.falseType);return this.falseType=e.id,e}async getBaseTypes(){if(!this.isClassOrInterface())return;return this.objectRegistry.fetchBaseTypes(this)}isClassOrInterface(){return ET(this)}isUnionType(){return yT(this)}isIntersectionType(){return xT(this)}isObjectType(){return Er(this)}isIntrinsicType(){return pp(this)}isErrorType(){return kT(this)}isLiteralType(){return wT(this)}isStringLiteralType(){return DT(this)}isNumberLiteralType(){return ST(this)}isBigIntLiteralType(){return _T(this)}isBooleanLiteralType(){return PT(this)}isTypeReference(){return AT(this)}isTupleType(){return bT(this)}isIndexType(){return IT(this)}isIndexedAccessType(){return CT(this)}isConditionalType(){return NT(this)}isSubstitutionType(){return LT(this)}isTemplateLiteralType(){return JT(this)}isStringMappingType(){return RT(this)}isTypeParameter(){return OT(this)}}function yT(e){return(e.flags&G.Union)!==0}function xT(e){return(e.flags&G.Intersection)!==0}function Er(e){return(e.flags&G.Object)!==0}function ET(e){return Er(e)&&(e.objectFlags&it.ClassOrInterface)!==0}function pp(e){return(e.flags&G.Intrinsic)!==0}function kT(e){return pp(e)&&e.intrinsicName==="error"}function wT(e){return(e.flags&G.Literal)!==0}function DT(e){return(e.flags&G.StringLiteral)!==0}function ST(e){return(e.flags&G.NumberLiteral)!==0}function _T(e){return(e.flags&G.BigIntLiteral)!==0}function PT(e){return(e.flags&G.BooleanLiteral)!==0}function AT(e){return Er(e)&&(e.objectFlags&it.Reference)!==0}function bT(e){return Er(e)&&(e.objectFlags&it.Tuple)!==0}function IT(e){return(e.flags&G.Index)!==0}function CT(e){return(e.flags&G.IndexedAccess)!==0}function NT(e){return(e.flags&G.Conditional)!==0}function LT(e){return(e.flags&G.Substitution)!==0}function JT(e){return(e.flags&G.TemplateLiteral)!==0}function RT(e){return(e.flags&G.StringMapping)!==0}function OT(e){return(e.flags&G.TypeParameter)!==0}class lp{flags;objectRegistry;id;declaration;typeParameters;parameters;thisParameter;target;constructor(e,t,r){this.id=e.id,this.flags=e.flags,this.objectRegistry=r,this.declaration=e.declaration?new Pe(e.declaration,t):void 0,this.typeParameters=e.typeParameters??[],this.parameters=e.parameters??[],this.thisParameter=e.thisParameter,this.target=e.target}async getTypeParameters(){return this.objectRegistry.fetchTypes(this,"getTypeParametersOfSignature",this.typeParameters)}async getParameters(){return this.objectRegistry.fetchSymbols(this,"getParametersOfSignature",this.parameters)}async getThisParameter(){return this.objectRegistry.fetchSymbol(this,"getThisParameterOfSignature",this.thisParameter)}async getTarget(){return this.objectRegistry.fetchSignature(this,"getTargetOfSignature",this.target)}get hasRestParameter(){return(this.flags&st.HasRestParameter)!==0}get isConstruct(){return(this.flags&st.Construct)!==0}get isAbstract(){return(this.flags&st.Abstract)!==0}}export{Ku as API,op as Checker,_r as CompletionItemKind,Pr as DiagnosticCategory,Ar as ElementFlags,ap as Emitter,ep as InternalAPI,B as ModifierFlags,br as ModuleKind,Ir as NodeBuilderFlags,Pe as NodeHandle,it as ObjectFlags,sp as Program,ip as Project,lp as Signature,st as SignatureFlags,Cr as SignatureKind,tp as Snapshot,cp as Symbol,kt as SymbolFlags,G as TypeFlags,Nr as TypePredicateKind,Xr as documentURIToFileName,Ec as fileNameToDocumentURI,_T as isBigIntLiteralType,PT as isBooleanLiteralType,ET as isClassOrInterfaceType,NT as isConditionalType,kT as isErrorType,IT as isIndexType,CT as isIndexedAccessType,xT as isIntersectionType,pp as isIntrinsicType,wT as isLiteralType,ST as isNumberLiteralType,Er as isObjectType,DT as isStringLiteralType,RT as isStringMappingType,LT as isSubstitutionType,JT as isTemplateLiteralType,bT as isTupleType,OT as isTypeParameter,AT as isTypeReference,yT as isUnionType};