sveld 0.37.9 → 0.38.1

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{createRequire as Mp}from"node:module";var Cp=Object.create;var{getPrototypeOf:Np,defineProperty:$n,getOwnPropertyNames:Lp}=Object;var Fn=Object.prototype.hasOwnProperty;function Jp(e){return this[e]}var Rp,Op,vp=(e,t,r)=>{var i=e!=null&&typeof e==="object";if(i){var s=t?Rp??=new WeakMap:Op??=new WeakMap,o=s.get(e);if(o)return o}r=e!=null?Cp(Np(e)):{};let u=t||!e||!e.__esModule||!Fn.call(e,"default")?$n(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let f of Lp(e))if(!Fn.call(u,f))$n(u,f,{get:Jp.bind(e,f),enumerable:!0})}if(i)s.set(e,u);return u};var ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var nt=Mp(import.meta.url);var lt=ee(function(Pc){Object.defineProperty(Pc,"__esModule",{value:!0});Pc.boolean=ud;Pc.string=Dc;Pc.number=pd;Pc.error=ld;Pc.func=fd;Pc.array=Sc;Pc.stringArray=md;function ud(e){return e===!0||e===!1}function Dc(e){return typeof e==="string"||e instanceof String}function pd(e){return typeof e==="number"||e instanceof Number}function ld(e){return e instanceof Error}function fd(e){return typeof e==="function"}function Sc(e){return Array.isArray(e)}function md(e){return Sc(e)&&e.every((t)=>Dc(t))}});var rn=ee(function(w){var kd=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]}),wd=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_d=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")kd(r,t,i[s])}return wd(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 Ze=_d(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=Ze.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 bc extends U{_;constructor(e){super(e,0)}}w.RequestType0=bc;class Ic extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.RequestType=Ic;class Cc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.RequestType1=Cc;class Nc extends U{_;constructor(e){super(e,2)}}w.RequestType2=Nc;class Lc extends U{_;constructor(e){super(e,3)}}w.RequestType3=Lc;class Jc extends U{_;constructor(e){super(e,4)}}w.RequestType4=Jc;class Rc extends U{_;constructor(e){super(e,5)}}w.RequestType5=Rc;class Oc extends U{_;constructor(e){super(e,6)}}w.RequestType6=Oc;class vc extends U{_;constructor(e){super(e,7)}}w.RequestType7=vc;class Mc extends U{_;constructor(e){super(e,8)}}w.RequestType8=Mc;class qc extends U{_;constructor(e){super(e,9)}}w.RequestType9=qc;class Bc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.NotificationType=Bc;class Uc extends U{_;constructor(e){super(e,0)}}w.NotificationType0=Uc;class jc extends U{_parameterStructures;_;constructor(e,t=pe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}w.NotificationType1=jc;class Vc extends U{_;constructor(e){super(e,2)}}w.NotificationType2=Vc;class Wc extends U{_;constructor(e){super(e,3)}}w.NotificationType3=Wc;class zc extends U{_;constructor(e){super(e,4)}}w.NotificationType4=zc;class Hc extends U{_;constructor(e){super(e,5)}}w.NotificationType5=Hc;class Gc extends U{_;constructor(e){super(e,6)}}w.NotificationType6=Gc;class $c extends U{_;constructor(e){super(e,7)}}w.NotificationType7=$c;class Fc extends U{_;constructor(e){super(e,8)}}w.NotificationType8=Fc;class Qc extends U{_;constructor(e){super(e,9)}}w.NotificationType9=Qc;var Ac;(function(e){function t(s){let o=s;return o&&Ze.string(o.method)&&(Ze.string(o.id)||Ze.number(o.id))}e.isRequest=t;function r(s){let o=s;return o&&Ze.string(o.method)&&s.id===void 0}e.isNotification=r;function i(s){let o=s;return o&&(o.result!==void 0||!!o.error)&&(Ze.string(o.id)||Ze.number(o.id)||o.id===null)}e.isResponse=i})(Ac||(w.Message=Ac={}))});var sn=ee(function(Xc){Object.defineProperty(Xc,"__esModule",{value:!0});Xc.LRUCache=Xc.LinkedMap=Xc.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||(Xc.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)}}Xc.LinkedMap=nn;class Yc 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))}}Xc.LRUCache=Yc});var ru=ee(function(eu){Object.defineProperty(eu,"__esModule",{value:!0});eu.Disposable=void 0;var Kc;(function(e){function t(r){return{dispose:r}}e.create=t})(Kc||(eu.Disposable=Kc={}))});var Be=ee(function(nu){Object.defineProperty(nu,"__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={}));nu.default=an});var ft=ee(function(Ue){var Ad=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 bd=Ad(Be()),iu;(function(e){let t={dispose(){}};e.None=function(){return t}})(iu||(Ue.Event=iu={}));class su{_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,bd.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 su;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 Id=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]}),Cd=ae&&ae.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nd=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")Id(r,t,i[s])}return Cd(r,t),r}}(),Ld=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 Jd=Ld(Be()),Rd=Nd(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||Rd.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}e.is=t})(pr||(ae.CancellationToken=pr={}));var Od=Object.freeze(function(e,t){let r=(0,Jd.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 Od;if(!this._emitter)this._emitter=new un.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}}class ou{_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=ou});var mu=ee(function(lu){Object.defineProperty(lu,"__esModule",{value:!0});lu.SharedArrayReceiverStrategy=lu.SharedArraySenderStrategy=void 0;var vd=lr(),Jt;(function(e){e.Continue=0,e.Cancelled=1})(Jt||(Jt={}));class au{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()}}lu.SharedArraySenderStrategy=au;class cu{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 uu{token;constructor(e){this.token=new cu(e)}cancel(){}dispose(){}}class pu{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;if(t===void 0)return new vd.CancellationTokenSource;return new uu(t)}}lu.SharedArrayReceiverStrategy=pu});var ln=ee(function(mt){var qd=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.Semaphore=void 0;var Bd=qd(Be());class hu{_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,Bd.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=hu});var gu=ee(function(re){var Ud=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]}),jd=re&&re.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Vd=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")Ud(r,t,i[s])}return jd(r,t),r}}(),Wd=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=Wd(Be()),ht=Vd(lt()),fn=ft(),zd=ln(),du;(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})(du||(re.MessageReader=du={}));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,f,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 S of r.contentDecoders)u.set(S.name,S);if(r.contentTypeDecoder!==void 0)f=r.contentTypeDecoder,x.set(f.name,f);if(r.contentTypeDecoders!==void 0)for(let S of r.contentTypeDecoders)x.set(S.name,S)}if(f===void 0)f=(0,mn.default)().applicationJson.decoder,x.set(f.name,f);return{charset:i,contentDecoder:o,contentDecoders:u,contentTypeDecoder:f,contentTypeDecoders:x}}e.fromOptions=t})(hn||(hn={}));class Tu 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 zd.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=Tu});var _u=ee(function(ne){var Hd=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]}),Gd=ne&&ne.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$d=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")Hd(r,t,i[s])}return Gd(r,t),r}}(),Fd=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 yu=Fd(Be()),Rt=$d(lt()),Qd=ln(),xu=ft(),Yd="Content-Length: ",Eu=`\r
3
+ `,ku;(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})(ku||(ne.MessageWriter=ku={}));class gn{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new xu.Emitter,this.closeEmitter=new xu.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,yu.default)().applicationJson.encoder};else return{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,yu.default)().applicationJson.encoder}}e.fromOptions=t})(Tn||(Tn={}));class wu extends gn{writable;options;errorCount;writeSemaphore;constructor(e,t){super();this.writable=e,this.options=Tn.fromOptions(t),this.errorCount=0,this.writeSemaphore=new Qd.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(Yd,r.byteLength.toString(),Eu),i.push(Eu),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=wu});var Au=ee(function(Su){Object.defineProperty(Su,"__esModule",{value:!0});Su.AbstractMessageBuffer=void 0;var Xd=13,Zd=10,Kd=`\r
4
+ `;class Du{_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 Xd:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case Zd: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,f=this.toString(o,"ascii").split(Kd);if(f.length<2)return u;for(let x=0;x<f.length-2;x++){let S=f[x],I=S.indexOf(":");if(I===-1)throw Error(`Message header must separate key and value using ':'
5
+ ${S}`);let q=S.substr(0,I),O=S.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}}Su.AbstractMessageBuffer=Du});var Lu=ee(function(P){var eT=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]}),tT=P&&P.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),rT=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")eT(r,t,i[s])}return tT(r,t),r}}(),nT=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=iT;var bu=nT(Be()),V=rT(lt()),b=rn(),Iu=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 Nu{__;_pr;constructor(){}}P.ProgressType=Nu;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 _n;(function(e){function t(r){let i=r;return i&&V.func(i.cancelUndispatched)}e.is=t})(_n||(P.ConnectionStrategy=_n={}));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 Dn;(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})(Dn||(P.RequestCancellationReceiverStrategy=Dn={}));var hr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new yn.CancellationTokenSource}});function t(r){return mr.is(r)||Dn.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 Cu;(function(e){function t(r){let i=r;return i&&(Tr.is(i.cancellationStrategy)||_n.is(i.connectionStrategy)||gr.is(i.messageStrategy)||V.number(i.maxParallelism))}e.is=t})(Cu||(P.ConnectionOptions=Cu={}));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 iT(e,t,r,i){let s=r!==void 0?r:P.NullLogger,o=0,u=0,f=0,x="2.0",S=i?.maxParallelism??-1,I=0,q=void 0,O=new Map,F=void 0,ce=new Map,Ae=new Map,Ke,de=new Iu.LinkedMap,ke=new Map,et=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 tt(){return me===Ee.Disposed}function Un(){if(me===Ee.New||me===Ee.Listening)me=Ee.Closed,Ut.fire(void 0)}function hp(p){we.fire([p,void 0,void 0])}function dp(p){we.fire(p)}e.onClose(Un),e.onError(hp),t.onClose(Un),t.onError(dp);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 Tp(p){if(p===null)return"res-unknown-"+(++f).toString();else return"res-"+p.toString()}function gp(){return"not-"+(++u).toString()}function yp(p,g){if(b.Message.isRequest(g))p.set(jn(g.id),g);else if(b.Message.isResponse(g))if(S===-1)p.set(Tp(g.id),g);else Wn(g);else p.set(gp(),g)}function kr(){if(Ke||de.size===0)return;if(S!==-1&&I>=S)return;Ke=(0,bu.default)().timer.setImmediate(async()=>{if(Ke=void 0,de.size===0)return;if(S!==-1&&I>=S)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 Ep(p);else if(b.Message.isNotification(p))return kp(p);else if(b.Message.isResponse(p))return Wn(p);else return wp(p)}let xp=(p)=>{try{if(b.Message.isNotification(p)&&p.method===qt.type.method){let g=p.params.id,y=jn(g),_=de.get(y);if(b.Message.isRequest(_)){let j=i?.connectionStrategy,v=j&&j.cancelUndispatched?j.cancelUndispatched(_,Ie):Ie(_);if(v&&(v.error!==void 0||v.result!==void 0)){de.delete(y),Oe.delete(g),v.id=_.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(),_r(p);return}else et.add(g)}yp(de,p)}finally{kr()}};async function Ep(p){if(tt())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)}Sp(p);let _=O.get(p.method),L,j;if(_)L=_.type,j=_.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&&et.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(tt())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(Pp(p,y),y!==void 0){ke.delete(g);try{if(p.error){let _=p.error;y.reject(new b.ResponseError(_.code,_.message,_.data))}else if(p.result!==void 0)y.resolve(p.result);else throw Error("Should never happen.")}catch(_){if(_.message)s.error(`Response handler '${y.method}' failed with message: ${_.message}`);else s.error(`Response handler '${y.method}' failed unexpectedly.`)}}}}async function kp(p){if(tt())return;let g=void 0,y;if(p.method===qt.type.method){let _=p.params.id;et.delete(_),_r(p);return}else{let _=ce.get(p.method);if(_)y=_.handler,g=_.type}if(y||F)try{if(_r(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 _=p.params;if(p.method===vt.type.method&&_.length===2&&xn.is(_[0]))await y({token:_[0],value:_[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 ${_.length} arguments`)}await y(..._)}}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(_){if(_.message)s.error(`Notification handler '${p.method}' failed with message: ${_.message}`);else s.error(`Notification handler '${p.method}' failed unexpectedly.`)}else be.fire(p)}function wp(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,_=ke.get(y);if(_)_.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 _p(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 rt("send-request",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)if(p.params)g=`Params: ${ve(p.params)}`;else g="No parameters provided.";W.log(`Sending notification '${p.method}'.`,g)}else rt("send-notification",p)}function wr(p,g,y){if(R===J.Off||!W)return;if(Te===le.Text){let _=void 0;if(R===J.Verbose||R===J.Compact){if(p.error&&p.error.data)_=`Error data: ${ve(p.error.data)}`;else if(p.result)_=`Result: ${ve(p.result)}`;else if(p.error===void 0)_="No result returned."}W.log(`Sending response '${g} - (${p.id})'. Processing request took ${Date.now()-y}ms`,_)}else rt("send-response",p)}function Sp(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 rt("receive-request",p)}function _r(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 rt("receive-notification",p)}function Pp(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 _=p.error?` Request failed: ${p.error.message} (${p.error.code}).`:"";W.log(`Received response '${g.method} - (${p.id})' in ${Date.now()-g.timerStart}ms.${_}`,y)}else W.log(`Received response ${p.id} without active response promise.`,y)}else rt("receive-response",p)}function rt(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(tt())throw new dt(Mt.Disposed,"Connection is disposed.")}function Ap(){if(Ce())throw new dt(Mt.AlreadyListening,"Connection is already listening")}function bp(){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 Dr(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,_=p.numberOfParams;switch(_){case 0:y=void 0;break;case 1:y=Dr(p.parameterStructures,g[0]);break;default:y=[];for(let L=0;L<g.length&&L<_;L++)y.push(xt(g[L]));if(g.length<_)for(let L=g.length;L<_;L++)y.push(null);break}return y}let je={sendNotification:(p,...g)=>{yt();let y,_;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:_=void 0;break;case 1:_=Dr(X,g[v]);break;default:if(X===b.ParameterStructures.byName)throw Error(`Received ${z} parameters for 'by Name' notification parameter structure.`);_=g.slice(v,K).map((H)=>xt(H));break}}else{let j=g;y=p.method,_=Gn(p,j)}let L={jsonrpc:x,method:y,params:_};return Dp(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)=>je.sendNotification(vt.type,{token:g,value:y}),onUnhandledProgress:N.event,sendRequest:(p,...g)=>{yt(),bp();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 _,L,j=void 0;if(V.string(p)){_=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 Ve=g.length;if(yn.CancellationToken.is(ge))Ve=Ve-1,j=ge;let _e=Ve-Ne;switch(_e){case 0:L=void 0;break;case 1:L=Dr(Et,g[Ne]);break;default:if(Et===b.ParameterStructures.byName)throw Error(`Received ${_e} parameters for 'by Name' request parameter structure.`);L=g.slice(Ne,Ve).map((Ip)=>xt(Ip));break}}else{let H=g;_=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(je,v)});let z={jsonrpc:x,id:v,method:_,params:L};if(_p(z),typeof se.sender.enableCancellation==="function")se.sender.enableCancellation(z);return new Promise(async(H,ge)=>{let Ne=(_e)=>{H(_e),se.sender.cleanup(v),X?.dispose()},Et=(_e)=>{ge(_e),se.sender.cleanup(v),X?.dispose()},Ve={method:_,timerStart:Date.now(),resolve:Ne,reject:Et};try{if(ke.set(v,Ve),await t.write(z),K)y(je,v)}catch(_e){throw ke.delete(v),Ve.reject(new b.ResponseError(b.ErrorCodes.MessageWriteError,_e.message?_e.message:"Unknown reason")),s.error("Sending request failed."),_e}})},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 _=!1,L=le.Text;if(y!==void 0)if(V.boolean(y))_=y;else _=y.sendNotification||!1,L=y.traceFormat||le.Text;if(R=p,Te=L,R===J.Off)W=void 0;else W=g;if(_&&!Bn()&&!tt())await je.sendNotification(wn.type,{value:J.toString(p)})},onError:we.event,onClose:Ut.event,onUnhandledNotification:be.event,onDispose:ue.event,end:()=>{t.end()},dispose:()=>{if(tt())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,et=new Set,de=new Iu.LinkedMap,V.func(t.dispose))t.dispose();if(V.func(e.dispose))e.dispose()},listen:()=>{yt(),Ap(),me=Ee.Listening,e.listen(xp)},inspect:()=>{(0,bu.default)().console.log("inspect")}};return je.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)}),je.onNotification(vt.type,async(p)=>{let g=Ae.get(p.token);if(g)await g(p.value);else N.fire(p)}),je}});var yr=ee(function(d){var sT=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.ProgressType=d.ProgressToken=d.createMessageConnection=d.NullLogger=d.ConnectionOptions=d.ConnectionStrategy=d.AbstractMessageBuffer=d.WriteableStreamMessageWriter=d.AbstractMessageWriter=d.MessageWriter=d.ReadableStreamMessageReader=d.AbstractMessageReader=d.MessageReader=d.SharedArrayReceiverStrategy=d.SharedArraySenderStrategy=d.CancellationToken=d.CancellationTokenSource=d.Emitter=d.Event=d.Disposable=d.LRUCache=d.Touch=d.LinkedMap=d.ParameterStructures=d.NotificationType9=d.NotificationType8=d.NotificationType7=d.NotificationType6=d.NotificationType5=d.NotificationType4=d.NotificationType3=d.NotificationType2=d.NotificationType1=d.NotificationType0=d.NotificationType=d.ErrorCodes=d.ResponseError=d.RequestType9=d.RequestType8=d.RequestType7=d.RequestType6=d.RequestType5=d.RequestType4=d.RequestType3=d.RequestType2=d.RequestType1=d.RequestType0=d.RequestType=d.Message=d.RAL=void 0;d.MessageStrategy=d.CancellationStrategy=d.CancellationSenderStrategy=d.RequestCancellationReceiverStrategy=d.IdCancellationReceiverStrategy=d.CancellationReceiverStrategy=d.ConnectionError=d.ConnectionErrors=d.LogTraceNotification=d.SetTraceNotification=d.TraceFormat=d.TraceValues=d.TraceValue=d.Trace=void 0;var M=rn();Object.defineProperty(d,"Message",{enumerable:!0,get:function(){return M.Message}});Object.defineProperty(d,"RequestType",{enumerable:!0,get:function(){return M.RequestType}});Object.defineProperty(d,"RequestType0",{enumerable:!0,get:function(){return M.RequestType0}});Object.defineProperty(d,"RequestType1",{enumerable:!0,get:function(){return M.RequestType1}});Object.defineProperty(d,"RequestType2",{enumerable:!0,get:function(){return M.RequestType2}});Object.defineProperty(d,"RequestType3",{enumerable:!0,get:function(){return M.RequestType3}});Object.defineProperty(d,"RequestType4",{enumerable:!0,get:function(){return M.RequestType4}});Object.defineProperty(d,"RequestType5",{enumerable:!0,get:function(){return M.RequestType5}});Object.defineProperty(d,"RequestType6",{enumerable:!0,get:function(){return M.RequestType6}});Object.defineProperty(d,"RequestType7",{enumerable:!0,get:function(){return M.RequestType7}});Object.defineProperty(d,"RequestType8",{enumerable:!0,get:function(){return M.RequestType8}});Object.defineProperty(d,"RequestType9",{enumerable:!0,get:function(){return M.RequestType9}});Object.defineProperty(d,"ResponseError",{enumerable:!0,get:function(){return M.ResponseError}});Object.defineProperty(d,"ErrorCodes",{enumerable:!0,get:function(){return M.ErrorCodes}});Object.defineProperty(d,"NotificationType",{enumerable:!0,get:function(){return M.NotificationType}});Object.defineProperty(d,"NotificationType0",{enumerable:!0,get:function(){return M.NotificationType0}});Object.defineProperty(d,"NotificationType1",{enumerable:!0,get:function(){return M.NotificationType1}});Object.defineProperty(d,"NotificationType2",{enumerable:!0,get:function(){return M.NotificationType2}});Object.defineProperty(d,"NotificationType3",{enumerable:!0,get:function(){return M.NotificationType3}});Object.defineProperty(d,"NotificationType4",{enumerable:!0,get:function(){return M.NotificationType4}});Object.defineProperty(d,"NotificationType5",{enumerable:!0,get:function(){return M.NotificationType5}});Object.defineProperty(d,"NotificationType6",{enumerable:!0,get:function(){return M.NotificationType6}});Object.defineProperty(d,"NotificationType7",{enumerable:!0,get:function(){return M.NotificationType7}});Object.defineProperty(d,"NotificationType8",{enumerable:!0,get:function(){return M.NotificationType8}});Object.defineProperty(d,"NotificationType9",{enumerable:!0,get:function(){return M.NotificationType9}});Object.defineProperty(d,"ParameterStructures",{enumerable:!0,get:function(){return M.ParameterStructures}});var Sn=sn();Object.defineProperty(d,"LinkedMap",{enumerable:!0,get:function(){return Sn.LinkedMap}});Object.defineProperty(d,"LRUCache",{enumerable:!0,get:function(){return Sn.LRUCache}});Object.defineProperty(d,"Touch",{enumerable:!0,get:function(){return Sn.Touch}});var oT=ru();Object.defineProperty(d,"Disposable",{enumerable:!0,get:function(){return oT.Disposable}});var Ju=ft();Object.defineProperty(d,"Event",{enumerable:!0,get:function(){return Ju.Event}});Object.defineProperty(d,"Emitter",{enumerable:!0,get:function(){return Ju.Emitter}});var Ru=lr();Object.defineProperty(d,"CancellationTokenSource",{enumerable:!0,get:function(){return Ru.CancellationTokenSource}});Object.defineProperty(d,"CancellationToken",{enumerable:!0,get:function(){return Ru.CancellationToken}});var Ou=mu();Object.defineProperty(d,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ou.SharedArraySenderStrategy}});Object.defineProperty(d,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ou.SharedArrayReceiverStrategy}});var Pn=gu();Object.defineProperty(d,"MessageReader",{enumerable:!0,get:function(){return Pn.MessageReader}});Object.defineProperty(d,"AbstractMessageReader",{enumerable:!0,get:function(){return Pn.AbstractMessageReader}});Object.defineProperty(d,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Pn.ReadableStreamMessageReader}});var An=_u();Object.defineProperty(d,"MessageWriter",{enumerable:!0,get:function(){return An.MessageWriter}});Object.defineProperty(d,"AbstractMessageWriter",{enumerable:!0,get:function(){return An.AbstractMessageWriter}});Object.defineProperty(d,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return An.WriteableStreamMessageWriter}});var aT=Au();Object.defineProperty(d,"AbstractMessageBuffer",{enumerable:!0,get:function(){return aT.AbstractMessageBuffer}});var Y=Lu();Object.defineProperty(d,"ConnectionStrategy",{enumerable:!0,get:function(){return Y.ConnectionStrategy}});Object.defineProperty(d,"ConnectionOptions",{enumerable:!0,get:function(){return Y.ConnectionOptions}});Object.defineProperty(d,"NullLogger",{enumerable:!0,get:function(){return Y.NullLogger}});Object.defineProperty(d,"createMessageConnection",{enumerable:!0,get:function(){return Y.createMessageConnection}});Object.defineProperty(d,"ProgressToken",{enumerable:!0,get:function(){return Y.ProgressToken}});Object.defineProperty(d,"ProgressType",{enumerable:!0,get:function(){return Y.ProgressType}});Object.defineProperty(d,"Trace",{enumerable:!0,get:function(){return Y.Trace}});Object.defineProperty(d,"TraceValue",{enumerable:!0,get:function(){return Y.TraceValue}});Object.defineProperty(d,"TraceFormat",{enumerable:!0,get:function(){return Y.TraceFormat}});Object.defineProperty(d,"SetTraceNotification",{enumerable:!0,get:function(){return Y.SetTraceNotification}});Object.defineProperty(d,"LogTraceNotification",{enumerable:!0,get:function(){return Y.LogTraceNotification}});Object.defineProperty(d,"ConnectionErrors",{enumerable:!0,get:function(){return Y.ConnectionErrors}});Object.defineProperty(d,"ConnectionError",{enumerable:!0,get:function(){return Y.ConnectionError}});Object.defineProperty(d,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.CancellationReceiverStrategy}});Object.defineProperty(d,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.IdCancellationReceiverStrategy}});Object.defineProperty(d,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return Y.RequestCancellationReceiverStrategy}});Object.defineProperty(d,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Y.CancellationSenderStrategy}});Object.defineProperty(d,"CancellationStrategy",{enumerable:!0,get:function(){return Y.CancellationStrategy}});Object.defineProperty(d,"MessageStrategy",{enumerable:!0,get:function(){return Y.MessageStrategy}});Object.defineProperty(d,"TraceValues",{enumerable:!0,get:function(){return Y.TraceValues}});var cT=sT(Be());d.RAL=cT.default});var ju=ee(function(Uu){Object.defineProperty(Uu,"__esModule",{value:!0});var vu=nt("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 vu.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 Mu{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 qu{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 Bu=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 vu.TextDecoder(t.charset).decode(e)))}catch(r){return Promise.reject(r)}}})}),stream:Object.freeze({asReadableStream:(e)=>new Mu(e),asWritableStream:(e)=>new qu(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 Bu}(function(e){function t(){Je.RAL.install(Bu)}e.install=t})(bn||(bn={}));Uu.default=bn});var Fu=ee(function(C){var Wu=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]}),pT=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")Wu(r,t,i[s])}return pT(r,t),r}}(),lT=C&&C.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Wu(t,e,r)},fT=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=yT;C.createClientPipeTransport=xT;C.createServerPipeTransport=ET;C.createClientSocketTransport=kT;C.createServerSocketTransport=wT;C.createMessageConnection=ST;var Bt=fT(ju());Bt.default.install();var mT=Cn(nt("path")),hT=Cn(nt("os")),dT=Cn(nt("fs")),Vu=nt("crypto"),xr=nt("net"),fe=yr();lT(yr(),C);class zu 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=zu;class Hu 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=Hu;class Gu 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=Gu;class $u 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=$u;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 TT=process.env.XDG_RUNTIME_DIR,gT=new Map([["linux",107],["darwin",103]]);function yT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${Vu.randomBytes(16).toString("hex")}-sock`;let e=32,t=10,r=dT.realpathSync(TT??hT.tmpdir()),i=gT.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=Vu.randomBytes(Math.floor(e/2)).toString("hex");return mT.join(r,`lsp-${s}.sock`)}function xT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=xr.createServer((f)=>{u.close(),r([new Tt(f,t),new gt(f,t)])});u.on("error",o),u.listen(e,()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function ET(e,t="utf-8"){let r=xr.createConnection(e);return[new Tt(r,t),new gt(r,t)]}function kT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=xr.createServer((f)=>{u.close(),r([new Tt(f,t),new gt(f,t)])});u.on("error",o),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function wT(e,t="utf-8"){let r=xr.createConnection(e,"127.0.0.1");return[new Tt(r,t),new gt(r,t)]}function _T(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function DT(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function ST(e,t,r,i){if(!r)r=fe.NullLogger;let s=_T(e)?new Nn(e):e,o=DT(t)?new Ln(t):t;if(fe.ConnectionStrategy.is(i))i={connectionStrategy:i};return fe.createMessageConnection(s,o,r,i)}});var Sr;(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"})(Sr||(Sr={}));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 De;(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"})(De||(De={}));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 Qn(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 Yn(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 Xn(e){return e.kind===n.CaseBlock}function Zn(e){return e.kind===n.CatchClause}function wt(e){return e.kind===n.Block}function Kn(e){return e.kind===n.VariableDeclaration}function ei(e){return e.kind===n.VariableDeclarationList}function Jr(e){return e.kind===n.ExpressionWithTypeArguments}function _t(e){return e.kind===n.ImportAttributes}function Rr(e){return e.kind===n.TemplateHead}function Or(e){return e.kind===n.JsxAttributes}function ti(e){return e.kind===n.JsxOpeningElement}function ri(e){return e.kind===n.JsxOpeningFragment}function ni(e){return e.kind===n.JsxClosingFragment}function ii(e){return e.kind===n.JsxClosingElement}function vr(e){return e.kind===n.ImportClause}function Mr(e){return e.kind===n.TypeParameter}function si(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function Dt(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 oi(e){return e.kind===n.ModuleBlock||e.kind===n.ModuleDeclaration}function qr(e){return e.kind===n.Identifier||e.kind===n.ModuleDeclaration}function ai(e){return e.kind===n.Identifier||e.kind===n.QualifiedName||e.kind===n.ExternalModuleReference}function ci(e){return e.kind===n.NamespaceImport||e.kind===n.NamedImports}function ui(e){return e.kind===n.NamespaceExport||e.kind===n.NamedExports}function pi(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 li(e){return e.kind===n.Identifier||e.kind===n.JsxNamespacedName}function fi(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 mi(e){return e.kind===n.TemplateExpression||e.kind===n.NoSubstitutionTemplateLiteral}function hi(e){return e.kind===n.Identifier||e.kind===n.ThisType}function di(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function We(e){return e.kind===n.Block}function qp(e){return e===n.EqualsToken||tl(e)}function Bp(e){return rl(e)||e===n.CommaToken}function Up(e){return e===n.AsteriskAsteriskToken}function jp(e){return e===n.AsteriskToken||e===n.SlashToken||e===n.PercentToken}function Vp(e){return Up(e)||jp(e)}function Wp(e){return e===n.PlusToken||e===n.MinusToken}function zp(e){return Vp(e)||Wp(e)}function Hp(e){return e===n.LessThanLessThanToken||e===n.GreaterThanGreaterThanToken||e===n.GreaterThanGreaterThanGreaterThanToken}function Gp(e){return zp(e)||Hp(e)}function $p(e){return e===n.LessThanToken||e===n.LessThanEqualsToken||e===n.GreaterThanToken||e===n.GreaterThanEqualsToken||e===n.InstanceOfKeyword||e===n.InKeyword}function Fp(e){return Gp(e)||$p(e)}function Qp(e){return e===n.EqualsEqualsToken||e===n.EqualsEqualsEqualsToken||e===n.ExclamationEqualsEqualsToken||e===n.ExclamationEqualsToken}function Yp(e){return Fp(e)||Qp(e)}function Xp(e){return e===n.AmpersandToken||e===n.BarToken||e===n.CaretToken}function Zp(e){return Yp(e)||Xp(e)}function Kp(e){return e===n.AmpersandAmpersandToken||e===n.BarBarToken}function el(e){return Zp(e)||Kp(e)}function tl(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 rl(e){return e===n.QuestionQuestionToken||el(e)||qp(e)}function Ti(e){return e>=n.FirstJSDocNode&&e<=n.LastJSDocNode}function gi(e){return e.kind===n.EndOfFile}function St(e){return e.kind===n.DotDotDotToken}function Ht(e){return e.kind===n.QuestionToken}function yi(e){return e.kind===n.ExclamationToken}function xi(e){return e.kind===n.ColonToken}function Ei(e){return e.kind===n.EqualsToken}function Pt(e){return e.kind===n.AsteriskToken}function ki(e){return e.kind===n.EqualsGreaterThanToken}function At(e){return e.kind===n.QuestionDotToken}function wi(e){return e.kind===n.AssertsKeyword}function Ur(e){return e.kind===n.AwaitKeyword}function _i(e){return Bp(e.kind)}function D(e){return nl(e.kind)}function nl(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 Se(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 Di(e){return sl(il(e).kind)}function il(e){return al(e,oe.PartiallyEmittedExpressions)}function sl(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 ol(e,t=oe.All){switch(e.kind){case n.ParenthesizedExpression:if(t&oe.ExcludeJSDocTypeAssertion&&cl(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 al(e,t=oe.All){while(ol(e,t))e=e.expression;return e}function cl(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&De.Reparsed)!==0}function Si(e){return e.kind===n.Block||k(e)}function Gt(e){return e.kind===n.VariableDeclarationList||k(e)}function ze(e){return e.kind===n.QuestionToken||e.kind===n.ExclamationToken}function Pi(e){return e.kind===n.ReadonlyKeyword||e.kind===n.PlusToken||e.kind===n.MinusToken}function Ai(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 m(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 Ug={[n.QualifiedName]:(e,t)=>{let r=a(e.left,t,xe),i=a(e.right,t,A);return bi(e,r,i)},[n.ComputedPropertyName]:(e,t)=>{let r=a(e.expression,t,k);return Ii(e,r)},[n.Decorator]:(e,t)=>{let r=a(e.expression,t,Di);return Ci(e,r)},[n.IfStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.thenStatement,t,Se),s=a(e.elseStatement,t,Se);return Ni(e,r,i,s)},[n.DoStatement]:(e,t)=>{let r=a(e.statement,t,Se),i=a(e.expression,t,k);return Li(e,r,i)},[n.WhileStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.statement,t,Se);return Ji(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,Se);return Ri(e,r,i,s,o)},[n.BreakStatement]:(e,t)=>{let r=a(e.label,t,A);return Oi(e,r)},[n.ContinueStatement]:(e,t)=>{let r=a(e.label,t,A);return vi(e,r)},[n.ReturnStatement]:(e,t)=>{let r=a(e.expression,t,k);return Mi(e,r)},[n.WithStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.statement,t,Se);return qi(e,r,i)},[n.SwitchStatement]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.caseBlock,t,Xn);return Bi(e,r,i)},[n.CaseBlock]:(e,t)=>{let r=T(e.clauses,t);return Ui(e,r)},[n.ThrowStatement]:(e,t)=>{let r=a(e.expression,t,k);return ji(e,r)},[n.TryStatement]:(e,t)=>{let r=a(e.tryBlock,t,wt),i=a(e.catchClause,t,Zn),s=a(e.finallyBlock,t,wt);return Vi(e,r,i,s)},[n.CatchClause]:(e,t)=>{let r=a(e.variableDeclaration,t,Kn),i=a(e.block,t,wt);return Wi(e,r,i)},[n.LabeledStatement]:(e,t)=>{let r=a(e.label,t,A),i=a(e.statement,t,Se);return zi(e,r,i)},[n.ExpressionStatement]:(e,t)=>{let r=a(e.expression,t,k);return Hi(e,r)},[n.Block]:(e,t)=>{let r=T(e.statements,t);return Gi(e,r)},[n.VariableStatement]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.declarationList,t,ei);return $i(e,r,i)},[n.VariableDeclaration]:(e,t)=>{let r=a(e.name,t,zt),i=a(e.exclamationToken,t,yi),s=a(e.type,t,D),o=a(e.initializer,t,k);return Fi(e,r,i,s,o)},[n.VariableDeclarationList]:(e,t)=>{let r=T(e.declarations,t);return Qi(e,r)},[n.Parameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.dotDotDotToken,t,St),s=a(e.name,t,zt),o=a(e.questionToken,t,Ht),u=a(e.type,t,D),f=a(e.initializer,t,k);return Yi(e,r,i,s,o,u,f)},[n.BindingElement]:(e,t)=>{let r=a(e.dotDotDotToken,t,St),i=a(e.propertyName,t,ye),s=a(e.name,t,zt),o=a(e.initializer,t,k);return Xi(e,r,i,s,o)},[n.MissingDeclaration]:(e,t)=>{let r=T(e.modifiers,t);return Zi(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),f=a(e.type,t,D),x=a(e.body,t,We);return Ki(e,r,i,s,o,u,f,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 es(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 ts(e,r,i,s,o,u)},[n.HeritageClause]:(e,t)=>{let r=T(e.types,t);return rs(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 ns(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,D);return is(e,r,i,s,o)},[n.EnumMember]:(e,t)=>{let r=a(e.name,t,ye),i=a(e.initializer,t,k);return ss(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 os(e,r,i,s)},[n.ModuleBlock]:(e,t)=>{let r=T(e.statements,t);return as(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,_t);return cs(e,r,i,s,o)},[n.ExternalModuleReference]:(e,t)=>{let r=a(e.expression,t,k);return us(e,r)},[n.NamespaceImport]:(e,t)=>{let r=a(e.name,t,A);return ps(e,r)},[n.NamedImports]:(e,t)=>{let r=T(e.elements,t);return ls(e,r)},[n.ExportAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.type,t,D),s=a(e.expression,t,k);return fs(e,r,i,s)},[n.NamespaceExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A);return ms(e,r,i)},[n.NamespaceExport]:(e,t)=>{let r=a(e.name,t,Dt);return hs(e,r)},[n.NamedExports]:(e,t)=>{let r=T(e.elements,t);return ds(e,r)},[n.ExportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,Dt),i=a(e.name,t,Dt);return Ts(e,r,i)},[n.CallSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,D);return gs(e,r,i,s)},[n.ConstructSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,D);return ys(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,D),u=a(e.body,t,We);return xs(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,D),f=a(e.body,t,We);return Es(e,r,i,s,o,u,f)},[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,D),f=a(e.body,t,We);return ks(e,r,i,s,o,u,f)},[n.IndexSignature]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.parameters,t),s=a(e.type,t,D);return ws(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,ze),o=T(e.typeParameters,t),u=T(e.parameters,t),f=a(e.type,t,D);return _s(e,r,i,s,o,u,f)},[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,ze),u=T(e.typeParameters,t),f=T(e.parameters,t),x=a(e.type,t,D),S=a(e.body,t,We);return Ds(e,r,i,s,o,u,f,x,S)},[n.PropertySignature]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,ze),o=a(e.type,t,D),u=a(e.initializer,t,k);return Ss(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,ze),o=a(e.type,t,D),u=a(e.initializer,t,k);return Ps(e,r,i,s,o,u)},[n.ClassStaticBlockDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.body,t,wt);return As(e,r,i)},[n.BinaryExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.left,t,k),s=a(e.type,t,D),o=a(e.operatorToken,t,_i),u=a(e.right,t,k);return bs(e,r,i,s,o,u)},[n.PrefixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,k);return Is(e,r)},[n.PostfixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,k);return Cs(e,r)},[n.YieldExpression]:(e,t)=>{let r=a(e.asteriskToken,t,Pt),i=a(e.expression,t,k);return Ns(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,D),u=a(e.equalsGreaterThanToken,t,ki),f=a(e.body,t,Si);return Ls(e,r,i,s,o,u,f)},[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),f=a(e.type,t,D),x=a(e.body,t,We);return Js(e,r,i,s,o,u,f,x)},[n.AsExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.type,t,D);return Rs(e,r,i)},[n.SatisfiesExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.type,t,D);return Os(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,xi),u=a(e.whenFalse,t,k);return vs(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,pi);return Ms(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 qs(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 Bs(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 Us(e,r,i,s)},[n.MetaProperty]:(e,t)=>{let r=a(e.name,t,A);return js(e,r)},[n.NonNullExpression]:(e,t)=>{let r=a(e.expression,t,k);return Vs(e,r)},[n.SpreadElement]:(e,t)=>{let r=a(e.expression,t,k);return Ws(e,r)},[n.TemplateExpression]:(e,t)=>{let r=a(e.head,t,Rr),i=T(e.templateSpans,t);return zs(e,r,i)},[n.TemplateSpan]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.literal,t,Br);return Hs(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,mi);return Gs(e,r,i,s,o)},[n.ParenthesizedExpression]:(e,t)=>{let r=a(e.expression,t,k);return $s(e,r)},[n.ArrayLiteralExpression]:(e,t)=>{let r=T(e.elements,t);return Fs(e,r)},[n.ObjectLiteralExpression]:(e,t)=>{let r=T(e.properties,t);return Qs(e,r)},[n.SpreadAssignment]:(e,t)=>{let r=a(e.expression,t,k);return Ys(e,r)},[n.PropertyAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,ye),s=a(e.postfixToken,t,ze),o=a(e.type,t,D),u=a(e.initializer,t,k);return Xs(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,ze),o=a(e.type,t,D),u=a(e.equalsToken,t,Ei),f=a(e.objectAssignmentInitializer,t,k);return Zs(e,r,i,s,o,u,f)},[n.DeleteExpression]:(e,t)=>{let r=a(e.expression,t,k);return Ks(e,r)},[n.TypeOfExpression]:(e,t)=>{let r=a(e.expression,t,k);return eo(e,r)},[n.VoidExpression]:(e,t)=>{let r=a(e.expression,t,k);return to(e,r)},[n.AwaitExpression]:(e,t)=>{let r=a(e.expression,t,k);return ro(e,r)},[n.TypeAssertionExpression]:(e,t)=>{let r=a(e.type,t,D),i=a(e.expression,t,k);return no(e,r,i)},[n.UnionType]:(e,t)=>{let r=T(e.types,t);return io(e,r)},[n.IntersectionType]:(e,t)=>{let r=T(e.types,t);return so(e,r)},[n.ConditionalType]:(e,t)=>{let r=a(e.checkType,t,D),i=a(e.extendsType,t,D),s=a(e.trueType,t,D),o=a(e.falseType,t,D);return oo(e,r,i,s,o)},[n.TypeOperator]:(e,t)=>{let r=a(e.type,t,D);return ao(e,r)},[n.InferType]:(e,t)=>{let r=a(e.typeParameter,t,Mr);return co(e,r)},[n.ArrayType]:(e,t)=>{let r=a(e.elementType,t,D);return uo(e,r)},[n.IndexedAccessType]:(e,t)=>{let r=a(e.objectType,t,D),i=a(e.indexType,t,D);return po(e,r,i)},[n.TypeReference]:(e,t)=>{let r=a(e.typeName,t,xe),i=T(e.typeArguments,t);return lo(e,r,i)},[n.ExpressionWithTypeArguments]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.typeArguments,t);return fo(e,r,i)},[n.LiteralType]:(e,t)=>{let r=a(e.literal,t);return mo(e,r)},[n.TypePredicate]:(e,t)=>{let r=a(e.assertsModifier,t,wi),i=a(e.parameterName,t,hi),s=a(e.type,t,D);return ho(e,r,i,s)},[n.ImportAttribute]:(e,t)=>{let r=a(e.name,t,di),i=a(e.value,t,k);return To(e,r,i)},[n.ImportAttributes]:(e,t)=>{let r=T(e.attributes,t);return go(e,r)},[n.TypeQuery]:(e,t)=>{let r=a(e.exprName,t,xe),i=T(e.typeArguments,t);return yo(e,r,i)},[n.MappedType]:(e,t)=>{let r=a(e.readonlyToken,t,Pi),i=a(e.typeParameter,t,Mr),s=a(e.nameType,t,D),o=a(e.questionToken,t,Ai),u=a(e.type,t,D),f=T(e.members,t);return xo(e,r,i,s,o,u,f)},[n.TypeLiteral]:(e,t)=>{let r=T(e.members,t);return Eo(e,r)},[n.TupleType]:(e,t)=>{let r=T(e.elements,t);return ko(e,r)},[n.NamedTupleMember]:(e,t)=>{let r=a(e.dotDotDotToken,t,St),i=a(e.name,t,A),s=a(e.questionToken,t,Ht),o=a(e.type,t,D);return wo(e,r,i,s,o)},[n.OptionalType]:(e,t)=>{let r=a(e.type,t,D);return _o(e,r)},[n.RestType]:(e,t)=>{let r=a(e.type,t,D);return Do(e,r)},[n.ParenthesizedType]:(e,t)=>{let r=a(e.type,t,D);return So(e,r)},[n.FunctionType]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,D);return Po(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,D);return Ao(e,r,i,s,o)},[n.TemplateLiteralType]:(e,t)=>{let r=a(e.head,t,Rr),i=T(e.templateSpans,t);return bo(e,r,i)},[n.TemplateLiteralTypeSpan]:(e,t)=>{let r=a(e.type,t,D),i=a(e.literal,t,Br);return Io(e,r,i)},[n.SyntheticExpression]:(e,t)=>{let r=a(e.tupleNameSource,t);return Co(e,r)},[n.PartiallyEmittedExpression]:(e,t)=>{let r=a(e.expression,t,k);return No(e,r)},[n.JsxElement]:(e,t)=>{let r=a(e.openingElement,t,ti),i=T(e.children,t),s=a(e.closingElement,t,ii);return Lo(e,r,i,s)},[n.JsxAttributes]:(e,t)=>{let r=T(e.properties,t);return Jo(e,r)},[n.JsxNamespacedName]:(e,t)=>{let r=a(e.namespace,t,A),i=a(e.name,t,A);return Ro(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 Oo(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 vo(e,r,i,s)},[n.JsxFragment]:(e,t)=>{let r=a(e.openingFragment,t,ri),i=T(e.children,t),s=a(e.closingFragment,t,ni);return Mo(e,r,i,s)},[n.JsxAttribute]:(e,t)=>{let r=a(e.name,t,li),i=a(e.initializer,t,fi);return qo(e,r,i)},[n.JsxSpreadAttribute]:(e,t)=>{let r=a(e.expression,t,k);return Bo(e,r)},[n.JsxClosingElement]:(e,t)=>{let r=a(e.tagName,t,$t);return Uo(e,r)},[n.JsxExpression]:(e,t)=>{let r=a(e.dotDotDotToken,t,St),i=a(e.expression,t,k);return jo(e,r,i)},[n.SyntaxList]:(e,t)=>{let r=Ft(e.children,t);return Vo(e,r)},[n.JSDoc]:(e,t)=>{let r=T(e.comment,t),i=T(e.tags,t);return Wo(e,r,i)},[n.JSDocTypeExpression]:(e,t)=>{let r=a(e.type,t,D);return zo(e,r)},[n.JSDocNonNullableType]:(e,t)=>{let r=a(e.type,t,D);return Ho(e,r)},[n.JSDocNullableType]:(e,t)=>{let r=a(e.type,t,D);return Go(e,r)},[n.JSDocVariadicType]:(e,t)=>{let r=a(e.type,t,D);return $o(e,r)},[n.JSDocOptionalType]:(e,t)=>{let r=a(e.type,t,D);return Fo(e,r)},[n.JSDocTypeTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t),s=T(e.comment,t);return Qo(e,r,i,s)},[n.JSDocUnknownTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Yo(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 Xo(e,r,i,s,o)},[n.JSDocReturnTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=T(e.comment,t);return Zo(e,r,i,s)},[n.JSDocPublicTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return Ko(e,r,i)},[n.JSDocPrivateTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ea(e,r,i)},[n.JSDocProtectedTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ta(e,r,i)},[n.JSDocReadonlyTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ra(e,r,i)},[n.JSDocOverrideTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return na(e,r,i)},[n.JSDocDeprecatedTag]:(e,t)=>{let r=a(e.tagName,t,A),i=T(e.comment,t);return ia(e,r,i)},[n.JSDocSeeTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.nameExpression,t,D),s=T(e.comment,t);return sa(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 oa(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 aa(e,r,i,s)},[n.JSDocSatisfiesTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=T(e.comment,t);return ca(e,r,i,s)},[n.JSDocThrowsTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=T(e.comment,t);return ua(e,r,i,s)},[n.JSDocThisTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=T(e.comment,t);return pa(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,_t),u=T(e.comment,t);return la(e,r,i,s,o,u)},[n.JSDocCallbackTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=a(e.name,t,qr),o=T(e.comment,t);return fa(e,r,i,s,o)},[n.JSDocOverloadTag]:(e,t)=>{let r=a(e.tagName,t,A),i=a(e.typeExpression,t,D),s=T(e.comment,t);return ma(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 ha(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,D);return da(e,r,i,s)},[n.JSDocNameReference]:(e,t)=>{let r=a(e.name,t,xe);return Ta(e,r)},[n.SourceFile]:(e,t)=>{let r=T(e.statements,t),i=a(e.endOfFileToken,t,gi);return Oa(e,r,i)},[n.ModuleDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,si),s=a(e.body,t,oi);return ga(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,ai);return ya(e,r,i,s)},[n.ExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.exportClause,t,ui),s=a(e.moduleSpecifier,t,k),o=a(e.attributes,t,_t);return xa(e,r,i,s,o)},[n.ImportType]:(e,t)=>{let r=a(e.argument,t,D),i=a(e.attributes,t,_t),s=a(e.qualifier,t,xe),o=T(e.typeArguments,t);return Ea(e,r,i,s,o)},[n.ImportClause]:(e,t)=>{let r=a(e.name,t,A),i=a(e.namedBindings,t,ci);return ka(e,r,i)},[n.ImportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,Dt),i=a(e.name,t,A);return wa(e,r,i)},[n.JSDocLink]:(e,t)=>{let r=a(e.name,t,xe);return _a(e,r)},[n.JSDocLinkPlain]:(e,t)=>{let r=a(e.name,t,xe);return Da(e,r)},[n.JSDocLinkCode]:(e,t)=>{let r=a(e.name,t,xe);return Sa(e,r)},[n.TypeParameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,A),s=a(e.constraint,t,D),o=a(e.expression,t,k),u=a(e.defaultType,t,D);return Pa(e,r,i,s,o,u)},[n.SyntheticReferenceExpression]:(e,t)=>{let r=a(e.expression,t,k),i=a(e.thisArg,t,k);return Aa(e,r,i)},[n.JSDocTypeLiteral]:(e,t)=>{let r=Ft(e.jsdocPropertyTags,t);return ba(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,Se);return Ia(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,Se);return Ca(e,r,i,s,o)},[n.CaseClause]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.statements,t);return Na(e,r,i)},[n.DefaultClause]:(e,t)=>{let r=a(e.expression,t,k),i=T(e.statements,t);return La(e,r,i)},[n.ObjectBindingPattern]:(e,t)=>{let r=T(e.elements,t);return Ja(e,r)},[n.ArrayBindingPattern]:(e,t)=>{let r=T(e.elements,t);return Ra(e,r)},[n.JSDocParameterTag]:Qt,[n.JSDocPropertyTag]:Qt};function bt(e,t){return t?e(t):void 0}function pl(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))||pl(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,D),o=T(e.comment,t);return e.kind===n.JSDocParameterTag?va(e,r,i,s,o):Ma(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=fl[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 ll(e){return"pos"in e&&"end"in e}function m(e,t=-1,r=-1){if(ll(e))return e;let i=e.slice();return i.pos=t,i.end=r,i}var fl={[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)=>h(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)=>h(t,r,e.statements),[n.VariableStatement]:(e,t,r)=>h(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)=>h(t,r,e.declarations),[n.Parameter]:(e,t,r)=>h(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)=>h(t,r,e.modifiers),[n.FunctionDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.ClassDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.ClassExpression]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.HeritageClause]:(e,t,r)=>h(t,r,e.types),[n.InterfaceDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.TypeAliasDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||c(t,e.type),[n.JSTypeAliasDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(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)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.members),[n.ModuleBlock]:(e,t,r)=>h(t,r,e.statements),[n.ImportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.JSImportDeclaration]:(e,t,r)=>h(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)=>h(t,r,e.elements),[n.ExportAssignment]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.type)||c(t,e.expression),[n.NamespaceExportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name),[n.NamespaceExport]:(e,t,r)=>c(t,e.name),[n.NamedExports]:(e,t,r)=>h(t,r,e.elements),[n.ExportSpecifier]:(e,t,r)=>c(t,e.propertyName)||c(t,e.name),[n.CallSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.ConstructSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.Constructor]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.GetAccessor]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.SetAccessor]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.IndexSignature]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.parameters)||c(t,e.type),[n.MethodSignature]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.MethodDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||c(t,e.postfixToken)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.PropertySignature]:(e,t,r)=>h(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)=>h(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)=>h(t,r,e.modifiers)||c(t,e.body),[n.BinaryExpression]:(e,t,r)=>h(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)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.equalsGreaterThanToken)||c(t,e.body),[n.FunctionExpression]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||h(t,r,e.typeParameters)||h(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)||h(t,r,e.typeArguments)||h(t,r,e.arguments),[n.NewExpression]:(e,t,r)=>c(t,e.expression)||h(t,r,e.typeArguments)||h(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)||h(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)||h(t,r,e.typeArguments)||c(t,e.template),[n.ParenthesizedExpression]:(e,t,r)=>c(t,e.expression),[n.ArrayLiteralExpression]:(e,t,r)=>h(t,r,e.elements),[n.ObjectLiteralExpression]:(e,t,r)=>h(t,r,e.properties),[n.SpreadAssignment]:(e,t,r)=>c(t,e.expression),[n.PropertyAssignment]:(e,t,r)=>h(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)=>h(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)=>h(t,r,e.types),[n.IntersectionType]:(e,t,r)=>h(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)||h(t,r,e.typeArguments),[n.ExpressionWithTypeArguments]:(e,t,r)=>c(t,e.expression)||h(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)=>h(t,r,e.attributes),[n.TypeQuery]:(e,t,r)=>c(t,e.exprName)||h(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)||h(t,r,e.members),[n.TypeLiteral]:(e,t,r)=>h(t,r,e.members),[n.TupleType]:(e,t,r)=>h(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)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.ConstructorType]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.TemplateLiteralType]:(e,t,r)=>c(t,e.head)||h(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)||h(t,r,e.children)||c(t,e.closingElement),[n.JsxAttributes]:(e,t,r)=>h(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)||h(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxSelfClosingElement]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxFragment]:(e,t,r)=>c(t,e.openingFragment)||h(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)=>h(t,r,e.children),[n.JSDoc]:(e,t,r)=>h(t,r,e.comment)||h(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)||h(t,r,e.comment),[n.JSDocUnknownTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocTemplateTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.constraint)||h(t,r,e.typeParameters)||h(t,r,e.comment),[n.JSDocReturnTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocPublicTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocPrivateTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocProtectedTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocReadonlyTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocOverrideTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocDeprecatedTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocSeeTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.nameExpression)||h(t,r,e.comment),[n.JSDocImplementsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||h(t,r,e.comment),[n.JSDocAugmentsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||h(t,r,e.comment),[n.JSDocSatisfiesTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocThrowsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocThisTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(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)||h(t,r,e.comment),[n.JSDocCallbackTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||h(t,r,e.comment),[n.JSDocOverloadTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocTypedefTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||h(t,r,e.comment),[n.JSDocSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.JSDocNameReference]:(e,t,r)=>c(t,e.name),[n.ModuleDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.body),[n.ImportEqualsDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.moduleReference),[n.ExportDeclaration]:(e,t,r)=>h(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)||h(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)=>h(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)=>h(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)||h(t,r,e.statements),[n.DefaultClause]:(e,t,r)=>c(t,e.expression)||h(t,r,e.statements),[n.ObjectBindingPattern]:(e,t,r)=>h(t,r,e.elements),[n.ArrayBindingPattern]:(e,t,r)=>h(t,r,e.elements),[n.JSDocParameterTag]:Yt,[n.JSDocPropertyTag]:Yt,[n.SourceFile]:(e,t,r)=>h(t,r,e.statements)||c(t,e.endOfFileToken)};function c(e,t){return t?e(t):void 0}function h(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 ml(e,t){return new l(n.QualifiedName,{left:e,right:t})}function hl(e){return new l(n.ComputedPropertyName,{expression:e})}function dl(e){return new l(n.Decorator,{expression:e})}function Tl(e,t,r){return new l(n.IfStatement,{expression:e,thenStatement:t,elseStatement:r})}function gl(e,t){return new l(n.DoStatement,{statement:e,expression:t})}function yl(e,t){return new l(n.WhileStatement,{expression:e,statement:t})}function xl(e,t,r,i){return new l(n.ForStatement,{initializer:e,condition:t,incrementor:r,statement:i})}function El(e){return new l(n.BreakStatement,{label:e})}function kl(e){return new l(n.ContinueStatement,{label:e})}function wl(e){return new l(n.ReturnStatement,{expression:e})}function _l(e,t){return new l(n.WithStatement,{expression:e,statement:t})}function Dl(e,t){return new l(n.SwitchStatement,{expression:e,caseBlock:t})}function Sl(e){return new l(n.CaseBlock,{clauses:m(e)})}function Pl(e){return new l(n.ThrowStatement,{expression:e})}function Al(e,t,r){return new l(n.TryStatement,{tryBlock:e,catchClause:t,finallyBlock:r})}function bl(e,t){return new l(n.CatchClause,{variableDeclaration:e,block:t})}function Il(e,t){return new l(n.LabeledStatement,{label:e,statement:t})}function Cl(e){return new l(n.ExpressionStatement,{expression:e})}function Nl(e,t){return new l(n.Block,{statements:m(e),multiLine:t})}function Ll(e,t){return new l(n.VariableStatement,{modifiers:e?m(e):void 0,declarationList:t})}function Jl(e,t,r,i){return new l(n.VariableDeclaration,{name:e,exclamationToken:t,type:r,initializer:i})}function Rl(e,t){let r=new l(n.VariableDeclarationList,{declarations:m(e)});return r.flags=t,r}function Ol(e,t,r,i,s,o){return new l(n.Parameter,{modifiers:e?m(e):void 0,dotDotDotToken:t,name:r,questionToken:i,type:s,initializer:o})}function vl(e,t,r,i){return new l(n.BindingElement,{dotDotDotToken:e,propertyName:t,name:r,initializer:i})}function Ml(e){return new l(n.MissingDeclaration,{modifiers:e?m(e):void 0})}function ql(e,t,r,i,s,o,u){return new l(n.FunctionDeclaration,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o,body:u})}function Bl(e,t,r,i,s){return new l(n.ClassDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function Ul(e,t,r,i,s){return new l(n.ClassExpression,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function jl(e,t){return new l(n.HeritageClause,{token:e,types:m(t)})}function Vl(e,t,r,i,s){return new l(n.InterfaceDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function Wl(e,t,r,i){return new l(n.TypeAliasDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,type:i})}function zl(e,t){return new l(n.EnumMember,{name:e,initializer:t})}function Hl(e,t,r){return new l(n.EnumDeclaration,{modifiers:e?m(e):void 0,name:t,members:m(r)})}function Gl(e){return new l(n.ModuleBlock,{statements:m(e)})}function $l(e,t,r,i){return new l(n.ImportDeclaration,{modifiers:e?m(e):void 0,importClause:t,moduleSpecifier:r,attributes:i})}function Fl(e){return new l(n.ExternalModuleReference,{expression:e})}function Ql(e){return new l(n.NamespaceImport,{name:e})}function Yl(e){return new l(n.NamedImports,{elements:m(e)})}function Xl(e,t=!1,r,i){return new l(n.ExportAssignment,{modifiers:e?m(e):void 0,isExportEquals:t,type:r,expression:i})}function Zl(e,t){return new l(n.NamespaceExportDeclaration,{modifiers:e?m(e):void 0,name:t})}function Kl(e){return new l(n.NamespaceExport,{name:e})}function ef(e){return new l(n.NamedExports,{elements:m(e)})}function tf(e=!1,t,r){return new l(n.ExportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function rf(e,t,r){return new l(n.CallSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function nf(e,t,r){return new l(n.ConstructSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function sf(e,t,r,i,s){return new l(n.Constructor,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i,body:s})}function of(e,t,r,i,s,o){return new l(n.GetAccessor,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,parameters:m(i),type:s,body:o})}function af(e,t,r,i,s,o){return new l(n.SetAccessor,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,parameters:m(i),type:s,body:o})}function cf(e,t,r){return new l(n.IndexSignature,{modifiers:e?m(e):void 0,parameters:m(t),type:r})}function uf(e,t,r,i,s,o){return new l(n.MethodSignature,{modifiers:e?m(e):void 0,name:t,postfixToken:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o})}function pf(e,t,r,i,s,o,u,f){return new l(n.MethodDeclaration,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,postfixToken:i,typeParameters:s?m(s):void 0,parameters:m(o),type:u,body:f})}function lf(e,t,r,i,s){return new l(n.PropertySignature,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function ff(e,t,r,i,s){return new l(n.PropertyDeclaration,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function mf(e,t){return new l(n.ClassStaticBlockDeclaration,{modifiers:e?m(e):void 0,body:t})}function hf(e,t,r,i,s){return new l(n.BinaryExpression,{modifiers:e?m(e):void 0,left:t,type:r,operatorToken:i,right:s})}function df(e,t){return new l(n.PrefixUnaryExpression,{operator:e,operand:t})}function Tf(e,t){return new l(n.PostfixUnaryExpression,{operand:e,operator:t})}function gf(e,t){return new l(n.YieldExpression,{asteriskToken:e,expression:t})}function yf(e,t,r,i,s,o){return new l(n.ArrowFunction,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i,equalsGreaterThanToken:s,body:o})}function xf(e,t,r,i,s,o,u){return new l(n.FunctionExpression,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o,body:u})}function Ef(e,t){return new l(n.AsExpression,{expression:e,type:t})}function kf(e,t){return new l(n.SatisfiesExpression,{expression:e,type:t})}function wf(e,t,r,i,s){return new l(n.ConditionalExpression,{condition:e,questionToken:t,whenTrue:r,colonToken:i,whenFalse:s})}function _f(e,t,r,i){let s=new l(n.PropertyAccessExpression,{expression:e,questionDotToken:t,name:r});return s.flags=i,s}function Df(e,t,r,i){let s=new l(n.ElementAccessExpression,{expression:e,questionDotToken:t,argumentExpression:r});return s.flags=i,s}function Sf(e,t,r,i,s){let o=new l(n.CallExpression,{expression:e,questionDotToken:t,typeArguments:r?m(r):void 0,arguments:m(i)});return o.flags=s,o}function Pf(e,t,r){return new l(n.NewExpression,{expression:e,typeArguments:t?m(t):void 0,arguments:r?m(r):void 0})}function Af(e,t){return new l(n.MetaProperty,{keywordToken:e,name:t})}function bf(e,t){let r=new l(n.NonNullExpression,{expression:e});return r.flags=t,r}function If(e){return new l(n.SpreadElement,{expression:e})}function Cf(e,t){return new l(n.TemplateExpression,{head:e,templateSpans:m(t)})}function Nf(e,t){return new l(n.TemplateSpan,{expression:e,literal:t})}function Lf(e,t,r,i,s){let o=new l(n.TaggedTemplateExpression,{tag:e,questionDotToken:t,typeArguments:r?m(r):void 0,template:i});return o.flags=s,o}function Jf(e){return new l(n.ParenthesizedExpression,{expression:e})}function Rf(e,t){return new l(n.ArrayLiteralExpression,{elements:m(e),multiLine:t})}function Of(e,t){return new l(n.ObjectLiteralExpression,{properties:m(e),multiLine:t})}function vf(e){return new l(n.SpreadAssignment,{expression:e})}function Mf(e,t,r,i,s){return new l(n.PropertyAssignment,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function qf(e,t,r,i,s,o){return new l(n.ShorthandPropertyAssignment,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,equalsToken:s,objectAssignmentInitializer:o})}function Bf(e){return new l(n.DeleteExpression,{expression:e})}function Uf(e){return new l(n.TypeOfExpression,{expression:e})}function jf(e){return new l(n.VoidExpression,{expression:e})}function Vf(e){return new l(n.AwaitExpression,{expression:e})}function Wf(e,t){return new l(n.TypeAssertionExpression,{type:e,expression:t})}function zf(e){return new l(n.UnionType,{types:m(e)})}function Hf(e){return new l(n.IntersectionType,{types:m(e)})}function Gf(e,t,r,i){return new l(n.ConditionalType,{checkType:e,extendsType:t,trueType:r,falseType:i})}function $f(e,t){return new l(n.TypeOperator,{operator:e,type:t})}function Ff(e){return new l(n.InferType,{typeParameter:e})}function Qf(e){return new l(n.ArrayType,{elementType:e})}function Yf(e,t){return new l(n.IndexedAccessType,{objectType:e,indexType:t})}function Xf(e,t){return new l(n.TypeReference,{typeName:e,typeArguments:t?m(t):void 0})}function Zf(e,t){return new l(n.ExpressionWithTypeArguments,{expression:e,typeArguments:t?m(t):void 0})}function Kf(e){return new l(n.LiteralType,{literal:e})}function em(e,t,r){return new l(n.TypePredicate,{assertsModifier:e,parameterName:t,type:r})}function tm(e,t){return new l(n.ImportAttribute,{name:e,value:t})}function rm(e,t,r){return new l(n.ImportAttributes,{token:e,attributes:m(t),multiLine:r})}function nm(e,t){return new l(n.TypeQuery,{exprName:e,typeArguments:t?m(t):void 0})}function im(e,t,r,i,s,o){return new l(n.MappedType,{readonlyToken:e,typeParameter:t,nameType:r,questionToken:i,type:s,members:o?m(o):void 0})}function sm(e){return new l(n.TypeLiteral,{members:m(e)})}function om(e){return new l(n.TupleType,{elements:m(e)})}function am(e,t,r,i){return new l(n.NamedTupleMember,{dotDotDotToken:e,name:t,questionToken:r,type:i})}function cm(e){return new l(n.OptionalType,{type:e})}function um(e){return new l(n.RestType,{type:e})}function pm(e){return new l(n.ParenthesizedType,{type:e})}function lm(e,t,r){return new l(n.FunctionType,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function fm(e,t,r,i){return new l(n.ConstructorType,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i})}function mm(e,t){return new l(n.TemplateLiteralType,{head:e,templateSpans:m(t)})}function hm(e,t){return new l(n.TemplateLiteralTypeSpan,{type:e,literal:t})}function dm(e,t,r){return new l(n.SyntheticExpression,{type:e,isSpread:t,tupleNameSource:r})}function Tm(e){return new l(n.PartiallyEmittedExpression,{expression:e})}function gm(e,t,r){return new l(n.JsxElement,{openingElement:e,children:m(t),closingElement:r})}function ym(e){return new l(n.JsxAttributes,{properties:m(e)})}function xm(e,t){return new l(n.JsxNamespacedName,{namespace:e,name:t})}function Em(e,t,r){return new l(n.JsxOpeningElement,{tagName:e,typeArguments:t?m(t):void 0,attributes:r})}function km(e,t,r){return new l(n.JsxSelfClosingElement,{tagName:e,typeArguments:t?m(t):void 0,attributes:r})}function wm(e,t,r){return new l(n.JsxFragment,{openingFragment:e,children:m(t),closingFragment:r})}function _m(e,t){return new l(n.JsxAttribute,{name:e,initializer:t})}function Dm(e){return new l(n.JsxSpreadAttribute,{expression:e})}function Sm(e){return new l(n.JsxClosingElement,{tagName:e})}function Pm(e,t){return new l(n.JsxExpression,{dotDotDotToken:e,expression:t})}function Am(e){return new l(n.SyntaxList,{children:e})}function bm(e,t){return new l(n.JSDoc,{comment:m(e),tags:t?m(t):void 0})}function Im(e){return new l(n.JSDocTypeExpression,{type:e})}function Cm(e){return new l(n.JSDocNonNullableType,{type:e})}function Nm(e){return new l(n.JSDocNullableType,{type:e})}function Lm(e){return new l(n.JSDocVariadicType,{type:e})}function Jm(e){return new l(n.JSDocOptionalType,{type:e})}function Rm(e,t,r){return new l(n.JSDocTypeTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Om(e,t){return new l(n.JSDocUnknownTag,{tagName:e,comment:t?m(t):void 0})}function vm(e,t,r,i){return new l(n.JSDocTemplateTag,{tagName:e,constraint:t,typeParameters:m(r),comment:i?m(i):void 0})}function Mm(e,t,r){return new l(n.JSDocReturnTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function qm(e,t){return new l(n.JSDocPublicTag,{tagName:e,comment:t?m(t):void 0})}function Bm(e,t){return new l(n.JSDocPrivateTag,{tagName:e,comment:t?m(t):void 0})}function Um(e,t){return new l(n.JSDocProtectedTag,{tagName:e,comment:t?m(t):void 0})}function jm(e,t){return new l(n.JSDocReadonlyTag,{tagName:e,comment:t?m(t):void 0})}function Vm(e,t){return new l(n.JSDocOverrideTag,{tagName:e,comment:t?m(t):void 0})}function Wm(e,t){return new l(n.JSDocDeprecatedTag,{tagName:e,comment:t?m(t):void 0})}function zm(e,t,r){return new l(n.JSDocSeeTag,{tagName:e,nameExpression:t,comment:r?m(r):void 0})}function Hm(e,t,r){return new l(n.JSDocImplementsTag,{tagName:e,className:t,comment:r?m(r):void 0})}function Gm(e,t,r){return new l(n.JSDocAugmentsTag,{tagName:e,className:t,comment:r?m(r):void 0})}function $m(e,t,r){return new l(n.JSDocSatisfiesTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Fm(e,t,r){return new l(n.JSDocThrowsTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Qm(e,t,r){return new l(n.JSDocThisTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Ym(e,t,r,i,s){return new l(n.JSDocImportTag,{tagName:e,importClause:t,moduleSpecifier:r,attributes:i,comment:s?m(s):void 0})}function Xm(e,t,r,i){return new l(n.JSDocCallbackTag,{tagName:e,typeExpression:t,name:r,comment:i?m(i):void 0})}function Zm(e,t,r){return new l(n.JSDocOverloadTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Km(e,t,r,i){return new l(n.JSDocTypedefTag,{tagName:e,typeExpression:t,name:r,comment:i?m(i):void 0})}function eh(e,t,r){return new l(n.JSDocSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function th(e){return new l(n.JSDocNameReference,{name:e})}function rh(e,t,r,i){return new l(n.ModuleDeclaration,{modifiers:e?m(e):void 0,keyword:t,name:r,body:i})}function nh(e,t=!1,r,i){return new l(n.ImportEqualsDeclaration,{modifiers:e?m(e):void 0,isTypeOnly:t,name:r,moduleReference:i})}function ih(e,t,r,i,s){return new l(n.ExportDeclaration,{modifiers:e?m(e):void 0,isTypeOnly:t,exportClause:r,moduleSpecifier:i,attributes:s})}function sh(e=!1,t,r,i,s){return new l(n.ImportType,{isTypeOf:e,argument:t,attributes:r,qualifier:i,typeArguments:s?m(s):void 0})}function oh(e,t,r){return new l(n.ImportClause,{phaseModifier:e,name:t,namedBindings:r})}function ah(e=!1,t,r){return new l(n.ImportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function ch(e,t){return new l(n.JSDocLink,{name:e,text:t})}function uh(e,t){return new l(n.JSDocLinkPlain,{name:e,text:t})}function ph(e,t){return new l(n.JSDocLinkCode,{name:e,text:t})}function lh(e,t,r,i,s){return new l(n.TypeParameter,{modifiers:e?m(e):void 0,name:t,constraint:r,expression:i,defaultType:s})}function fh(e,t){return new l(n.SyntheticReferenceExpression,{expression:e,thisArg:t})}function mh(e,t){return new l(n.JSDocTypeLiteral,{jsdocPropertyTags:e,isArrayType:t})}function hh(e,t,r,i){return new l(n.ForInStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function dh(e,t,r,i){return new l(n.ForOfStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function Th(e,t){return new l(n.CaseClause,{expression:e,statements:m(t)})}function gh(e,t){return new l(n.DefaultClause,{expression:e,statements:m(t)})}function yh(e){return new l(n.ObjectBindingPattern,{elements:m(e)})}function xh(e){return new l(n.ArrayBindingPattern,{elements:m(e)})}function Eh(e,t,r,i,s,o){return new l(n.JSDocParameterTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?m(o):void 0})}function kh(e,t,r,i,s,o){return new l(n.JSDocPropertyTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?m(o):void 0})}function bi(e,t,r){return e.left!==t||e.right!==r?ml(t,r):e}function Ii(e,t){return e.expression!==t?hl(t):e}function Ci(e,t){return e.expression!==t?dl(t):e}function Ni(e,t,r,i){return e.expression!==t||e.thenStatement!==r||e.elseStatement!==i?Tl(t,r,i):e}function Li(e,t,r){return e.statement!==t||e.expression!==r?gl(t,r):e}function Ji(e,t,r){return e.expression!==t||e.statement!==r?yl(t,r):e}function Ri(e,t,r,i,s){return e.initializer!==t||e.condition!==r||e.incrementor!==i||e.statement!==s?xl(t,r,i,s):e}function Oi(e,t){return e.label!==t?El(t):e}function vi(e,t){return e.label!==t?kl(t):e}function Mi(e,t){return e.expression!==t?wl(t):e}function qi(e,t,r){return e.expression!==t||e.statement!==r?_l(t,r):e}function Bi(e,t,r){return e.expression!==t||e.caseBlock!==r?Dl(t,r):e}function Ui(e,t){return e.clauses!==t?Sl(t):e}function ji(e,t){return e.expression!==t?Pl(t):e}function Vi(e,t,r,i){return e.tryBlock!==t||e.catchClause!==r||e.finallyBlock!==i?Al(t,r,i):e}function Wi(e,t,r){return e.variableDeclaration!==t||e.block!==r?bl(t,r):e}function zi(e,t,r){return e.label!==t||e.statement!==r?Il(t,r):e}function Hi(e,t){return e.expression!==t?Cl(t):e}function Gi(e,t){return e.statements!==t?Nl(t,e.multiLine):e}function $i(e,t,r){return e.modifiers!==t||e.declarationList!==r?Ll(t,r):e}function Fi(e,t,r,i,s){return e.name!==t||e.exclamationToken!==r||e.type!==i||e.initializer!==s?Jl(t,r,i,s):e}function Qi(e,t){return e.declarations!==t?Rl(t,e.flags):e}function Yi(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?Ol(t,r,i,s,o,u):e}function Xi(e,t,r,i,s){return e.dotDotDotToken!==t||e.propertyName!==r||e.name!==i||e.initializer!==s?vl(t,r,i,s):e}function Zi(e,t){return e.modifiers!==t?Ml(t):e}function Ki(e,t,r,i,s,o,u,f){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==f?ql(t,r,i,s,o,u,f):e}function es(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Bl(t,r,i,s,o):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?Ul(t,r,i,s,o):e}function rs(e,t){return e.types!==t?jl(e.token,t):e}function ns(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Vl(t,r,i,s,o):e}function is(e,t,r,i,s){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.type!==s?Wl(t,r,i,s):e}function ss(e,t,r){return e.name!==t||e.initializer!==r?zl(t,r):e}function os(e,t,r,i){return e.modifiers!==t||e.name!==r||e.members!==i?Hl(t,r,i):e}function as(e,t){return e.statements!==t?Gl(t):e}function cs(e,t,r,i,s){return e.modifiers!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s?$l(t,r,i,s):e}function us(e,t){return e.expression!==t?Fl(t):e}function ps(e,t){return e.name!==t?Ql(t):e}function ls(e,t){return e.elements!==t?Yl(t):e}function fs(e,t,r,i){return e.modifiers!==t||e.type!==r||e.expression!==i?Xl(t,e.isExportEquals,r,i):e}function ms(e,t,r){return e.modifiers!==t||e.name!==r?Zl(t,r):e}function hs(e,t){return e.name!==t?Kl(t):e}function ds(e,t){return e.elements!==t?ef(t):e}function Ts(e,t,r){return e.propertyName!==t||e.name!==r?tf(e.isTypeOnly,t,r):e}function gs(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?rf(t,r,i):e}function ys(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?nf(t,r,i):e}function xs(e,t,r,i,s,o){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s||e.body!==o?sf(t,r,i,s,o):e}function Es(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?of(t,r,i,s,o,u):e}function ks(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?af(t,r,i,s,o,u):e}function ws(e,t,r,i){return e.modifiers!==t||e.parameters!==r||e.type!==i?cf(t,r,i):e}function _s(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?uf(t,r,i,s,o,u):e}function Ds(e,t,r,i,s,o,u,f,x){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.postfixToken!==s||e.typeParameters!==o||e.parameters!==u||e.type!==f||e.body!==x?pf(t,r,i,s,o,u,f,x):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?lf(t,r,i,s,o):e}function Ps(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?ff(t,r,i,s,o):e}function As(e,t,r){return e.modifiers!==t||e.body!==r?mf(t,r):e}function bs(e,t,r,i,s,o){return e.modifiers!==t||e.left!==r||e.type!==i||e.operatorToken!==s||e.right!==o?hf(t,r,i,s,o):e}function Is(e,t){return e.operand!==t?df(e.operator,t):e}function Cs(e,t){return e.operand!==t?Tf(t,e.operator):e}function Ns(e,t,r){return e.asteriskToken!==t||e.expression!==r?gf(t,r):e}function Ls(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?yf(t,r,i,s,o,u):e}function Js(e,t,r,i,s,o,u,f){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==f?xf(t,r,i,s,o,u,f):e}function Rs(e,t,r){return e.expression!==t||e.type!==r?Ef(t,r):e}function Os(e,t,r){return e.expression!==t||e.type!==r?kf(t,r):e}function vs(e,t,r,i,s,o){return e.condition!==t||e.questionToken!==r||e.whenTrue!==i||e.colonToken!==s||e.whenFalse!==o?wf(t,r,i,s,o):e}function Ms(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.name!==i?_f(t,r,i,e.flags):e}function qs(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.argumentExpression!==i?Df(t,r,i,e.flags):e}function Bs(e,t,r,i,s){return e.expression!==t||e.questionDotToken!==r||e.typeArguments!==i||e.arguments!==s?Sf(t,r,i,s,e.flags):e}function Us(e,t,r,i){return e.expression!==t||e.typeArguments!==r||e.arguments!==i?Pf(t,r,i):e}function js(e,t){return e.name!==t?Af(e.keywordToken,t):e}function Vs(e,t){return e.expression!==t?bf(t,e.flags):e}function Ws(e,t){return e.expression!==t?If(t):e}function zs(e,t,r){return e.head!==t||e.templateSpans!==r?Cf(t,r):e}function Hs(e,t,r){return e.expression!==t||e.literal!==r?Nf(t,r):e}function Gs(e,t,r,i,s){return e.tag!==t||e.questionDotToken!==r||e.typeArguments!==i||e.template!==s?Lf(t,r,i,s,e.flags):e}function $s(e,t){return e.expression!==t?Jf(t):e}function Fs(e,t){return e.elements!==t?Rf(t,e.multiLine):e}function Qs(e,t){return e.properties!==t?Of(t,e.multiLine):e}function Ys(e,t){return e.expression!==t?vf(t):e}function Xs(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?Mf(t,r,i,s,o):e}function Zs(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?qf(t,r,i,s,o,u):e}function Ks(e,t){return e.expression!==t?Bf(t):e}function eo(e,t){return e.expression!==t?Uf(t):e}function to(e,t){return e.expression!==t?jf(t):e}function ro(e,t){return e.expression!==t?Vf(t):e}function no(e,t,r){return e.type!==t||e.expression!==r?Wf(t,r):e}function io(e,t){return e.types!==t?zf(t):e}function so(e,t){return e.types!==t?Hf(t):e}function oo(e,t,r,i,s){return e.checkType!==t||e.extendsType!==r||e.trueType!==i||e.falseType!==s?Gf(t,r,i,s):e}function ao(e,t){return e.type!==t?$f(e.operator,t):e}function co(e,t){return e.typeParameter!==t?Ff(t):e}function uo(e,t){return e.elementType!==t?Qf(t):e}function po(e,t,r){return e.objectType!==t||e.indexType!==r?Yf(t,r):e}function lo(e,t,r){return e.typeName!==t||e.typeArguments!==r?Xf(t,r):e}function fo(e,t,r){return e.expression!==t||e.typeArguments!==r?Zf(t,r):e}function mo(e,t){return e.literal!==t?Kf(t):e}function ho(e,t,r,i){return e.assertsModifier!==t||e.parameterName!==r||e.type!==i?em(t,r,i):e}function To(e,t,r){return e.name!==t||e.value!==r?tm(t,r):e}function go(e,t){return e.attributes!==t?rm(e.token,t,e.multiLine):e}function yo(e,t,r){return e.exprName!==t||e.typeArguments!==r?nm(t,r):e}function xo(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?im(t,r,i,s,o,u):e}function Eo(e,t){return e.members!==t?sm(t):e}function ko(e,t){return e.elements!==t?om(t):e}function wo(e,t,r,i,s){return e.dotDotDotToken!==t||e.name!==r||e.questionToken!==i||e.type!==s?am(t,r,i,s):e}function _o(e,t){return e.type!==t?cm(t):e}function Do(e,t){return e.type!==t?um(t):e}function So(e,t){return e.type!==t?pm(t):e}function Po(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?lm(t,r,i):e}function Ao(e,t,r,i,s){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s?fm(t,r,i,s):e}function bo(e,t,r){return e.head!==t||e.templateSpans!==r?mm(t,r):e}function Io(e,t,r){return e.type!==t||e.literal!==r?hm(t,r):e}function Co(e,t){return e.tupleNameSource!==t?dm(e.type,e.isSpread,t):e}function No(e,t){return e.expression!==t?Tm(t):e}function Lo(e,t,r,i){return e.openingElement!==t||e.children!==r||e.closingElement!==i?gm(t,r,i):e}function Jo(e,t){return e.properties!==t?ym(t):e}function Ro(e,t,r){return e.namespace!==t||e.name!==r?xm(t,r):e}function Oo(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?Em(t,r,i):e}function vo(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?km(t,r,i):e}function Mo(e,t,r,i){return e.openingFragment!==t||e.children!==r||e.closingFragment!==i?wm(t,r,i):e}function qo(e,t,r){return e.name!==t||e.initializer!==r?_m(t,r):e}function Bo(e,t){return e.expression!==t?Dm(t):e}function Uo(e,t){return e.tagName!==t?Sm(t):e}function jo(e,t,r){return e.dotDotDotToken!==t||e.expression!==r?Pm(t,r):e}function Vo(e,t){return e.children!==t?Am(t):e}function Wo(e,t,r){return e.comment!==t||e.tags!==r?bm(t,r):e}function zo(e,t){return e.type!==t?Im(t):e}function Ho(e,t){return e.type!==t?Cm(t):e}function Go(e,t){return e.type!==t?Nm(t):e}function $o(e,t){return e.type!==t?Lm(t):e}function Fo(e,t){return e.type!==t?Jm(t):e}function Qo(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Rm(t,r,i):e}function Yo(e,t,r){return e.tagName!==t||e.comment!==r?Om(t,r):e}function Xo(e,t,r,i,s){return e.tagName!==t||e.constraint!==r||e.typeParameters!==i||e.comment!==s?vm(t,r,i,s):e}function Zo(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Mm(t,r,i):e}function Ko(e,t,r){return e.tagName!==t||e.comment!==r?qm(t,r):e}function ea(e,t,r){return e.tagName!==t||e.comment!==r?Bm(t,r):e}function ta(e,t,r){return e.tagName!==t||e.comment!==r?Um(t,r):e}function ra(e,t,r){return e.tagName!==t||e.comment!==r?jm(t,r):e}function na(e,t,r){return e.tagName!==t||e.comment!==r?Vm(t,r):e}function ia(e,t,r){return e.tagName!==t||e.comment!==r?Wm(t,r):e}function sa(e,t,r,i){return e.tagName!==t||e.nameExpression!==r||e.comment!==i?zm(t,r,i):e}function oa(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?Hm(t,r,i):e}function aa(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?Gm(t,r,i):e}function ca(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?$m(t,r,i):e}function ua(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Fm(t,r,i):e}function pa(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Qm(t,r,i):e}function la(e,t,r,i,s,o){return e.tagName!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s||e.comment!==o?Ym(t,r,i,s,o):e}function fa(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?Xm(t,r,i,s):e}function ma(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Zm(t,r,i):e}function ha(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?Km(t,r,i,s):e}function da(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?eh(t,r,i):e}function Ta(e,t){return e.name!==t?th(t):e}function ga(e,t,r,i){return e.modifiers!==t||e.name!==r||e.body!==i?rh(t,e.keyword,r,i):e}function ya(e,t,r,i){return e.modifiers!==t||e.name!==r||e.moduleReference!==i?nh(t,e.isTypeOnly,r,i):e}function xa(e,t,r,i,s){return e.modifiers!==t||e.exportClause!==r||e.moduleSpecifier!==i||e.attributes!==s?ih(t,e.isTypeOnly,r,i,s):e}function Ea(e,t,r,i,s){return e.argument!==t||e.attributes!==r||e.qualifier!==i||e.typeArguments!==s?sh(e.isTypeOf,t,r,i,s):e}function ka(e,t,r){return e.name!==t||e.namedBindings!==r?oh(e.phaseModifier,t,r):e}function wa(e,t,r){return e.propertyName!==t||e.name!==r?ah(e.isTypeOnly,t,r):e}function _a(e,t){return e.name!==t?ch(t,e.text):e}function Da(e,t){return e.name!==t?uh(t,e.text):e}function Sa(e,t){return e.name!==t?ph(t,e.text):e}function Pa(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.constraint!==i||e.expression!==s||e.defaultType!==o?lh(t,r,i,s,o):e}function Aa(e,t,r){return e.expression!==t||e.thisArg!==r?fh(t,r):e}function ba(e,t){return e.jsdocPropertyTags!==t?mh(t,e.isArrayType):e}function Ia(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?hh(t,r,i,s):e}function Ca(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?dh(t,r,i,s):e}function Na(e,t,r){return e.expression!==t||e.statements!==r?Th(t,r):e}function La(e,t,r){return e.expression!==t||e.statements!==r?gh(t,r):e}function Ja(e,t){return e.elements!==t?yh(t):e}function Ra(e,t){return e.elements!==t?xh(t):e}function va(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?Eh(t,r,e.isBracketed,i,e.isNameFirst,s):e}function Ma(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?kh(t,r,e.isBracketed,i,e.isNameFirst,s):e}function wh(e,t,r){return new l(n.SourceFile,{...Yn(e),statements:m(t),endOfFileToken:r})}function Oa(e,t,r){return e.statements!==t||e.endOfFileToken!==r?wh(e,t,r):e}var qa={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},c1=new Map(Object.entries(qa)),_h=new Map(Object.entries({...qa,"{":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})),u1=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 Dh(e){let t=[];return e.forEach((r,i)=>{t[r]=i}),t}var p1=Dh(_h);function Ba(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 Sh(e){return Ph(e)||at(e)}function Ph(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(Ua(e,t)){t=Ah(e,t),o=!1;continue}break;case E.hash:if(t===0&&bh(e,t)){t=Ih(e,t);continue}break;case E.asterisk:if(o){t++,o=!1;continue}break;default:if(u>E.maxAsciiCharacter&&Sh(u)){t++;continue}break}return t}}function Ua(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 Ah(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)&&Ua(e,t))break;t++}}return t}function bh(e,t){return t===0&&e.charCodeAt(0)===E.hash&&e.charCodeAt(1)===E.exclamation}function Ih(e,t){t+=2;while(t<e.length){if(at(e.charCodeAt(t)))break;t++}return t}function It(e,t,r){if(Nh(e))return e.pos;if(Ti(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&De.JSDoc))}function Nh(e){return e.pos===e.end&&e.pos>=0&&e.kind!==n.EndOfFile}var He={[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"]},Lh={[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 ja=5,Va=0,Wa=4,za=8,Ha=12,Ga=16,$a=20,Xt=24,Zt=28,Kt=32,er=36,tr=40,Ct=44,Z=28,Ge=0,rr=4,nr=8,ct=12,$e=16,ir=20,Fa=24,Fe=4294967295,Le=0,Qe=1073741824,ut=2147483648;function Qa(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 Qe;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 Ya(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 Jh}from"node:buffer";var Xa=237,Rh=160,Oh=191,vh=128,Mh=191;function qh(e,t){return t+2<e.length&&e[t]===Xa&&e[t+1]>=Rh&&e[t+1]<=Oh&&e[t+2]>=vh&&e[t+2]<=Mh}function Bh(e,t){return 53248|(e[t+1]&63)<<6|e[t+2]&63}function Uh(e){return Jh.from(e.buffer,e.byteOffset,e.byteLength).indexOf(Xa)>=0}function jh(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 Ye extends TextDecoder{decode(e,t){if(e===void 0)return super.decode(e,t);let r=jh(e);if(!Uh(r))return super.decode(r,t);let i=[],s=0;for(let o=0;o<r.length;o++){if(!qh(r,o))continue;if(s<o)i.push(super.decode(r.subarray(s,o),t));i.push(String.fromCharCode(Bh(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 Vh=new TextEncoder,Wh=new Ye;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=Vh.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=Wh.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 Za=Z/4,Ka=3,sr=4294967295;class rc{parts;byteLen;offsets;constructor(){this.parts=[],this.byteLen=0,this.offsets=[]}add(e){let t=this.offsets.length,i=ec().encode(e).length,s=this.byteLen;return this.parts.push(e),this.byteLen+=i,this.offsets.push(s,s+i),t}encode(){let t=ec().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 zh;function ec(){return zh??=new TextEncoder}function Hh(e){let t=e.kind,r=He[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&&Gh(i[u]))s|=1<<o}return s}function Gh(e){if(e===void 0||e===null)return!1;return!0}function $h(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 Fh(e,t,r,i){let s=r.length*4;if(e.kind===n.SourceFile){let o=e,u=t.add(o.text),f=t.add(o.fileName),x=t.add(o.path),S=Wr(o.referencedFiles,i),I=Wr(o.typeReferenceDirectives,i),q=Wr(o.libReferenceDirectives,i);r.push(u,f,x,o.languageVariant,o.scriptKind,S,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??"",f=o.rawText??"",x=o.templateFlags??0,S=t.add(u),I=t.add(f);r.push(S,I,x)}else{let o=e,u=o.text??"",f=o.tokenFlags??0,x=t.add(u);r.push(x,f)}return s}function tc(e,t,r,i){let s=Qa(e.kind),o=Ya(e);switch(s){case Le:return s|o|Hh(e);case Qe:return s|o|$h(e,t);case ut:return s|o|Fh(e,t,r,i);default:throw Error("unreachable")}}function Qh(e){return He[e.kind]}function Yh(e){return Array.isArray(e)&&typeof e.pos==="number"&&typeof e.end==="number"}function nc(e){let t=new rc,r=[],i=new Vr,s=[];s.push(0,0,0,0,0,0,0);let o=0,u=0,f=0;function x(N){o++;let ue=o;if(f!==0)s[f*Za+Ka]=ue;let se=tc(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=f;u=ue,f=0,I(N),f=ue,u=Ie}function S(N){if(!N)return;o++;let ue=o;if(f!==0)s[f*Za+Ka]=ue;s.push(Fe,N.pos>=0?N.pos:0,N.end>=0?N.end:0,0,u,N.length,0);let se=u;u=ue,f=0;for(let Ie of N)x(Ie);f=ue,u=se}function I(N){let ue=Qh(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(Yh(Ce))S(Ce);else x(Ce)}}o++,u++;let q=tc(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;f=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(),Ke=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 et=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=ja<<24;we.setUint32(Va,Ut,!0),we.setUint32(Xt,et,!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+Ke.length+F.length+Ae.length+de.length);return be.set(me,0),be.set(Ke,Ct),be.set(F,R),be.set(Ae,Te),be.set(de,W),be}function ic(e){return Buffer.from(e).toString("base64")}var sc=[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],oc=3221225472,ac=255,cc=16777215,Xe=16777215;function zr(e){let t=e.getUint32(Wa,!0),r=e.getUint32(za,!0),i=e.getUint32(Ha,!0),s=e.getUint32(Ga,!0);return or(s)+or(i)+or(r)+or(t)}function Hr(e){return e.getUint32($a,!0).toString()}function or(e){return(e>>>0).toString(16).padStart(8,"0")}function uc(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+Ge,!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+$e,!0)}get data(){return this.view.getUint32(this._byteIndex+ir,!0)}get dataType(){return this.data&oc}get childMask(){if(this.dataType!==Le)return-1;return this.data&ac}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+Ge,!0)===Fe)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+Ge,!0)===Fe?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+$e,!0)===this.index}getNamedChild(e){let t=this.kind,r=He[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-sc[~(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===Qe?"string":"extended";if(e.push(`dataType: ${t}`),this.dataType===Le)e.push(`childMask: ${this.childMask.toString(2).padStart(8,"0")}`),e.push(`childProperties: ${He[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&Xe);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&Xe);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&cc;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&Xe),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&Xe),t=this.view.getUint32(e+4,!0);return this.getString(t)}}get flags(){return this.view.getUint32(this._byteIndex+Fa,!0)}get modifierFlags(){let e=this.modifiers;if(!e)return B.None;let t=B.None;for(let r of e)t|=uc(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(),f=r.readUint(),x=r.readString(),S=r.readUint(),I=r.readBool();s.push({pos:u,end:f,fileName:x,resolutionMode:S,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+$e,!0);while(r!==e&&this.view.getUint32(this._offsetNodes+r*Z+Ge,!0)===Fe)r=this.view.getUint32(this._offsetNodes+r*Z+$e,!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&Xe)}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&De.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??=Ba(this.text??"")}getLineAndCharacterOfPosition(e){let t=this.getLineStarts(),r=Xh(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 Xh(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 pc(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 Ye)}function Q(e){if(!(e instanceof qe))throw Error("getNodeId requires a RemoteNode");return e.id}var Zh=/\\/g,lc=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function Kh(e){return e===47||e===92}function Fr(e){return e>=97&&e<=122||e>=65&&e<=90}function ed(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=hc(e);return t<0?~t:t}function hc(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 f=ed(e,s+2);if(f!==-1){if(e.charCodeAt(f)===47)return~(f+1);if(f===e.length)return~f}}return~(s+1)}return~e.length}return 0}function Yr(e){return e.length>0&&Kh(e.charCodeAt(e.length-1))}function fc(e){if(Yr(e))return e.substr(0,e.length-1);return e}function dc(e){if(!Yr(e))return e+"/";return e}function ur(e){return e.includes("\\")?e.replace(Zh,"/"):e}function td(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=dc(e)+r}return e}function Tc(e){if(!lc.test(e))return e;let t=e.replace(/\/\.\//g,"/");if(t.startsWith("./"))t=t.slice(2);if(t!==e){if(e=t,!lc.test(e))return e}return}function gc(e,t){let r=Qr(e);if(r===0&&t)e=td(t,e),r=Qr(e);else e=ur(e);let i=Tc(e);if(i!==void 0)return i.length>r?fc(i):i;let s=e.length,o=e.substring(0,r),u,f=r,x=f,S=f,I=r!==0;while(f<s){x=f;let q=e.charCodeAt(f);while(q===47&&f+1<s)f++,q=e.charCodeAt(f);if(f>x)u??=e.substring(0,x-1),x=f;let O=e.indexOf("/",f+1);if(O===-1)O=s;let F=O-x;if(F===1&&e.charCodeAt(f)===46)u??=e.substring(0,S);else if(F===2&&e.charCodeAt(f)===46&&e.charCodeAt(f+1)===46)if(!I)if(u!==void 0)u+=u.length===r?"..":"/..";else S=f+2;else if(u===void 0)if(S-2>=0)u=e.substring(0,Math.max(r,e.lastIndexOf("/",S-2)));else u=e.substring(0,S);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,S=O;f=O+1}return u??(s>r?fc(e):e)}function rd(e){e=ur(e);let t=Tc(e);if(t!==void 0)return t;return t=gc(e,""),t&&Yr(e)?dc(t):t}function nd(e){return hc(e)>0}function yc(e,t,r){let i=nd(e)?rd(e):gc(e,t);return r(i)}function xc(e){return e?id:sd}function id(e){return e}function sd(e){return e.toLowerCase()}var od="bundled:///";function Ec(e){return e.startsWith(od)}function ad(e){return e.startsWith("^/")}function kc(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 cd={":":"%3A","/":"%2F","?":"%3F","#":"%23","[":"%5B","]":"%5D","@":"%40","!":"%21",$:"%24","&":"%26","'":"%27","(":"%28",")":"%29","*":"%2A","+":"%2B",",":"%2C",";":"%3B","=":"%3D"," ":"%20"};function mc(e){let t=e;for(let[r,i]of Object.entries(cd))t=t.replaceAll(r,i);return t}function wc(e){if(Ec(e))return e;if(ad(e)){let o=e.substring(2),u=o.indexOf("/");if(u===-1)throw Error("invalid file name: "+e);let f=o.substring(0,u),x=o.substring(u+1),S=x.indexOf("/");if(S===-1)throw Error("invalid file name: "+e);let I=x.substring(0,S),q=x.substring(S+1);if(I==="ts-nul-authority")return f+":"+q;return f+"://"+I+"/"+q}let[t,r]=kc(e);if(t!=="")t="/"+mc(t);if(r.startsWith("//"))r=r.substring(2);let s=r.split("/").map((o)=>mc(encodeURIComponent(o)));return"file://"+t+s.join("/")}function Xr(e){if(Ec(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[f,x,S]=kc(u.substring(1));if(S)return f+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 _c(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 f=Lt(s,o),x=u.find((S)=>S.parseOptionsKey===r&&S.contentHash===i);if(x)return x.refs.add(f),this.trackPath(s,o,e),x.file;return u.push({file:t,contentHash:i,parseOptionsKey:r,refs:new Set([f])}),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,f]of i){if(s.has(u))continue;let x=o[u],S;if(x){S=new Set;for(let O of x.changedFiles??[])S.add(O);for(let O of x.deletedFiles??[])S.add(O)}let I=Lt(t,u),q=Lt(e,u);for(let O of f){if(S?.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 f=u.length-1;f>=0;f--)if(u[f].refs.delete(s),u[f].refs.size===0)u.splice(f,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=vp(Fu(),1);var Jn=["readFile","fileExists","directoryExists","getAccessibleEntries","realpath"];import Qu from"node:fs";import PT from"node:module";import Re from"node:path";import{fileURLToPath as Yu}from"node:url";function Rn(){let e=Re.dirname(Yu(import.meta.url)),t=e.replace(/\\/g,"/"),r=JSON.parse(Qu.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 f=o,x,S=s+"-"+process.platform+"-"+process.arch;if(t.endsWith("/_packages/"+s+"/lib"))x=Re.resolve(e,"..","..","..","built","local"),f="tsgo";else if(t.endsWith("/built/npm/"+s+"/lib"))x=Re.resolve(e,"..","..",S,"lib");else{let q="@typescript/"+S;try{if(typeof import.meta.resolve>"u"){let F=PT.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=Yu(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,f);if(process.platform==="win32"){if(I+=".exe",I.length>=248)I="\\\\?\\"+I}if(!Qu.existsSync(I))throw Error("Executable not found: "+I);return I}function On(e){return!("pipe"in e)}function Xu(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 Zu(){return{enabled:!1,totals:vn(),recentRequests:[]}}function Ku(){return{enabled:!1,totals:{requestCount:0,totalProcessingTimeMs:0},recentRequests:[]}}function ep(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((f)=>({...f})),o=t.recentRequests,u=Math.min(s.length,o.length);for(let f=1;f<=u;f++){let x=s[s.length-f],S=o[o.length-f];if(x.method===S.method)x.serverTimeMs=S.processingTimeMs,x.transportOverheadMs=Math.max(0,x.roundTripMs-S.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(Xu(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),f=new ie.StreamMessageWriter(this.process.stdin);this.connection=ie.createMessageConnection(u,f),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 Zu();let e=this.timing.getInfo();if(!this.connected||!this.connection)return e;return ep(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 Ku();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 tp{client;sourceFileCache;toPath;initialized=!1;activeSnapshots=new Set;latestSnapshot;internal;constructor(e={}){this.client=new qn(e),this.sourceFileCache=new Kr,this.internal=new rp(this.client,()=>this.ensureInitialized())}static async fromLSPConnection(e){let t=new tp(e);return await t.ensureInitialized(),t}async ensureInitialized(){if(!this.initialized){let e=await this.client.apiRequest("initialize",null),t=xc(e.useCaseSensitiveFileNames),r=e.currentDirectory;this.toPath=(i)=>yc(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=_c(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 np(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 rp{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 np{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 ip(t,this.id,(o)=>this.projectMap.get(o));for(let o of e.projects){let u=new op(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 ip{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 pp(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 f=0;f<r.length;f++){let x=this.getSymbol(r[f]);if(!x){u=!1;break}o[f]=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 sp{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 lp(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 mp(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 f=this.getType(r[u]);if(!f){o=!1;break}s[u]=f}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 op{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 ap(t,this,r,i,s);let u=new sp(r,t,this,o);this.checker=new cp(t,this,r,u),this.emitter=new up(r)}dispose(){this.checker.dispose()}}class ap{snapshotId;project;client;sourceFileCache;toPath;decoder=new Ye;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),f=Hr(o),x=new cr(s,this.decoder,this.client.getTimingCollector());return this.sourceFileCache.set(r,x,f,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 cp{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 up{client;constructor(e){this.client=e}async printNode(e,t={}){let r=nc(e),i=ic(r);return this.client.apiRequest("printNode",{data:i,...t})}}class Pe{canonicalProject;index;kind;path;constructor(e,t){let r=pc(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 pp{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=Qn(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 lp{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 IT(this)}isUnionType(){return AT(this)}isIntersectionType(){return bT(this)}isObjectType(){return Er(this)}isIntrinsicType(){return fp(this)}isErrorType(){return CT(this)}isLiteralType(){return NT(this)}isStringLiteralType(){return LT(this)}isNumberLiteralType(){return JT(this)}isBigIntLiteralType(){return RT(this)}isBooleanLiteralType(){return OT(this)}isTypeReference(){return vT(this)}isTupleType(){return MT(this)}isIndexType(){return qT(this)}isIndexedAccessType(){return BT(this)}isConditionalType(){return UT(this)}isSubstitutionType(){return jT(this)}isTemplateLiteralType(){return VT(this)}isStringMappingType(){return WT(this)}isTypeParameter(){return zT(this)}}function AT(e){return(e.flags&G.Union)!==0}function bT(e){return(e.flags&G.Intersection)!==0}function Er(e){return(e.flags&G.Object)!==0}function IT(e){return Er(e)&&(e.objectFlags&it.ClassOrInterface)!==0}function fp(e){return(e.flags&G.Intrinsic)!==0}function CT(e){return fp(e)&&e.intrinsicName==="error"}function NT(e){return(e.flags&G.Literal)!==0}function LT(e){return(e.flags&G.StringLiteral)!==0}function JT(e){return(e.flags&G.NumberLiteral)!==0}function RT(e){return(e.flags&G.BigIntLiteral)!==0}function OT(e){return(e.flags&G.BooleanLiteral)!==0}function vT(e){return Er(e)&&(e.objectFlags&it.Reference)!==0}function MT(e){return Er(e)&&(e.objectFlags&it.Tuple)!==0}function qT(e){return(e.flags&G.Index)!==0}function BT(e){return(e.flags&G.IndexedAccess)!==0}function UT(e){return(e.flags&G.Conditional)!==0}function jT(e){return(e.flags&G.Substitution)!==0}function VT(e){return(e.flags&G.TemplateLiteral)!==0}function WT(e){return(e.flags&G.StringMapping)!==0}function zT(e){return(e.flags&G.TypeParameter)!==0}class mp{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{tp as API,cp as Checker,Sr as CompletionItemKind,Pr as DiagnosticCategory,Ar as ElementFlags,up as Emitter,rp as InternalAPI,B as ModifierFlags,br as ModuleKind,Ir as NodeBuilderFlags,Pe as NodeHandle,it as ObjectFlags,ap as Program,op as Project,mp as Signature,st as SignatureFlags,Cr as SignatureKind,np as Snapshot,pp as Symbol,kt as SymbolFlags,G as TypeFlags,Nr as TypePredicateKind,Xr as documentURIToFileName,wc as fileNameToDocumentURI,RT as isBigIntLiteralType,OT as isBooleanLiteralType,IT as isClassOrInterfaceType,UT as isConditionalType,CT as isErrorType,qT as isIndexType,BT as isIndexedAccessType,bT as isIntersectionType,fp as isIntrinsicType,NT as isLiteralType,JT as isNumberLiteralType,Er as isObjectType,LT as isStringLiteralType,WT as isStringMappingType,jT as isSubstitutionType,VT as isTemplateLiteralType,MT as isTupleType,zT as isTypeParameter,vT as isTypeReference,AT as isUnionType};