sveld 0.35.0 → 0.35.2

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.
Files changed (54) hide show
  1. package/README.md +46 -4
  2. package/cli.js +1 -1
  3. package/lib/ComponentParser.d.ts +164 -398
  4. package/lib/ast-guards.d.ts +2 -0
  5. package/lib/browser.d.ts +39 -0
  6. package/lib/browser.js +268 -0
  7. package/lib/bundle.d.ts +9 -4
  8. package/lib/chunk-1p4ka68s.js +2 -0
  9. package/lib/chunk-72hx9e9w.js +20 -0
  10. package/lib/chunk-7qz0hzgw.js +217 -0
  11. package/lib/chunk-8xw75w8t.js +10 -0
  12. package/lib/chunk-cxrw7gzr.js +2 -0
  13. package/lib/chunk-jdnsv86e.js +1 -0
  14. package/lib/chunk-pmj8c3yv.js +6 -0
  15. package/lib/chunk-s9mzxa4y.js +1 -0
  16. package/lib/chunk-v4q9vw0y.js +62 -0
  17. package/lib/chunk-xkrgedm4.js +4 -0
  18. package/lib/chunk-zva3xjwa.js +13 -0
  19. package/lib/cli-entry.d.ts +12 -0
  20. package/lib/cli-entry.js +1 -0
  21. package/lib/get-svelte-entry.d.ts +0 -1
  22. package/lib/index.js +1 -484
  23. package/lib/parse-cache.d.ts +1 -1
  24. package/lib/parse-entry-exports.d.ts +2 -2
  25. package/lib/parse-exports.d.ts +5 -1
  26. package/lib/parsed-component-metadata.d.ts +13 -0
  27. package/lib/parser/bindings.d.ts +0 -2
  28. package/lib/parser/context.d.ts +13 -51
  29. package/lib/parser/events.d.ts +0 -2
  30. package/lib/parser/jsdoc.d.ts +0 -4
  31. package/lib/parser/prop-shared.d.ts +84 -0
  32. package/lib/parser/props.d.ts +6 -2
  33. package/lib/parser/rest-props.d.ts +0 -2
  34. package/lib/parser/runes-detection.d.ts +13 -0
  35. package/lib/parser/scopes.d.ts +23 -7
  36. package/lib/parser/slots.d.ts +1 -6
  37. package/lib/parser/source-position.d.ts +0 -4
  38. package/lib/parser/type-resolution.d.ts +4 -14
  39. package/lib/parser/typescript-casts.d.ts +1 -0
  40. package/lib/parser/utils.d.ts +1 -0
  41. package/lib/parser/variable-jsdoc.d.ts +12 -0
  42. package/lib/parser-stack.d.ts +20 -0
  43. package/lib/path.d.ts +0 -1
  44. package/lib/resolve-types.d.ts +1 -1
  45. package/lib/svelte-parse.d.ts +4 -0
  46. package/lib/svelte-version.d.ts +1 -0
  47. package/lib/writer/Writer.d.ts +7 -29
  48. package/lib/writer/WriterMarkdown.d.ts +0 -2
  49. package/lib/writer/markdown-format-utils.d.ts +0 -84
  50. package/lib/writer/writer-json.d.ts +2 -12
  51. package/lib/writer/writer-markdown.d.ts +0 -2
  52. package/lib/writer/writer-ts-definitions-core.d.ts +1 -9
  53. package/lib/writer/writer-ts-definitions.d.ts +1 -28
  54. package/package.json +6 -1
@@ -0,0 +1,13 @@
1
+ import{T as qU,U as e,W as p0}from"./chunk-1p4ka68s.js";var H$=e((MY)=>{Object.defineProperty(MY,"__esModule",{value:!0});MY.boolean=oJ;MY.string=PY;MY.number=aJ;MY.error=tJ;MY.func=nJ;MY.array=DY;MY.stringArray=eJ;function oJ($){return $===!0||$===!1}function PY($){return typeof $==="string"||$ instanceof String}function aJ($){return typeof $==="number"||$ instanceof Number}function tJ($){return $ instanceof Error}function nJ($){return typeof $==="function"}function DY($){return Array.isArray($)}function eJ($){return DY($)&&$.every((Z)=>PY(Z))}});var Z6=e((j)=>{var U3=j&&j.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),W3=j&&j.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),V3=j&&j.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")U3(Y,Z,Q[G])}return W3(Y,Z),Y}}();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var n0=V3(H$()),eZ;(function($){$.ParseError=-32700,$.InvalidRequest=-32600,$.MethodNotFound=-32601,$.InvalidParams=-32602,$.InternalError=-32603,$.jsonrpcReservedErrorRangeStart=-32099,$.serverErrorStart=-32099,$.MessageWriteError=-32099,$.MessageReadError=-32098,$.PendingResponseRejected=-32097,$.ConnectionInactive=-32096,$.ServerNotInitialized=-32002,$.UnknownErrorCode=-32001,$.jsonrpcReservedErrorRangeEnd=-32000,$.serverErrorEnd=-32000})(eZ||(j.ErrorCodes=eZ={}));class $6 extends Error{code;data;constructor($,Z,Y){super(Z);this.code=n0.number($)?$:eZ.UnknownErrorCode,this.data=Y,Object.setPrototypeOf(this,$6.prototype)}toJson(){let $={code:this.code,message:this.message};if(this.data!==void 0)$.data=this.data;return $}}j.ResponseError=$6;class V0{kind;static auto=new V0("auto");static byPosition=new V0("byPosition");static byName=new V0("byName");constructor($){this.kind=$}static is($){return $===V0.auto||$===V0.byName||$===V0.byPosition}toString(){return this.kind}}j.ParameterStructures=V0;class p{method;numberOfParams;constructor($,Z){this.method=$,this.numberOfParams=Z}get parameterStructures(){return V0.auto}}j.AbstractMessageSignature=p;class EY extends p{_;constructor($){super($,0)}}j.RequestType0=EY;class OY extends p{_parameterStructures;_;constructor($,Z=V0.auto){super($,1);this._parameterStructures=Z}get parameterStructures(){return this._parameterStructures}}j.RequestType=OY;class _Y extends p{_parameterStructures;_;constructor($,Z=V0.auto){super($,1);this._parameterStructures=Z}get parameterStructures(){return this._parameterStructures}}j.RequestType1=_Y;class TY extends p{_;constructor($){super($,2)}}j.RequestType2=TY;class vY extends p{_;constructor($){super($,3)}}j.RequestType3=vY;class fY extends p{_;constructor($){super($,4)}}j.RequestType4=fY;class kY extends p{_;constructor($){super($,5)}}j.RequestType5=kY;class CY extends p{_;constructor($){super($,6)}}j.RequestType6=CY;class FY extends p{_;constructor($){super($,7)}}j.RequestType7=FY;class hY extends p{_;constructor($){super($,8)}}j.RequestType8=hY;class NY extends p{_;constructor($){super($,9)}}j.RequestType9=NY;class uY extends p{_parameterStructures;_;constructor($,Z=V0.auto){super($,1);this._parameterStructures=Z}get parameterStructures(){return this._parameterStructures}}j.NotificationType=uY;class KY extends p{_;constructor($){super($,0)}}j.NotificationType0=KY;class bY extends p{_parameterStructures;_;constructor($,Z=V0.auto){super($,1);this._parameterStructures=Z}get parameterStructures(){return this._parameterStructures}}j.NotificationType1=bY;class SY extends p{_;constructor($){super($,2)}}j.NotificationType2=SY;class xY extends p{_;constructor($){super($,3)}}j.NotificationType3=xY;class gY extends p{_;constructor($){super($,4)}}j.NotificationType4=gY;class pY extends p{_;constructor($){super($,5)}}j.NotificationType5=pY;class yY extends p{_;constructor($){super($,6)}}j.NotificationType6=yY;class mY extends p{_;constructor($){super($,7)}}j.NotificationType7=mY;class cY extends p{_;constructor($){super($,8)}}j.NotificationType8=cY;class lY extends p{_;constructor($){super($,9)}}j.NotificationType9=lY;var jY;(function($){function Z(G){let J=G;return J&&n0.string(J.method)&&(n0.string(J.id)||n0.number(J.id))}$.isRequest=Z;function Y(G){let J=G;return J&&n0.string(J.method)&&G.id===void 0}$.isNotification=Y;function Q(G){let J=G;return J&&(J.result!==void 0||!!J.error)&&(n0.string(J.id)||n0.number(J.id)||J.id===null)}$.isResponse=Q})(jY||(j.Message=jY={}))});var X6=e((sY)=>{Object.defineProperty(sY,"__esModule",{value:!0});sY.LRUCache=sY.LinkedMap=sY.Touch=void 0;var $0;(function($){$.None=0,$.First=1,$.AsOld=$.First,$.Last=2,$.AsNew=$.Last})($0||(sY.Touch=$0={}));class Y6{[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($){let Z=this._map.get($);return Z?Z.previous?.value:void 0}after($){let Z=this._map.get($);return Z?Z.next?.value:void 0}has($){return this._map.has($)}get($,Z=$0.None){let Y=this._map.get($);if(!Y)return;if(Z!==$0.None)this.touch(Y,Z);return Y.value}set($,Z,Y=$0.None){let Q=this._map.get($);if(Q){if(Q.value=Z,Y!==$0.None)this.touch(Q,Y)}else{switch(Q={key:$,value:Z,next:void 0,previous:void 0},Y){case $0.None:this.addItemLast(Q);break;case $0.First:this.addItemFirst(Q);break;case $0.Last:this.addItemLast(Q);break;default:this.addItemLast(Q);break}this._map.set($,Q),this._size++}return this}delete($){return!!this.remove($)}remove($){let Z=this._map.get($);if(!Z)return;return this._map.delete($),this.removeItem(Z),this._size--,Z.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let $=this._head;return this._map.delete($.key),this.removeItem($),this._size--,$.value}forEach($,Z){let Y=this._state,Q=this._head;while(Q){if(Z)$.bind(Z)(Q.value,Q.key,this);else $(Q.value,Q.key,this);if(this._state!==Y)throw Error("LinkedMap got modified during iteration.");Q=Q.next}}keys(){let $=this._state,Z=this._head,Y={[Symbol.iterator]:()=>{return Y},next:()=>{if(this._state!==$)throw Error("LinkedMap got modified during iteration.");if(Z){let Q={value:Z.key,done:!1};return Z=Z.next,Q}else return{value:void 0,done:!0}}};return Y}values(){let $=this._state,Z=this._head,Y={[Symbol.iterator]:()=>{return Y},next:()=>{if(this._state!==$)throw Error("LinkedMap got modified during iteration.");if(Z){let Q={value:Z.value,done:!1};return Z=Z.next,Q}else return{value:void 0,done:!0}}};return Y}entries(){let $=this._state,Z=this._head,Y={[Symbol.iterator]:()=>{return Y},next:()=>{if(this._state!==$)throw Error("LinkedMap got modified during iteration.");if(Z){let Q={value:[Z.key,Z.value],done:!1};return Z=Z.next,Q}else return{value:void 0,done:!0}}};return Y}[Symbol.iterator](){return this.entries()}trimOld($){if($>=this.size)return;if($===0){this.clear();return}let Z=this._head,Y=this.size;while(Z&&Y>$)this._map.delete(Z.key),Z=Z.next,Y--;if(this._head=Z,this._size=Y,Z)Z.previous=void 0;this._state++}addItemFirst($){if(!this._head&&!this._tail)this._tail=$;else if(!this._head)throw Error("Invalid list");else $.next=this._head,this._head.previous=$;this._head=$,this._state++}addItemLast($){if(!this._head&&!this._tail)this._head=$;else if(!this._tail)throw Error("Invalid list");else $.previous=this._tail,this._tail.next=$;this._tail=$,this._state++}removeItem($){if($===this._head&&$===this._tail)this._head=void 0,this._tail=void 0;else if($===this._head){if(!$.next)throw Error("Invalid list");$.next.previous=void 0,this._head=$.next}else if($===this._tail){if(!$.previous)throw Error("Invalid list");$.previous.next=void 0,this._tail=$.previous}else{let{next:Z,previous:Y}=$;if(!Z||!Y)throw Error("Invalid list");Z.previous=Y,Y.next=Z}$.next=void 0,$.previous=void 0,this._state++}touch($,Z){if(!this._head||!this._tail)throw Error("Invalid list");if(Z!==$0.First&&Z!==$0.Last)return;if(Z===$0.First){if($===this._head)return;let{next:Y,previous:Q}=$;if($===this._tail)Q.next=void 0,this._tail=Q;else Y.previous=Q,Q.next=Y;$.previous=void 0,$.next=this._head,this._head.previous=$,this._head=$,this._state++}else if(Z===$0.Last){if($===this._tail)return;let{next:Y,previous:Q}=$;if($===this._head)Y.previous=void 0,this._head=Y;else Y.previous=Q,Q.next=Y;$.next=void 0,$.previous=this._tail,this._tail.next=$,this._tail=$,this._state++}}toJSON(){let $=[];return this.forEach((Z,Y)=>{$.push([Y,Z])}),$}fromJSON($){this.clear();for(let[Z,Y]of $)this.set(Z,Y)}}sY.LinkedMap=Y6;class rY extends Y6{_limit;_ratio;constructor($,Z=1){super();this._limit=$,this._ratio=Math.min(Math.max(0,Z),1)}get limit(){return this._limit}set limit($){this._limit=$,this.checkTrim()}get ratio(){return this._ratio}set ratio($){this._ratio=Math.min(Math.max(0,$),1),this.checkTrim()}get($,Z=$0.AsNew){return super.get($,Z)}peek($){return super.get($,$0.None)}set($,Z){return super.set($,Z,$0.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}}sY.LRUCache=rY});var tY=e((oY)=>{Object.defineProperty(oY,"__esModule",{value:!0});oY.Disposable=void 0;var dY;(function($){function Z(Y){return{dispose:Y}}$.create=Z})(dY||(oY.Disposable=dY={}))});var x0=e((nY)=>{Object.defineProperty(nY,"__esModule",{value:!0});var Q6;function G6(){if(Q6===void 0)throw Error("No runtime abstraction layer installed");return Q6}(function($){function Z(Y){if(Y===void 0)throw Error("No runtime abstraction layer provided");Q6=Y}$.install=Z})(G6||(G6={}));nY.default=G6});var z$=e((g0)=>{var q3=g0&&g0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(g0,"__esModule",{value:!0});g0.Emitter=g0.Event=void 0;var B3=q3(x0()),eY;(function($){let Z={dispose(){}};$.None=function(){return Z}})(eY||(g0.Event=eY={}));class $X{_callbacks;_contexts;add($,Z=null,Y){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push($),this._contexts.push(Z),Array.isArray(Y))Y.push({dispose:()=>this.remove($,Z)})}remove($,Z=null){if(!this._callbacks)return;let Y=!1;for(let Q=0,G=this._callbacks.length;Q<G;Q++)if(this._callbacks[Q]===$)if(this._contexts[Q]===Z){this._callbacks.splice(Q,1),this._contexts.splice(Q,1);return}else Y=!0;if(Y)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...$){if(!this._callbacks)return[];let Z=[],Y=this._callbacks.slice(0),Q=this._contexts.slice(0);for(let G=0,J=Y.length;G<J;G++)try{Z.push(Y[G].apply(Q[G],$))}catch(V){(0,B3.default)().console.error(V)}return Z}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class J6{_options;static _noop=function(){};_event;_callbacks;constructor($){this._options=$}get event(){if(!this._event)this._event=($,Z,Y)=>{if(!this._callbacks)this._callbacks=new $X;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add($,Z);let Q={dispose:()=>{if(!this._callbacks)return;if(this._callbacks.remove($,Z),Q.dispose=J6._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)}};if(Array.isArray(Y))Y.push(Q);return Q};return this._event}fire($){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,$)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}}g0.Emitter=J6});var HZ=e((J0)=>{var L3=J0&&J0.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),A3=J0&&J0.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),R3=J0&&J0.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")L3(Y,Z,Q[G])}return A3(Y,Z),Y}}(),I3=J0&&J0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(J0,"__esModule",{value:!0});J0.CancellationTokenSource=J0.CancellationToken=void 0;var P3=I3(x0()),D3=R3(H$()),U6=z$(),VZ;(function($){$.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:U6.Event.None}),$.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:U6.Event.None});function Z(Y){let Q=Y;return Q&&(Q===$.None||Q===$.Cancelled||D3.boolean(Q.isCancellationRequested)&&!!Q.onCancellationRequested)}$.is=Z})(VZ||(J0.CancellationToken=VZ={}));var M3=Object.freeze(function($,Z){let Y=(0,P3.default)().timer.setTimeout($.bind(Z),0);return{dispose(){Y.dispose()}}});class W6{_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 M3;if(!this._emitter)this._emitter=new U6.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}}class ZX{_token;get token(){if(!this._token)this._token=new W6;return this._token}cancel(){if(!this._token)this._token=VZ.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=VZ.None;else if(this._token instanceof W6)this._token.dispose()}}J0.CancellationTokenSource=ZX});var WX=e((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.SharedArrayReceiverStrategy=JX.SharedArraySenderStrategy=void 0;var j3=HZ(),h$;(function($){$.Continue=0,$.Cancelled=1})(h$||(h$={}));class YX{buffers;constructor(){this.buffers=new Map}enableCancellation($){if($.id===null)return;let Z=new SharedArrayBuffer(4),Y=new Int32Array(Z,0,1);Y[0]=h$.Continue,this.buffers.set($.id,Z),$.$cancellationData=Z}async sendCancellation($,Z){let Y=this.buffers.get(Z);if(Y===void 0)return;let Q=new Int32Array(Y,0,1);Atomics.store(Q,0,h$.Cancelled)}cleanup($){this.buffers.delete($)}dispose(){this.buffers.clear()}}JX.SharedArraySenderStrategy=YX;class XX{data;constructor($){this.data=new Int32Array($,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===h$.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class QX{token;constructor($){this.token=new XX($)}cancel(){}dispose(){}}class GX{kind="request";createCancellationTokenSource($){let Z=$.$cancellationData;if(Z===void 0)return new j3.CancellationTokenSource;return new QX(Z)}}JX.SharedArrayReceiverStrategy=GX});var V6=e((w$)=>{var O3=w$&&w$.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(w$,"__esModule",{value:!0});w$.Semaphore=void 0;var _3=O3(x0());class VX{_capacity;_active;_waiting;constructor($=1){if($<=0)throw Error("Capacity must be greater than 0");this._capacity=$,this._active=0,this._waiting=[]}lock($){return new Promise((Z,Y)=>{this._waiting.push({thunk:$,resolve:Z,reject:Y}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,_3.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let $=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let Z=$.thunk();if(Z instanceof Promise)Z.then((Y)=>{this._active--,$.resolve(Y),this.runNext()},(Y)=>{this._active--,$.reject(Y),this.runNext()});else this._active--,$.resolve(Z),this.runNext()}catch(Z){this._active--,$.reject(Z),this.runNext()}}}w$.Semaphore=VX});var wX=e((Z0)=>{var T3=Z0&&Z0.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),v3=Z0&&Z0.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),f3=Z0&&Z0.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")T3(Y,Z,Q[G])}return v3(Y,Z),Y}}(),k3=Z0&&Z0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(Z0,"__esModule",{value:!0});Z0.ReadableStreamMessageReader=Z0.AbstractMessageReader=Z0.MessageReader=void 0;var z6=k3(x0()),q$=f3(H$()),H6=z$(),C3=V6(),HX;(function($){function Z(Y){let Q=Y;return Q&&q$.func(Q.listen)&&q$.func(Q.dispose)&&q$.func(Q.onError)&&q$.func(Q.onClose)&&q$.func(Q.onPartialMessage)}$.is=Z})(HX||(Z0.MessageReader=HX={}));class q6{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new H6.Emitter,this.closeEmitter=new H6.Emitter,this.partialMessageEmitter=new H6.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError($){this.errorEmitter.fire(this.asError($))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage($){this.partialMessageEmitter.fire($)}asError($){if($ instanceof Error)return $;else return Error(`Reader received error. Reason: ${q$.string($.message)?$.message:"unknown"}`)}}Z0.AbstractMessageReader=q6;var w6;(function($){function Z(Y){let Q,G,J,V=new Map,L,P=new Map;if(Y===void 0||typeof Y==="string")Q=Y??"utf-8";else{if(Q=Y.charset??"utf-8",Y.contentDecoder!==void 0)J=Y.contentDecoder,V.set(J.name,J);if(Y.contentDecoders!==void 0)for(let _ of Y.contentDecoders)V.set(_.name,_);if(Y.contentTypeDecoder!==void 0)L=Y.contentTypeDecoder,P.set(L.name,L);if(Y.contentTypeDecoders!==void 0)for(let _ of Y.contentTypeDecoders)P.set(_.name,_)}if(L===void 0)L=(0,z6.default)().applicationJson.decoder,P.set(L.name,L);return{charset:Q,contentDecoder:J,contentDecoders:V,contentTypeDecoder:L,contentTypeDecoders:P}}$.fromOptions=Z})(w6||(w6={}));class zX extends q6{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor($,Z){super();this.readable=$,this.options=w6.fromOptions(Z),this.buffer=(0,z6.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new C3.Semaphore(1)}set partialMessageTimeout($){this._partialMessageTimeout=$}get partialMessageTimeout(){return this._partialMessageTimeout}listen($){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=$;let Z=this.readable.onData((Y)=>{this.onData(Y)});return this.readable.onError((Y)=>this.fireError(Y)),this.readable.onClose(()=>this.fireClose()),Z}onData($){try{this.buffer.append($);while(!0){if(this.nextMessageLength===-1){let Y=this.buffer.tryReadHeaders(!0);if(!Y)return;let Q=Y.get("content-length");if(!Q){this.fireError(Error(`Header must provide a Content-Length property.
2
+ ${JSON.stringify(Object.fromEntries(Y))}`));return}let G=parseInt(Q);if(isNaN(G)){this.fireError(Error(`Content-Length value must be a number. Got ${Q}`));return}this.nextMessageLength=G}let Z=this.buffer.tryReadBody(this.nextMessageLength);if(Z===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let Y=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(Z):Z,Q=await this.options.contentTypeDecoder.decode(Y,this.options);this.callback(Q)}).catch((Y)=>{this.fireError(Y)})}}catch(Z){this.fireError(Z)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,z6.default)().timer.setTimeout(($,Z)=>{if(this.partialMessageTimer=void 0,$===this.messageToken)this.firePartialMessage({messageToken:$,waitingTime:Z}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}}Z0.ReadableStreamMessageReader=zX});var IX=e((Y0)=>{var F3=Y0&&Y0.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),h3=Y0&&Y0.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),N3=Y0&&Y0.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")F3(Y,Z,Q[G])}return h3(Y,Z),Y}}(),u3=Y0&&Y0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(Y0,"__esModule",{value:!0});Y0.WriteableStreamMessageWriter=Y0.AbstractMessageWriter=Y0.MessageWriter=void 0;var qX=u3(x0()),N$=N3(H$()),K3=V6(),BX=z$(),b3="Content-Length: ",LX=`\r
3
+ `,AX;(function($){function Z(Y){let Q=Y;return Q&&N$.func(Q.dispose)&&N$.func(Q.onClose)&&N$.func(Q.onError)&&N$.func(Q.write)}$.is=Z})(AX||(Y0.MessageWriter=AX={}));class L6{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new BX.Emitter,this.closeEmitter=new BX.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError($,Z,Y){this.errorEmitter.fire([this.asError($),Z,Y])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError($){if($ instanceof Error)return $;else return Error(`Writer received error. Reason: ${N$.string($.message)?$.message:"unknown"}`)}}Y0.AbstractMessageWriter=L6;var B6;(function($){function Z(Y){if(Y===void 0||typeof Y==="string")return{charset:Y??"utf-8",contentTypeEncoder:(0,qX.default)().applicationJson.encoder};else return{charset:Y.charset??"utf-8",contentEncoder:Y.contentEncoder,contentTypeEncoder:Y.contentTypeEncoder??(0,qX.default)().applicationJson.encoder}}$.fromOptions=Z})(B6||(B6={}));class RX extends L6{writable;options;errorCount;writeSemaphore;constructor($,Z){super();this.writable=$,this.options=B6.fromOptions(Z),this.errorCount=0,this.writeSemaphore=new K3.Semaphore(1),this.writable.onError((Y)=>this.fireError(Y)),this.writable.onClose(()=>this.fireClose())}async write($){return this.writeSemaphore.lock(async()=>{return this.options.contentTypeEncoder.encode($,this.options).then((Y)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(Y);else return Y}).then((Y)=>{let Q=[];return Q.push(b3,Y.byteLength.toString(),LX),Q.push(LX),this.doWrite($,Q,Y)},(Y)=>{throw this.fireError(Y),Y})})}async doWrite($,Z,Y){try{return await this.writable.write(Z.join(""),"ascii"),this.writable.write(Y)}catch(Q){return this.handleError(Q,$),Promise.reject(Q)}}handleError($,Z){this.errorCount++,this.fireError($,Z,this.errorCount)}end(){this.writable.end()}}Y0.WriteableStreamMessageWriter=RX});var jX=e((DX)=>{Object.defineProperty(DX,"__esModule",{value:!0});DX.AbstractMessageBuffer=void 0;var S3=13,x3=10,g3=`\r
4
+ `;class PX{_encoding;_chunks;_totalLength;constructor($="utf-8"){this._encoding=$,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append($){let Z=typeof $==="string"?this.fromString($,this._encoding):$;this._chunks.push(Z),this._totalLength+=Z.byteLength}tryReadHeaders($=!1){if(this._chunks.length===0)return;let Z=0,Y=0,Q=0,G=0;$:while(Y<this._chunks.length){let P=this._chunks[Y];Q=0;while(Q<P.length){switch(P[Q]){case S3:switch(Z){case 0:Z=1;break;case 2:Z=3;break;default:Z=0}break;case x3:switch(Z){case 1:Z=2;break;case 3:Z=4,Q++;break $;default:Z=0}break;default:Z=0}Q++}G+=P.byteLength,Y++}if(Z!==4)return;let J=this._read(G+Q),V=new Map,L=this.toString(J,"ascii").split(g3);if(L.length<2)return V;for(let P=0;P<L.length-2;P++){let _=L[P],k=_.indexOf(":");if(k===-1)throw Error(`Message header must separate key and value using ':'
5
+ ${_}`);let x=_.substr(0,k),K=_.substr(k+1).trim();V.set($?x.toLowerCase():x,K)}return V}tryReadBody($){if(this._totalLength<$)return;return this._read($)}get numberOfBytes(){return this._totalLength}_read($){if($===0)return this.emptyBuffer();if($>this._totalLength)throw Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===$){let G=this._chunks[0];return this._chunks.shift(),this._totalLength-=$,this.asNative(G)}if(this._chunks[0].byteLength>$){let G=this._chunks[0],J=this.asNative(G,$);return this._chunks[0]=G.slice($),this._totalLength-=$,J}let Z=this.allocNative($),Y=0,Q=0;while($>0){let G=this._chunks[Q];if(G.byteLength>$){let J=G.slice(0,$);Z.set(J,Y),Y+=$,this._chunks[Q]=G.slice($),this._totalLength-=$,$-=$}else Z.set(G,Y),Y+=G.byteLength,this._chunks.shift(),this._totalLength-=G.byteLength,$-=G.byteLength}return Z}}DX.AbstractMessageBuffer=PX});var vX=e((T)=>{var p3=T&&T.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),y3=T&&T.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),m3=T&&T.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")p3(Y,Z,Q[G])}return y3(Y,Z),Y}}(),c3=T&&T.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(T,"__esModule",{value:!0});T.ConnectionOptions=T.MessageStrategy=T.CancellationStrategy=T.CancellationSenderStrategy=T.CancellationReceiverStrategy=T.RequestCancellationReceiverStrategy=T.IdCancellationReceiverStrategy=T.ConnectionStrategy=T.ConnectionError=T.ConnectionErrors=T.LogTraceNotification=T.SetTraceNotification=T.TraceFormat=T.TraceValues=T.TraceValue=T.Trace=T.NullLogger=T.ProgressType=T.ProgressToken=void 0;T.createMessageConnection=l3;var EX=c3(x0()),m=m3(H$()),f=Z6(),OX=X6(),u$=z$(),A6=HZ(),S$;(function($){$.type=new f.NotificationType("$/cancelRequest")})(S$||(S$={}));var R6;(function($){function Z(Y){return typeof Y==="string"||typeof Y==="number"}$.is=Z})(R6||(T.ProgressToken=R6={}));var K$;(function($){$.type=new f.NotificationType("$/progress")})(K$||(K$={}));class TX{__;_pr;constructor(){}}T.ProgressType=TX;var I6;(function($){function Z(Y){return m.func(Y)}$.is=Z})(I6||(I6={}));T.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var N;(function($){$[$.Off=0]="Off",$[$.Messages=1]="Messages",$[$.Compact=2]="Compact",$[$.Verbose=3]="Verbose"})(N||(T.Trace=N={}));var P6;(function($){$.Off="off",$.Messages="messages",$.Compact="compact",$.Verbose="verbose"})(P6||(T.TraceValue=P6={}));T.TraceValues=P6;(function($){function Z(Q){if(!m.string(Q))return $.Off;switch(Q=Q.toLowerCase(),Q){case"off":return $.Off;case"messages":return $.Messages;case"compact":return $.Compact;case"verbose":return $.Verbose;default:return $.Off}}$.fromString=Z;function Y(Q){switch(Q){case $.Off:return"off";case $.Messages:return"messages";case $.Compact:return"compact";case $.Verbose:return"verbose";default:return"off"}}$.toString=Y})(N||(T.Trace=N={}));var H0;(function($){$.Text="text",$.JSON="json"})(H0||(T.TraceFormat=H0={}));(function($){function Z(Y){if(!m.string(Y))return $.Text;if(Y=Y.toLowerCase(),Y==="json")return $.JSON;else return $.Text}$.fromString=Z})(H0||(T.TraceFormat=H0={}));var D6;(function($){$.type=new f.NotificationType("$/setTrace")})(D6||(T.SetTraceNotification=D6={}));var zZ;(function($){$.type=new f.NotificationType("$/logTrace")})(zZ||(T.LogTraceNotification=zZ={}));var b$;(function($){$[$.Closed=1]="Closed",$[$.Disposed=2]="Disposed",$[$.AlreadyListening=3]="AlreadyListening"})(b$||(T.ConnectionErrors=b$={}));class B$ extends Error{code;constructor($,Z){super(Z);this.code=$,Object.setPrototypeOf(this,B$.prototype)}}T.ConnectionError=B$;var M6;(function($){function Z(Y){let Q=Y;return Q&&m.func(Q.cancelUndispatched)}$.is=Z})(M6||(T.ConnectionStrategy=M6={}));var wZ;(function($){function Z(Y){let Q=Y;return Q&&(Q.kind===void 0||Q.kind==="id")&&m.func(Q.createCancellationTokenSource)&&(Q.dispose===void 0||m.func(Q.dispose))}$.is=Z})(wZ||(T.IdCancellationReceiverStrategy=wZ={}));var j6;(function($){function Z(Y){let Q=Y;return Q&&Q.kind==="request"&&m.func(Q.createCancellationTokenSource)&&(Q.dispose===void 0||m.func(Q.dispose))}$.is=Z})(j6||(T.RequestCancellationReceiverStrategy=j6={}));var qZ;(function($){$.Message=Object.freeze({createCancellationTokenSource(Y){return new A6.CancellationTokenSource}});function Z(Y){return wZ.is(Y)||j6.is(Y)}$.is=Z})(qZ||(T.CancellationReceiverStrategy=qZ={}));var BZ;(function($){$.Message=Object.freeze({sendCancellation(Y,Q){return Y.sendNotification(S$.type,{id:Q})},cleanup(Y){}});function Z(Y){let Q=Y;return Q&&m.func(Q.sendCancellation)&&m.func(Q.cleanup)}$.is=Z})(BZ||(T.CancellationSenderStrategy=BZ={}));var LZ;(function($){$.Message=Object.freeze({receiver:qZ.Message,sender:BZ.Message});function Z(Y){let Q=Y;return Q&&qZ.is(Q.receiver)&&BZ.is(Q.sender)}$.is=Z})(LZ||(T.CancellationStrategy=LZ={}));var AZ;(function($){function Z(Y){let Q=Y;return Q&&m.func(Q.handleMessage)}$.is=Z})(AZ||(T.MessageStrategy=AZ={}));var _X;(function($){function Z(Y){let Q=Y;return Q&&(LZ.is(Q.cancellationStrategy)||M6.is(Q.connectionStrategy)||AZ.is(Q.messageStrategy)||m.number(Q.maxParallelism))}$.is=Z})(_X||(T.ConnectionOptions=_X={}));var P0;(function($){$[$.New=1]="New",$[$.Listening=2]="Listening",$[$.Closed=3]="Closed",$[$.Disposed=4]="Disposed"})(P0||(P0={}));function l3($,Z,Y,Q){let G=Y!==void 0?Y:T.NullLogger,J=0,V=0,L=0,P="2.0",_=Q?.maxParallelism??-1,k=0,x=void 0,K=new Map,i=void 0,U0=new Map,T0=new Map,e0,B0=new OX.LinkedMap,D0=new Map,$$=new Set,u0=new Map,u=N.Off,L0=H0.Text,c,w0=P0.New,M0=new u$.Emitter,g$=new u$.Emitter,v0=new u$.Emitter,F=new u$.Emitter,W0=new u$.Emitter,Q0=Q&&Q.cancellationStrategy?Q.cancellationStrategy:LZ.Message;function f0(H){return}function k0(){return w0===P0.Listening}function S6(){return w0===P0.Closed}function Z$(){return w0===P0.Disposed}function x6(){if(w0===P0.New||w0===P0.Listening)w0=P0.Closed,g$.fire(void 0)}function V1(H){M0.fire([H,void 0,void 0])}function H1(H){M0.fire(H)}$.onClose(x6),$.onError(V1),Z.onClose(x6),Z.onError(H1);function g6(H){if(H===null)throw Error("Can't send requests with id null since the response can't be correlated.");return"req-"+H.toString()}function z1(H){if(H===null)return"res-unknown-"+(++L).toString();else return"res-"+H.toString()}function w1(){return"not-"+(++V).toString()}function q1(H,R){if(f.Message.isRequest(R))H.set(g6(R.id),R);else if(f.Message.isResponse(R))if(_===-1)H.set(z1(R.id),R);else y6(R);else H.set(w1(),R)}function DZ(){if(e0||B0.size===0)return;if(_!==-1&&k>=_)return;e0=(0,EX.default)().timer.setImmediate(async()=>{if(e0=void 0,B0.size===0)return;if(_!==-1&&k>=_)return;let H=B0.shift(),R;try{k++;let I=Q?.messageStrategy;if(AZ.is(I))R=I.handleMessage(H,p6);else R=p6(H)}catch(I){G.error(`Processing message queue failed: ${I.toString()}`)}finally{if(R instanceof Promise)R.then(()=>{k--,DZ()}).catch((I)=>{G.error(`Processing message queue failed: ${I.toString()}`)});else k--;DZ()}})}async function p6(H){if(f.Message.isRequest(H))return L1(H);else if(f.Message.isNotification(H))return A1(H);else if(f.Message.isResponse(H))return y6(H);else return R1(H)}let B1=(H)=>{try{if(f.Message.isNotification(H)&&H.method===S$.type.method){let R=H.params.id,I=g6(R),E=B0.get(I);if(f.Message.isRequest(E)){let y=Q?.connectionStrategy,b=y&&y.cancelUndispatched?y.cancelUndispatched(E,f0):f0(E);if(b&&(b.error!==void 0||b.result!==void 0)){B0.delete(I),u0.delete(R),b.id=E.id,MZ(b,H.method,Date.now()),Z.write(b).catch(()=>G.error("Sending response for canceled message failed."));return}}let h=u0.get(R);if(h!==void 0){h.cancel(),jZ(H);return}else $$.add(R)}q1(B0,H)}finally{DZ()}};async function L1(H){if(Z$())return Promise.resolve();function R(a,n,l){let r={jsonrpc:P,id:H.id};if(a instanceof f.ResponseError)r.error=a.toJson();else r.result=a===void 0?null:a;return MZ(r,n,l),Z.write(r)}function I(a,n,l){let r={jsonrpc:P,id:H.id,error:a.toJson()};return MZ(r,n,l),Z.write(r)}D1(H);let E=K.get(H.method),h,y;if(E)h=E.type,y=E.handler;let b=Date.now();if(y||x){let a=H.id??String(Date.now()),n=wZ.is(Q0.receiver)?Q0.receiver.createCancellationTokenSource(a):Q0.receiver.createCancellationTokenSource(H);if(H.id!==null&&$$.has(H.id))n.cancel();if(H.id!==null)u0.set(a,n);try{let l;if(y)if(H.params===void 0){if(h!==void 0&&h.numberOfParams!==0)return I(new f.ResponseError(f.ErrorCodes.InvalidParams,`Request ${H.method} defines ${h.numberOfParams} params but received none.`),H.method,b);l=y(n.token)}else if(Array.isArray(H.params)){if(h!==void 0&&h.parameterStructures===f.ParameterStructures.byName)return I(new f.ResponseError(f.ErrorCodes.InvalidParams,`Request ${H.method} defines parameters by name but received parameters by position`),H.method,b);l=y(...H.params,n.token)}else{if(h!==void 0&&h.parameterStructures===f.ParameterStructures.byPosition)return I(new f.ResponseError(f.ErrorCodes.InvalidParams,`Request ${H.method} defines parameters by position but received parameters by name`),H.method,b);l=y(H.params,n.token)}else if(x)l=x(H.method,H.params,n.token);let r=await l;await R(r,H.method,b)}catch(l){if(l instanceof f.ResponseError)await R(l,H.method,b);else if(l&&m.string(l.message))await I(new f.ResponseError(f.ErrorCodes.InternalError,`Request ${H.method} failed with message: ${l.message}`),H.method,b);else await I(new f.ResponseError(f.ErrorCodes.InternalError,`Request ${H.method} failed unexpectedly without providing any details.`),H.method,b)}finally{u0.delete(a)}}else await I(new f.ResponseError(f.ErrorCodes.MethodNotFound,`Unhandled method ${H.method}`),H.method,b)}function y6(H){if(Z$())return;if(H.id===null)if(H.error)G.error(`Received response message without id: Error is:
6
+ ${JSON.stringify(H.error,void 0,4)}`);else G.error("Received response message without id. No further error information provided.");else{let R=H.id,I=D0.get(R);if(M1(H,I),I!==void 0){D0.delete(R);try{if(H.error){let E=H.error;I.reject(new f.ResponseError(E.code,E.message,E.data))}else if(H.result!==void 0)I.resolve(H.result);else throw Error("Should never happen.")}catch(E){if(E.message)G.error(`Response handler '${I.method}' failed with message: ${E.message}`);else G.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}async function A1(H){if(Z$())return;let R=void 0,I;if(H.method===S$.type.method){let E=H.params.id;$$.delete(E),jZ(H);return}else{let E=U0.get(H.method);if(E)I=E.handler,R=E.type}if(I||i)try{if(jZ(H),I)if(H.params===void 0){if(R!==void 0){if(R.numberOfParams!==0&&R.parameterStructures!==f.ParameterStructures.byName)G.error(`Notification ${H.method} defines ${R.numberOfParams} params but received none.`)}await I()}else if(Array.isArray(H.params)){let E=H.params;if(H.method===K$.type.method&&E.length===2&&R6.is(E[0]))await I({token:E[0],value:E[1]});else{if(R!==void 0){if(R.parameterStructures===f.ParameterStructures.byName)G.error(`Notification ${H.method} defines parameters by name but received parameters by position`);if(R.numberOfParams!==H.params.length)G.error(`Notification ${H.method} defines ${R.numberOfParams} params but received ${E.length} arguments`)}await I(...E)}}else{if(R!==void 0&&R.parameterStructures===f.ParameterStructures.byPosition)G.error(`Notification ${H.method} defines parameters by position but received parameters by name`);await I(H.params)}else if(i)await i(H.method,H.params)}catch(E){if(E.message)G.error(`Notification handler '${H.method}' failed with message: ${E.message}`);else G.error(`Notification handler '${H.method}' failed unexpectedly.`)}else v0.fire(H)}function R1(H){if(!H){G.error("Received empty message.");return}G.error(`Received message which is neither a response nor a notification message:
7
+ ${JSON.stringify(H,null,4)}`);let R=H;if(m.string(R.id)||m.number(R.id)){let I=R.id,E=D0.get(I);if(E)E.reject(Error("The received response has neither a result nor an error property."))}}function K0(H){if(H===void 0||H===null)return;switch(u){case N.Verbose:return JSON.stringify(H,null,4);case N.Compact:return JSON.stringify(H);default:return}}function I1(H){if(u===N.Off||!c)return;if(L0===H0.Text){let R=void 0;if((u===N.Verbose||u===N.Compact)&&H.params)R=`Params: ${K0(H.params)}`;c.log(`Sending request '${H.method} - (${H.id})'.`,R)}else Y$("send-request",H)}function P1(H){if(u===N.Off||!c)return;if(L0===H0.Text){let R=void 0;if(u===N.Verbose||u===N.Compact)if(H.params)R=`Params: ${K0(H.params)}`;else R="No parameters provided.";c.log(`Sending notification '${H.method}'.`,R)}else Y$("send-notification",H)}function MZ(H,R,I){if(u===N.Off||!c)return;if(L0===H0.Text){let E=void 0;if(u===N.Verbose||u===N.Compact){if(H.error&&H.error.data)E=`Error data: ${K0(H.error.data)}`;else if(H.result)E=`Result: ${K0(H.result)}`;else if(H.error===void 0)E="No result returned."}c.log(`Sending response '${R} - (${H.id})'. Processing request took ${Date.now()-I}ms`,E)}else Y$("send-response",H)}function D1(H){if(u===N.Off||!c)return;if(L0===H0.Text){let R=void 0;if((u===N.Verbose||u===N.Compact)&&H.params)R=`Params: ${K0(H.params)}`;c.log(`Received request '${H.method} - (${H.id})'.`,R)}else Y$("receive-request",H)}function jZ(H){if(u===N.Off||!c||H.method===zZ.type.method)return;if(L0===H0.Text){let R=void 0;if(u===N.Verbose||u===N.Compact)if(H.params)R=`Params: ${K0(H.params)}`;else R="No parameters provided.";c.log(`Received notification '${H.method}'.`,R)}else Y$("receive-notification",H)}function M1(H,R){if(u===N.Off||!c)return;if(L0===H0.Text){let I=void 0;if(u===N.Verbose||u===N.Compact){if(H.error&&H.error.data)I=`Error data: ${K0(H.error.data)}`;else if(H.result)I=`Result: ${K0(H.result)}`;else if(H.error===void 0)I="No result returned."}if(R){let E=H.error?` Request failed: ${H.error.message} (${H.error.code}).`:"";c.log(`Received response '${R.method} - (${H.id})' in ${Date.now()-R.timerStart}ms.${E}`,I)}else c.log(`Received response ${H.id} without active response promise.`,I)}else Y$("receive-response",H)}function Y$(H,R){if(!c||u===N.Off)return;let I={isLSPMessage:!0,type:H,message:R,timestamp:Date.now()};c.log(I)}function R$(){if(S6())throw new B$(b$.Closed,"Connection is closed.");if(Z$())throw new B$(b$.Disposed,"Connection is disposed.")}function j1(){if(k0())throw new B$(b$.AlreadyListening,"Connection is already listening")}function E1(){if(!k0())throw Error("Call listen() first.")}function I$(H){if(H===void 0)return null;else return H}function m6(H){if(H===null)return;else return H}function c6(H){return H!==void 0&&H!==null&&!Array.isArray(H)&&typeof H==="object"}function EZ(H,R){switch(H){case f.ParameterStructures.auto:if(c6(R))return m6(R);else return[I$(R)];case f.ParameterStructures.byName:if(!c6(R))throw Error("Received parameters by name but param is not an object literal.");return m6(R);case f.ParameterStructures.byPosition:return[I$(R)];default:throw Error(`Unknown parameter structure ${H.toString()}`)}}function l6(H,R){let I,E=H.numberOfParams;switch(E){case 0:I=void 0;break;case 1:I=EZ(H.parameterStructures,R[0]);break;default:I=[];for(let h=0;h<R.length&&h<E;h++)I.push(I$(R[h]));if(R.length<E)for(let h=R.length;h<E;h++)I.push(null);break}return I}let y0={sendNotification:(H,...R)=>{R$();let I,E;if(m.string(H)){I=H;let y=R[0],b=0,a=f.ParameterStructures.auto;if(f.ParameterStructures.is(y))b=1,a=y;let n=R.length,l=n-b;switch(l){case 0:E=void 0;break;case 1:E=EZ(a,R[b]);break;default:if(a===f.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);E=R.slice(b,n).map((r)=>I$(r));break}}else{let y=R;I=H.method,E=l6(H,y)}let h={jsonrpc:P,method:I,params:E};return P1(h),Z.write(h).catch((y)=>{throw G.error("Sending notification failed."),y})},onNotification:(H,R)=>{R$();let I;if(m.func(H))i=H;else if(R)if(m.string(H))I=H,U0.set(H,{type:void 0,handler:R});else I=H.method,U0.set(H.method,{type:H,handler:R});return{dispose:()=>{if(I!==void 0){if(U0.get(I)?.handler===R)U0.delete(I)}else if(i===H)i=void 0}}},onProgress:(H,R,I)=>{if(T0.has(R))throw Error(`Progress handler for token ${R} already registered`);return T0.set(R,I),{dispose:()=>{if(T0.get(R)===I)T0.delete(R)}}},sendProgress:(H,R,I)=>{return y0.sendNotification(K$.type,{token:R,value:I})},onUnhandledProgress:F.event,sendRequest:(H,...R)=>{R$(),E1();function I(r,A0){let C0=Q0.sender.sendCancellation(r,A0);if(C0===void 0)G.log(`Received no promise from cancellation strategy when cancelling id ${A0}`);else C0.catch(()=>{G.log(`Sending cancellation messages for id ${A0} failed.`)})}let E,h,y=void 0;if(m.string(H)){E=H;let r=R[0],A0=R[R.length-1],C0=0,P$=f.ParameterStructures.auto;if(f.ParameterStructures.is(r))C0=1,P$=r;let m0=R.length;if(A6.CancellationToken.is(A0))m0=m0-1,y=A0;let j0=m0-C0;switch(j0){case 0:h=void 0;break;case 1:h=EZ(P$,R[C0]);break;default:if(P$===f.ParameterStructures.byName)throw Error(`Received ${j0} parameters for 'by Name' request parameter structure.`);h=R.slice(C0,m0).map((O1)=>I$(O1));break}}else{let r=R;E=H.method,h=l6(H,r);let A0=H.numberOfParams;y=A6.CancellationToken.is(r[A0])?r[A0]:void 0}let b=J++,a,n=!1;if(y!==void 0)if(y.isCancellationRequested)n=!0;else a=y.onCancellationRequested(()=>{I(y0,b)});let l={jsonrpc:P,id:b,method:E,params:h};if(I1(l),typeof Q0.sender.enableCancellation==="function")Q0.sender.enableCancellation(l);return new Promise(async(r,A0)=>{let C0=(j0)=>{r(j0),Q0.sender.cleanup(b),a?.dispose()},P$=(j0)=>{A0(j0),Q0.sender.cleanup(b),a?.dispose()},m0={method:E,timerStart:Date.now(),resolve:C0,reject:P$};try{if(D0.set(b,m0),await Z.write(l),n)I(y0,b)}catch(j0){throw D0.delete(b),m0.reject(new f.ResponseError(f.ErrorCodes.MessageWriteError,j0.message?j0.message:"Unknown reason")),G.error("Sending request failed."),j0}})},onRequest:(H,R)=>{R$();let I=null;if(I6.is(H))I=void 0,x=H;else if(m.string(H)){if(I=null,R!==void 0)I=H,K.set(H,{handler:R,type:void 0})}else if(R!==void 0)I=H.method,K.set(H.method,{type:H,handler:R});return{dispose:()=>{if(I===null)return;if(I!==void 0){if(K.get(I)?.handler===R)K.delete(I)}else if(x===H)x=void 0}}},hasPendingResponse:()=>{return D0.size>0},trace:async(H,R,I)=>{let E=!1,h=H0.Text;if(I!==void 0)if(m.boolean(I))E=I;else E=I.sendNotification||!1,h=I.traceFormat||H0.Text;if(u=H,L0=h,u===N.Off)c=void 0;else c=R;if(E&&!S6()&&!Z$())await y0.sendNotification(D6.type,{value:N.toString(H)})},onError:M0.event,onClose:g$.event,onUnhandledNotification:v0.event,onDispose:W0.event,end:()=>{Z.end()},dispose:()=>{if(Z$())return;w0=P0.Disposed,W0.fire(void 0);let H=new f.ResponseError(f.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let R of D0.values())R.reject(H);if(D0=new Map,u0=new Map,$$=new Set,B0=new OX.LinkedMap,m.func(Z.dispose))Z.dispose();if(m.func($.dispose))$.dispose()},listen:()=>{R$(),j1(),w0=P0.Listening,$.listen(B1)},inspect:()=>{(0,EX.default)().console.log("inspect")}};return y0.onNotification(zZ.type,(H)=>{if(u===N.Off||!c)return;let R=u===N.Verbose||u===N.Compact;c.log(H.message,R?H.verbose:void 0)}),y0.onNotification(K$.type,async(H)=>{let R=T0.get(H.token);if(R)await R(H.value);else F.fire(H)}),y0}});var RZ=e((B)=>{var r3=B&&B.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(B,"__esModule",{value:!0});B.ProgressType=B.ProgressToken=B.createMessageConnection=B.NullLogger=B.ConnectionOptions=B.ConnectionStrategy=B.AbstractMessageBuffer=B.WriteableStreamMessageWriter=B.AbstractMessageWriter=B.MessageWriter=B.ReadableStreamMessageReader=B.AbstractMessageReader=B.MessageReader=B.SharedArrayReceiverStrategy=B.SharedArraySenderStrategy=B.CancellationToken=B.CancellationTokenSource=B.Emitter=B.Event=B.Disposable=B.LRUCache=B.Touch=B.LinkedMap=B.ParameterStructures=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.ErrorCodes=B.ResponseError=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType0=B.RequestType=B.Message=B.RAL=void 0;B.MessageStrategy=B.CancellationStrategy=B.CancellationSenderStrategy=B.RequestCancellationReceiverStrategy=B.IdCancellationReceiverStrategy=B.CancellationReceiverStrategy=B.ConnectionError=B.ConnectionErrors=B.LogTraceNotification=B.SetTraceNotification=B.TraceFormat=B.TraceValues=B.TraceValue=B.Trace=void 0;var S=Z6();Object.defineProperty(B,"Message",{enumerable:!0,get:function(){return S.Message}});Object.defineProperty(B,"RequestType",{enumerable:!0,get:function(){return S.RequestType}});Object.defineProperty(B,"RequestType0",{enumerable:!0,get:function(){return S.RequestType0}});Object.defineProperty(B,"RequestType1",{enumerable:!0,get:function(){return S.RequestType1}});Object.defineProperty(B,"RequestType2",{enumerable:!0,get:function(){return S.RequestType2}});Object.defineProperty(B,"RequestType3",{enumerable:!0,get:function(){return S.RequestType3}});Object.defineProperty(B,"RequestType4",{enumerable:!0,get:function(){return S.RequestType4}});Object.defineProperty(B,"RequestType5",{enumerable:!0,get:function(){return S.RequestType5}});Object.defineProperty(B,"RequestType6",{enumerable:!0,get:function(){return S.RequestType6}});Object.defineProperty(B,"RequestType7",{enumerable:!0,get:function(){return S.RequestType7}});Object.defineProperty(B,"RequestType8",{enumerable:!0,get:function(){return S.RequestType8}});Object.defineProperty(B,"RequestType9",{enumerable:!0,get:function(){return S.RequestType9}});Object.defineProperty(B,"ResponseError",{enumerable:!0,get:function(){return S.ResponseError}});Object.defineProperty(B,"ErrorCodes",{enumerable:!0,get:function(){return S.ErrorCodes}});Object.defineProperty(B,"NotificationType",{enumerable:!0,get:function(){return S.NotificationType}});Object.defineProperty(B,"NotificationType0",{enumerable:!0,get:function(){return S.NotificationType0}});Object.defineProperty(B,"NotificationType1",{enumerable:!0,get:function(){return S.NotificationType1}});Object.defineProperty(B,"NotificationType2",{enumerable:!0,get:function(){return S.NotificationType2}});Object.defineProperty(B,"NotificationType3",{enumerable:!0,get:function(){return S.NotificationType3}});Object.defineProperty(B,"NotificationType4",{enumerable:!0,get:function(){return S.NotificationType4}});Object.defineProperty(B,"NotificationType5",{enumerable:!0,get:function(){return S.NotificationType5}});Object.defineProperty(B,"NotificationType6",{enumerable:!0,get:function(){return S.NotificationType6}});Object.defineProperty(B,"NotificationType7",{enumerable:!0,get:function(){return S.NotificationType7}});Object.defineProperty(B,"NotificationType8",{enumerable:!0,get:function(){return S.NotificationType8}});Object.defineProperty(B,"NotificationType9",{enumerable:!0,get:function(){return S.NotificationType9}});Object.defineProperty(B,"ParameterStructures",{enumerable:!0,get:function(){return S.ParameterStructures}});var E6=X6();Object.defineProperty(B,"LinkedMap",{enumerable:!0,get:function(){return E6.LinkedMap}});Object.defineProperty(B,"LRUCache",{enumerable:!0,get:function(){return E6.LRUCache}});Object.defineProperty(B,"Touch",{enumerable:!0,get:function(){return E6.Touch}});var s3=tY();Object.defineProperty(B,"Disposable",{enumerable:!0,get:function(){return s3.Disposable}});var fX=z$();Object.defineProperty(B,"Event",{enumerable:!0,get:function(){return fX.Event}});Object.defineProperty(B,"Emitter",{enumerable:!0,get:function(){return fX.Emitter}});var kX=HZ();Object.defineProperty(B,"CancellationTokenSource",{enumerable:!0,get:function(){return kX.CancellationTokenSource}});Object.defineProperty(B,"CancellationToken",{enumerable:!0,get:function(){return kX.CancellationToken}});var CX=WX();Object.defineProperty(B,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return CX.SharedArraySenderStrategy}});Object.defineProperty(B,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return CX.SharedArrayReceiverStrategy}});var O6=wX();Object.defineProperty(B,"MessageReader",{enumerable:!0,get:function(){return O6.MessageReader}});Object.defineProperty(B,"AbstractMessageReader",{enumerable:!0,get:function(){return O6.AbstractMessageReader}});Object.defineProperty(B,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return O6.ReadableStreamMessageReader}});var _6=IX();Object.defineProperty(B,"MessageWriter",{enumerable:!0,get:function(){return _6.MessageWriter}});Object.defineProperty(B,"AbstractMessageWriter",{enumerable:!0,get:function(){return _6.AbstractMessageWriter}});Object.defineProperty(B,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return _6.WriteableStreamMessageWriter}});var i3=jX();Object.defineProperty(B,"AbstractMessageBuffer",{enumerable:!0,get:function(){return i3.AbstractMessageBuffer}});var o=vX();Object.defineProperty(B,"ConnectionStrategy",{enumerable:!0,get:function(){return o.ConnectionStrategy}});Object.defineProperty(B,"ConnectionOptions",{enumerable:!0,get:function(){return o.ConnectionOptions}});Object.defineProperty(B,"NullLogger",{enumerable:!0,get:function(){return o.NullLogger}});Object.defineProperty(B,"createMessageConnection",{enumerable:!0,get:function(){return o.createMessageConnection}});Object.defineProperty(B,"ProgressToken",{enumerable:!0,get:function(){return o.ProgressToken}});Object.defineProperty(B,"ProgressType",{enumerable:!0,get:function(){return o.ProgressType}});Object.defineProperty(B,"Trace",{enumerable:!0,get:function(){return o.Trace}});Object.defineProperty(B,"TraceValue",{enumerable:!0,get:function(){return o.TraceValue}});Object.defineProperty(B,"TraceFormat",{enumerable:!0,get:function(){return o.TraceFormat}});Object.defineProperty(B,"SetTraceNotification",{enumerable:!0,get:function(){return o.SetTraceNotification}});Object.defineProperty(B,"LogTraceNotification",{enumerable:!0,get:function(){return o.LogTraceNotification}});Object.defineProperty(B,"ConnectionErrors",{enumerable:!0,get:function(){return o.ConnectionErrors}});Object.defineProperty(B,"ConnectionError",{enumerable:!0,get:function(){return o.ConnectionError}});Object.defineProperty(B,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return o.CancellationReceiverStrategy}});Object.defineProperty(B,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return o.IdCancellationReceiverStrategy}});Object.defineProperty(B,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return o.RequestCancellationReceiverStrategy}});Object.defineProperty(B,"CancellationSenderStrategy",{enumerable:!0,get:function(){return o.CancellationSenderStrategy}});Object.defineProperty(B,"CancellationStrategy",{enumerable:!0,get:function(){return o.CancellationStrategy}});Object.defineProperty(B,"MessageStrategy",{enumerable:!0,get:function(){return o.MessageStrategy}});Object.defineProperty(B,"TraceValues",{enumerable:!0,get:function(){return o.TraceValues}});var d3=r3(x0());B.RAL=d3.default});var bX=e((KX)=>{Object.defineProperty(KX,"__esModule",{value:!0});var FX=p0("util"),h0=RZ();class v6 extends h0.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor($="utf-8"){super($)}emptyBuffer(){return v6.emptyBuffer}fromString($,Z){return Buffer.from($,Z)}toString($,Z){if($ instanceof Buffer)return $.toString(Z);else return new FX.TextDecoder(Z).decode($)}asNative($,Z){if(Z===void 0)return $ instanceof Buffer?$:Buffer.from($);else return $ instanceof Buffer?$.slice(0,Z):Buffer.from($,0,Z)}allocNative($){return Buffer.allocUnsafe($)}}class hX{stream;constructor($){this.stream=$}onClose($){return this.stream.on("close",$),h0.Disposable.create(()=>this.stream.off("close",$))}onError($){return this.stream.on("error",$),h0.Disposable.create(()=>this.stream.off("error",$))}onEnd($){return this.stream.on("end",$),h0.Disposable.create(()=>this.stream.off("end",$))}onData($){return this.stream.on("data",$),h0.Disposable.create(()=>this.stream.off("data",$))}}class NX{stream;constructor($){this.stream=$}onClose($){return this.stream.on("close",$),h0.Disposable.create(()=>this.stream.off("close",$))}onError($){return this.stream.on("error",$),h0.Disposable.create(()=>this.stream.off("error",$))}onEnd($){return this.stream.on("end",$),h0.Disposable.create(()=>this.stream.off("end",$))}write($,Z){return new Promise((Y,Q)=>{let G=(J)=>{if(J===void 0||J===null)Y();else Q(J)};if(typeof $==="string")this.stream.write($,Z,G);else this.stream.write($,G)})}end(){this.stream.end()}}var uX=Object.freeze({messageBuffer:Object.freeze({create:($)=>new v6($)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:($,Z)=>{try{return Promise.resolve(Buffer.from(JSON.stringify($,void 0,0),Z.charset))}catch(Y){return Promise.reject(Y)}}}),decoder:Object.freeze({name:"application/json",decode:($,Z)=>{try{if($ instanceof Buffer)return Promise.resolve(JSON.parse($.toString(Z.charset)));else return Promise.resolve(JSON.parse(new FX.TextDecoder(Z.charset).decode($)))}catch(Y){return Promise.reject(Y)}}})}),stream:Object.freeze({asReadableStream:($)=>new hX($),asWritableStream:($)=>new NX($)}),console,timer:Object.freeze({setTimeout($,Z,...Y){let Q=setTimeout($,Z,...Y);return{dispose:()=>clearTimeout(Q)}},setImmediate($,...Z){let Y=setImmediate($,...Z);return{dispose:()=>clearImmediate(Y)}},setInterval($,Z,...Y){let Q=setInterval($,Z,...Y);return{dispose:()=>clearInterval(Q)}}})});function T6(){return uX}(function($){function Z(){h0.RAL.install(uX)}$.install=Z})(T6||(T6={}));KX.default=T6});var cX=e((C)=>{var xX=C&&C.__createBinding||(Object.create?function($,Z,Y,Q){if(Q===void 0)Q=Y;var G=Object.getOwnPropertyDescriptor(Z,Y);if(!G||("get"in G?!Z.__esModule:G.writable||G.configurable))G={enumerable:!0,get:function(){return Z[Y]}};Object.defineProperty($,Q,G)}:function($,Z,Y,Q){if(Q===void 0)Q=Y;$[Q]=Z[Y]}),a3=C&&C.__setModuleDefault||(Object.create?function($,Z){Object.defineProperty($,"default",{enumerable:!0,value:Z})}:function($,Z){$.default=Z}),f6=C&&C.__importStar||function(){var $=function(Z){return $=Object.getOwnPropertyNames||function(Y){var Q=[];for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G))Q[Q.length]=G;return Q},$(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null){for(var Q=$(Z),G=0;G<Q.length;G++)if(Q[G]!=="default")xX(Y,Z,Q[G])}return a3(Y,Z),Y}}(),t3=C&&C.__exportStar||function($,Z){for(var Y in $)if(Y!=="default"&&!Object.prototype.hasOwnProperty.call(Z,Y))xX(Z,$,Y)},n3=C&&C.__importDefault||function($){return $&&$.__esModule?$:{default:$}};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=QU;C.createClientPipeTransport=GU;C.createServerPipeTransport=JU;C.createClientSocketTransport=UU;C.createServerSocketTransport=WU;C.createMessageConnection=zU;var x$=n3(bX());x$.default.install();var e3=f6(p0("path")),$U=f6(p0("os")),ZU=f6(p0("fs")),SX=p0("crypto"),IZ=p0("net"),z0=RZ();t3(RZ(),C);class gX extends z0.AbstractMessageReader{process;constructor($){super();this.process=$;let Z=this.process;Z.on("error",(Y)=>this.fireError(Y)),Z.on("close",()=>this.fireClose())}listen($){return this.process.on("message",$),z0.Disposable.create(()=>this.process.off("message",$))}}C.IPCMessageReader=gX;class pX extends z0.AbstractMessageWriter{process;errorCount;constructor($){super();this.process=$,this.errorCount=0;let Z=this.process;Z.on("error",(Y)=>this.fireError(Y)),Z.on("close",()=>this.fireClose)}write($){try{if(typeof this.process.send==="function")this.process.send($,void 0,void 0,(Z)=>{if(Z)this.errorCount++,this.handleError(Z,$);else this.errorCount=0});return Promise.resolve()}catch(Z){return this.handleError(Z,$),Promise.reject(Z)}}handleError($,Z){this.errorCount++,this.fireError($,Z,this.errorCount)}end(){}}C.IPCMessageWriter=pX;class yX extends z0.AbstractMessageReader{onData;constructor($){super();this.onData=new z0.Emitter,$.on("close",()=>this.fireClose),$.on("error",(Z)=>this.fireError(Z)),$.on("message",(Z)=>{this.onData.fire(Z)})}listen($){return this.onData.event($)}}C.PortMessageReader=yX;class mX extends z0.AbstractMessageWriter{port;errorCount;constructor($){super();this.port=$,this.errorCount=0,$.on("close",()=>this.fireClose()),$.on("error",(Z)=>this.fireError(Z))}write($){try{return this.port.postMessage($),Promise.resolve()}catch(Z){return this.handleError(Z,$),Promise.reject(Z)}}handleError($,Z){this.errorCount++,this.fireError($,Z,this.errorCount)}end(){}}C.PortMessageWriter=mX;class L$ extends z0.ReadableStreamMessageReader{constructor($,Z="utf-8"){super((0,x$.default)().stream.asReadableStream($),Z)}}C.SocketMessageReader=L$;class A$ extends z0.WriteableStreamMessageWriter{socket;constructor($,Z){super((0,x$.default)().stream.asWritableStream($),Z);this.socket=$}dispose(){super.dispose(),this.socket.destroy()}}C.SocketMessageWriter=A$;class k6 extends z0.ReadableStreamMessageReader{constructor($,Z){super((0,x$.default)().stream.asReadableStream($),Z)}}C.StreamMessageReader=k6;class C6 extends z0.WriteableStreamMessageWriter{constructor($,Z){super((0,x$.default)().stream.asWritableStream($),Z)}}C.StreamMessageWriter=C6;var YU=process.env.XDG_RUNTIME_DIR,XU=new Map([["linux",107],["darwin",103]]);function QU(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,SX.randomBytes)(16).toString("hex")}-sock`;let $=32,Z=10,Y=ZU.realpathSync(YU??$U.tmpdir()),Q=XU.get(process.platform);if(Q!==void 0)$=Math.min(Q-Y.length-Z,$);if($<16)throw Error(`Unable to generate a random pipe name with ${$} characters.`);let G=(0,SX.randomBytes)(Math.floor($/2)).toString("hex");return e3.join(Y,`lsp-${G}.sock`)}function GU($,Z="utf-8"){let Y,Q=new Promise((G,J)=>{Y=G});return new Promise((G,J)=>{let V=(0,IZ.createServer)((L)=>{V.close(),Y([new L$(L,Z),new A$(L,Z)])});V.on("error",J),V.listen($,()=>{V.removeListener("error",J),G({onConnected:()=>{return Q}})})})}function JU($,Z="utf-8"){let Y=(0,IZ.createConnection)($);return[new L$(Y,Z),new A$(Y,Z)]}function UU($,Z="utf-8"){let Y,Q=new Promise((G,J)=>{Y=G});return new Promise((G,J)=>{let V=(0,IZ.createServer)((L)=>{V.close(),Y([new L$(L,Z),new A$(L,Z)])});V.on("error",J),V.listen($,"127.0.0.1",()=>{V.removeListener("error",J),G({onConnected:()=>{return Q}})})})}function WU($,Z="utf-8"){let Y=(0,IZ.createConnection)($,"127.0.0.1");return[new L$(Y,Z),new A$(Y,Z)]}function VU($){let Z=$;return Z.read!==void 0&&Z.addListener!==void 0}function HU($){let Z=$;return Z.write!==void 0&&Z.addListener!==void 0}function zU($,Z,Y,Q){if(!Y)Y=z0.NullLogger;let G=VU($)?new k6($):$,J=HU(Z)?new C6(Z):Z;if(z0.ConnectionStrategy.is(Q))Q={connectionStrategy:Q};return(0,z0.createMessageConnection)(G,J,Y,Q)}});var OZ;(function($){$[$.Text=1]="Text",$[$.Method=2]="Method",$[$.Function=3]="Function",$[$.Constructor=4]="Constructor",$[$.Field=5]="Field",$[$.Variable=6]="Variable",$[$.Class=7]="Class",$[$.Interface=8]="Interface",$[$.Module=9]="Module",$[$.Property=10]="Property",$[$.Unit=11]="Unit",$[$.Value=12]="Value",$[$.Enum=13]="Enum",$[$.Keyword=14]="Keyword",$[$.Snippet=15]="Snippet",$[$.Color=16]="Color",$[$.File=17]="File",$[$.Reference=18]="Reference",$[$.Folder=19]="Folder",$[$.EnumMember=20]="EnumMember",$[$.Constant=21]="Constant",$[$.Struct=22]="Struct",$[$.Event=23]="Event",$[$.Operator=24]="Operator",$[$.TypeParameter=25]="TypeParameter"})(OZ||(OZ={}));var _Z;(function($){$[$.Warning=0]="Warning",$[$.Error=1]="Error",$[$.Suggestion=2]="Suggestion",$[$.Message=3]="Message"})(_Z||(_Z={}));var TZ;(function($){$[$.None=0]="None",$[$.Required=1]="Required",$[$.Optional=2]="Optional",$[$.Rest=4]="Rest",$[$.Variadic=8]="Variadic",$[$.Fixed=3]="Fixed",$[$.Variable=12]="Variable",$[$.NonRequired=14]="NonRequired",$[$.NonRest=11]="NonRest"})(TZ||(TZ={}));var vZ;(function($){$[$.None=0]="None",$[$.CommonJS=1]="CommonJS",$[$.AMD=2]="AMD",$[$.UMD=3]="UMD",$[$.System=4]="System",$[$.ES2015=5]="ES2015",$[$.ES2020=6]="ES2020",$[$.ES2022=7]="ES2022",$[$.ESNext=99]="ESNext",$[$.Node16=100]="Node16",$[$.Node18=101]="Node18",$[$.Node20=102]="Node20",$[$.NodeNext=199]="NodeNext",$[$.Preserve=200]="Preserve"})(vZ||(vZ={}));var fZ;(function($){$[$.None=0]="None",$[$.NoTruncation=1]="NoTruncation",$[$.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",$[$.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",$[$.UseStructuralFallback=8]="UseStructuralFallback",$[$.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",$[$.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",$[$.UseFullyQualifiedType=64]="UseFullyQualifiedType",$[$.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",$[$.SuppressAnyReturnType=256]="SuppressAnyReturnType",$[$.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",$[$.MultilineObjectLiterals=1024]="MultilineObjectLiterals",$[$.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",$[$.UseTypeOfFunction=4096]="UseTypeOfFunction",$[$.OmitParameterModifiers=8192]="OmitParameterModifiers",$[$.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",$[$.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",$[$.NoTypeReduction=536870912]="NoTypeReduction",$[$.UseInstantiationExpressions=1073741824]="UseInstantiationExpressions",$[$.OmitThisParameter=33554432]="OmitThisParameter",$[$.WriteCallStyleSignature=134217728]="WriteCallStyleSignature",$[$.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",$[$.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",$[$.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",$[$.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",$[$.AllowEmptyTuple=524288]="AllowEmptyTuple",$[$.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",$[$.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",$[$.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",$[$.IgnoreErrors=70221824]="IgnoreErrors",$[$.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",$[$.InTypeAlias=8388608]="InTypeAlias",$[$.InInitialEntityName=16777216]="InInitialEntityName"})(fZ||(fZ={}));var X$;(function($){$[$.None=0]="None",$[$.Class=1]="Class",$[$.Interface=2]="Interface",$[$.Reference=4]="Reference",$[$.Tuple=8]="Tuple",$[$.Anonymous=16]="Anonymous",$[$.Mapped=32]="Mapped",$[$.Instantiated=64]="Instantiated",$[$.ObjectLiteral=128]="ObjectLiteral",$[$.EvolvingArray=256]="EvolvingArray",$[$.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",$[$.ReverseMapped=1024]="ReverseMapped",$[$.JsxAttributes=2048]="JsxAttributes",$[$.JSLiteral=4096]="JSLiteral",$[$.FreshLiteral=8192]="FreshLiteral",$[$.ArrayLiteral=16384]="ArrayLiteral",$[$.PrimitiveUnion=32768]="PrimitiveUnion",$[$.ContainsWideningType=65536]="ContainsWideningType",$[$.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",$[$.NonInferrableType=262144]="NonInferrableType",$[$.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",$[$.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",$[$.MembersResolved=2097152]="MembersResolved",$[$.ClassOrInterface=3]="ClassOrInterface",$[$.RequiresWidening=196608]="RequiresWidening",$[$.PropagatingFlags=458752]="PropagatingFlags",$[$.InstantiatedMapped=96]="InstantiatedMapped",$[$.InstantiationExpressionType=16777216]="InstantiationExpressionType",$[$.SingleSignatureType=33554432]="SingleSignatureType",$[$.ObjectTypeKindMask=50332991]="ObjectTypeKindMask",$[$.ContainsSpread=4194304]="ContainsSpread",$[$.ObjectRestType=8388608]="ObjectRestType",$[$.IsClassInstanceClone=67108864]="IsClassInstanceClone",$[$.IdenticalBaseTypeCalculated=134217728]="IdenticalBaseTypeCalculated",$[$.IdenticalBaseTypeExists=268435456]="IdenticalBaseTypeExists",$[$.UnresolvedMembers=536870912]="UnresolvedMembers",$[$.FromTypeNode=1073741824]="FromTypeNode",$[$.IsGenericTypeComputed=4194304]="IsGenericTypeComputed",$[$.IsGenericObjectType=8388608]="IsGenericObjectType",$[$.IsGenericIndexType=16777216]="IsGenericIndexType",$[$.IsGenericType=25165824]="IsGenericType",$[$.ContainsIntersections=33554432]="ContainsIntersections",$[$.IsUnknownLikeUnionComputed=67108864]="IsUnknownLikeUnionComputed",$[$.IsUnknownLikeUnion=134217728]="IsUnknownLikeUnion",$[$.IsNeverIntersectionComputed=33554432]="IsNeverIntersectionComputed",$[$.IsNeverIntersection=67108864]="IsNeverIntersection",$[$.IsConstrainedTypeVariable=134217728]="IsConstrainedTypeVariable"})(X$||(X$={}));var Q$;(function($){$[$.None=0]="None",$[$.HasRestParameter=1]="HasRestParameter",$[$.HasLiteralTypes=2]="HasLiteralTypes",$[$.Construct=4]="Construct",$[$.Abstract=8]="Abstract",$[$.IsInnerCallChain=16]="IsInnerCallChain",$[$.IsOuterCallChain=32]="IsOuterCallChain",$[$.IsUntypedSignatureInJSFile=64]="IsUntypedSignatureInJSFile",$[$.IsNonInferrable=128]="IsNonInferrable",$[$.IsSignatureCandidateForOverloadFailure=256]="IsSignatureCandidateForOverloadFailure",$[$.PropagatingFlags=335]="PropagatingFlags",$[$.CallChainFlags=48]="CallChainFlags"})(Q$||(Q$={}));var kZ;(function($){$[$.Call=0]="Call",$[$.Construct=1]="Construct"})(kZ||(kZ={}));var D$;(function($){$[$.None=0]="None",$[$.FunctionScopedVariable=1]="FunctionScopedVariable",$[$.BlockScopedVariable=2]="BlockScopedVariable",$[$.Property=4]="Property",$[$.EnumMember=8]="EnumMember",$[$.Function=16]="Function",$[$.Class=32]="Class",$[$.Interface=64]="Interface",$[$.ConstEnum=128]="ConstEnum",$[$.RegularEnum=256]="RegularEnum",$[$.ValueModule=512]="ValueModule",$[$.NamespaceModule=1024]="NamespaceModule",$[$.TypeLiteral=2048]="TypeLiteral",$[$.ObjectLiteral=4096]="ObjectLiteral",$[$.Method=8192]="Method",$[$.Constructor=16384]="Constructor",$[$.GetAccessor=32768]="GetAccessor",$[$.SetAccessor=65536]="SetAccessor",$[$.Signature=131072]="Signature",$[$.TypeParameter=262144]="TypeParameter",$[$.TypeAlias=524288]="TypeAlias",$[$.ExportValue=1048576]="ExportValue",$[$.Alias=2097152]="Alias",$[$.Prototype=4194304]="Prototype",$[$.ExportStar=8388608]="ExportStar",$[$.Optional=16777216]="Optional",$[$.Transient=33554432]="Transient",$[$.Assignment=67108864]="Assignment",$[$.ModuleExports=134217728]="ModuleExports",$[$.ConstEnumOnlyModule=268435456]="ConstEnumOnlyModule",$[$.ReplaceableByMethod=536870912]="ReplaceableByMethod",$[$.GlobalLookup=1073741824]="GlobalLookup",$[$.All=536870912]="All",$[$.Enum=384]="Enum",$[$.Variable=3]="Variable",$[$.Value=111551]="Value",$[$.Type=788968]="Type",$[$.Namespace=1920]="Namespace",$[$.Module=1536]="Module",$[$.Accessor=98304]="Accessor",$[$.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",$[$.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",$[$.ParameterExcludes=111551]="ParameterExcludes",$[$.PropertyExcludes=13243]="PropertyExcludes",$[$.EnumMemberExcludes=900095]="EnumMemberExcludes",$[$.FunctionExcludes=110991]="FunctionExcludes",$[$.ClassExcludes=899503]="ClassExcludes",$[$.InterfaceExcludes=788872]="InterfaceExcludes",$[$.RegularEnumExcludes=899327]="RegularEnumExcludes",$[$.ConstEnumExcludes=899967]="ConstEnumExcludes",$[$.ValueModuleExcludes=110735]="ValueModuleExcludes",$[$.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",$[$.MethodExcludes=103359]="MethodExcludes",$[$.GetAccessorExcludes=46011]="GetAccessorExcludes",$[$.SetAccessorExcludes=78779]="SetAccessorExcludes",$[$.AccessorExcludes=111547]="AccessorExcludes",$[$.TypeParameterExcludes=526824]="TypeParameterExcludes",$[$.TypeAliasExcludes=788968]="TypeAliasExcludes",$[$.AliasExcludes=2097152]="AliasExcludes",$[$.ModuleMember=2623475]="ModuleMember",$[$.ExportHasLocal=944]="ExportHasLocal",$[$.BlockScoped=418]="BlockScoped",$[$.PropertyOrAccessor=98308]="PropertyOrAccessor",$[$.ClassMember=106500]="ClassMember",$[$.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",$[$.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",$[$.Classifiable=2885600]="Classifiable",$[$.LateBindingContainer=6256]="LateBindingContainer"})(D$||(D$={}));var s;(function($){$[$.None=0]="None",$[$.Any=1]="Any",$[$.Unknown=2]="Unknown",$[$.Undefined=4]="Undefined",$[$.Null=8]="Null",$[$.Void=16]="Void",$[$.String=32]="String",$[$.Number=64]="Number",$[$.BigInt=128]="BigInt",$[$.Boolean=256]="Boolean",$[$.ESSymbol=512]="ESSymbol",$[$.StringLiteral=1024]="StringLiteral",$[$.NumberLiteral=2048]="NumberLiteral",$[$.BigIntLiteral=4096]="BigIntLiteral",$[$.BooleanLiteral=8192]="BooleanLiteral",$[$.UniqueESSymbol=16384]="UniqueESSymbol",$[$.EnumLiteral=32768]="EnumLiteral",$[$.Enum=65536]="Enum",$[$.NonPrimitive=131072]="NonPrimitive",$[$.Never=262144]="Never",$[$.TypeParameter=524288]="TypeParameter",$[$.Object=1048576]="Object",$[$.Index=2097152]="Index",$[$.TemplateLiteral=4194304]="TemplateLiteral",$[$.StringMapping=8388608]="StringMapping",$[$.Substitution=16777216]="Substitution",$[$.IndexedAccess=33554432]="IndexedAccess",$[$.Conditional=67108864]="Conditional",$[$.Union=134217728]="Union",$[$.Intersection=268435456]="Intersection",$[$.Reserved1=536870912]="Reserved1",$[$.Reserved2=1073741824]="Reserved2",$[$.Reserved3=-2147483648]="Reserved3",$[$.AnyOrUnknown=3]="AnyOrUnknown",$[$.Nullable=12]="Nullable",$[$.Literal=15360]="Literal",$[$.Unit=97292]="Unit",$[$.Freshable=80896]="Freshable",$[$.StringOrNumberLiteral=3072]="StringOrNumberLiteral",$[$.StringOrNumberLiteralOrUnique=19456]="StringOrNumberLiteralOrUnique",$[$.DefinitelyFalsy=15388]="DefinitelyFalsy",$[$.PossiblyFalsy=15868]="PossiblyFalsy",$[$.Intrinsic=393983]="Intrinsic",$[$.StringLike=12583968]="StringLike",$[$.NumberLike=67648]="NumberLike",$[$.BigIntLike=4224]="BigIntLike",$[$.BooleanLike=8448]="BooleanLike",$[$.EnumLike=98304]="EnumLike",$[$.ESSymbolLike=16896]="ESSymbolLike",$[$.VoidLike=20]="VoidLike",$[$.Primitive=12713980]="Primitive",$[$.DefinitelyNonNullable=13893600]="DefinitelyNonNullable",$[$.DisjointDomains=12812284]="DisjointDomains",$[$.UnionOrIntersection=402653184]="UnionOrIntersection",$[$.StructuredType=403701760]="StructuredType",$[$.TypeVariable=34078720]="TypeVariable",$[$.InstantiableNonPrimitive=117964800]="InstantiableNonPrimitive",$[$.InstantiablePrimitive=14680064]="InstantiablePrimitive",$[$.Instantiable=132644864]="Instantiable",$[$.StructuredOrInstantiable=536346624]="StructuredOrInstantiable",$[$.ObjectFlagsType=403963917]="ObjectFlagsType",$[$.Simplifiable=102760448]="Simplifiable",$[$.Singleton=394239]="Singleton",$[$.Narrowable=536575971]="Narrowable",$[$.IncludesMask=416808959]="IncludesMask",$[$.IncludesMissingType=524288]="IncludesMissingType",$[$.IncludesNonWideningType=2097152]="IncludesNonWideningType",$[$.IncludesWildcard=33554432]="IncludesWildcard",$[$.IncludesEmptyObject=67108864]="IncludesEmptyObject",$[$.IncludesInstantiable=16777216]="IncludesInstantiable",$[$.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",$[$.IncludesError=1073741824]="IncludesError",$[$.NotPrimitiveUnion=286523411]="NotPrimitiveUnion"})(s||(s={}));var CZ;(function($){$[$.This=0]="This",$[$.Identifier=1]="Identifier",$[$.AssertsThis=2]="AssertsThis",$[$.AssertsIdentifier=3]="AssertsIdentifier"})(CZ||(CZ={}));var D;(function($){$[$.EOF=-1]="EOF",$[$.nullCharacter=0]="nullCharacter",$[$.maxAsciiCharacter=127]="maxAsciiCharacter",$[$.lineFeed=10]="lineFeed",$[$.carriageReturn=13]="carriageReturn",$[$.lineSeparator=8232]="lineSeparator",$[$.paragraphSeparator=8233]="paragraphSeparator",$[$.nextLine=133]="nextLine",$[$.space=32]="space",$[$.nonBreakingSpace=160]="nonBreakingSpace",$[$.enQuad=8192]="enQuad",$[$.emQuad=8193]="emQuad",$[$.enSpace=8194]="enSpace",$[$.emSpace=8195]="emSpace",$[$.threePerEmSpace=8196]="threePerEmSpace",$[$.fourPerEmSpace=8197]="fourPerEmSpace",$[$.sixPerEmSpace=8198]="sixPerEmSpace",$[$.figureSpace=8199]="figureSpace",$[$.punctuationSpace=8200]="punctuationSpace",$[$.thinSpace=8201]="thinSpace",$[$.hairSpace=8202]="hairSpace",$[$.zeroWidthSpace=8203]="zeroWidthSpace",$[$.narrowNoBreakSpace=8239]="narrowNoBreakSpace",$[$.ideographicSpace=12288]="ideographicSpace",$[$.mathematicalSpace=8287]="mathematicalSpace",$[$.ogham=5765]="ogham",$[$.replacementCharacter=65533]="replacementCharacter",$[$._=95]="_",$[$.$=36]="$",$[$._0=48]="_0",$[$._1=49]="_1",$[$._2=50]="_2",$[$._3=51]="_3",$[$._4=52]="_4",$[$._5=53]="_5",$[$._6=54]="_6",$[$._7=55]="_7",$[$._8=56]="_8",$[$._9=57]="_9",$[$.a=97]="a",$[$.b=98]="b",$[$.c=99]="c",$[$.d=100]="d",$[$.e=101]="e",$[$.f=102]="f",$[$.g=103]="g",$[$.h=104]="h",$[$.i=105]="i",$[$.j=106]="j",$[$.k=107]="k",$[$.l=108]="l",$[$.m=109]="m",$[$.n=110]="n",$[$.o=111]="o",$[$.p=112]="p",$[$.q=113]="q",$[$.r=114]="r",$[$.s=115]="s",$[$.t=116]="t",$[$.u=117]="u",$[$.v=118]="v",$[$.w=119]="w",$[$.x=120]="x",$[$.y=121]="y",$[$.z=122]="z",$[$.A=65]="A",$[$.B=66]="B",$[$.C=67]="C",$[$.D=68]="D",$[$.E=69]="E",$[$.F=70]="F",$[$.G=71]="G",$[$.H=72]="H",$[$.I=73]="I",$[$.J=74]="J",$[$.K=75]="K",$[$.L=76]="L",$[$.M=77]="M",$[$.N=78]="N",$[$.O=79]="O",$[$.P=80]="P",$[$.Q=81]="Q",$[$.R=82]="R",$[$.S=83]="S",$[$.T=84]="T",$[$.U=85]="U",$[$.V=86]="V",$[$.W=87]="W",$[$.X=88]="X",$[$.Y=89]="Y",$[$.Z=90]="Z",$[$.ampersand=38]="ampersand",$[$.asterisk=42]="asterisk",$[$.at=64]="at",$[$.backslash=92]="backslash",$[$.backtick=96]="backtick",$[$.bar=124]="bar",$[$.caret=94]="caret",$[$.closeBrace=125]="closeBrace",$[$.closeBracket=93]="closeBracket",$[$.closeParen=41]="closeParen",$[$.colon=58]="colon",$[$.comma=44]="comma",$[$.dot=46]="dot",$[$.doubleQuote=34]="doubleQuote",$[$.equals=61]="equals",$[$.exclamation=33]="exclamation",$[$.greaterThan=62]="greaterThan",$[$.hash=35]="hash",$[$.lessThan=60]="lessThan",$[$.minus=45]="minus",$[$.openBrace=123]="openBrace",$[$.openBracket=91]="openBracket",$[$.openParen=40]="openParen",$[$.percent=37]="percent",$[$.plus=43]="plus",$[$.question=63]="question",$[$.semicolon=59]="semicolon",$[$.singleQuote=39]="singleQuote",$[$.slash=47]="slash",$[$.tilde=126]="tilde",$[$.backspace=8]="backspace",$[$.formFeed=12]="formFeed",$[$.byteOrderMark=65279]="byteOrderMark",$[$.tab=9]="tab",$[$.verticalTab=11]="verticalTab"})(D||(D={}));var p$;(function($){$[$.ExpectError=0]="ExpectError",$[$.Ignore=1]="Ignore"})(p$||(p$={}));var FZ;(function($){$.Call="__call",$.Constructor="__constructor",$.New="__new",$.Index="__index",$.ExportStar="__export",$.Global="__global",$.Missing="__missing",$.Type="__type",$.Object="__object",$.JSXAttributes="__jsxAttributes",$.Class="__class",$.Function="__function",$.Computed="__computed",$.AssignmentDeclaration="__assignment",$.InstantiationExpression="__instantiationExpression",$.ImportAttributes="__importAttributes",$.ExportEquals="export=",$.Default="default",$.This="this",$.ModuleExports="module.exports"})(FZ||(FZ={}));var y$;(function($){$[$.Standard=0]="Standard",$[$.JSX=1]="JSX"})(y$||(y$={}));var g;(function($){$[$.None=0]="None",$[$.Public=1]="Public",$[$.Private=2]="Private",$[$.Protected=4]="Protected",$[$.Readonly=8]="Readonly",$[$.Override=16]="Override",$[$.Export=32]="Export",$[$.Abstract=64]="Abstract",$[$.Ambient=128]="Ambient",$[$.Static=256]="Static",$[$.Accessor=512]="Accessor",$[$.Async=1024]="Async",$[$.Default=2048]="Default",$[$.Const=4096]="Const",$[$.In=8192]="In",$[$.Out=16384]="Out",$[$.Decorator=32768]="Decorator",$[$.Deprecated=65536]="Deprecated",$[$.JSDocPublic=8388608]="JSDocPublic",$[$.JSDocPrivate=16777216]="JSDocPrivate",$[$.JSDocProtected=33554432]="JSDocProtected",$[$.JSDocReadonly=67108864]="JSDocReadonly",$[$.JSDocOverride=134217728]="JSDocOverride",$[$.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",$[$.HasComputedFlags=536870912]="HasComputedFlags",$[$.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",$[$.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",$[$.SyntacticModifiers=65535]="SyntacticModifiers",$[$.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",$[$.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",$[$.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",$[$.AccessibilityModifier=7]="AccessibilityModifier",$[$.ParameterPropertyModifier=31]="ParameterPropertyModifier",$[$.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",$[$.TypeScriptModifier=28895]="TypeScriptModifier",$[$.ExportDefault=2080]="ExportDefault",$[$.All=131071]="All",$[$.Modifier=98303]="Modifier",$[$.JavaScript=3872]="JavaScript"})(g||(g={}));var E0;(function($){$[$.None=0]="None",$[$.Let=1]="Let",$[$.Const=2]="Const",$[$.Using=4]="Using",$[$.Reparsed=8]="Reparsed",$[$.Synthesized=16]="Synthesized",$[$.OptionalChain=32]="OptionalChain",$[$.ExportContext=64]="ExportContext",$[$.ContainsThis=128]="ContainsThis",$[$.HasImplicitReturn=256]="HasImplicitReturn",$[$.HasExplicitReturn=512]="HasExplicitReturn",$[$.DisallowInContext=1024]="DisallowInContext",$[$.YieldContext=2048]="YieldContext",$[$.DecoratorContext=4096]="DecoratorContext",$[$.AwaitContext=8192]="AwaitContext",$[$.DisallowConditionalTypesContext=16384]="DisallowConditionalTypesContext",$[$.ThisNodeHasError=32768]="ThisNodeHasError",$[$.JavaScriptFile=65536]="JavaScriptFile",$[$.ThisNodeOrAnySubNodesHasError=131072]="ThisNodeOrAnySubNodesHasError",$[$.HasAsyncFunctions=262144]="HasAsyncFunctions",$[$.PossiblyContainsDynamicImport=524288]="PossiblyContainsDynamicImport",$[$.PossiblyContainsImportMeta=1048576]="PossiblyContainsImportMeta",$[$.HasJSDoc=2097152]="HasJSDoc",$[$.JSDoc=4194304]="JSDoc",$[$.Ambient=8388608]="Ambient",$[$.InWithStatement=16777216]="InWithStatement",$[$.JsonFile=33554432]="JsonFile",$[$.PossiblyContainsDeprecatedTag=67108864]="PossiblyContainsDeprecatedTag",$[$.Unreachable=134217728]="Unreachable",$[$.ReparserTransformedLiteral=268435456]="ReparserTransformedLiteral",$[$.BlockScoped=7]="BlockScoped",$[$.Constant=6]="Constant",$[$.AwaitUsing=6]="AwaitUsing",$[$.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",$[$.ReachabilityAndEmitFlags=262912]="ReachabilityAndEmitFlags",$[$.ContextFlags=25263104]="ContextFlags",$[$.TypeExcludesFlags=10240]="TypeExcludesFlags",$[$.PermanentlySetIncrementalFlags=1572864]="PermanentlySetIncrementalFlags",$[$.IdentifierHasExtendedUnicodeEscape=128]="IdentifierHasExtendedUnicodeEscape",$[$.IdentifierIsInJSDocNamespace=262144]="IdentifierIsInJSDocNamespace",$[$.NestedNamespace=32]="NestedNamespace"})(E0||(E0={}));var q0;(function($){$[$.None=0]="None",$[$.HasIndices=1]="HasIndices",$[$.Global=2]="Global",$[$.IgnoreCase=4]="IgnoreCase",$[$.Multiline=8]="Multiline",$[$.DotAll=16]="DotAll",$[$.Unicode=32]="Unicode",$[$.UnicodeSets=64]="UnicodeSets",$[$.Sticky=128]="Sticky",$[$.AnyUnicodeMode=96]="AnyUnicodeMode"})(q0||(q0={}));var G$;(function($){$[$.Unknown=0]="Unknown",$[$.JS=1]="JS",$[$.JSX=2]="JSX",$[$.TS=3]="TS",$[$.TSX=4]="TSX",$[$.External=5]="External",$[$.JSON=6]="JSON",$[$.Deferred=7]="Deferred"})(G$||(G$={}));var m$;(function($){$[$.ES2015=2]="ES2015",$[$.ES2016=3]="ES2016",$[$.ES2017=4]="ES2017",$[$.ES2018=5]="ES2018",$[$.ES2019=6]="ES2019",$[$.ES2020=7]="ES2020",$[$.ES2021=8]="ES2021",$[$.ES2022=9]="ES2022",$[$.ES2023=10]="ES2023",$[$.ES2024=11]="ES2024",$[$.ES2025=12]="ES2025",$[$.ESNext=99]="ESNext",$[$.JSON=100]="JSON",$[$.Latest=99]="Latest"})(m$||(m$={}));var X;(function($){$[$.Unknown=0]="Unknown",$[$.EndOfFile=1]="EndOfFile",$[$.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",$[$.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",$[$.NewLineTrivia=4]="NewLineTrivia",$[$.WhitespaceTrivia=5]="WhitespaceTrivia",$[$.ConflictMarkerTrivia=6]="ConflictMarkerTrivia",$[$.NonTextFileMarkerTrivia=7]="NonTextFileMarkerTrivia",$[$.NumericLiteral=8]="NumericLiteral",$[$.BigIntLiteral=9]="BigIntLiteral",$[$.StringLiteral=10]="StringLiteral",$[$.JsxText=11]="JsxText",$[$.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",$[$.RegularExpressionLiteral=13]="RegularExpressionLiteral",$[$.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",$[$.TemplateHead=15]="TemplateHead",$[$.TemplateMiddle=16]="TemplateMiddle",$[$.TemplateTail=17]="TemplateTail",$[$.OpenBraceToken=18]="OpenBraceToken",$[$.CloseBraceToken=19]="CloseBraceToken",$[$.OpenParenToken=20]="OpenParenToken",$[$.CloseParenToken=21]="CloseParenToken",$[$.OpenBracketToken=22]="OpenBracketToken",$[$.CloseBracketToken=23]="CloseBracketToken",$[$.DotToken=24]="DotToken",$[$.DotDotDotToken=25]="DotDotDotToken",$[$.SemicolonToken=26]="SemicolonToken",$[$.CommaToken=27]="CommaToken",$[$.QuestionDotToken=28]="QuestionDotToken",$[$.LessThanToken=29]="LessThanToken",$[$.LessThanSlashToken=30]="LessThanSlashToken",$[$.GreaterThanToken=31]="GreaterThanToken",$[$.LessThanEqualsToken=32]="LessThanEqualsToken",$[$.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",$[$.EqualsEqualsToken=34]="EqualsEqualsToken",$[$.ExclamationEqualsToken=35]="ExclamationEqualsToken",$[$.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",$[$.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",$[$.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",$[$.PlusToken=39]="PlusToken",$[$.MinusToken=40]="MinusToken",$[$.AsteriskToken=41]="AsteriskToken",$[$.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",$[$.SlashToken=43]="SlashToken",$[$.PercentToken=44]="PercentToken",$[$.PlusPlusToken=45]="PlusPlusToken",$[$.MinusMinusToken=46]="MinusMinusToken",$[$.LessThanLessThanToken=47]="LessThanLessThanToken",$[$.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",$[$.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",$[$.AmpersandToken=50]="AmpersandToken",$[$.BarToken=51]="BarToken",$[$.CaretToken=52]="CaretToken",$[$.ExclamationToken=53]="ExclamationToken",$[$.TildeToken=54]="TildeToken",$[$.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",$[$.BarBarToken=56]="BarBarToken",$[$.QuestionToken=57]="QuestionToken",$[$.ColonToken=58]="ColonToken",$[$.AtToken=59]="AtToken",$[$.QuestionQuestionToken=60]="QuestionQuestionToken",$[$.BacktickToken=61]="BacktickToken",$[$.HashToken=62]="HashToken",$[$.EqualsToken=63]="EqualsToken",$[$.PlusEqualsToken=64]="PlusEqualsToken",$[$.MinusEqualsToken=65]="MinusEqualsToken",$[$.AsteriskEqualsToken=66]="AsteriskEqualsToken",$[$.AsteriskAsteriskEqualsToken=67]="AsteriskAsteriskEqualsToken",$[$.SlashEqualsToken=68]="SlashEqualsToken",$[$.PercentEqualsToken=69]="PercentEqualsToken",$[$.LessThanLessThanEqualsToken=70]="LessThanLessThanEqualsToken",$[$.GreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanEqualsToken",$[$.GreaterThanGreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanGreaterThanEqualsToken",$[$.AmpersandEqualsToken=73]="AmpersandEqualsToken",$[$.BarEqualsToken=74]="BarEqualsToken",$[$.BarBarEqualsToken=75]="BarBarEqualsToken",$[$.AmpersandAmpersandEqualsToken=76]="AmpersandAmpersandEqualsToken",$[$.QuestionQuestionEqualsToken=77]="QuestionQuestionEqualsToken",$[$.CaretEqualsToken=78]="CaretEqualsToken",$[$.Identifier=79]="Identifier",$[$.PrivateIdentifier=80]="PrivateIdentifier",$[$.JSDocCommentTextToken=81]="JSDocCommentTextToken",$[$.BreakKeyword=82]="BreakKeyword",$[$.CaseKeyword=83]="CaseKeyword",$[$.CatchKeyword=84]="CatchKeyword",$[$.ClassKeyword=85]="ClassKeyword",$[$.ConstKeyword=86]="ConstKeyword",$[$.ContinueKeyword=87]="ContinueKeyword",$[$.DebuggerKeyword=88]="DebuggerKeyword",$[$.DefaultKeyword=89]="DefaultKeyword",$[$.DeleteKeyword=90]="DeleteKeyword",$[$.DoKeyword=91]="DoKeyword",$[$.ElseKeyword=92]="ElseKeyword",$[$.EnumKeyword=93]="EnumKeyword",$[$.ExportKeyword=94]="ExportKeyword",$[$.ExtendsKeyword=95]="ExtendsKeyword",$[$.FalseKeyword=96]="FalseKeyword",$[$.FinallyKeyword=97]="FinallyKeyword",$[$.ForKeyword=98]="ForKeyword",$[$.FunctionKeyword=99]="FunctionKeyword",$[$.IfKeyword=100]="IfKeyword",$[$.ImportKeyword=101]="ImportKeyword",$[$.InKeyword=102]="InKeyword",$[$.InstanceOfKeyword=103]="InstanceOfKeyword",$[$.NewKeyword=104]="NewKeyword",$[$.NullKeyword=105]="NullKeyword",$[$.ReturnKeyword=106]="ReturnKeyword",$[$.SuperKeyword=107]="SuperKeyword",$[$.SwitchKeyword=108]="SwitchKeyword",$[$.ThisKeyword=109]="ThisKeyword",$[$.ThrowKeyword=110]="ThrowKeyword",$[$.TrueKeyword=111]="TrueKeyword",$[$.TryKeyword=112]="TryKeyword",$[$.TypeOfKeyword=113]="TypeOfKeyword",$[$.VarKeyword=114]="VarKeyword",$[$.VoidKeyword=115]="VoidKeyword",$[$.WhileKeyword=116]="WhileKeyword",$[$.WithKeyword=117]="WithKeyword",$[$.ImplementsKeyword=118]="ImplementsKeyword",$[$.InterfaceKeyword=119]="InterfaceKeyword",$[$.LetKeyword=120]="LetKeyword",$[$.PackageKeyword=121]="PackageKeyword",$[$.PrivateKeyword=122]="PrivateKeyword",$[$.ProtectedKeyword=123]="ProtectedKeyword",$[$.PublicKeyword=124]="PublicKeyword",$[$.StaticKeyword=125]="StaticKeyword",$[$.YieldKeyword=126]="YieldKeyword",$[$.AbstractKeyword=127]="AbstractKeyword",$[$.AccessorKeyword=128]="AccessorKeyword",$[$.AsKeyword=129]="AsKeyword",$[$.AssertsKeyword=130]="AssertsKeyword",$[$.AssertKeyword=131]="AssertKeyword",$[$.AnyKeyword=132]="AnyKeyword",$[$.AsyncKeyword=133]="AsyncKeyword",$[$.AwaitKeyword=134]="AwaitKeyword",$[$.BooleanKeyword=135]="BooleanKeyword",$[$.ConstructorKeyword=136]="ConstructorKeyword",$[$.DeclareKeyword=137]="DeclareKeyword",$[$.GetKeyword=138]="GetKeyword",$[$.ImmediateKeyword=139]="ImmediateKeyword",$[$.InferKeyword=140]="InferKeyword",$[$.IntrinsicKeyword=141]="IntrinsicKeyword",$[$.IsKeyword=142]="IsKeyword",$[$.KeyOfKeyword=143]="KeyOfKeyword",$[$.ModuleKeyword=144]="ModuleKeyword",$[$.NamespaceKeyword=145]="NamespaceKeyword",$[$.NeverKeyword=146]="NeverKeyword",$[$.OutKeyword=147]="OutKeyword",$[$.ReadonlyKeyword=148]="ReadonlyKeyword",$[$.RequireKeyword=149]="RequireKeyword",$[$.NumberKeyword=150]="NumberKeyword",$[$.ObjectKeyword=151]="ObjectKeyword",$[$.SatisfiesKeyword=152]="SatisfiesKeyword",$[$.SetKeyword=153]="SetKeyword",$[$.StringKeyword=154]="StringKeyword",$[$.SymbolKeyword=155]="SymbolKeyword",$[$.TypeKeyword=156]="TypeKeyword",$[$.UndefinedKeyword=157]="UndefinedKeyword",$[$.UniqueKeyword=158]="UniqueKeyword",$[$.UnknownKeyword=159]="UnknownKeyword",$[$.UsingKeyword=160]="UsingKeyword",$[$.FromKeyword=161]="FromKeyword",$[$.GlobalKeyword=162]="GlobalKeyword",$[$.BigIntKeyword=163]="BigIntKeyword",$[$.OverrideKeyword=164]="OverrideKeyword",$[$.OfKeyword=165]="OfKeyword",$[$.DeferKeyword=166]="DeferKeyword",$[$.QualifiedName=167]="QualifiedName",$[$.ComputedPropertyName=168]="ComputedPropertyName",$[$.TypeParameter=169]="TypeParameter",$[$.Parameter=170]="Parameter",$[$.Decorator=171]="Decorator",$[$.PropertySignature=172]="PropertySignature",$[$.PropertyDeclaration=173]="PropertyDeclaration",$[$.MethodSignature=174]="MethodSignature",$[$.MethodDeclaration=175]="MethodDeclaration",$[$.ClassStaticBlockDeclaration=176]="ClassStaticBlockDeclaration",$[$.Constructor=177]="Constructor",$[$.GetAccessor=178]="GetAccessor",$[$.SetAccessor=179]="SetAccessor",$[$.CallSignature=180]="CallSignature",$[$.ConstructSignature=181]="ConstructSignature",$[$.IndexSignature=182]="IndexSignature",$[$.TypePredicate=183]="TypePredicate",$[$.TypeReference=184]="TypeReference",$[$.FunctionType=185]="FunctionType",$[$.ConstructorType=186]="ConstructorType",$[$.TypeQuery=187]="TypeQuery",$[$.TypeLiteral=188]="TypeLiteral",$[$.ArrayType=189]="ArrayType",$[$.TupleType=190]="TupleType",$[$.OptionalType=191]="OptionalType",$[$.RestType=192]="RestType",$[$.UnionType=193]="UnionType",$[$.IntersectionType=194]="IntersectionType",$[$.ConditionalType=195]="ConditionalType",$[$.InferType=196]="InferType",$[$.ParenthesizedType=197]="ParenthesizedType",$[$.ThisType=198]="ThisType",$[$.TypeOperator=199]="TypeOperator",$[$.IndexedAccessType=200]="IndexedAccessType",$[$.MappedType=201]="MappedType",$[$.LiteralType=202]="LiteralType",$[$.NamedTupleMember=203]="NamedTupleMember",$[$.TemplateLiteralType=204]="TemplateLiteralType",$[$.TemplateLiteralTypeSpan=205]="TemplateLiteralTypeSpan",$[$.ImportType=206]="ImportType",$[$.ObjectBindingPattern=207]="ObjectBindingPattern",$[$.ArrayBindingPattern=208]="ArrayBindingPattern",$[$.BindingElement=209]="BindingElement",$[$.ArrayLiteralExpression=210]="ArrayLiteralExpression",$[$.ObjectLiteralExpression=211]="ObjectLiteralExpression",$[$.PropertyAccessExpression=212]="PropertyAccessExpression",$[$.ElementAccessExpression=213]="ElementAccessExpression",$[$.CallExpression=214]="CallExpression",$[$.NewExpression=215]="NewExpression",$[$.TaggedTemplateExpression=216]="TaggedTemplateExpression",$[$.TypeAssertionExpression=217]="TypeAssertionExpression",$[$.ParenthesizedExpression=218]="ParenthesizedExpression",$[$.FunctionExpression=219]="FunctionExpression",$[$.ArrowFunction=220]="ArrowFunction",$[$.DeleteExpression=221]="DeleteExpression",$[$.TypeOfExpression=222]="TypeOfExpression",$[$.VoidExpression=223]="VoidExpression",$[$.AwaitExpression=224]="AwaitExpression",$[$.PrefixUnaryExpression=225]="PrefixUnaryExpression",$[$.PostfixUnaryExpression=226]="PostfixUnaryExpression",$[$.BinaryExpression=227]="BinaryExpression",$[$.ConditionalExpression=228]="ConditionalExpression",$[$.TemplateExpression=229]="TemplateExpression",$[$.YieldExpression=230]="YieldExpression",$[$.SpreadElement=231]="SpreadElement",$[$.ClassExpression=232]="ClassExpression",$[$.OmittedExpression=233]="OmittedExpression",$[$.ExpressionWithTypeArguments=234]="ExpressionWithTypeArguments",$[$.AsExpression=235]="AsExpression",$[$.NonNullExpression=236]="NonNullExpression",$[$.MetaProperty=237]="MetaProperty",$[$.SyntheticExpression=238]="SyntheticExpression",$[$.SatisfiesExpression=239]="SatisfiesExpression",$[$.TemplateSpan=240]="TemplateSpan",$[$.SemicolonClassElement=241]="SemicolonClassElement",$[$.Block=242]="Block",$[$.EmptyStatement=243]="EmptyStatement",$[$.VariableStatement=244]="VariableStatement",$[$.ExpressionStatement=245]="ExpressionStatement",$[$.IfStatement=246]="IfStatement",$[$.DoStatement=247]="DoStatement",$[$.WhileStatement=248]="WhileStatement",$[$.ForStatement=249]="ForStatement",$[$.ForInStatement=250]="ForInStatement",$[$.ForOfStatement=251]="ForOfStatement",$[$.ContinueStatement=252]="ContinueStatement",$[$.BreakStatement=253]="BreakStatement",$[$.ReturnStatement=254]="ReturnStatement",$[$.WithStatement=255]="WithStatement",$[$.SwitchStatement=256]="SwitchStatement",$[$.LabeledStatement=257]="LabeledStatement",$[$.ThrowStatement=258]="ThrowStatement",$[$.TryStatement=259]="TryStatement",$[$.DebuggerStatement=260]="DebuggerStatement",$[$.VariableDeclaration=261]="VariableDeclaration",$[$.VariableDeclarationList=262]="VariableDeclarationList",$[$.FunctionDeclaration=263]="FunctionDeclaration",$[$.ClassDeclaration=264]="ClassDeclaration",$[$.InterfaceDeclaration=265]="InterfaceDeclaration",$[$.TypeAliasDeclaration=266]="TypeAliasDeclaration",$[$.EnumDeclaration=267]="EnumDeclaration",$[$.ModuleDeclaration=268]="ModuleDeclaration",$[$.ModuleBlock=269]="ModuleBlock",$[$.CaseBlock=270]="CaseBlock",$[$.NamespaceExportDeclaration=271]="NamespaceExportDeclaration",$[$.ImportEqualsDeclaration=272]="ImportEqualsDeclaration",$[$.ImportDeclaration=273]="ImportDeclaration",$[$.ImportClause=274]="ImportClause",$[$.NamespaceImport=275]="NamespaceImport",$[$.NamedImports=276]="NamedImports",$[$.ImportSpecifier=277]="ImportSpecifier",$[$.ExportAssignment=278]="ExportAssignment",$[$.ExportDeclaration=279]="ExportDeclaration",$[$.NamedExports=280]="NamedExports",$[$.NamespaceExport=281]="NamespaceExport",$[$.ExportSpecifier=282]="ExportSpecifier",$[$.MissingDeclaration=283]="MissingDeclaration",$[$.ExternalModuleReference=284]="ExternalModuleReference",$[$.JsxElement=285]="JsxElement",$[$.JsxSelfClosingElement=286]="JsxSelfClosingElement",$[$.JsxOpeningElement=287]="JsxOpeningElement",$[$.JsxClosingElement=288]="JsxClosingElement",$[$.JsxFragment=289]="JsxFragment",$[$.JsxOpeningFragment=290]="JsxOpeningFragment",$[$.JsxClosingFragment=291]="JsxClosingFragment",$[$.JsxAttribute=292]="JsxAttribute",$[$.JsxAttributes=293]="JsxAttributes",$[$.JsxSpreadAttribute=294]="JsxSpreadAttribute",$[$.JsxExpression=295]="JsxExpression",$[$.JsxNamespacedName=296]="JsxNamespacedName",$[$.CaseClause=297]="CaseClause",$[$.DefaultClause=298]="DefaultClause",$[$.HeritageClause=299]="HeritageClause",$[$.CatchClause=300]="CatchClause",$[$.ImportAttributes=301]="ImportAttributes",$[$.ImportAttribute=302]="ImportAttribute",$[$.PropertyAssignment=303]="PropertyAssignment",$[$.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",$[$.SpreadAssignment=305]="SpreadAssignment",$[$.EnumMember=306]="EnumMember",$[$.SourceFile=307]="SourceFile",$[$.JSDocTypeExpression=308]="JSDocTypeExpression",$[$.JSDocNameReference=309]="JSDocNameReference",$[$.JSDocAllType=310]="JSDocAllType",$[$.JSDocNullableType=311]="JSDocNullableType",$[$.JSDocNonNullableType=312]="JSDocNonNullableType",$[$.JSDocOptionalType=313]="JSDocOptionalType",$[$.JSDocVariadicType=314]="JSDocVariadicType",$[$.JSDoc=315]="JSDoc",$[$.JSDocText=316]="JSDocText",$[$.JSDocTypeLiteral=317]="JSDocTypeLiteral",$[$.JSDocSignature=318]="JSDocSignature",$[$.JSDocLink=319]="JSDocLink",$[$.JSDocLinkCode=320]="JSDocLinkCode",$[$.JSDocLinkPlain=321]="JSDocLinkPlain",$[$.JSDocUnknownTag=322]="JSDocUnknownTag",$[$.JSDocAugmentsTag=323]="JSDocAugmentsTag",$[$.JSDocImplementsTag=324]="JSDocImplementsTag",$[$.JSDocDeprecatedTag=325]="JSDocDeprecatedTag",$[$.JSDocPublicTag=326]="JSDocPublicTag",$[$.JSDocPrivateTag=327]="JSDocPrivateTag",$[$.JSDocProtectedTag=328]="JSDocProtectedTag",$[$.JSDocReadonlyTag=329]="JSDocReadonlyTag",$[$.JSDocOverrideTag=330]="JSDocOverrideTag",$[$.JSDocCallbackTag=331]="JSDocCallbackTag",$[$.JSDocOverloadTag=332]="JSDocOverloadTag",$[$.JSDocParameterTag=333]="JSDocParameterTag",$[$.JSDocReturnTag=334]="JSDocReturnTag",$[$.JSDocThisTag=335]="JSDocThisTag",$[$.JSDocTypeTag=336]="JSDocTypeTag",$[$.JSDocTemplateTag=337]="JSDocTemplateTag",$[$.JSDocTypedefTag=338]="JSDocTypedefTag",$[$.JSDocSeeTag=339]="JSDocSeeTag",$[$.JSDocPropertyTag=340]="JSDocPropertyTag",$[$.JSDocThrowsTag=341]="JSDocThrowsTag",$[$.JSDocSatisfiesTag=342]="JSDocSatisfiesTag",$[$.JSDocImportTag=343]="JSDocImportTag",$[$.SyntaxList=344]="SyntaxList",$[$.JSTypeAliasDeclaration=345]="JSTypeAliasDeclaration",$[$.JSImportDeclaration=346]="JSImportDeclaration",$[$.NotEmittedStatement=347]="NotEmittedStatement",$[$.PartiallyEmittedExpression=348]="PartiallyEmittedExpression",$[$.SyntheticReferenceExpression=349]="SyntheticReferenceExpression",$[$.NotEmittedTypeElement=350]="NotEmittedTypeElement",$[$.Count=351]="Count",$[$.FirstAssignment=63]="FirstAssignment",$[$.LastAssignment=78]="LastAssignment",$[$.FirstCompoundAssignment=64]="FirstCompoundAssignment",$[$.LastCompoundAssignment=78]="LastCompoundAssignment",$[$.FirstReservedWord=82]="FirstReservedWord",$[$.LastReservedWord=117]="LastReservedWord",$[$.FirstKeyword=82]="FirstKeyword",$[$.LastKeyword=166]="LastKeyword",$[$.FirstFutureReservedWord=118]="FirstFutureReservedWord",$[$.LastFutureReservedWord=126]="LastFutureReservedWord",$[$.FirstTypeNode=183]="FirstTypeNode",$[$.LastTypeNode=206]="LastTypeNode",$[$.FirstPunctuation=18]="FirstPunctuation",$[$.LastPunctuation=78]="LastPunctuation",$[$.FirstToken=0]="FirstToken",$[$.LastToken=166]="LastToken",$[$.FirstLiteralToken=8]="FirstLiteralToken",$[$.LastLiteralToken=14]="LastLiteralToken",$[$.FirstTemplateToken=14]="FirstTemplateToken",$[$.LastTemplateToken=17]="LastTemplateToken",$[$.FirstBinaryOperator=29]="FirstBinaryOperator",$[$.LastBinaryOperator=78]="LastBinaryOperator",$[$.FirstStatement=244]="FirstStatement",$[$.LastStatement=260]="LastStatement",$[$.FirstNode=167]="FirstNode",$[$.FirstJSDocNode=308]="FirstJSDocNode",$[$.LastJSDocNode=343]="LastJSDocNode",$[$.FirstJSDocTagNode=322]="FirstJSDocTagNode",$[$.LastJSDocTagNode=343]="LastJSDocTagNode",$[$.FirstContextualKeyword=127]="FirstContextualKeyword",$[$.LastContextualKeyword=166]="LastContextualKeyword",$[$.LastUnaryOperator=54]="LastUnaryOperator",$[$.FirstTriviaToken=2]="FirstTriviaToken",$[$.LastTriviaToken=6]="LastTriviaToken"})(X||(X={}));var b0;(function($){$[$.None=0]="None",$[$.PrecedingLineBreak=1]="PrecedingLineBreak",$[$.PrecedingJSDocComment=2]="PrecedingJSDocComment",$[$.Unterminated=4]="Unterminated",$[$.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",$[$.Scientific=16]="Scientific",$[$.Octal=32]="Octal",$[$.HexSpecifier=64]="HexSpecifier",$[$.BinarySpecifier=128]="BinarySpecifier",$[$.OctalSpecifier=256]="OctalSpecifier",$[$.ContainsSeparator=512]="ContainsSeparator",$[$.UnicodeEscape=1024]="UnicodeEscape",$[$.ContainsInvalidEscape=2048]="ContainsInvalidEscape",$[$.HexEscape=4096]="HexEscape",$[$.ContainsLeadingZero=8192]="ContainsLeadingZero",$[$.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",$[$.PrecedingJSDocLeadingAsterisks=32768]="PrecedingJSDocLeadingAsterisks",$[$.SingleQuote=65536]="SingleQuote",$[$.PrecedingJSDocWithDeprecated=131072]="PrecedingJSDocWithDeprecated",$[$.PrecedingJSDocWithSeeOrLink=262144]="PrecedingJSDocWithSeeOrLink",$[$.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",$[$.WithSpecifier=448]="WithSpecifier",$[$.StringLiteralFlags=72716]="StringLiteralFlags",$[$.NumericLiteralFlags=25584]="NumericLiteralFlags",$[$.TemplateLiteralLikeFlags=7180]="TemplateLiteralLikeFlags",$[$.RegularExpressionLiteralFlags=4]="RegularExpressionLiteralFlags",$[$.IsInvalid=26656]="IsInvalid"})(b0||(b0={}));function r6($){let Z=$;return Z.length>=3&&Z.charCodeAt(0)===D._&&Z.charCodeAt(1)===D._&&Z.charCodeAt(2)===D._?Z.slice(1):Z}function s6($){return{statements:$.statements,endOfFileToken:$.endOfFileToken,text:$.text,fileName:$.fileName,path:$.path,languageVariant:$.languageVariant,scriptKind:$.scriptKind,isDeclarationFile:$.isDeclarationFile,referencedFiles:$.referencedFiles,typeReferenceDirectives:$.typeReferenceDirectives,libReferenceDirectives:$.libReferenceDirectives,imports:$.imports,moduleAugmentations:$.moduleAugmentations,ambientModuleNames:$.ambientModuleNames,externalModuleIndicator:$.externalModuleIndicator,tokenCache:void 0}}var G0;(function($){$[$.Parentheses=1]="Parentheses",$[$.TypeAssertions=2]="TypeAssertions",$[$.NonNullAssertions=4]="NonNullAssertions",$[$.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",$[$.ExpressionsWithTypeArguments=16]="ExpressionsWithTypeArguments",$[$.Satisfies=32]="Satisfies",$[$.ExcludeJSDocTypeAssertion=64]="ExcludeJSDocTypeAssertion",$[$.Assignments=128]="Assignments",$[$.Comma=256]="Comma",$[$.Assertions=38]="Assertions",$[$.All=63]="All",$[$.AllExceptAssertionsOrExpressionsWithTypeArguments=9]="AllExceptAssertionsOrExpressionsWithTypeArguments",$[$.ExpressionTypePassthrough=385]="ExpressionTypePassthrough"})(G0||(G0={}));function v($){return $.kind===X.Identifier}function i6($){return $.kind===X.CaseBlock}function d6($){return $.kind===X.CatchClause}function M$($){return $.kind===X.Block}function o6($){return $.kind===X.VariableDeclaration}function a6($){return $.kind===X.VariableDeclarationList}function hZ($){return $.kind===X.ExpressionWithTypeArguments}function j$($){return $.kind===X.ImportAttributes}function NZ($){return $.kind===X.TemplateHead}function uZ($){return $.kind===X.JsxAttributes}function t6($){return $.kind===X.JsxOpeningElement}function n6($){return $.kind===X.JsxOpeningFragment}function e6($){return $.kind===X.JsxClosingFragment}function $4($){return $.kind===X.JsxClosingElement}function KZ($){return $.kind===X.ImportClause}function bZ($){return $.kind===X.TypeParameter}function Z4($){return $.kind===X.Identifier||$.kind===X.StringLiteral}function E$($){return $.kind===X.Identifier||$.kind===X.StringLiteral}function R0($){let Z=$.kind;return Z===X.Identifier||Z===X.StringLiteral||Z===X.NoSubstitutionTemplateLiteral||Z===X.NumericLiteral||Z===X.ComputedPropertyName||Z===X.PrivateIdentifier||Z===X.BigIntLiteral}function Y4($){return $.kind===X.ModuleBlock||$.kind===X.ModuleDeclaration}function SZ($){return $.kind===X.Identifier||$.kind===X.ModuleDeclaration}function X4($){return $.kind===X.Identifier||$.kind===X.QualifiedName||$.kind===X.ExternalModuleReference}function Q4($){return $.kind===X.NamespaceImport||$.kind===X.NamedImports}function G4($){return $.kind===X.NamespaceExport||$.kind===X.NamedExports}function J4($){return $.kind===X.Identifier||$.kind===X.PrivateIdentifier}function I0($){return $.kind===X.Identifier||$.kind===X.QualifiedName}function c$($){return $.kind===X.Identifier||$.kind===X.ObjectBindingPattern||$.kind===X.ArrayBindingPattern}function U4($){return $.kind===X.Identifier||$.kind===X.JsxNamespacedName}function W4($){let Z=$.kind;return Z===X.StringLiteral||Z===X.JsxExpression||Z===X.JsxElement||Z===X.JsxSelfClosingElement||Z===X.JsxFragment}function xZ($){return $.kind===X.TemplateMiddle||$.kind===X.TemplateTail}function V4($){return $.kind===X.TemplateExpression||$.kind===X.NoSubstitutionTemplateLiteral}function H4($){return $.kind===X.Identifier||$.kind===X.ThisType}function z4($){return $.kind===X.Identifier||$.kind===X.StringLiteral}function c0($){return $.kind===X.Block}function _1($){return $===X.EqualsToken||m1($)}function T1($){return c1($)||$===X.CommaToken}function v1($){return $===X.AsteriskAsteriskToken}function f1($){return $===X.AsteriskToken||$===X.SlashToken||$===X.PercentToken}function k1($){return v1($)||f1($)}function C1($){return $===X.PlusToken||$===X.MinusToken}function F1($){return k1($)||C1($)}function h1($){return $===X.LessThanLessThanToken||$===X.GreaterThanGreaterThanToken||$===X.GreaterThanGreaterThanGreaterThanToken}function N1($){return F1($)||h1($)}function u1($){return $===X.LessThanToken||$===X.LessThanEqualsToken||$===X.GreaterThanToken||$===X.GreaterThanEqualsToken||$===X.InstanceOfKeyword||$===X.InKeyword}function K1($){return N1($)||u1($)}function b1($){return $===X.EqualsEqualsToken||$===X.EqualsEqualsEqualsToken||$===X.ExclamationEqualsEqualsToken||$===X.ExclamationEqualsToken}function S1($){return K1($)||b1($)}function x1($){return $===X.AmpersandToken||$===X.BarToken||$===X.CaretToken}function g1($){return S1($)||x1($)}function p1($){return $===X.AmpersandAmpersandToken||$===X.BarBarToken}function y1($){return g1($)||p1($)}function m1($){return $===X.PlusEqualsToken||$===X.MinusEqualsToken||$===X.AsteriskAsteriskEqualsToken||$===X.AsteriskEqualsToken||$===X.SlashEqualsToken||$===X.PercentEqualsToken||$===X.AmpersandEqualsToken||$===X.BarEqualsToken||$===X.CaretEqualsToken||$===X.LessThanLessThanEqualsToken||$===X.GreaterThanGreaterThanGreaterThanEqualsToken||$===X.GreaterThanGreaterThanEqualsToken||$===X.BarBarEqualsToken||$===X.AmpersandAmpersandEqualsToken||$===X.QuestionQuestionEqualsToken}function c1($){return $===X.QuestionQuestionToken||y1($)||_1($)}function w4($){return $>=X.FirstJSDocNode&&$<=X.LastJSDocNode}function q4($){return $.kind===X.EndOfFile}function O$($){return $.kind===X.DotDotDotToken}function l$($){return $.kind===X.QuestionToken}function B4($){return $.kind===X.ExclamationToken}function L4($){return $.kind===X.ColonToken}function A4($){return $.kind===X.EqualsToken}function _$($){return $.kind===X.AsteriskToken}function R4($){return $.kind===X.EqualsGreaterThanToken}function T$($){return $.kind===X.QuestionDotToken}function I4($){return $.kind===X.AssertsKeyword}function gZ($){return $.kind===X.AwaitKeyword}function P4($){return T1($.kind)}function O($){return l1($.kind)}function l1($){return $>=X.FirstTypeNode&&$<=X.LastTypeNode||$===X.AnyKeyword||$===X.UnknownKeyword||$===X.NumberKeyword||$===X.BigIntKeyword||$===X.ObjectKeyword||$===X.BooleanKeyword||$===X.StringKeyword||$===X.SymbolKeyword||$===X.VoidKeyword||$===X.UndefinedKeyword||$===X.NeverKeyword||$===X.IntrinsicKeyword||$===X.ExpressionWithTypeArguments||$===X.JSDocAllType||$===X.JSDocNullableType||$===X.JSDocNonNullableType||$===X.JSDocOptionalType||$===X.JSDocVariadicType||$===X.JSDocTypeExpression||$===X.JSDocTypeLiteral||$===X.JSDocSignature}function O0($){let Z=$.kind;return Z===X.VariableStatement||Z===X.EmptyStatement||Z===X.ExpressionStatement||Z===X.IfStatement||Z===X.DoStatement||Z===X.WhileStatement||Z===X.ForStatement||Z===X.ForInStatement||Z===X.ForOfStatement||Z===X.ContinueStatement||Z===X.BreakStatement||Z===X.ReturnStatement||Z===X.WithStatement||Z===X.SwitchStatement||Z===X.LabeledStatement||Z===X.ThrowStatement||Z===X.TryStatement||Z===X.DebuggerStatement||Z===X.InterfaceDeclaration||Z===X.TypeAliasDeclaration||Z===X.EnumDeclaration||Z===X.ModuleDeclaration||Z===X.ImportDeclaration||Z===X.ImportEqualsDeclaration||Z===X.ExportDeclaration||Z===X.ExportAssignment||Z===X.NamespaceExportDeclaration||Z===X.FunctionDeclaration||Z===X.ClassDeclaration||Z===X.MissingDeclaration||Z===X.NotEmittedStatement||Z===X.Block}function M($){let Z=$.kind;return Z===X.ConditionalExpression||Z===X.YieldExpression||Z===X.ArrowFunction||Z===X.BinaryExpression||Z===X.SpreadElement||Z===X.AsExpression||Z===X.OmittedExpression||Z===X.SatisfiesExpression||Z===X.PrefixUnaryExpression||Z===X.PostfixUnaryExpression||Z===X.DeleteExpression||Z===X.TypeOfExpression||Z===X.VoidExpression||Z===X.AwaitExpression||Z===X.TypeAssertionExpression||Z===X.CallExpression||Z===X.NewExpression||Z===X.TaggedTemplateExpression||Z===X.NonNullExpression||Z===X.MetaProperty||Z===X.JsxExpression||Z===X.PropertyAccessExpression||Z===X.ElementAccessExpression||Z===X.FunctionExpression||Z===X.ClassExpression||Z===X.ParenthesizedExpression||Z===X.ArrayLiteralExpression||Z===X.ObjectLiteralExpression||Z===X.TemplateExpression||Z===X.Identifier||Z===X.PrivateIdentifier||Z===X.NumericLiteral||Z===X.BigIntLiteral||Z===X.StringLiteral||Z===X.RegularExpressionLiteral||Z===X.NoSubstitutionTemplateLiteral||Z===X.JsxElement||Z===X.JsxSelfClosingElement||Z===X.JsxFragment||Z===X.NullKeyword||Z===X.TrueKeyword||Z===X.FalseKeyword||Z===X.ThisKeyword||Z===X.SuperKeyword||Z===X.ImportKeyword||Z===X.ExpressionWithTypeArguments}function D4($){return s1(r1($).kind)}function r1($){return d1($,G0.PartiallyEmittedExpressions)}function s1($){switch($){case X.PropertyAccessExpression:case X.ElementAccessExpression:case X.NewExpression:case X.CallExpression:case X.JsxElement:case X.JsxSelfClosingElement:case X.JsxFragment:case X.TaggedTemplateExpression:case X.ArrayLiteralExpression:case X.ParenthesizedExpression:case X.ObjectLiteralExpression:case X.ClassExpression:case X.FunctionExpression:case X.Identifier:case X.PrivateIdentifier:case X.RegularExpressionLiteral:case X.NumericLiteral:case X.BigIntLiteral:case X.StringLiteral:case X.NoSubstitutionTemplateLiteral:case X.TemplateExpression:case X.FalseKeyword:case X.NullKeyword:case X.ThisKeyword:case X.TrueKeyword:case X.SuperKeyword:case X.NonNullExpression:case X.ExpressionWithTypeArguments:case X.MetaProperty:case X.ImportKeyword:case X.MissingDeclaration:return!0;default:return!1}}function i1($,Z=G0.All){switch($.kind){case X.ParenthesizedExpression:if(Z&G0.ExcludeJSDocTypeAssertion&&o1($))return!1;return(Z&G0.Parentheses)!==0;case X.TypeAssertionExpression:case X.AsExpression:return(Z&G0.TypeAssertions)!==0;case X.SatisfiesExpression:return(Z&(G0.ExpressionsWithTypeArguments|G0.Satisfies))!==0;case X.ExpressionWithTypeArguments:return(Z&G0.ExpressionsWithTypeArguments)!==0;case X.NonNullExpression:return(Z&G0.NonNullAssertions)!==0;case X.PartiallyEmittedExpression:return(Z&G0.PartiallyEmittedExpressions)!==0}return!1}function d1($,Z=G0.All){while(i1($,Z))$=$.expression;return $}function o1($){let Z=$.getSourceFile();if(Z.scriptKind!==G$.JS&&Z.scriptKind!==G$.JSX)return!1;let Y=$.expression;if(Y.kind!==X.AsExpression)return!1;let Q=Y;return!!Q.type&&(Q.type.flags&E0.Reparsed)!==0}function M4($){return $.kind===X.Block||M($)}function r$($){return $.kind===X.VariableDeclarationList||M($)}function l0($){return $.kind===X.QuestionToken||$.kind===X.ExclamationToken}function j4($){return $.kind===X.ReadonlyKeyword||$.kind===X.PlusToken||$.kind===X.MinusToken}function E4($){return $.kind===X.QuestionToken||$.kind===X.PlusToken||$.kind===X.MinusToken}function s$($){let Z=$.kind;return Z===X.ThisKeyword||Z===X.Identifier||Z===X.PropertyAccessExpression||Z===X.JsxNamespacedName}function U($,Z,Y){if($===void 0)return;let Q=Z($);if(Q!==void 0&&Y!==void 0&&!Y(Q))throw Error("Visited node failed test assertion.");return Q}function A($,Z){if($===void 0)return;let Y=i$($,Z);if(Y===$)return $;return w(Y,$.pos,$.end)}function i$($,Z){if($===void 0)return;let Y;for(let Q=0;Q<$.length;Q++){let G=$[Q],J=Z(G);if(Y){if(J)Y.push(J)}else if(J!==G){Y=[];for(let V=0;V<Q;V++)Y.push($[V]);if(J)Y.push(J)}}return Y??$}var _W={[X.QualifiedName]:($,Z)=>{let Y=U($.left,Z,I0),Q=U($.right,Z,v);return O4($,Y,Q)},[X.ComputedPropertyName]:($,Z)=>{let Y=U($.expression,Z,M);return _4($,Y)},[X.Decorator]:($,Z)=>{let Y=U($.expression,Z,D4);return T4($,Y)},[X.IfStatement]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.thenStatement,Z,O0),G=U($.elseStatement,Z,O0);return v4($,Y,Q,G)},[X.DoStatement]:($,Z)=>{let Y=U($.statement,Z,O0),Q=U($.expression,Z,M);return f4($,Y,Q)},[X.WhileStatement]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.statement,Z,O0);return k4($,Y,Q)},[X.ForStatement]:($,Z)=>{let Y=U($.initializer,Z,r$),Q=U($.condition,Z,M),G=U($.incrementor,Z,M),J=U($.statement,Z,O0);return C4($,Y,Q,G,J)},[X.BreakStatement]:($,Z)=>{let Y=U($.label,Z,v);return F4($,Y)},[X.ContinueStatement]:($,Z)=>{let Y=U($.label,Z,v);return h4($,Y)},[X.ReturnStatement]:($,Z)=>{let Y=U($.expression,Z,M);return N4($,Y)},[X.WithStatement]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.statement,Z,O0);return u4($,Y,Q)},[X.SwitchStatement]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.caseBlock,Z,i6);return K4($,Y,Q)},[X.CaseBlock]:($,Z)=>{let Y=A($.clauses,Z);return b4($,Y)},[X.ThrowStatement]:($,Z)=>{let Y=U($.expression,Z,M);return S4($,Y)},[X.TryStatement]:($,Z)=>{let Y=U($.tryBlock,Z,M$),Q=U($.catchClause,Z,d6),G=U($.finallyBlock,Z,M$);return x4($,Y,Q,G)},[X.CatchClause]:($,Z)=>{let Y=U($.variableDeclaration,Z,o6),Q=U($.block,Z,M$);return g4($,Y,Q)},[X.LabeledStatement]:($,Z)=>{let Y=U($.label,Z,v),Q=U($.statement,Z,O0);return p4($,Y,Q)},[X.ExpressionStatement]:($,Z)=>{let Y=U($.expression,Z,M);return y4($,Y)},[X.Block]:($,Z)=>{let Y=A($.statements,Z);return m4($,Y)},[X.VariableStatement]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.declarationList,Z,a6);return c4($,Y,Q)},[X.VariableDeclaration]:($,Z)=>{let Y=U($.name,Z,c$),Q=U($.exclamationToken,Z,B4),G=U($.type,Z,O),J=U($.initializer,Z,M);return l4($,Y,Q,G,J)},[X.VariableDeclarationList]:($,Z)=>{let Y=A($.declarations,Z);return r4($,Y)},[X.Parameter]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.dotDotDotToken,Z,O$),G=U($.name,Z,c$),J=U($.questionToken,Z,l$),V=U($.type,Z,O),L=U($.initializer,Z,M);return s4($,Y,Q,G,J,V,L)},[X.BindingElement]:($,Z)=>{let Y=U($.dotDotDotToken,Z,O$),Q=U($.propertyName,Z,R0),G=U($.name,Z,c$),J=U($.initializer,Z,M);return i4($,Y,Q,G,J)},[X.MissingDeclaration]:($,Z)=>{let Y=A($.modifiers,Z);return d4($,Y)},[X.FunctionDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.asteriskToken,Z,_$),G=U($.name,Z,v),J=A($.typeParameters,Z),V=A($.parameters,Z),L=U($.type,Z,O),P=U($.body,Z,c0);return o4($,Y,Q,G,J,V,L,P)},[X.ClassDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=A($.typeParameters,Z),J=A($.heritageClauses,Z),V=A($.members,Z);return a4($,Y,Q,G,J,V)},[X.ClassExpression]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=A($.typeParameters,Z),J=A($.heritageClauses,Z),V=A($.members,Z);return t4($,Y,Q,G,J,V)},[X.HeritageClause]:($,Z)=>{let Y=A($.types,Z);return n4($,Y)},[X.InterfaceDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=A($.typeParameters,Z),J=A($.heritageClauses,Z),V=A($.members,Z);return e4($,Y,Q,G,J,V)},[X.TypeAliasDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=A($.typeParameters,Z),J=U($.type,Z,O);return $8($,Y,Q,G,J)},[X.EnumMember]:($,Z)=>{let Y=U($.name,Z,R0),Q=U($.initializer,Z,M);return Z8($,Y,Q)},[X.EnumDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=A($.members,Z);return Y8($,Y,Q,G)},[X.ModuleBlock]:($,Z)=>{let Y=A($.statements,Z);return X8($,Y)},[X.ImportDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.importClause,Z,KZ),G=U($.moduleSpecifier,Z,M),J=U($.attributes,Z,j$);return Q8($,Y,Q,G,J)},[X.ExternalModuleReference]:($,Z)=>{let Y=U($.expression,Z,M);return G8($,Y)},[X.NamespaceImport]:($,Z)=>{let Y=U($.name,Z,v);return J8($,Y)},[X.NamedImports]:($,Z)=>{let Y=A($.elements,Z);return U8($,Y)},[X.ExportAssignment]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.type,Z,O),G=U($.expression,Z,M);return W8($,Y,Q,G)},[X.NamespaceExportDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v);return V8($,Y,Q)},[X.NamespaceExport]:($,Z)=>{let Y=U($.name,Z,E$);return H8($,Y)},[X.NamedExports]:($,Z)=>{let Y=A($.elements,Z);return z8($,Y)},[X.ExportSpecifier]:($,Z)=>{let Y=U($.propertyName,Z,E$),Q=U($.name,Z,E$);return w8($,Y,Q)},[X.CallSignature]:($,Z)=>{let Y=A($.typeParameters,Z),Q=A($.parameters,Z),G=U($.type,Z,O);return q8($,Y,Q,G)},[X.ConstructSignature]:($,Z)=>{let Y=A($.typeParameters,Z),Q=A($.parameters,Z),G=U($.type,Z,O);return B8($,Y,Q,G)},[X.Constructor]:($,Z)=>{let Y=A($.modifiers,Z),Q=A($.typeParameters,Z),G=A($.parameters,Z),J=U($.type,Z,O),V=U($.body,Z,c0);return L8($,Y,Q,G,J,V)},[X.GetAccessor]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=A($.typeParameters,Z),J=A($.parameters,Z),V=U($.type,Z,O),L=U($.body,Z,c0);return A8($,Y,Q,G,J,V,L)},[X.SetAccessor]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=A($.typeParameters,Z),J=A($.parameters,Z),V=U($.type,Z,O),L=U($.body,Z,c0);return R8($,Y,Q,G,J,V,L)},[X.IndexSignature]:($,Z)=>{let Y=A($.modifiers,Z),Q=A($.parameters,Z),G=U($.type,Z,O);return I8($,Y,Q,G)},[X.MethodSignature]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=U($.postfixToken,Z,l0),J=A($.typeParameters,Z),V=A($.parameters,Z),L=U($.type,Z,O);return P8($,Y,Q,G,J,V,L)},[X.MethodDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.asteriskToken,Z,_$),G=U($.name,Z,R0),J=U($.postfixToken,Z,l0),V=A($.typeParameters,Z),L=A($.parameters,Z),P=U($.type,Z,O),_=U($.body,Z,c0);return D8($,Y,Q,G,J,V,L,P,_)},[X.PropertySignature]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=U($.postfixToken,Z,l0),J=U($.type,Z,O),V=U($.initializer,Z,M);return M8($,Y,Q,G,J,V)},[X.PropertyDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=U($.postfixToken,Z,l0),J=U($.type,Z,O),V=U($.initializer,Z,M);return j8($,Y,Q,G,J,V)},[X.ClassStaticBlockDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.body,Z,M$);return E8($,Y,Q)},[X.BinaryExpression]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.left,Z,M),G=U($.type,Z,O),J=U($.operatorToken,Z,P4),V=U($.right,Z,M);return O8($,Y,Q,G,J,V)},[X.PrefixUnaryExpression]:($,Z)=>{let Y=U($.operand,Z,M);return _8($,Y)},[X.PostfixUnaryExpression]:($,Z)=>{let Y=U($.operand,Z,M);return T8($,Y)},[X.YieldExpression]:($,Z)=>{let Y=U($.asteriskToken,Z,_$),Q=U($.expression,Z,M);return v8($,Y,Q)},[X.ArrowFunction]:($,Z)=>{let Y=A($.modifiers,Z),Q=A($.typeParameters,Z),G=A($.parameters,Z),J=U($.type,Z,O),V=U($.equalsGreaterThanToken,Z,R4),L=U($.body,Z,M4);return f8($,Y,Q,G,J,V,L)},[X.FunctionExpression]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.asteriskToken,Z,_$),G=U($.name,Z,v),J=A($.typeParameters,Z),V=A($.parameters,Z),L=U($.type,Z,O),P=U($.body,Z,c0);return k8($,Y,Q,G,J,V,L,P)},[X.AsExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.type,Z,O);return C8($,Y,Q)},[X.SatisfiesExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.type,Z,O);return F8($,Y,Q)},[X.ConditionalExpression]:($,Z)=>{let Y=U($.condition,Z,M),Q=U($.questionToken,Z,l$),G=U($.whenTrue,Z,M),J=U($.colonToken,Z,L4),V=U($.whenFalse,Z,M);return h8($,Y,Q,G,J,V)},[X.PropertyAccessExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.questionDotToken,Z,T$),G=U($.name,Z,J4);return N8($,Y,Q,G)},[X.ElementAccessExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.questionDotToken,Z,T$),G=U($.argumentExpression,Z,M);return u8($,Y,Q,G)},[X.CallExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.questionDotToken,Z,T$),G=A($.typeArguments,Z),J=A($.arguments,Z);return K8($,Y,Q,G,J)},[X.NewExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=A($.typeArguments,Z),G=A($.arguments,Z);return b8($,Y,Q,G)},[X.MetaProperty]:($,Z)=>{let Y=U($.name,Z,v);return S8($,Y)},[X.NonNullExpression]:($,Z)=>{let Y=U($.expression,Z,M);return x8($,Y)},[X.SpreadElement]:($,Z)=>{let Y=U($.expression,Z,M);return g8($,Y)},[X.TemplateExpression]:($,Z)=>{let Y=U($.head,Z,NZ),Q=A($.templateSpans,Z);return p8($,Y,Q)},[X.TemplateSpan]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.literal,Z,xZ);return y8($,Y,Q)},[X.TaggedTemplateExpression]:($,Z)=>{let Y=U($.tag,Z,M),Q=U($.questionDotToken,Z,T$),G=A($.typeArguments,Z),J=U($.template,Z,V4);return m8($,Y,Q,G,J)},[X.ParenthesizedExpression]:($,Z)=>{let Y=U($.expression,Z,M);return c8($,Y)},[X.ArrayLiteralExpression]:($,Z)=>{let Y=A($.elements,Z);return l8($,Y)},[X.ObjectLiteralExpression]:($,Z)=>{let Y=A($.properties,Z);return r8($,Y)},[X.SpreadAssignment]:($,Z)=>{let Y=U($.expression,Z,M);return s8($,Y)},[X.PropertyAssignment]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=U($.postfixToken,Z,l0),J=U($.type,Z,O),V=U($.initializer,Z,M);return i8($,Y,Q,G,J,V)},[X.ShorthandPropertyAssignment]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,R0),G=U($.postfixToken,Z,l0),J=U($.type,Z,O),V=U($.equalsToken,Z,A4),L=U($.objectAssignmentInitializer,Z,M);return d8($,Y,Q,G,J,V,L)},[X.DeleteExpression]:($,Z)=>{let Y=U($.expression,Z,M);return o8($,Y)},[X.TypeOfExpression]:($,Z)=>{let Y=U($.expression,Z,M);return a8($,Y)},[X.VoidExpression]:($,Z)=>{let Y=U($.expression,Z,M);return t8($,Y)},[X.AwaitExpression]:($,Z)=>{let Y=U($.expression,Z,M);return n8($,Y)},[X.TypeAssertionExpression]:($,Z)=>{let Y=U($.type,Z,O),Q=U($.expression,Z,M);return e8($,Y,Q)},[X.UnionType]:($,Z)=>{let Y=A($.types,Z);return $5($,Y)},[X.IntersectionType]:($,Z)=>{let Y=A($.types,Z);return Z5($,Y)},[X.ConditionalType]:($,Z)=>{let Y=U($.checkType,Z,O),Q=U($.extendsType,Z,O),G=U($.trueType,Z,O),J=U($.falseType,Z,O);return Y5($,Y,Q,G,J)},[X.TypeOperator]:($,Z)=>{let Y=U($.type,Z,O);return X5($,Y)},[X.InferType]:($,Z)=>{let Y=U($.typeParameter,Z,bZ);return Q5($,Y)},[X.ArrayType]:($,Z)=>{let Y=U($.elementType,Z,O);return G5($,Y)},[X.IndexedAccessType]:($,Z)=>{let Y=U($.objectType,Z,O),Q=U($.indexType,Z,O);return J5($,Y,Q)},[X.TypeReference]:($,Z)=>{let Y=U($.typeName,Z,I0),Q=A($.typeArguments,Z);return U5($,Y,Q)},[X.ExpressionWithTypeArguments]:($,Z)=>{let Y=U($.expression,Z,M),Q=A($.typeArguments,Z);return W5($,Y,Q)},[X.LiteralType]:($,Z)=>{let Y=U($.literal,Z);return V5($,Y)},[X.TypePredicate]:($,Z)=>{let Y=U($.assertsModifier,Z,I4),Q=U($.parameterName,Z,H4),G=U($.type,Z,O);return H5($,Y,Q,G)},[X.ImportAttribute]:($,Z)=>{let Y=U($.name,Z,z4),Q=U($.value,Z,M);return z5($,Y,Q)},[X.ImportAttributes]:($,Z)=>{let Y=A($.attributes,Z);return w5($,Y)},[X.TypeQuery]:($,Z)=>{let Y=U($.exprName,Z,I0),Q=A($.typeArguments,Z);return q5($,Y,Q)},[X.MappedType]:($,Z)=>{let Y=U($.readonlyToken,Z,j4),Q=U($.typeParameter,Z,bZ),G=U($.nameType,Z,O),J=U($.questionToken,Z,E4),V=U($.type,Z,O),L=A($.members,Z);return B5($,Y,Q,G,J,V,L)},[X.TypeLiteral]:($,Z)=>{let Y=A($.members,Z);return L5($,Y)},[X.TupleType]:($,Z)=>{let Y=A($.elements,Z);return A5($,Y)},[X.NamedTupleMember]:($,Z)=>{let Y=U($.dotDotDotToken,Z,O$),Q=U($.name,Z,v),G=U($.questionToken,Z,l$),J=U($.type,Z,O);return R5($,Y,Q,G,J)},[X.OptionalType]:($,Z)=>{let Y=U($.type,Z,O);return I5($,Y)},[X.RestType]:($,Z)=>{let Y=U($.type,Z,O);return P5($,Y)},[X.ParenthesizedType]:($,Z)=>{let Y=U($.type,Z,O);return D5($,Y)},[X.FunctionType]:($,Z)=>{let Y=A($.typeParameters,Z),Q=A($.parameters,Z),G=U($.type,Z,O);return M5($,Y,Q,G)},[X.ConstructorType]:($,Z)=>{let Y=A($.modifiers,Z),Q=A($.typeParameters,Z),G=A($.parameters,Z),J=U($.type,Z,O);return j5($,Y,Q,G,J)},[X.TemplateLiteralType]:($,Z)=>{let Y=U($.head,Z,NZ),Q=A($.templateSpans,Z);return E5($,Y,Q)},[X.TemplateLiteralTypeSpan]:($,Z)=>{let Y=U($.type,Z,O),Q=U($.literal,Z,xZ);return O5($,Y,Q)},[X.SyntheticExpression]:($,Z)=>{let Y=U($.tupleNameSource,Z);return _5($,Y)},[X.PartiallyEmittedExpression]:($,Z)=>{let Y=U($.expression,Z,M);return T5($,Y)},[X.JsxElement]:($,Z)=>{let Y=U($.openingElement,Z,t6),Q=A($.children,Z),G=U($.closingElement,Z,$4);return v5($,Y,Q,G)},[X.JsxAttributes]:($,Z)=>{let Y=A($.properties,Z);return f5($,Y)},[X.JsxNamespacedName]:($,Z)=>{let Y=U($.namespace,Z,v),Q=U($.name,Z,v);return k5($,Y,Q)},[X.JsxOpeningElement]:($,Z)=>{let Y=U($.tagName,Z,s$),Q=A($.typeArguments,Z),G=U($.attributes,Z,uZ);return C5($,Y,Q,G)},[X.JsxSelfClosingElement]:($,Z)=>{let Y=U($.tagName,Z,s$),Q=A($.typeArguments,Z),G=U($.attributes,Z,uZ);return F5($,Y,Q,G)},[X.JsxFragment]:($,Z)=>{let Y=U($.openingFragment,Z,n6),Q=A($.children,Z),G=U($.closingFragment,Z,e6);return h5($,Y,Q,G)},[X.JsxAttribute]:($,Z)=>{let Y=U($.name,Z,U4),Q=U($.initializer,Z,W4);return N5($,Y,Q)},[X.JsxSpreadAttribute]:($,Z)=>{let Y=U($.expression,Z,M);return u5($,Y)},[X.JsxClosingElement]:($,Z)=>{let Y=U($.tagName,Z,s$);return K5($,Y)},[X.JsxExpression]:($,Z)=>{let Y=U($.dotDotDotToken,Z,O$),Q=U($.expression,Z,M);return b5($,Y,Q)},[X.SyntaxList]:($,Z)=>{let Y=i$($.children,Z);return S5($,Y)},[X.JSDoc]:($,Z)=>{let Y=A($.comment,Z),Q=A($.tags,Z);return x5($,Y,Q)},[X.JSDocTypeExpression]:($,Z)=>{let Y=U($.type,Z,O);return g5($,Y)},[X.JSDocNonNullableType]:($,Z)=>{let Y=U($.type,Z,O);return p5($,Y)},[X.JSDocNullableType]:($,Z)=>{let Y=U($.type,Z,O);return y5($,Y)},[X.JSDocVariadicType]:($,Z)=>{let Y=U($.type,Z,O);return m5($,Y)},[X.JSDocOptionalType]:($,Z)=>{let Y=U($.type,Z,O);return c5($,Y)},[X.JSDocTypeTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z),G=A($.comment,Z);return l5($,Y,Q,G)},[X.JSDocUnknownTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return r5($,Y,Q)},[X.JSDocTemplateTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.constraint,Z),G=A($.typeParameters,Z),J=A($.comment,Z);return s5($,Y,Q,G,J)},[X.JSDocReturnTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=A($.comment,Z);return i5($,Y,Q,G)},[X.JSDocPublicTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return d5($,Y,Q)},[X.JSDocPrivateTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return o5($,Y,Q)},[X.JSDocProtectedTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return a5($,Y,Q)},[X.JSDocReadonlyTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return t5($,Y,Q)},[X.JSDocOverrideTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return n5($,Y,Q)},[X.JSDocDeprecatedTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=A($.comment,Z);return e5($,Y,Q)},[X.JSDocSeeTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.nameExpression,Z,O),G=A($.comment,Z);return $7($,Y,Q,G)},[X.JSDocImplementsTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.className,Z,hZ),G=A($.comment,Z);return Z7($,Y,Q,G)},[X.JSDocAugmentsTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.className,Z,hZ),G=A($.comment,Z);return Y7($,Y,Q,G)},[X.JSDocSatisfiesTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=A($.comment,Z);return X7($,Y,Q,G)},[X.JSDocThrowsTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=A($.comment,Z);return Q7($,Y,Q,G)},[X.JSDocThisTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=A($.comment,Z);return G7($,Y,Q,G)},[X.JSDocImportTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.importClause,Z,KZ),G=U($.moduleSpecifier,Z,M),J=U($.attributes,Z,j$),V=A($.comment,Z);return J7($,Y,Q,G,J,V)},[X.JSDocCallbackTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=U($.name,Z,SZ),J=A($.comment,Z);return U7($,Y,Q,G,J)},[X.JSDocOverloadTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z,O),G=A($.comment,Z);return W7($,Y,Q,G)},[X.JSDocTypedefTag]:($,Z)=>{let Y=U($.tagName,Z,v),Q=U($.typeExpression,Z),G=U($.name,Z,SZ),J=A($.comment,Z);return V7($,Y,Q,G,J)},[X.JSDocSignature]:($,Z)=>{let Y=A($.typeParameters,Z),Q=A($.parameters,Z),G=U($.type,Z,O);return H7($,Y,Q,G)},[X.JSDocNameReference]:($,Z)=>{let Y=U($.name,Z,I0);return z7($,Y)},[X.SourceFile]:($,Z)=>{let Y=A($.statements,Z),Q=U($.endOfFileToken,Z,q4);return C7($,Y,Q)},[X.ModuleDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,Z4),G=U($.body,Z,Y4);return w7($,Y,Q,G)},[X.ImportEqualsDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=U($.moduleReference,Z,X4);return q7($,Y,Q,G)},[X.ExportDeclaration]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.exportClause,Z,G4),G=U($.moduleSpecifier,Z,M),J=U($.attributes,Z,j$);return B7($,Y,Q,G,J)},[X.ImportType]:($,Z)=>{let Y=U($.argument,Z,O),Q=U($.attributes,Z,j$),G=U($.qualifier,Z,I0),J=A($.typeArguments,Z);return L7($,Y,Q,G,J)},[X.ImportClause]:($,Z)=>{let Y=U($.name,Z,v),Q=U($.namedBindings,Z,Q4);return A7($,Y,Q)},[X.ImportSpecifier]:($,Z)=>{let Y=U($.propertyName,Z,E$),Q=U($.name,Z,v);return R7($,Y,Q)},[X.JSDocLink]:($,Z)=>{let Y=U($.name,Z,I0);return I7($,Y)},[X.JSDocLinkPlain]:($,Z)=>{let Y=U($.name,Z,I0);return P7($,Y)},[X.JSDocLinkCode]:($,Z)=>{let Y=U($.name,Z,I0);return D7($,Y)},[X.TypeParameter]:($,Z)=>{let Y=A($.modifiers,Z),Q=U($.name,Z,v),G=U($.constraint,Z,O),J=U($.expression,Z,M),V=U($.defaultType,Z,O);return M7($,Y,Q,G,J,V)},[X.SyntheticReferenceExpression]:($,Z)=>{let Y=U($.expression,Z,M),Q=U($.thisArg,Z,M);return j7($,Y,Q)},[X.JSDocTypeLiteral]:($,Z)=>{let Y=i$($.jsdocPropertyTags,Z);return E7($,Y)},[X.ForInStatement]:($,Z)=>{let Y=U($.awaitModifier,Z,gZ),Q=U($.initializer,Z,r$),G=U($.expression,Z,M),J=U($.statement,Z,O0);return O7($,Y,Q,G,J)},[X.ForOfStatement]:($,Z)=>{let Y=U($.awaitModifier,Z,gZ),Q=U($.initializer,Z,r$),G=U($.expression,Z,M),J=U($.statement,Z,O0);return _7($,Y,Q,G,J)},[X.CaseClause]:($,Z)=>{let Y=U($.expression,Z,M),Q=A($.statements,Z);return T7($,Y,Q)},[X.DefaultClause]:($,Z)=>{let Y=U($.expression,Z,M),Q=A($.statements,Z);return v7($,Y,Q)},[X.ObjectBindingPattern]:($,Z)=>{let Y=A($.elements,Z);return f7($,Y)},[X.ArrayBindingPattern]:($,Z)=>{let Y=A($.elements,Z);return k7($,Y)},[X.JSDocParameterTag]:d$,[X.JSDocPropertyTag]:d$};function v$($,Z){return Z?$(Z):void 0}function t1($,Z,Y){if(!Y)return;if(Z)return Z(Y);for(let Q of Y){let G=$(Q);if(G)return G}return}function o$($,Z,Y){return v$(Z,$.tagName)||($.isNameFirst?v$(Z,$.name)||v$(Z,$.typeExpression):v$(Z,$.typeExpression)||v$(Z,$.name))||t1(Z,Y,$.comment)}function d$($,Z){let Y=U($.tagName,Z,v),Q=U($.name,Z,I0),G=U($.typeExpression,Z,O),J=A($.comment,Z);return $.kind===X.JSDocParameterTag?F7($,Y,Q,G,J):h7($,Y,Q,G,J)}class z{kind;flags=0;pos=-1;end=-1;parent=void 0;_data;constructor($,Z){this.kind=$,this._data=Z}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($,Z){let Y=e1[this.kind];return Y?Y(this._data,$,Z):void 0}getSourceFile(){let $=this;while($.parent)$=$.parent;return $}getStart($,Z){return f$(this,$??this.getSourceFile(),Z)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth($){return this.getEnd()-this.getStart($)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth($){return this.getStart($)-this.pos}getFullText($){return($??this.getSourceFile()).text.substring(this.pos,this.end)}getText($){return $??=this.getSourceFile(),$.text.substring(this.getStart($),this.end)}}function n1($){return"pos"in $&&"end"in $}function w($,Z=-1,Y=-1){if(n1($))return $;let Q=$.slice();return Q.pos=Z,Q.end=Y,Q}var e1={[X.QualifiedName]:($,Z,Y)=>W(Z,$.left)||W(Z,$.right),[X.ComputedPropertyName]:($,Z,Y)=>W(Z,$.expression),[X.Decorator]:($,Z,Y)=>W(Z,$.expression),[X.IfStatement]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.thenStatement)||W(Z,$.elseStatement),[X.DoStatement]:($,Z,Y)=>W(Z,$.statement)||W(Z,$.expression),[X.WhileStatement]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.statement),[X.ForStatement]:($,Z,Y)=>W(Z,$.initializer)||W(Z,$.condition)||W(Z,$.incrementor)||W(Z,$.statement),[X.BreakStatement]:($,Z,Y)=>W(Z,$.label),[X.ContinueStatement]:($,Z,Y)=>W(Z,$.label),[X.ReturnStatement]:($,Z,Y)=>W(Z,$.expression),[X.WithStatement]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.statement),[X.SwitchStatement]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.caseBlock),[X.CaseBlock]:($,Z,Y)=>q(Z,Y,$.clauses),[X.ThrowStatement]:($,Z,Y)=>W(Z,$.expression),[X.TryStatement]:($,Z,Y)=>W(Z,$.tryBlock)||W(Z,$.catchClause)||W(Z,$.finallyBlock),[X.CatchClause]:($,Z,Y)=>W(Z,$.variableDeclaration)||W(Z,$.block),[X.LabeledStatement]:($,Z,Y)=>W(Z,$.label)||W(Z,$.statement),[X.ExpressionStatement]:($,Z,Y)=>W(Z,$.expression),[X.Block]:($,Z,Y)=>q(Z,Y,$.statements),[X.VariableStatement]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.declarationList),[X.VariableDeclaration]:($,Z,Y)=>W(Z,$.name)||W(Z,$.exclamationToken)||W(Z,$.type)||W(Z,$.initializer),[X.VariableDeclarationList]:($,Z,Y)=>q(Z,Y,$.declarations),[X.Parameter]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.dotDotDotToken)||W(Z,$.name)||W(Z,$.questionToken)||W(Z,$.type)||W(Z,$.initializer),[X.BindingElement]:($,Z,Y)=>W(Z,$.dotDotDotToken)||W(Z,$.propertyName)||W(Z,$.name)||W(Z,$.initializer),[X.MissingDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers),[X.FunctionDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.asteriskToken)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.ClassDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.heritageClauses)||q(Z,Y,$.members),[X.ClassExpression]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.heritageClauses)||q(Z,Y,$.members),[X.HeritageClause]:($,Z,Y)=>q(Z,Y,$.types),[X.InterfaceDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.heritageClauses)||q(Z,Y,$.members),[X.TypeAliasDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||W(Z,$.type),[X.JSTypeAliasDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||W(Z,$.type),[X.EnumMember]:($,Z,Y)=>W(Z,$.name)||W(Z,$.initializer),[X.EnumDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.members),[X.ModuleBlock]:($,Z,Y)=>q(Z,Y,$.statements),[X.ImportDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.importClause)||W(Z,$.moduleSpecifier)||W(Z,$.attributes),[X.JSImportDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.importClause)||W(Z,$.moduleSpecifier)||W(Z,$.attributes),[X.ExternalModuleReference]:($,Z,Y)=>W(Z,$.expression),[X.NamespaceImport]:($,Z,Y)=>W(Z,$.name),[X.NamedImports]:($,Z,Y)=>q(Z,Y,$.elements),[X.ExportAssignment]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.type)||W(Z,$.expression),[X.NamespaceExportDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name),[X.NamespaceExport]:($,Z,Y)=>W(Z,$.name),[X.NamedExports]:($,Z,Y)=>q(Z,Y,$.elements),[X.ExportSpecifier]:($,Z,Y)=>W(Z,$.propertyName)||W(Z,$.name),[X.CallSignature]:($,Z,Y)=>q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.ConstructSignature]:($,Z,Y)=>q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.Constructor]:($,Z,Y)=>q(Z,Y,$.modifiers)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.GetAccessor]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.SetAccessor]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.IndexSignature]:($,Z,Y)=>q(Z,Y,$.modifiers)||q(Z,Y,$.parameters)||W(Z,$.type),[X.MethodSignature]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.postfixToken)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.MethodDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.asteriskToken)||W(Z,$.name)||W(Z,$.postfixToken)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.PropertySignature]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.postfixToken)||W(Z,$.type)||W(Z,$.initializer),[X.PropertyDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.postfixToken)||W(Z,$.type)||W(Z,$.initializer),[X.ClassStaticBlockDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.body),[X.BinaryExpression]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.left)||W(Z,$.type)||W(Z,$.operatorToken)||W(Z,$.right),[X.PrefixUnaryExpression]:($,Z,Y)=>W(Z,$.operand),[X.PostfixUnaryExpression]:($,Z,Y)=>W(Z,$.operand),[X.YieldExpression]:($,Z,Y)=>W(Z,$.asteriskToken)||W(Z,$.expression),[X.ArrowFunction]:($,Z,Y)=>q(Z,Y,$.modifiers)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.equalsGreaterThanToken)||W(Z,$.body),[X.FunctionExpression]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.asteriskToken)||W(Z,$.name)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type)||W(Z,$.body),[X.AsExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.type),[X.SatisfiesExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.type),[X.ConditionalExpression]:($,Z,Y)=>W(Z,$.condition)||W(Z,$.questionToken)||W(Z,$.whenTrue)||W(Z,$.colonToken)||W(Z,$.whenFalse),[X.PropertyAccessExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.questionDotToken)||W(Z,$.name),[X.ElementAccessExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.questionDotToken)||W(Z,$.argumentExpression),[X.CallExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.questionDotToken)||q(Z,Y,$.typeArguments)||q(Z,Y,$.arguments),[X.NewExpression]:($,Z,Y)=>W(Z,$.expression)||q(Z,Y,$.typeArguments)||q(Z,Y,$.arguments),[X.MetaProperty]:($,Z,Y)=>W(Z,$.name),[X.NonNullExpression]:($,Z,Y)=>W(Z,$.expression),[X.SpreadElement]:($,Z,Y)=>W(Z,$.expression),[X.TemplateExpression]:($,Z,Y)=>W(Z,$.head)||q(Z,Y,$.templateSpans),[X.TemplateSpan]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.literal),[X.TaggedTemplateExpression]:($,Z,Y)=>W(Z,$.tag)||W(Z,$.questionDotToken)||q(Z,Y,$.typeArguments)||W(Z,$.template),[X.ParenthesizedExpression]:($,Z,Y)=>W(Z,$.expression),[X.ArrayLiteralExpression]:($,Z,Y)=>q(Z,Y,$.elements),[X.ObjectLiteralExpression]:($,Z,Y)=>q(Z,Y,$.properties),[X.SpreadAssignment]:($,Z,Y)=>W(Z,$.expression),[X.PropertyAssignment]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.postfixToken)||W(Z,$.type)||W(Z,$.initializer),[X.ShorthandPropertyAssignment]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.postfixToken)||W(Z,$.type)||W(Z,$.equalsToken)||W(Z,$.objectAssignmentInitializer),[X.DeleteExpression]:($,Z,Y)=>W(Z,$.expression),[X.TypeOfExpression]:($,Z,Y)=>W(Z,$.expression),[X.VoidExpression]:($,Z,Y)=>W(Z,$.expression),[X.AwaitExpression]:($,Z,Y)=>W(Z,$.expression),[X.TypeAssertionExpression]:($,Z,Y)=>W(Z,$.type)||W(Z,$.expression),[X.UnionType]:($,Z,Y)=>q(Z,Y,$.types),[X.IntersectionType]:($,Z,Y)=>q(Z,Y,$.types),[X.ConditionalType]:($,Z,Y)=>W(Z,$.checkType)||W(Z,$.extendsType)||W(Z,$.trueType)||W(Z,$.falseType),[X.TypeOperator]:($,Z,Y)=>W(Z,$.type),[X.InferType]:($,Z,Y)=>W(Z,$.typeParameter),[X.ArrayType]:($,Z,Y)=>W(Z,$.elementType),[X.IndexedAccessType]:($,Z,Y)=>W(Z,$.objectType)||W(Z,$.indexType),[X.TypeReference]:($,Z,Y)=>W(Z,$.typeName)||q(Z,Y,$.typeArguments),[X.ExpressionWithTypeArguments]:($,Z,Y)=>W(Z,$.expression)||q(Z,Y,$.typeArguments),[X.LiteralType]:($,Z,Y)=>W(Z,$.literal),[X.TypePredicate]:($,Z,Y)=>W(Z,$.assertsModifier)||W(Z,$.parameterName)||W(Z,$.type),[X.ImportAttribute]:($,Z,Y)=>W(Z,$.name)||W(Z,$.value),[X.ImportAttributes]:($,Z,Y)=>q(Z,Y,$.attributes),[X.TypeQuery]:($,Z,Y)=>W(Z,$.exprName)||q(Z,Y,$.typeArguments),[X.MappedType]:($,Z,Y)=>W(Z,$.readonlyToken)||W(Z,$.typeParameter)||W(Z,$.nameType)||W(Z,$.questionToken)||W(Z,$.type)||q(Z,Y,$.members),[X.TypeLiteral]:($,Z,Y)=>q(Z,Y,$.members),[X.TupleType]:($,Z,Y)=>q(Z,Y,$.elements),[X.NamedTupleMember]:($,Z,Y)=>W(Z,$.dotDotDotToken)||W(Z,$.name)||W(Z,$.questionToken)||W(Z,$.type),[X.OptionalType]:($,Z,Y)=>W(Z,$.type),[X.RestType]:($,Z,Y)=>W(Z,$.type),[X.ParenthesizedType]:($,Z,Y)=>W(Z,$.type),[X.FunctionType]:($,Z,Y)=>q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.ConstructorType]:($,Z,Y)=>q(Z,Y,$.modifiers)||q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.TemplateLiteralType]:($,Z,Y)=>W(Z,$.head)||q(Z,Y,$.templateSpans),[X.TemplateLiteralTypeSpan]:($,Z,Y)=>W(Z,$.type)||W(Z,$.literal),[X.SyntheticExpression]:($,Z,Y)=>W(Z,$.tupleNameSource),[X.PartiallyEmittedExpression]:($,Z,Y)=>W(Z,$.expression),[X.JsxElement]:($,Z,Y)=>W(Z,$.openingElement)||q(Z,Y,$.children)||W(Z,$.closingElement),[X.JsxAttributes]:($,Z,Y)=>q(Z,Y,$.properties),[X.JsxNamespacedName]:($,Z,Y)=>W(Z,$.namespace)||W(Z,$.name),[X.JsxOpeningElement]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.typeArguments)||W(Z,$.attributes),[X.JsxSelfClosingElement]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.typeArguments)||W(Z,$.attributes),[X.JsxFragment]:($,Z,Y)=>W(Z,$.openingFragment)||q(Z,Y,$.children)||W(Z,$.closingFragment),[X.JsxAttribute]:($,Z,Y)=>W(Z,$.name)||W(Z,$.initializer),[X.JsxSpreadAttribute]:($,Z,Y)=>W(Z,$.expression),[X.JsxClosingElement]:($,Z,Y)=>W(Z,$.tagName),[X.JsxExpression]:($,Z,Y)=>W(Z,$.dotDotDotToken)||W(Z,$.expression),[X.SyntaxList]:($,Z,Y)=>q(Z,Y,$.children),[X.JSDoc]:($,Z,Y)=>q(Z,Y,$.comment)||q(Z,Y,$.tags),[X.JSDocTypeExpression]:($,Z,Y)=>W(Z,$.type),[X.JSDocNonNullableType]:($,Z,Y)=>W(Z,$.type),[X.JSDocNullableType]:($,Z,Y)=>W(Z,$.type),[X.JSDocVariadicType]:($,Z,Y)=>W(Z,$.type),[X.JSDocOptionalType]:($,Z,Y)=>W(Z,$.type),[X.JSDocTypeTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocUnknownTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocTemplateTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.constraint)||q(Z,Y,$.typeParameters)||q(Z,Y,$.comment),[X.JSDocReturnTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocPublicTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocPrivateTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocProtectedTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocReadonlyTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocOverrideTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocDeprecatedTag]:($,Z,Y)=>W(Z,$.tagName)||q(Z,Y,$.comment),[X.JSDocSeeTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.nameExpression)||q(Z,Y,$.comment),[X.JSDocImplementsTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.className)||q(Z,Y,$.comment),[X.JSDocAugmentsTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.className)||q(Z,Y,$.comment),[X.JSDocSatisfiesTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocThrowsTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocThisTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocImportTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.importClause)||W(Z,$.moduleSpecifier)||W(Z,$.attributes)||q(Z,Y,$.comment),[X.JSDocCallbackTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||W(Z,$.name)||q(Z,Y,$.comment),[X.JSDocOverloadTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||q(Z,Y,$.comment),[X.JSDocTypedefTag]:($,Z,Y)=>W(Z,$.tagName)||W(Z,$.typeExpression)||W(Z,$.name)||q(Z,Y,$.comment),[X.JSDocSignature]:($,Z,Y)=>q(Z,Y,$.typeParameters)||q(Z,Y,$.parameters)||W(Z,$.type),[X.JSDocNameReference]:($,Z,Y)=>W(Z,$.name),[X.ModuleDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.body),[X.ImportEqualsDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.moduleReference),[X.ExportDeclaration]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.exportClause)||W(Z,$.moduleSpecifier)||W(Z,$.attributes),[X.ImportType]:($,Z,Y)=>W(Z,$.argument)||W(Z,$.attributes)||W(Z,$.qualifier)||q(Z,Y,$.typeArguments),[X.ImportClause]:($,Z,Y)=>W(Z,$.name)||W(Z,$.namedBindings),[X.ImportSpecifier]:($,Z,Y)=>W(Z,$.propertyName)||W(Z,$.name),[X.JSDocLink]:($,Z,Y)=>W(Z,$.name),[X.JSDocLinkPlain]:($,Z,Y)=>W(Z,$.name),[X.JSDocLinkCode]:($,Z,Y)=>W(Z,$.name),[X.TypeParameter]:($,Z,Y)=>q(Z,Y,$.modifiers)||W(Z,$.name)||W(Z,$.constraint)||W(Z,$.expression)||W(Z,$.defaultType),[X.SyntheticReferenceExpression]:($,Z,Y)=>W(Z,$.expression)||W(Z,$.thisArg),[X.JSDocTypeLiteral]:($,Z,Y)=>q(Z,Y,$.jsdocPropertyTags),[X.ForInStatement]:($,Z,Y)=>W(Z,$.awaitModifier)||W(Z,$.initializer)||W(Z,$.expression)||W(Z,$.statement),[X.ForOfStatement]:($,Z,Y)=>W(Z,$.awaitModifier)||W(Z,$.initializer)||W(Z,$.expression)||W(Z,$.statement),[X.CaseClause]:($,Z,Y)=>W(Z,$.expression)||q(Z,Y,$.statements),[X.DefaultClause]:($,Z,Y)=>W(Z,$.expression)||q(Z,Y,$.statements),[X.ObjectBindingPattern]:($,Z,Y)=>q(Z,Y,$.elements),[X.ArrayBindingPattern]:($,Z,Y)=>q(Z,Y,$.elements),[X.JSDocParameterTag]:o$,[X.JSDocPropertyTag]:o$,[X.SourceFile]:($,Z,Y)=>q(Z,Y,$.statements)||W(Z,$.endOfFileToken)};function W($,Z){return Z?$(Z):void 0}function q($,Z,Y){if(!Y)return;if(Z)return Z(Y);for(let Q of Y){let G=$(Q);if(G)return G}return}function $9($,Z){return new z(X.QualifiedName,{left:$,right:Z})}function Z9($){return new z(X.ComputedPropertyName,{expression:$})}function Y9($){return new z(X.Decorator,{expression:$})}function X9($,Z,Y){return new z(X.IfStatement,{expression:$,thenStatement:Z,elseStatement:Y})}function Q9($,Z){return new z(X.DoStatement,{statement:$,expression:Z})}function G9($,Z){return new z(X.WhileStatement,{expression:$,statement:Z})}function J9($,Z,Y,Q){return new z(X.ForStatement,{initializer:$,condition:Z,incrementor:Y,statement:Q})}function U9($){return new z(X.BreakStatement,{label:$})}function W9($){return new z(X.ContinueStatement,{label:$})}function V9($){return new z(X.ReturnStatement,{expression:$})}function H9($,Z){return new z(X.WithStatement,{expression:$,statement:Z})}function z9($,Z){return new z(X.SwitchStatement,{expression:$,caseBlock:Z})}function w9($){return new z(X.CaseBlock,{clauses:w($)})}function q9($){return new z(X.ThrowStatement,{expression:$})}function B9($,Z,Y){return new z(X.TryStatement,{tryBlock:$,catchClause:Z,finallyBlock:Y})}function L9($,Z){return new z(X.CatchClause,{variableDeclaration:$,block:Z})}function A9($,Z){return new z(X.LabeledStatement,{label:$,statement:Z})}function R9($){return new z(X.ExpressionStatement,{expression:$})}function I9($,Z){return new z(X.Block,{statements:w($),multiLine:Z})}function P9($,Z){return new z(X.VariableStatement,{modifiers:$?w($):void 0,declarationList:Z})}function D9($,Z,Y,Q){return new z(X.VariableDeclaration,{name:$,exclamationToken:Z,type:Y,initializer:Q})}function M9($,Z){let Y=new z(X.VariableDeclarationList,{declarations:w($)});return Y.flags=Z,Y}function j9($,Z,Y,Q,G,J){return new z(X.Parameter,{modifiers:$?w($):void 0,dotDotDotToken:Z,name:Y,questionToken:Q,type:G,initializer:J})}function E9($,Z,Y,Q){return new z(X.BindingElement,{dotDotDotToken:$,propertyName:Z,name:Y,initializer:Q})}function O9($){return new z(X.MissingDeclaration,{modifiers:$?w($):void 0})}function _9($,Z,Y,Q,G,J,V){return new z(X.FunctionDeclaration,{modifiers:$?w($):void 0,asteriskToken:Z,name:Y,typeParameters:Q?w(Q):void 0,parameters:w(G),type:J,body:V})}function T9($,Z,Y,Q,G){return new z(X.ClassDeclaration,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,heritageClauses:Q?w(Q):void 0,members:w(G)})}function v9($,Z,Y,Q,G){return new z(X.ClassExpression,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,heritageClauses:Q?w(Q):void 0,members:w(G)})}function f9($,Z){return new z(X.HeritageClause,{token:$,types:w(Z)})}function k9($,Z,Y,Q,G){return new z(X.InterfaceDeclaration,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,heritageClauses:Q?w(Q):void 0,members:w(G)})}function C9($,Z,Y,Q){return new z(X.TypeAliasDeclaration,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,type:Q})}function F9($,Z){return new z(X.EnumMember,{name:$,initializer:Z})}function h9($,Z,Y){return new z(X.EnumDeclaration,{modifiers:$?w($):void 0,name:Z,members:w(Y)})}function N9($){return new z(X.ModuleBlock,{statements:w($)})}function u9($,Z,Y,Q){return new z(X.ImportDeclaration,{modifiers:$?w($):void 0,importClause:Z,moduleSpecifier:Y,attributes:Q})}function K9($){return new z(X.ExternalModuleReference,{expression:$})}function b9($){return new z(X.NamespaceImport,{name:$})}function S9($){return new z(X.NamedImports,{elements:w($)})}function x9($,Z=!1,Y,Q){return new z(X.ExportAssignment,{modifiers:$?w($):void 0,isExportEquals:Z,type:Y,expression:Q})}function g9($,Z){return new z(X.NamespaceExportDeclaration,{modifiers:$?w($):void 0,name:Z})}function p9($){return new z(X.NamespaceExport,{name:$})}function y9($){return new z(X.NamedExports,{elements:w($)})}function m9($=!1,Z,Y){return new z(X.ExportSpecifier,{isTypeOnly:$,propertyName:Z,name:Y})}function c9($,Z,Y){return new z(X.CallSignature,{typeParameters:$?w($):void 0,parameters:w(Z),type:Y})}function l9($,Z,Y){return new z(X.ConstructSignature,{typeParameters:$?w($):void 0,parameters:w(Z),type:Y})}function r9($,Z,Y,Q,G){return new z(X.Constructor,{modifiers:$?w($):void 0,typeParameters:Z?w(Z):void 0,parameters:w(Y),type:Q,body:G})}function s9($,Z,Y,Q,G,J){return new z(X.GetAccessor,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,parameters:w(Q),type:G,body:J})}function i9($,Z,Y,Q,G,J){return new z(X.SetAccessor,{modifiers:$?w($):void 0,name:Z,typeParameters:Y?w(Y):void 0,parameters:w(Q),type:G,body:J})}function d9($,Z,Y){return new z(X.IndexSignature,{modifiers:$?w($):void 0,parameters:w(Z),type:Y})}function o9($,Z,Y,Q,G,J){return new z(X.MethodSignature,{modifiers:$?w($):void 0,name:Z,postfixToken:Y,typeParameters:Q?w(Q):void 0,parameters:w(G),type:J})}function a9($,Z,Y,Q,G,J,V,L){return new z(X.MethodDeclaration,{modifiers:$?w($):void 0,asteriskToken:Z,name:Y,postfixToken:Q,typeParameters:G?w(G):void 0,parameters:w(J),type:V,body:L})}function t9($,Z,Y,Q,G){return new z(X.PropertySignature,{modifiers:$?w($):void 0,name:Z,postfixToken:Y,type:Q,initializer:G})}function n9($,Z,Y,Q,G){return new z(X.PropertyDeclaration,{modifiers:$?w($):void 0,name:Z,postfixToken:Y,type:Q,initializer:G})}function e9($,Z){return new z(X.ClassStaticBlockDeclaration,{modifiers:$?w($):void 0,body:Z})}function $Q($,Z,Y,Q,G){return new z(X.BinaryExpression,{modifiers:$?w($):void 0,left:Z,type:Y,operatorToken:Q,right:G})}function ZQ($,Z){return new z(X.PrefixUnaryExpression,{operator:$,operand:Z})}function YQ($,Z){return new z(X.PostfixUnaryExpression,{operand:$,operator:Z})}function XQ($,Z){return new z(X.YieldExpression,{asteriskToken:$,expression:Z})}function QQ($,Z,Y,Q,G,J){return new z(X.ArrowFunction,{modifiers:$?w($):void 0,typeParameters:Z?w(Z):void 0,parameters:w(Y),type:Q,equalsGreaterThanToken:G,body:J})}function GQ($,Z,Y,Q,G,J,V){return new z(X.FunctionExpression,{modifiers:$?w($):void 0,asteriskToken:Z,name:Y,typeParameters:Q?w(Q):void 0,parameters:w(G),type:J,body:V})}function JQ($,Z){return new z(X.AsExpression,{expression:$,type:Z})}function UQ($,Z){return new z(X.SatisfiesExpression,{expression:$,type:Z})}function WQ($,Z,Y,Q,G){return new z(X.ConditionalExpression,{condition:$,questionToken:Z,whenTrue:Y,colonToken:Q,whenFalse:G})}function VQ($,Z,Y,Q){let G=new z(X.PropertyAccessExpression,{expression:$,questionDotToken:Z,name:Y});return G.flags=Q,G}function HQ($,Z,Y,Q){let G=new z(X.ElementAccessExpression,{expression:$,questionDotToken:Z,argumentExpression:Y});return G.flags=Q,G}function zQ($,Z,Y,Q,G){let J=new z(X.CallExpression,{expression:$,questionDotToken:Z,typeArguments:Y?w(Y):void 0,arguments:w(Q)});return J.flags=G,J}function wQ($,Z,Y){return new z(X.NewExpression,{expression:$,typeArguments:Z?w(Z):void 0,arguments:Y?w(Y):void 0})}function qQ($,Z){return new z(X.MetaProperty,{keywordToken:$,name:Z})}function BQ($,Z){let Y=new z(X.NonNullExpression,{expression:$});return Y.flags=Z,Y}function LQ($){return new z(X.SpreadElement,{expression:$})}function AQ($,Z){return new z(X.TemplateExpression,{head:$,templateSpans:w(Z)})}function RQ($,Z){return new z(X.TemplateSpan,{expression:$,literal:Z})}function IQ($,Z,Y,Q,G){let J=new z(X.TaggedTemplateExpression,{tag:$,questionDotToken:Z,typeArguments:Y?w(Y):void 0,template:Q});return J.flags=G,J}function PQ($){return new z(X.ParenthesizedExpression,{expression:$})}function DQ($,Z){return new z(X.ArrayLiteralExpression,{elements:w($),multiLine:Z})}function MQ($,Z){return new z(X.ObjectLiteralExpression,{properties:w($),multiLine:Z})}function jQ($){return new z(X.SpreadAssignment,{expression:$})}function EQ($,Z,Y,Q,G){return new z(X.PropertyAssignment,{modifiers:$?w($):void 0,name:Z,postfixToken:Y,type:Q,initializer:G})}function OQ($,Z,Y,Q,G,J){return new z(X.ShorthandPropertyAssignment,{modifiers:$?w($):void 0,name:Z,postfixToken:Y,type:Q,equalsToken:G,objectAssignmentInitializer:J})}function _Q($){return new z(X.DeleteExpression,{expression:$})}function TQ($){return new z(X.TypeOfExpression,{expression:$})}function vQ($){return new z(X.VoidExpression,{expression:$})}function fQ($){return new z(X.AwaitExpression,{expression:$})}function kQ($,Z){return new z(X.TypeAssertionExpression,{type:$,expression:Z})}function CQ($){return new z(X.UnionType,{types:w($)})}function FQ($){return new z(X.IntersectionType,{types:w($)})}function hQ($,Z,Y,Q){return new z(X.ConditionalType,{checkType:$,extendsType:Z,trueType:Y,falseType:Q})}function NQ($,Z){return new z(X.TypeOperator,{operator:$,type:Z})}function uQ($){return new z(X.InferType,{typeParameter:$})}function KQ($){return new z(X.ArrayType,{elementType:$})}function bQ($,Z){return new z(X.IndexedAccessType,{objectType:$,indexType:Z})}function SQ($,Z){return new z(X.TypeReference,{typeName:$,typeArguments:Z?w(Z):void 0})}function xQ($,Z){return new z(X.ExpressionWithTypeArguments,{expression:$,typeArguments:Z?w(Z):void 0})}function gQ($){return new z(X.LiteralType,{literal:$})}function pQ($,Z,Y){return new z(X.TypePredicate,{assertsModifier:$,parameterName:Z,type:Y})}function yQ($,Z){return new z(X.ImportAttribute,{name:$,value:Z})}function mQ($,Z,Y){return new z(X.ImportAttributes,{token:$,attributes:w(Z),multiLine:Y})}function cQ($,Z){return new z(X.TypeQuery,{exprName:$,typeArguments:Z?w(Z):void 0})}function lQ($,Z,Y,Q,G,J){return new z(X.MappedType,{readonlyToken:$,typeParameter:Z,nameType:Y,questionToken:Q,type:G,members:J?w(J):void 0})}function rQ($){return new z(X.TypeLiteral,{members:w($)})}function sQ($){return new z(X.TupleType,{elements:w($)})}function iQ($,Z,Y,Q){return new z(X.NamedTupleMember,{dotDotDotToken:$,name:Z,questionToken:Y,type:Q})}function dQ($){return new z(X.OptionalType,{type:$})}function oQ($){return new z(X.RestType,{type:$})}function aQ($){return new z(X.ParenthesizedType,{type:$})}function tQ($,Z,Y){return new z(X.FunctionType,{typeParameters:$?w($):void 0,parameters:w(Z),type:Y})}function nQ($,Z,Y,Q){return new z(X.ConstructorType,{modifiers:$?w($):void 0,typeParameters:Z?w(Z):void 0,parameters:w(Y),type:Q})}function eQ($,Z){return new z(X.TemplateLiteralType,{head:$,templateSpans:w(Z)})}function $G($,Z){return new z(X.TemplateLiteralTypeSpan,{type:$,literal:Z})}function ZG($,Z,Y){return new z(X.SyntheticExpression,{type:$,isSpread:Z,tupleNameSource:Y})}function YG($){return new z(X.PartiallyEmittedExpression,{expression:$})}function XG($,Z,Y){return new z(X.JsxElement,{openingElement:$,children:w(Z),closingElement:Y})}function QG($){return new z(X.JsxAttributes,{properties:w($)})}function GG($,Z){return new z(X.JsxNamespacedName,{namespace:$,name:Z})}function JG($,Z,Y){return new z(X.JsxOpeningElement,{tagName:$,typeArguments:Z?w(Z):void 0,attributes:Y})}function UG($,Z,Y){return new z(X.JsxSelfClosingElement,{tagName:$,typeArguments:Z?w(Z):void 0,attributes:Y})}function WG($,Z,Y){return new z(X.JsxFragment,{openingFragment:$,children:w(Z),closingFragment:Y})}function VG($,Z){return new z(X.JsxAttribute,{name:$,initializer:Z})}function HG($){return new z(X.JsxSpreadAttribute,{expression:$})}function zG($){return new z(X.JsxClosingElement,{tagName:$})}function wG($,Z){return new z(X.JsxExpression,{dotDotDotToken:$,expression:Z})}function qG($){return new z(X.SyntaxList,{children:$})}function BG($,Z){return new z(X.JSDoc,{comment:w($),tags:Z?w(Z):void 0})}function LG($){return new z(X.JSDocTypeExpression,{type:$})}function AG($){return new z(X.JSDocNonNullableType,{type:$})}function RG($){return new z(X.JSDocNullableType,{type:$})}function IG($){return new z(X.JSDocVariadicType,{type:$})}function PG($){return new z(X.JSDocOptionalType,{type:$})}function DG($,Z,Y){return new z(X.JSDocTypeTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function MG($,Z){return new z(X.JSDocUnknownTag,{tagName:$,comment:Z?w(Z):void 0})}function jG($,Z,Y,Q){return new z(X.JSDocTemplateTag,{tagName:$,constraint:Z,typeParameters:w(Y),comment:Q?w(Q):void 0})}function EG($,Z,Y){return new z(X.JSDocReturnTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function OG($,Z){return new z(X.JSDocPublicTag,{tagName:$,comment:Z?w(Z):void 0})}function _G($,Z){return new z(X.JSDocPrivateTag,{tagName:$,comment:Z?w(Z):void 0})}function TG($,Z){return new z(X.JSDocProtectedTag,{tagName:$,comment:Z?w(Z):void 0})}function vG($,Z){return new z(X.JSDocReadonlyTag,{tagName:$,comment:Z?w(Z):void 0})}function fG($,Z){return new z(X.JSDocOverrideTag,{tagName:$,comment:Z?w(Z):void 0})}function kG($,Z){return new z(X.JSDocDeprecatedTag,{tagName:$,comment:Z?w(Z):void 0})}function CG($,Z,Y){return new z(X.JSDocSeeTag,{tagName:$,nameExpression:Z,comment:Y?w(Y):void 0})}function FG($,Z,Y){return new z(X.JSDocImplementsTag,{tagName:$,className:Z,comment:Y?w(Y):void 0})}function hG($,Z,Y){return new z(X.JSDocAugmentsTag,{tagName:$,className:Z,comment:Y?w(Y):void 0})}function NG($,Z,Y){return new z(X.JSDocSatisfiesTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function uG($,Z,Y){return new z(X.JSDocThrowsTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function KG($,Z,Y){return new z(X.JSDocThisTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function bG($,Z,Y,Q,G){return new z(X.JSDocImportTag,{tagName:$,importClause:Z,moduleSpecifier:Y,attributes:Q,comment:G?w(G):void 0})}function SG($,Z,Y,Q){return new z(X.JSDocCallbackTag,{tagName:$,typeExpression:Z,name:Y,comment:Q?w(Q):void 0})}function xG($,Z,Y){return new z(X.JSDocOverloadTag,{tagName:$,typeExpression:Z,comment:Y?w(Y):void 0})}function gG($,Z,Y,Q){return new z(X.JSDocTypedefTag,{tagName:$,typeExpression:Z,name:Y,comment:Q?w(Q):void 0})}function pG($,Z,Y){return new z(X.JSDocSignature,{typeParameters:$?w($):void 0,parameters:w(Z),type:Y})}function yG($){return new z(X.JSDocNameReference,{name:$})}function mG($,Z,Y,Q){return new z(X.ModuleDeclaration,{modifiers:$?w($):void 0,keyword:Z,name:Y,body:Q})}function cG($,Z=!1,Y,Q){return new z(X.ImportEqualsDeclaration,{modifiers:$?w($):void 0,isTypeOnly:Z,name:Y,moduleReference:Q})}function lG($,Z,Y,Q,G){return new z(X.ExportDeclaration,{modifiers:$?w($):void 0,isTypeOnly:Z,exportClause:Y,moduleSpecifier:Q,attributes:G})}function rG($=!1,Z,Y,Q,G){return new z(X.ImportType,{isTypeOf:$,argument:Z,attributes:Y,qualifier:Q,typeArguments:G?w(G):void 0})}function sG($,Z,Y){return new z(X.ImportClause,{phaseModifier:$,name:Z,namedBindings:Y})}function iG($=!1,Z,Y){return new z(X.ImportSpecifier,{isTypeOnly:$,propertyName:Z,name:Y})}function dG($,Z){return new z(X.JSDocLink,{name:$,text:Z})}function oG($,Z){return new z(X.JSDocLinkPlain,{name:$,text:Z})}function aG($,Z){return new z(X.JSDocLinkCode,{name:$,text:Z})}function tG($,Z,Y,Q,G){return new z(X.TypeParameter,{modifiers:$?w($):void 0,name:Z,constraint:Y,expression:Q,defaultType:G})}function nG($,Z){return new z(X.SyntheticReferenceExpression,{expression:$,thisArg:Z})}function eG($,Z){return new z(X.JSDocTypeLiteral,{jsdocPropertyTags:$,isArrayType:Z})}function $J($,Z,Y,Q){return new z(X.ForInStatement,{awaitModifier:$,initializer:Z,expression:Y,statement:Q})}function ZJ($,Z,Y,Q){return new z(X.ForOfStatement,{awaitModifier:$,initializer:Z,expression:Y,statement:Q})}function YJ($,Z){return new z(X.CaseClause,{expression:$,statements:w(Z)})}function XJ($,Z){return new z(X.DefaultClause,{expression:$,statements:w(Z)})}function QJ($){return new z(X.ObjectBindingPattern,{elements:w($)})}function GJ($){return new z(X.ArrayBindingPattern,{elements:w($)})}function JJ($,Z,Y,Q,G,J){return new z(X.JSDocParameterTag,{tagName:$,name:Z,isBracketed:Y,typeExpression:Q,isNameFirst:G,comment:J?w(J):void 0})}function UJ($,Z,Y,Q,G,J){return new z(X.JSDocPropertyTag,{tagName:$,name:Z,isBracketed:Y,typeExpression:Q,isNameFirst:G,comment:J?w(J):void 0})}function O4($,Z,Y){return $.left!==Z||$.right!==Y?$9(Z,Y):$}function _4($,Z){return $.expression!==Z?Z9(Z):$}function T4($,Z){return $.expression!==Z?Y9(Z):$}function v4($,Z,Y,Q){return $.expression!==Z||$.thenStatement!==Y||$.elseStatement!==Q?X9(Z,Y,Q):$}function f4($,Z,Y){return $.statement!==Z||$.expression!==Y?Q9(Z,Y):$}function k4($,Z,Y){return $.expression!==Z||$.statement!==Y?G9(Z,Y):$}function C4($,Z,Y,Q,G){return $.initializer!==Z||$.condition!==Y||$.incrementor!==Q||$.statement!==G?J9(Z,Y,Q,G):$}function F4($,Z){return $.label!==Z?U9(Z):$}function h4($,Z){return $.label!==Z?W9(Z):$}function N4($,Z){return $.expression!==Z?V9(Z):$}function u4($,Z,Y){return $.expression!==Z||$.statement!==Y?H9(Z,Y):$}function K4($,Z,Y){return $.expression!==Z||$.caseBlock!==Y?z9(Z,Y):$}function b4($,Z){return $.clauses!==Z?w9(Z):$}function S4($,Z){return $.expression!==Z?q9(Z):$}function x4($,Z,Y,Q){return $.tryBlock!==Z||$.catchClause!==Y||$.finallyBlock!==Q?B9(Z,Y,Q):$}function g4($,Z,Y){return $.variableDeclaration!==Z||$.block!==Y?L9(Z,Y):$}function p4($,Z,Y){return $.label!==Z||$.statement!==Y?A9(Z,Y):$}function y4($,Z){return $.expression!==Z?R9(Z):$}function m4($,Z){return $.statements!==Z?I9(Z,$.multiLine):$}function c4($,Z,Y){return $.modifiers!==Z||$.declarationList!==Y?P9(Z,Y):$}function l4($,Z,Y,Q,G){return $.name!==Z||$.exclamationToken!==Y||$.type!==Q||$.initializer!==G?D9(Z,Y,Q,G):$}function r4($,Z){return $.declarations!==Z?M9(Z,$.flags):$}function s4($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.dotDotDotToken!==Y||$.name!==Q||$.questionToken!==G||$.type!==J||$.initializer!==V?j9(Z,Y,Q,G,J,V):$}function i4($,Z,Y,Q,G){return $.dotDotDotToken!==Z||$.propertyName!==Y||$.name!==Q||$.initializer!==G?E9(Z,Y,Q,G):$}function d4($,Z){return $.modifiers!==Z?O9(Z):$}function o4($,Z,Y,Q,G,J,V,L){return $.modifiers!==Z||$.asteriskToken!==Y||$.name!==Q||$.typeParameters!==G||$.parameters!==J||$.type!==V||$.body!==L?_9(Z,Y,Q,G,J,V,L):$}function a4($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.heritageClauses!==G||$.members!==J?T9(Z,Y,Q,G,J):$}function t4($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.heritageClauses!==G||$.members!==J?v9(Z,Y,Q,G,J):$}function n4($,Z){return $.types!==Z?f9($.token,Z):$}function e4($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.heritageClauses!==G||$.members!==J?k9(Z,Y,Q,G,J):$}function $8($,Z,Y,Q,G){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.type!==G?C9(Z,Y,Q,G):$}function Z8($,Z,Y){return $.name!==Z||$.initializer!==Y?F9(Z,Y):$}function Y8($,Z,Y,Q){return $.modifiers!==Z||$.name!==Y||$.members!==Q?h9(Z,Y,Q):$}function X8($,Z){return $.statements!==Z?N9(Z):$}function Q8($,Z,Y,Q,G){return $.modifiers!==Z||$.importClause!==Y||$.moduleSpecifier!==Q||$.attributes!==G?u9(Z,Y,Q,G):$}function G8($,Z){return $.expression!==Z?K9(Z):$}function J8($,Z){return $.name!==Z?b9(Z):$}function U8($,Z){return $.elements!==Z?S9(Z):$}function W8($,Z,Y,Q){return $.modifiers!==Z||$.type!==Y||$.expression!==Q?x9(Z,$.isExportEquals,Y,Q):$}function V8($,Z,Y){return $.modifiers!==Z||$.name!==Y?g9(Z,Y):$}function H8($,Z){return $.name!==Z?p9(Z):$}function z8($,Z){return $.elements!==Z?y9(Z):$}function w8($,Z,Y){return $.propertyName!==Z||$.name!==Y?m9($.isTypeOnly,Z,Y):$}function q8($,Z,Y,Q){return $.typeParameters!==Z||$.parameters!==Y||$.type!==Q?c9(Z,Y,Q):$}function B8($,Z,Y,Q){return $.typeParameters!==Z||$.parameters!==Y||$.type!==Q?l9(Z,Y,Q):$}function L8($,Z,Y,Q,G,J){return $.modifiers!==Z||$.typeParameters!==Y||$.parameters!==Q||$.type!==G||$.body!==J?r9(Z,Y,Q,G,J):$}function A8($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.parameters!==G||$.type!==J||$.body!==V?s9(Z,Y,Q,G,J,V):$}function R8($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.name!==Y||$.typeParameters!==Q||$.parameters!==G||$.type!==J||$.body!==V?i9(Z,Y,Q,G,J,V):$}function I8($,Z,Y,Q){return $.modifiers!==Z||$.parameters!==Y||$.type!==Q?d9(Z,Y,Q):$}function P8($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.name!==Y||$.postfixToken!==Q||$.typeParameters!==G||$.parameters!==J||$.type!==V?o9(Z,Y,Q,G,J,V):$}function D8($,Z,Y,Q,G,J,V,L,P){return $.modifiers!==Z||$.asteriskToken!==Y||$.name!==Q||$.postfixToken!==G||$.typeParameters!==J||$.parameters!==V||$.type!==L||$.body!==P?a9(Z,Y,Q,G,J,V,L,P):$}function M8($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.postfixToken!==Q||$.type!==G||$.initializer!==J?t9(Z,Y,Q,G,J):$}function j8($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.postfixToken!==Q||$.type!==G||$.initializer!==J?n9(Z,Y,Q,G,J):$}function E8($,Z,Y){return $.modifiers!==Z||$.body!==Y?e9(Z,Y):$}function O8($,Z,Y,Q,G,J){return $.modifiers!==Z||$.left!==Y||$.type!==Q||$.operatorToken!==G||$.right!==J?$Q(Z,Y,Q,G,J):$}function _8($,Z){return $.operand!==Z?ZQ($.operator,Z):$}function T8($,Z){return $.operand!==Z?YQ(Z,$.operator):$}function v8($,Z,Y){return $.asteriskToken!==Z||$.expression!==Y?XQ(Z,Y):$}function f8($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.typeParameters!==Y||$.parameters!==Q||$.type!==G||$.equalsGreaterThanToken!==J||$.body!==V?QQ(Z,Y,Q,G,J,V):$}function k8($,Z,Y,Q,G,J,V,L){return $.modifiers!==Z||$.asteriskToken!==Y||$.name!==Q||$.typeParameters!==G||$.parameters!==J||$.type!==V||$.body!==L?GQ(Z,Y,Q,G,J,V,L):$}function C8($,Z,Y){return $.expression!==Z||$.type!==Y?JQ(Z,Y):$}function F8($,Z,Y){return $.expression!==Z||$.type!==Y?UQ(Z,Y):$}function h8($,Z,Y,Q,G,J){return $.condition!==Z||$.questionToken!==Y||$.whenTrue!==Q||$.colonToken!==G||$.whenFalse!==J?WQ(Z,Y,Q,G,J):$}function N8($,Z,Y,Q){return $.expression!==Z||$.questionDotToken!==Y||$.name!==Q?VQ(Z,Y,Q,$.flags):$}function u8($,Z,Y,Q){return $.expression!==Z||$.questionDotToken!==Y||$.argumentExpression!==Q?HQ(Z,Y,Q,$.flags):$}function K8($,Z,Y,Q,G){return $.expression!==Z||$.questionDotToken!==Y||$.typeArguments!==Q||$.arguments!==G?zQ(Z,Y,Q,G,$.flags):$}function b8($,Z,Y,Q){return $.expression!==Z||$.typeArguments!==Y||$.arguments!==Q?wQ(Z,Y,Q):$}function S8($,Z){return $.name!==Z?qQ($.keywordToken,Z):$}function x8($,Z){return $.expression!==Z?BQ(Z,$.flags):$}function g8($,Z){return $.expression!==Z?LQ(Z):$}function p8($,Z,Y){return $.head!==Z||$.templateSpans!==Y?AQ(Z,Y):$}function y8($,Z,Y){return $.expression!==Z||$.literal!==Y?RQ(Z,Y):$}function m8($,Z,Y,Q,G){return $.tag!==Z||$.questionDotToken!==Y||$.typeArguments!==Q||$.template!==G?IQ(Z,Y,Q,G,$.flags):$}function c8($,Z){return $.expression!==Z?PQ(Z):$}function l8($,Z){return $.elements!==Z?DQ(Z,$.multiLine):$}function r8($,Z){return $.properties!==Z?MQ(Z,$.multiLine):$}function s8($,Z){return $.expression!==Z?jQ(Z):$}function i8($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.postfixToken!==Q||$.type!==G||$.initializer!==J?EQ(Z,Y,Q,G,J):$}function d8($,Z,Y,Q,G,J,V){return $.modifiers!==Z||$.name!==Y||$.postfixToken!==Q||$.type!==G||$.equalsToken!==J||$.objectAssignmentInitializer!==V?OQ(Z,Y,Q,G,J,V):$}function o8($,Z){return $.expression!==Z?_Q(Z):$}function a8($,Z){return $.expression!==Z?TQ(Z):$}function t8($,Z){return $.expression!==Z?vQ(Z):$}function n8($,Z){return $.expression!==Z?fQ(Z):$}function e8($,Z,Y){return $.type!==Z||$.expression!==Y?kQ(Z,Y):$}function $5($,Z){return $.types!==Z?CQ(Z):$}function Z5($,Z){return $.types!==Z?FQ(Z):$}function Y5($,Z,Y,Q,G){return $.checkType!==Z||$.extendsType!==Y||$.trueType!==Q||$.falseType!==G?hQ(Z,Y,Q,G):$}function X5($,Z){return $.type!==Z?NQ($.operator,Z):$}function Q5($,Z){return $.typeParameter!==Z?uQ(Z):$}function G5($,Z){return $.elementType!==Z?KQ(Z):$}function J5($,Z,Y){return $.objectType!==Z||$.indexType!==Y?bQ(Z,Y):$}function U5($,Z,Y){return $.typeName!==Z||$.typeArguments!==Y?SQ(Z,Y):$}function W5($,Z,Y){return $.expression!==Z||$.typeArguments!==Y?xQ(Z,Y):$}function V5($,Z){return $.literal!==Z?gQ(Z):$}function H5($,Z,Y,Q){return $.assertsModifier!==Z||$.parameterName!==Y||$.type!==Q?pQ(Z,Y,Q):$}function z5($,Z,Y){return $.name!==Z||$.value!==Y?yQ(Z,Y):$}function w5($,Z){return $.attributes!==Z?mQ($.token,Z,$.multiLine):$}function q5($,Z,Y){return $.exprName!==Z||$.typeArguments!==Y?cQ(Z,Y):$}function B5($,Z,Y,Q,G,J,V){return $.readonlyToken!==Z||$.typeParameter!==Y||$.nameType!==Q||$.questionToken!==G||$.type!==J||$.members!==V?lQ(Z,Y,Q,G,J,V):$}function L5($,Z){return $.members!==Z?rQ(Z):$}function A5($,Z){return $.elements!==Z?sQ(Z):$}function R5($,Z,Y,Q,G){return $.dotDotDotToken!==Z||$.name!==Y||$.questionToken!==Q||$.type!==G?iQ(Z,Y,Q,G):$}function I5($,Z){return $.type!==Z?dQ(Z):$}function P5($,Z){return $.type!==Z?oQ(Z):$}function D5($,Z){return $.type!==Z?aQ(Z):$}function M5($,Z,Y,Q){return $.typeParameters!==Z||$.parameters!==Y||$.type!==Q?tQ(Z,Y,Q):$}function j5($,Z,Y,Q,G){return $.modifiers!==Z||$.typeParameters!==Y||$.parameters!==Q||$.type!==G?nQ(Z,Y,Q,G):$}function E5($,Z,Y){return $.head!==Z||$.templateSpans!==Y?eQ(Z,Y):$}function O5($,Z,Y){return $.type!==Z||$.literal!==Y?$G(Z,Y):$}function _5($,Z){return $.tupleNameSource!==Z?ZG($.type,$.isSpread,Z):$}function T5($,Z){return $.expression!==Z?YG(Z):$}function v5($,Z,Y,Q){return $.openingElement!==Z||$.children!==Y||$.closingElement!==Q?XG(Z,Y,Q):$}function f5($,Z){return $.properties!==Z?QG(Z):$}function k5($,Z,Y){return $.namespace!==Z||$.name!==Y?GG(Z,Y):$}function C5($,Z,Y,Q){return $.tagName!==Z||$.typeArguments!==Y||$.attributes!==Q?JG(Z,Y,Q):$}function F5($,Z,Y,Q){return $.tagName!==Z||$.typeArguments!==Y||$.attributes!==Q?UG(Z,Y,Q):$}function h5($,Z,Y,Q){return $.openingFragment!==Z||$.children!==Y||$.closingFragment!==Q?WG(Z,Y,Q):$}function N5($,Z,Y){return $.name!==Z||$.initializer!==Y?VG(Z,Y):$}function u5($,Z){return $.expression!==Z?HG(Z):$}function K5($,Z){return $.tagName!==Z?zG(Z):$}function b5($,Z,Y){return $.dotDotDotToken!==Z||$.expression!==Y?wG(Z,Y):$}function S5($,Z){return $.children!==Z?qG(Z):$}function x5($,Z,Y){return $.comment!==Z||$.tags!==Y?BG(Z,Y):$}function g5($,Z){return $.type!==Z?LG(Z):$}function p5($,Z){return $.type!==Z?AG(Z):$}function y5($,Z){return $.type!==Z?RG(Z):$}function m5($,Z){return $.type!==Z?IG(Z):$}function c5($,Z){return $.type!==Z?PG(Z):$}function l5($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?DG(Z,Y,Q):$}function r5($,Z,Y){return $.tagName!==Z||$.comment!==Y?MG(Z,Y):$}function s5($,Z,Y,Q,G){return $.tagName!==Z||$.constraint!==Y||$.typeParameters!==Q||$.comment!==G?jG(Z,Y,Q,G):$}function i5($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?EG(Z,Y,Q):$}function d5($,Z,Y){return $.tagName!==Z||$.comment!==Y?OG(Z,Y):$}function o5($,Z,Y){return $.tagName!==Z||$.comment!==Y?_G(Z,Y):$}function a5($,Z,Y){return $.tagName!==Z||$.comment!==Y?TG(Z,Y):$}function t5($,Z,Y){return $.tagName!==Z||$.comment!==Y?vG(Z,Y):$}function n5($,Z,Y){return $.tagName!==Z||$.comment!==Y?fG(Z,Y):$}function e5($,Z,Y){return $.tagName!==Z||$.comment!==Y?kG(Z,Y):$}function $7($,Z,Y,Q){return $.tagName!==Z||$.nameExpression!==Y||$.comment!==Q?CG(Z,Y,Q):$}function Z7($,Z,Y,Q){return $.tagName!==Z||$.className!==Y||$.comment!==Q?FG(Z,Y,Q):$}function Y7($,Z,Y,Q){return $.tagName!==Z||$.className!==Y||$.comment!==Q?hG(Z,Y,Q):$}function X7($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?NG(Z,Y,Q):$}function Q7($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?uG(Z,Y,Q):$}function G7($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?KG(Z,Y,Q):$}function J7($,Z,Y,Q,G,J){return $.tagName!==Z||$.importClause!==Y||$.moduleSpecifier!==Q||$.attributes!==G||$.comment!==J?bG(Z,Y,Q,G,J):$}function U7($,Z,Y,Q,G){return $.tagName!==Z||$.typeExpression!==Y||$.name!==Q||$.comment!==G?SG(Z,Y,Q,G):$}function W7($,Z,Y,Q){return $.tagName!==Z||$.typeExpression!==Y||$.comment!==Q?xG(Z,Y,Q):$}function V7($,Z,Y,Q,G){return $.tagName!==Z||$.typeExpression!==Y||$.name!==Q||$.comment!==G?gG(Z,Y,Q,G):$}function H7($,Z,Y,Q){return $.typeParameters!==Z||$.parameters!==Y||$.type!==Q?pG(Z,Y,Q):$}function z7($,Z){return $.name!==Z?yG(Z):$}function w7($,Z,Y,Q){return $.modifiers!==Z||$.name!==Y||$.body!==Q?mG(Z,$.keyword,Y,Q):$}function q7($,Z,Y,Q){return $.modifiers!==Z||$.name!==Y||$.moduleReference!==Q?cG(Z,$.isTypeOnly,Y,Q):$}function B7($,Z,Y,Q,G){return $.modifiers!==Z||$.exportClause!==Y||$.moduleSpecifier!==Q||$.attributes!==G?lG(Z,$.isTypeOnly,Y,Q,G):$}function L7($,Z,Y,Q,G){return $.argument!==Z||$.attributes!==Y||$.qualifier!==Q||$.typeArguments!==G?rG($.isTypeOf,Z,Y,Q,G):$}function A7($,Z,Y){return $.name!==Z||$.namedBindings!==Y?sG($.phaseModifier,Z,Y):$}function R7($,Z,Y){return $.propertyName!==Z||$.name!==Y?iG($.isTypeOnly,Z,Y):$}function I7($,Z){return $.name!==Z?dG(Z,$.text):$}function P7($,Z){return $.name!==Z?oG(Z,$.text):$}function D7($,Z){return $.name!==Z?aG(Z,$.text):$}function M7($,Z,Y,Q,G,J){return $.modifiers!==Z||$.name!==Y||$.constraint!==Q||$.expression!==G||$.defaultType!==J?tG(Z,Y,Q,G,J):$}function j7($,Z,Y){return $.expression!==Z||$.thisArg!==Y?nG(Z,Y):$}function E7($,Z){return $.jsdocPropertyTags!==Z?eG(Z,$.isArrayType):$}function O7($,Z,Y,Q,G){return $.awaitModifier!==Z||$.initializer!==Y||$.expression!==Q||$.statement!==G?$J(Z,Y,Q,G):$}function _7($,Z,Y,Q,G){return $.awaitModifier!==Z||$.initializer!==Y||$.expression!==Q||$.statement!==G?ZJ(Z,Y,Q,G):$}function T7($,Z,Y){return $.expression!==Z||$.statements!==Y?YJ(Z,Y):$}function v7($,Z,Y){return $.expression!==Z||$.statements!==Y?XJ(Z,Y):$}function f7($,Z){return $.elements!==Z?QJ(Z):$}function k7($,Z){return $.elements!==Z?GJ(Z):$}function F7($,Z,Y,Q,G){return $.tagName!==Z||$.name!==Y||$.typeExpression!==Q||$.comment!==G?JJ(Z,Y,$.isBracketed,Q,$.isNameFirst,G):$}function h7($,Z,Y,Q,G){return $.tagName!==Z||$.name!==Y||$.typeExpression!==Q||$.comment!==G?UJ(Z,Y,$.isBracketed,Q,$.isNameFirst,G):$}function WJ($,Z,Y){return new z(X.SourceFile,{...s6($),statements:w(Z),endOfFileToken:Y})}function C7($,Z,Y){return $.statements!==Z||$.endOfFileToken!==Y?WJ($,Z,Y):$}var N7={abstract:X.AbstractKeyword,accessor:X.AccessorKeyword,any:X.AnyKeyword,as:X.AsKeyword,asserts:X.AssertsKeyword,assert:X.AssertKeyword,bigint:X.BigIntKeyword,boolean:X.BooleanKeyword,break:X.BreakKeyword,case:X.CaseKeyword,catch:X.CatchKeyword,class:X.ClassKeyword,continue:X.ContinueKeyword,const:X.ConstKeyword,["constructor"]:X.ConstructorKeyword,debugger:X.DebuggerKeyword,declare:X.DeclareKeyword,default:X.DefaultKeyword,defer:X.DeferKeyword,delete:X.DeleteKeyword,do:X.DoKeyword,else:X.ElseKeyword,enum:X.EnumKeyword,export:X.ExportKeyword,extends:X.ExtendsKeyword,false:X.FalseKeyword,finally:X.FinallyKeyword,for:X.ForKeyword,from:X.FromKeyword,function:X.FunctionKeyword,get:X.GetKeyword,if:X.IfKeyword,implements:X.ImplementsKeyword,import:X.ImportKeyword,in:X.InKeyword,infer:X.InferKeyword,instanceof:X.InstanceOfKeyword,interface:X.InterfaceKeyword,intrinsic:X.IntrinsicKeyword,is:X.IsKeyword,keyof:X.KeyOfKeyword,let:X.LetKeyword,module:X.ModuleKeyword,namespace:X.NamespaceKeyword,never:X.NeverKeyword,new:X.NewKeyword,null:X.NullKeyword,number:X.NumberKeyword,object:X.ObjectKeyword,package:X.PackageKeyword,private:X.PrivateKeyword,protected:X.ProtectedKeyword,public:X.PublicKeyword,override:X.OverrideKeyword,out:X.OutKeyword,readonly:X.ReadonlyKeyword,require:X.RequireKeyword,global:X.GlobalKeyword,return:X.ReturnKeyword,satisfies:X.SatisfiesKeyword,set:X.SetKeyword,static:X.StaticKeyword,string:X.StringKeyword,super:X.SuperKeyword,switch:X.SwitchKeyword,symbol:X.SymbolKeyword,this:X.ThisKeyword,throw:X.ThrowKeyword,true:X.TrueKeyword,try:X.TryKeyword,type:X.TypeKeyword,typeof:X.TypeOfKeyword,undefined:X.UndefinedKeyword,unique:X.UniqueKeyword,unknown:X.UnknownKeyword,using:X.UsingKeyword,var:X.VarKeyword,void:X.VoidKeyword,while:X.WhileKeyword,with:X.WithKeyword,yield:X.YieldKeyword,async:X.AsyncKeyword,await:X.AwaitKeyword,of:X.OfKeyword},iW=new Map(Object.entries(N7)),VJ=new Map(Object.entries({...N7,"{":X.OpenBraceToken,"}":X.CloseBraceToken,"(":X.OpenParenToken,")":X.CloseParenToken,"[":X.OpenBracketToken,"]":X.CloseBracketToken,".":X.DotToken,"...":X.DotDotDotToken,";":X.SemicolonToken,",":X.CommaToken,"<":X.LessThanToken,">":X.GreaterThanToken,"<=":X.LessThanEqualsToken,">=":X.GreaterThanEqualsToken,"==":X.EqualsEqualsToken,"!=":X.ExclamationEqualsToken,"===":X.EqualsEqualsEqualsToken,"!==":X.ExclamationEqualsEqualsToken,"=>":X.EqualsGreaterThanToken,"+":X.PlusToken,"-":X.MinusToken,"**":X.AsteriskAsteriskToken,"*":X.AsteriskToken,"/":X.SlashToken,"%":X.PercentToken,"++":X.PlusPlusToken,"--":X.MinusMinusToken,"<<":X.LessThanLessThanToken,"</":X.LessThanSlashToken,">>":X.GreaterThanGreaterThanToken,">>>":X.GreaterThanGreaterThanGreaterThanToken,"&":X.AmpersandToken,"|":X.BarToken,"^":X.CaretToken,"!":X.ExclamationToken,"~":X.TildeToken,"&&":X.AmpersandAmpersandToken,"||":X.BarBarToken,"?":X.QuestionToken,"??":X.QuestionQuestionToken,"?.":X.QuestionDotToken,":":X.ColonToken,"=":X.EqualsToken,"+=":X.PlusEqualsToken,"-=":X.MinusEqualsToken,"*=":X.AsteriskEqualsToken,"**=":X.AsteriskAsteriskEqualsToken,"/=":X.SlashEqualsToken,"%=":X.PercentEqualsToken,"<<=":X.LessThanLessThanEqualsToken,">>=":X.GreaterThanGreaterThanEqualsToken,">>>=":X.GreaterThanGreaterThanGreaterThanEqualsToken,"&=":X.AmpersandEqualsToken,"|=":X.BarEqualsToken,"^=":X.CaretEqualsToken,"||=":X.BarBarEqualsToken,"&&=":X.AmpersandAmpersandEqualsToken,"??=":X.QuestionQuestionEqualsToken,"@":X.AtToken,"#":X.HashToken,"`":X.BacktickToken})),dW=new Map([[D.d,q0.HasIndices],[D.g,q0.Global],[D.i,q0.IgnoreCase],[D.m,q0.Multiline],[D.s,q0.DotAll],[D.u,q0.Unicode],[D.v,q0.UnicodeSets],[D.y,q0.Sticky]]);function HJ($){let Z=[];return $.forEach((Y,Q)=>{Z[Y]=Q}),Z}var oW=HJ(VJ);function u7($){let Z=[],Y=0,Q=0;while(Y<$.length){let G=$.charCodeAt(Y);switch(Y++,G){case D.carriageReturn:if($.charCodeAt(Y)===D.lineFeed)Y++;case D.lineFeed:Z.push(Q),Q=Y;break;default:if(G>D.maxAsciiCharacter&&J$(G))Z.push(Q),Q=Y;break}}return Z.push(Q),Z}function zJ($){return wJ($)||J$($)}function wJ($){return $===D.space||$===D.tab||$===D.verticalTab||$===D.formFeed||$===D.nonBreakingSpace||$===D.nextLine||$===D.ogham||$>=D.enQuad&&$<=D.zeroWidthSpace||$===D.narrowNoBreakSpace||$===D.mathematicalSpace||$===D.ideographicSpace||$===D.byteOrderMark}function J$($){return $===D.lineFeed||$===D.carriageReturn||$===D.lineSeparator||$===D.paragraphSeparator}function pZ($,Z,Y,Q,G){if(Z<0)return Z;let J=!1;while(!0){let V=$.charCodeAt(Z);switch(V){case D.carriageReturn:if($.charCodeAt(Z+1)===D.lineFeed)Z++;case D.lineFeed:if(Z++,Y)return Z;J=!!G;continue;case D.tab:case D.verticalTab:case D.formFeed:case D.space:Z++;continue;case D.slash:if(Q)break;if($.charCodeAt(Z+1)===D.slash){Z+=2;while(Z<$.length){if(J$($.charCodeAt(Z)))break;Z++}J=!1;continue}if($.charCodeAt(Z+1)===D.asterisk){Z+=2;while(Z<$.length){if($.charCodeAt(Z)===D.asterisk&&$.charCodeAt(Z+1)===D.slash){Z+=2;break}Z++}J=!1;continue}break;case D.lessThan:case D.bar:case D.equals:case D.greaterThan:if(K7($,Z)){Z=qJ($,Z),J=!1;continue}break;case D.hash:if(Z===0&&BJ($,Z)){Z=LJ($,Z);continue}break;case D.asterisk:if(J){Z++,J=!1;continue}break;default:if(V>D.maxAsciiCharacter&&zJ(V)){Z++;continue}break}return Z}}function K7($,Z){if(Z>=$.length)return!1;let Y=$.charCodeAt(Z);if(Z===0||J$($.charCodeAt(Z-1))){if(Y===D.lessThan||Y===D.greaterThan||Y===D.equals){if(Z+6<$.length&&$.charCodeAt(Z+1)===Y&&$.charCodeAt(Z+2)===Y&&$.charCodeAt(Z+3)===Y&&$.charCodeAt(Z+4)===Y&&$.charCodeAt(Z+5)===Y&&$.charCodeAt(Z+6)===Y)return Y===D.equals||$.charCodeAt(Z+7)===D.space}if(Y===D.bar&&Z+6<$.length&&$.charCodeAt(Z+1)===Y&&$.charCodeAt(Z+2)===Y&&$.charCodeAt(Z+3)===Y&&$.charCodeAt(Z+4)===Y&&$.charCodeAt(Z+5)===Y&&$.charCodeAt(Z+6)===Y)return!0}return!1}function qJ($,Z){let Y=$.charCodeAt(Z),Q=$.length;if(Y===D.lessThan||Y===D.greaterThan)while(Z<Q&&!J$($.charCodeAt(Z)))Z++;else{Z+=7;while(Z<Q){let G=$.charCodeAt(Z);if((G===D.equals||G===D.greaterThan)&&K7($,Z))break;Z++}}return Z}function BJ($,Z){return Z===0&&$.charCodeAt(0)===D.hash&&$.charCodeAt(1)===D.exclamation}function LJ($,Z){Z+=2;while(Z<$.length){if(J$($.charCodeAt(Z)))break;Z++}return Z}function f$($,Z,Y){if(RJ($))return $.pos;if(w4($.kind)||$.kind===X.JsxText)return pZ(Z.text,$.pos,!1,!0);if(Y&&$.jsDoc&&$.jsDoc.length>0)return f$($.jsDoc[0],Z,!1);return pZ(Z.text,$.pos,!1,!1,!!($.flags&E0.JSDoc))}function RJ($){return $.pos===$.end&&$.pos>=0&&$.kind!==X.EndOfFile}var r0={[X.QualifiedName]:["left","right"],[X.ComputedPropertyName]:["expression"],[X.Decorator]:["expression"],[X.IfStatement]:["expression","thenStatement","elseStatement"],[X.DoStatement]:["statement","expression"],[X.WhileStatement]:["expression","statement"],[X.ForStatement]:["initializer","condition","incrementor","statement"],[X.ForInStatement]:["awaitModifier","initializer","expression","statement"],[X.ForOfStatement]:["awaitModifier","initializer","expression","statement"],[X.BreakStatement]:["label"],[X.ContinueStatement]:["label"],[X.ReturnStatement]:["expression"],[X.WithStatement]:["expression","statement"],[X.SwitchStatement]:["expression","caseBlock"],[X.CaseBlock]:["clauses"],[X.CaseClause]:["expression","statements"],[X.DefaultClause]:["expression","statements"],[X.ThrowStatement]:["expression"],[X.TryStatement]:["tryBlock","catchClause","finallyBlock"],[X.CatchClause]:["variableDeclaration","block"],[X.LabeledStatement]:["label","statement"],[X.ExpressionStatement]:["expression"],[X.Block]:["statements"],[X.VariableStatement]:["modifiers","declarationList"],[X.VariableDeclaration]:["name","exclamationToken","type","initializer"],[X.VariableDeclarationList]:["declarations"],[X.ObjectBindingPattern]:["elements"],[X.ArrayBindingPattern]:["elements"],[X.Parameter]:["modifiers","dotDotDotToken","name","questionToken","type","initializer"],[X.BindingElement]:["dotDotDotToken","propertyName","name","initializer"],[X.MissingDeclaration]:["modifiers"],[X.FunctionDeclaration]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[X.ClassDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[X.ClassExpression]:["modifiers","name","typeParameters","heritageClauses","members"],[X.HeritageClause]:["types"],[X.InterfaceDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[X.TypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[X.JSTypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[X.EnumMember]:["name","initializer"],[X.EnumDeclaration]:["modifiers","name","members"],[X.ModuleBlock]:["statements"],[X.ImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[X.JSImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[X.ExternalModuleReference]:["expression"],[X.NamespaceImport]:["name"],[X.NamedImports]:["elements"],[X.ExportAssignment]:["modifiers","type","expression"],[X.NamespaceExportDeclaration]:["modifiers","name"],[X.NamespaceExport]:["name"],[X.NamedExports]:["elements"],[X.ExportSpecifier]:["propertyName","name"],[X.CallSignature]:["typeParameters","parameters","type"],[X.ConstructSignature]:["typeParameters","parameters","type"],[X.Constructor]:["modifiers","typeParameters","parameters","type","body"],[X.GetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[X.SetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[X.IndexSignature]:["modifiers","parameters","type"],[X.MethodSignature]:["modifiers","name","postfixToken","typeParameters","parameters","type"],[X.MethodDeclaration]:["modifiers","asteriskToken","name","postfixToken","typeParameters","parameters","type","body"],[X.PropertySignature]:["modifiers","name","postfixToken","type","initializer"],[X.PropertyDeclaration]:["modifiers","name","postfixToken","type","initializer"],[X.ClassStaticBlockDeclaration]:["modifiers","body"],[X.BinaryExpression]:["modifiers","left","type","operatorToken","right"],[X.PrefixUnaryExpression]:["operand"],[X.PostfixUnaryExpression]:["operand"],[X.YieldExpression]:["asteriskToken","expression"],[X.ArrowFunction]:["modifiers","typeParameters","parameters","type","equalsGreaterThanToken","body"],[X.FunctionExpression]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[X.AsExpression]:["expression","type"],[X.SatisfiesExpression]:["expression","type"],[X.ConditionalExpression]:["condition","questionToken","whenTrue","colonToken","whenFalse"],[X.PropertyAccessExpression]:["expression","questionDotToken","name"],[X.ElementAccessExpression]:["expression","questionDotToken","argumentExpression"],[X.CallExpression]:["expression","questionDotToken","typeArguments","arguments"],[X.NewExpression]:["expression","typeArguments","arguments"],[X.MetaProperty]:["name"],[X.NonNullExpression]:["expression"],[X.SpreadElement]:["expression"],[X.TemplateExpression]:["head","templateSpans"],[X.TemplateSpan]:["expression","literal"],[X.TaggedTemplateExpression]:["tag","questionDotToken","typeArguments","template"],[X.ParenthesizedExpression]:["expression"],[X.ArrayLiteralExpression]:["elements"],[X.ObjectLiteralExpression]:["properties"],[X.SpreadAssignment]:["expression"],[X.PropertyAssignment]:["modifiers","name","postfixToken","type","initializer"],[X.ShorthandPropertyAssignment]:["modifiers","name","postfixToken","type","equalsToken","objectAssignmentInitializer"],[X.DeleteExpression]:["expression"],[X.TypeOfExpression]:["expression"],[X.VoidExpression]:["expression"],[X.AwaitExpression]:["expression"],[X.TypeAssertionExpression]:["type","expression"],[X.UnionType]:["types"],[X.IntersectionType]:["types"],[X.ConditionalType]:["checkType","extendsType","trueType","falseType"],[X.TypeOperator]:["type"],[X.InferType]:["typeParameter"],[X.ArrayType]:["elementType"],[X.IndexedAccessType]:["objectType","indexType"],[X.TypeReference]:["typeName","typeArguments"],[X.ExpressionWithTypeArguments]:["expression","typeArguments"],[X.LiteralType]:["literal"],[X.TypePredicate]:["assertsModifier","parameterName","type"],[X.ImportAttribute]:["name","value"],[X.ImportAttributes]:["attributes"],[X.TypeQuery]:["exprName","typeArguments"],[X.MappedType]:["readonlyToken","typeParameter","nameType","questionToken","type","members"],[X.TypeLiteral]:["members"],[X.TupleType]:["elements"],[X.NamedTupleMember]:["dotDotDotToken","name","questionToken","type"],[X.OptionalType]:["type"],[X.RestType]:["type"],[X.ParenthesizedType]:["type"],[X.FunctionType]:["typeParameters","parameters","type"],[X.ConstructorType]:["modifiers","typeParameters","parameters","type"],[X.TemplateLiteralType]:["head","templateSpans"],[X.TemplateLiteralTypeSpan]:["type","literal"],[X.SyntheticExpression]:["tupleNameSource"],[X.PartiallyEmittedExpression]:["expression"],[X.JsxElement]:["openingElement","children","closingElement"],[X.JsxAttributes]:["properties"],[X.JsxNamespacedName]:["namespace","name"],[X.JsxOpeningElement]:["tagName","typeArguments","attributes"],[X.JsxSelfClosingElement]:["tagName","typeArguments","attributes"],[X.JsxFragment]:["openingFragment","children","closingFragment"],[X.JsxAttribute]:["name","initializer"],[X.JsxSpreadAttribute]:["expression"],[X.JsxClosingElement]:["tagName"],[X.JsxExpression]:["dotDotDotToken","expression"],[X.SyntaxList]:["children"],[X.JSDoc]:["comment","tags"],[X.JSDocTypeExpression]:["type"],[X.JSDocNonNullableType]:["type"],[X.JSDocNullableType]:["type"],[X.JSDocVariadicType]:["type"],[X.JSDocOptionalType]:["type"],[X.JSDocTypeTag]:["tagName","typeExpression","comment"],[X.JSDocUnknownTag]:["tagName","comment"],[X.JSDocTemplateTag]:["tagName","constraint","typeParameters","comment"],[X.JSDocReturnTag]:["tagName","typeExpression","comment"],[X.JSDocPublicTag]:["tagName","comment"],[X.JSDocPrivateTag]:["tagName","comment"],[X.JSDocProtectedTag]:["tagName","comment"],[X.JSDocReadonlyTag]:["tagName","comment"],[X.JSDocOverrideTag]:["tagName","comment"],[X.JSDocDeprecatedTag]:["tagName","comment"],[X.JSDocSeeTag]:["tagName","nameExpression","comment"],[X.JSDocImplementsTag]:["tagName","className","comment"],[X.JSDocAugmentsTag]:["tagName","className","comment"],[X.JSDocSatisfiesTag]:["tagName","typeExpression","comment"],[X.JSDocThrowsTag]:["tagName","typeExpression","comment"],[X.JSDocThisTag]:["tagName","typeExpression","comment"],[X.JSDocImportTag]:["tagName","importClause","moduleSpecifier","attributes","comment"],[X.JSDocCallbackTag]:["tagName","typeExpression","name","comment"],[X.JSDocOverloadTag]:["tagName","typeExpression","comment"],[X.JSDocTypedefTag]:["tagName","typeExpression","name","comment"],[X.JSDocSignature]:["typeParameters","parameters","type"],[X.JSDocNameReference]:["name"],[X.SourceFile]:["statements","endOfFileToken"],[X.ModuleDeclaration]:["modifiers","name","body"],[X.ImportEqualsDeclaration]:["modifiers","name","moduleReference"],[X.ExportDeclaration]:["modifiers","exportClause","moduleSpecifier","attributes"],[X.ImportType]:["argument","attributes","qualifier","typeArguments"],[X.ImportClause]:["name","namedBindings"],[X.ImportSpecifier]:["propertyName","name"],[X.JSDocLink]:["name"],[X.JSDocLinkPlain]:["name"],[X.JSDocLinkCode]:["name"],[X.TypeParameter]:["modifiers","name","constraint","expression","defaultType"],[X.SyntheticReferenceExpression]:["expression","thisArg"],[X.JSDocTypeLiteral]:["jsdocPropertyTags"],[X.JSDocParameterTag]:["tagName","name","typeExpression","comment"],[X.JSDocPropertyTag]:["tagName","name","typeExpression","comment"]},IJ={[X.ComputedPropertyName]:"expression",[X.Decorator]:"expression",[X.BreakStatement]:"label",[X.ContinueStatement]:"label",[X.ReturnStatement]:"expression",[X.CaseBlock]:"clauses",[X.ThrowStatement]:"expression",[X.ExpressionStatement]:"expression",[X.Block]:"statements",[X.VariableDeclarationList]:"declarations",[X.ObjectBindingPattern]:"elements",[X.ArrayBindingPattern]:"elements",[X.MissingDeclaration]:"modifiers",[X.HeritageClause]:"types",[X.ModuleBlock]:"statements",[X.ExternalModuleReference]:"expression",[X.NamespaceImport]:"name",[X.NamedImports]:"elements",[X.NamespaceExport]:"name",[X.NamedExports]:"elements",[X.PrefixUnaryExpression]:"operand",[X.PostfixUnaryExpression]:"operand",[X.MetaProperty]:"name",[X.NonNullExpression]:"expression",[X.SpreadElement]:"expression",[X.ParenthesizedExpression]:"expression",[X.ArrayLiteralExpression]:"elements",[X.ObjectLiteralExpression]:"properties",[X.SpreadAssignment]:"expression",[X.DeleteExpression]:"expression",[X.TypeOfExpression]:"expression",[X.VoidExpression]:"expression",[X.AwaitExpression]:"expression",[X.UnionType]:"types",[X.IntersectionType]:"types",[X.TypeOperator]:"type",[X.InferType]:"typeParameter",[X.ArrayType]:"elementType",[X.LiteralType]:"literal",[X.ImportAttributes]:"attributes",[X.TypeLiteral]:"members",[X.TupleType]:"elements",[X.OptionalType]:"type",[X.RestType]:"type",[X.ParenthesizedType]:"type",[X.SyntheticExpression]:"tupleNameSource",[X.PartiallyEmittedExpression]:"expression",[X.JsxAttributes]:"properties",[X.JsxSpreadAttribute]:"expression",[X.JsxClosingElement]:"tagName",[X.SyntaxList]:"children",[X.JSDocTypeExpression]:"type",[X.JSDocNonNullableType]:"type",[X.JSDocNullableType]:"type",[X.JSDocVariadicType]:"type",[X.JSDocOptionalType]:"type",[X.JSDocNameReference]:"name",[X.JSDocLink]:"name",[X.JSDocLinkPlain]:"name",[X.JSDocLinkCode]:"name",[X.JSDocTypeLiteral]:"jsdocPropertyTags"};var b7=5,S7=0,x7=4,g7=8,p7=12,y7=16,m7=20,a$=24,t$=28,n$=32,e$=36,$Z=40,k$=44,t=28,s0=0,ZZ=4,YZ=8,U$=12,i0=16,XZ=20,c7=24,d0=4294967295,F0=0,o0=1073741824,W$=2147483648;function l7($){switch($){case X.Identifier:case X.PrivateIdentifier:case X.JsxText:case X.JSDocText:case X.JSDocLink:case X.JSDocLinkPlain:case X.JSDocLinkCode:return o0;case X.StringLiteral:case X.NumericLiteral:case X.BigIntLiteral:case X.RegularExpressionLiteral:case X.NoSubstitutionTemplateLiteral:case X.TemplateHead:case X.TemplateMiddle:case X.TemplateTail:case X.SourceFile:return W$;default:return F0}}function r7($){switch($.kind){case X.Block:return($.multiLine?1:0)<<24;case X.HeritageClause:return($.token===X.ImplementsKeyword?1:0)<<24;case X.ExportAssignment:return($.isExportEquals?1:0)<<24;case X.ExportSpecifier:return($.isTypeOnly?1:0)<<24;case X.PrefixUnaryExpression:return($.operator===X.MinusToken?1:$.operator===X.TildeToken?2:$.operator===X.ExclamationToken?3:$.operator===X.PlusPlusToken?4:$.operator===X.MinusMinusToken?5:0)<<24;case X.PostfixUnaryExpression:return($.operator===X.MinusMinusToken?1:0)<<24;case X.MetaProperty:return($.keywordToken===X.NewKeyword?1:0)<<24;case X.ArrayLiteralExpression:return($.multiLine?1:0)<<24;case X.ObjectLiteralExpression:return($.multiLine?1:0)<<24;case X.TypeOperator:return($.operator===X.ReadonlyKeyword?1:$.operator===X.UniqueKeyword?2:0)<<24;case X.ImportAttributes:return($.multiLine?1:0)<<24|($.token===X.AssertKeyword?1:0)<<25;case X.JsxText:return($.containsOnlyTriviaWhiteSpaces?1:0)<<24;case X.ModuleDeclaration:return($.keyword===X.NamespaceKeyword?1:0)<<24;case X.ImportEqualsDeclaration:return($.isTypeOnly?1:0)<<24;case X.ExportDeclaration:return($.isTypeOnly?1:0)<<24;case X.ImportType:return($.isTypeOf?1:0)<<24;case X.ImportClause:return($.phaseModifier===X.TypeKeyword?1:$.phaseModifier===X.DeferKeyword?2:0)<<24;case X.ImportSpecifier:return($.isTypeOnly?1:0)<<24;case X.JSDocTypeLiteral:return($.isArrayType?1:0)<<24;case X.JSDocParameterTag:case X.JSDocPropertyTag:return($.isBracketed?1:0)<<24|($.isNameFirst?1:0)<<25}return 0}import{Buffer as PJ}from"node:buffer";var s7=237,DJ=160,MJ=191,jJ=128,EJ=191;function OJ($,Z){return Z+2<$.length&&$[Z]===s7&&$[Z+1]>=DJ&&$[Z+1]<=MJ&&$[Z+2]>=jJ&&$[Z+2]<=EJ}function _J($,Z){return 53248|($[Z+1]&63)<<6|$[Z+2]&63}function TJ($){return PJ.from($.buffer,$.byteOffset,$.byteLength).indexOf(s7)>=0}function vJ($){if($ instanceof Uint8Array)return $;if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength);return new Uint8Array($)}class a0 extends TextDecoder{decode($,Z){if($===void 0)return super.decode($,Z);let Y=vJ($);if(!TJ(Y))return super.decode(Y,Z);let Q=[],G=0;for(let J=0;J<Y.length;J++){if(!OJ(Y,J))continue;if(G<J)Q.push(super.decode(Y.subarray(G,J),Z));Q.push(String.fromCharCode(_J(Y,J))),J+=2,G=J+1}if(G===0)return super.decode(Y,Z);if(G<Y.length)Q.push(super.decode(Y.subarray(G),Z));return Q.join("")}}var fJ=new TextEncoder,kJ=new a0;class yZ{buf;view;pos;constructor($=256){this.buf=new Uint8Array($),this.view=new DataView(this.buf.buffer),this.pos=0}ensure($){if(this.pos+$>this.buf.length){let Z=this.buf.length*2;while(Z<this.pos+$)Z*=2;let Y=new Uint8Array(Z);Y.set(this.buf),this.buf=Y,this.view=new DataView(this.buf.buffer)}}writeArrayHeader($){if($<=15)this.ensure(1),this.buf[this.pos++]=144|$;else if($<=65535)this.ensure(3),this.buf[this.pos++]=220,this.view.setUint16(this.pos,$,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=221,this.view.setUint32(this.pos,$,!1),this.pos+=4}writeUint($){if($<=127)this.ensure(1),this.buf[this.pos++]=$;else if($<=255)this.ensure(2),this.buf[this.pos++]=204,this.buf[this.pos++]=$;else if($<=65535)this.ensure(3),this.buf[this.pos++]=205,this.view.setUint16(this.pos,$,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=206,this.view.setUint32(this.pos,$,!1),this.pos+=4}writeString($){let Z=fJ.encode($),Y=Z.length;if(Y<=31)this.ensure(1+Y),this.buf[this.pos++]=160|Y;else if(Y<=255)this.ensure(2+Y),this.buf[this.pos++]=217,this.buf[this.pos++]=Y;else if(Y<=65535)this.ensure(3+Y),this.buf[this.pos++]=218,this.view.setUint16(this.pos,Y,!1),this.pos+=2;else this.ensure(5+Y),this.buf[this.pos++]=219,this.view.setUint32(this.pos,Y,!1),this.pos+=4;this.buf.set(Z,this.pos),this.pos+=Y}writeBool($){this.ensure(1),this.buf[this.pos++]=$?195:194}finish(){return this.buf.subarray(0,this.pos)}}class C${buf;view;pos;constructor($,Z=0){this.buf=$,this.view=new DataView($.buffer,$.byteOffset,$.byteLength),this.pos=Z}readArrayHeader(){let $=this.buf[this.pos++];if(($&240)===144)return $&15;if($===220){let Z=this.view.getUint16(this.pos,!1);return this.pos+=2,Z}if($===221){let Z=this.view.getUint32(this.pos,!1);return this.pos+=4,Z}throw Error(`Expected array header, got 0x${$.toString(16)}`)}readUint(){let $=this.buf[this.pos++];if($<=127)return $;if($===204)return this.buf[this.pos++];if($===205){let Z=this.view.getUint16(this.pos,!1);return this.pos+=2,Z}if($===206){let Z=this.view.getUint32(this.pos,!1);return this.pos+=4,Z}throw Error(`Expected uint, got 0x${$.toString(16)}`)}readString(){let $=this.buf[this.pos++],Z;if(($&224)===160)Z=$&31;else if($===217)Z=this.buf[this.pos++];else if($===218)Z=this.view.getUint16(this.pos,!1),this.pos+=2;else if($===219)Z=this.view.getUint32(this.pos,!1),this.pos+=4;else throw Error(`Expected string, got 0x${$.toString(16)}`);let Y=kJ.decode(this.buf.subarray(this.pos,this.pos+Z));return this.pos+=Z,Y}readBool(){let $=this.buf[this.pos++];if($===195)return!0;if($===194)return!1;throw Error(`Expected bool, got 0x${$.toString(16)}`)}}var i7=t/4,d7=3,QZ=4294967295;class t7{parts;byteLen;offsets;constructor(){this.parts=[],this.byteLen=0,this.offsets=[]}add($){let Z=this.offsets.length,Q=o7().encode($).length,G=this.byteLen;return this.parts.push($),this.byteLen+=Q,this.offsets.push(G,G+Q),Z}encode(){let Z=o7().encode(this.parts.join("")),Y=new Uint8Array(this.offsets.length*4),Q=new DataView(Y.buffer);for(let J=0;J<this.offsets.length;J++)Q.setUint32(J*4,this.offsets[J],!0);let G=new Uint8Array(Y.length+Z.length);return G.set(Y,0),G.set(Z,Y.length),G}stringByteLength(){return this.byteLen}offsetsCount(){return this.offsets.length}}var CJ;function o7(){return CJ??=new TextEncoder}function FJ($){let Z=$.kind,Y=r0[Z];if(!Y)return 0;let Q=$,G=0;for(let J=0;J<Y.length;J++){let V=Y[J];if(V!==void 0&&hJ(Q[V]))G|=1<<J}return G}function hJ($){if($===void 0||$===null)return!1;return!0}function NJ($,Z){return Z.add($.text??"")}function mZ($,Z){if(!$||$.length===0)return QZ;let Y=Z.finish().length;Z.writeArrayHeader($.length);for(let Q of $)Z.writeArrayHeader(5),Z.writeUint(Q.pos),Z.writeUint(Q.end),Z.writeString(Q.fileName),Z.writeUint(Q.resolutionMode??0),Z.writeBool(Q.preserve??!1);return Y}function uJ($,Z,Y,Q){let G=Y.length*4;if($.kind===X.SourceFile){let J=$,V=Z.add(J.text),L=Z.add(J.fileName),P=Z.add(J.path),_=mZ(J.referencedFiles,Q),k=mZ(J.typeReferenceDirectives,Q),x=mZ(J.libReferenceDirectives,Q);Y.push(V,L,P,J.languageVariant,J.scriptKind,_,k,x,QZ,QZ,QZ,0)}else if($.kind===X.TemplateHead||$.kind===X.TemplateMiddle||$.kind===X.TemplateTail){let J=$,V=J.text??"",L=J.rawText??"",P=J.templateFlags??0,_=Z.add(V),k=Z.add(L);Y.push(_,k,P)}else{let J=$,V=J.text??"",L=J.tokenFlags??0,P=Z.add(V);Y.push(P,L)}return G}function a7($,Z,Y,Q){let G=l7($.kind),J=r7($);switch(G){case F0:return G|J|FJ($);case o0:return G|J|NJ($,Z);case W$:return G|J|uJ($,Z,Y,Q);default:throw Error("unreachable")}}function KJ($){return r0[$.kind]}function bJ($){return Array.isArray($)&&typeof $.pos==="number"&&typeof $.end==="number"}function n7($){let Z=new t7,Y=[],Q=new yZ,G=[];G.push(0,0,0,0,0,0,0);let J=0,V=0,L=0;function P(F){J++;let W0=J;if(L!==0)G[L*i7+d7]=W0;let Q0=a7(F,Z,Y,Q);G.push(F.kind,F.pos>=0?F.pos:0,F.end>=0?F.end:0,0,V,Q0,F.flags);let f0=V,k0=L;V=W0,L=0,k(F),L=W0,V=f0}function _(F){if(!F)return;J++;let W0=J;if(L!==0)G[L*i7+d7]=W0;G.push(d0,F.pos>=0?F.pos:0,F.end>=0?F.end:0,0,V,F.length,0);let Q0=V;V=W0,L=0;for(let f0 of F)P(f0);L=W0,V=Q0}function k(F){let W0=KJ(F),Q0=F;if(W0)for(let f0 of W0){if(f0===void 0)continue;let k0=Q0[f0];if(k0===void 0||k0===null)continue;if(bJ(k0))_(k0);else P(k0)}}J++,V++;let x=a7($,Z,Y,Q);G.push($.kind,$.pos>=0?$.pos:0,$.end>=0?$.end:0,0,0,x,$.flags);let K=V;L=0,V=1,k($),V=K;let i=new Uint8Array(Y.length*4),U0=new DataView(i.buffer);for(let F=0;F<Y.length;F++)U0.setUint32(F*4,Y[F],!0);let T0=Q.finish(),e0=Z.encode(),B0=new Uint8Array(G.length*4),D0=new DataView(B0.buffer);for(let F=0;F<G.length;F++)D0.setUint32(F*4,G[F]>>>0,!0);let $$=k$,u0=k$+Z.offsetsCount()*4,u=u0+Z.stringByteLength(),L0=u+i.length,c=L0+T0.length,w0=new Uint8Array(k$),M0=new DataView(w0.buffer),g$=b7<<24;M0.setUint32(S7,g$,!0),M0.setUint32(a$,$$,!0),M0.setUint32(t$,u0,!0),M0.setUint32(n$,u,!0),M0.setUint32(e$,L0,!0),M0.setUint32($Z,c,!0);let v0=new Uint8Array(w0.length+e0.length+i.length+T0.length+B0.length);return v0.set(w0,0),v0.set(e0,k$),v0.set(i,u),v0.set(T0,L0),v0.set(B0,c),v0}function e7($){return Buffer.from($).toString("base64")}var $Y=[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],ZY=3221225472,YY=255,XY=16777215,t0=16777215;function cZ($){let Z=$.getUint32(x7,!0),Y=$.getUint32(g7,!0),Q=$.getUint32(p7,!0),G=$.getUint32(y7,!0);return GZ(G)+GZ(Q)+GZ(Y)+GZ(Z)}function lZ($){return $.getUint32(m7,!0).toString()}function GZ($){return($>>>0).toString(16).padStart(8,"0")}function QY($){switch($){case X.StaticKeyword:return g.Static;case X.PublicKeyword:return g.Public;case X.ProtectedKeyword:return g.Protected;case X.PrivateKeyword:return g.Private;case X.AbstractKeyword:return g.Abstract;case X.AccessorKeyword:return g.Accessor;case X.ExportKeyword:return g.Export;case X.DeclareKeyword:return g.Ambient;case X.ConstKeyword:return g.Const;case X.DefaultKeyword:return g.Default;case X.AsyncKeyword:return g.Async;case X.ReadonlyKeyword:return g.Readonly;case X.OverrideKeyword:return g.Override;case X.InKeyword:return g.In;case X.OutKeyword:return g.Out;case X.Decorator:return g.Decorator;default:return g.None}}class JZ{parent;view;index;_byteIndex;constructor($,Z,Y,Q){this.view=$,this.index=Z,this.parent=Y,this._byteIndex=Q}get kind(){return this.view.getUint32(this._byteIndex+s0,!0)}get pos(){return this.view.getInt32(this._byteIndex+ZZ,!0)}get end(){return this.view.getInt32(this._byteIndex+YZ,!0)}get next(){return this.view.getUint32(this._byteIndex+U$,!0)}get parentIndex(){return this.view.getUint32(this._byteIndex+i0,!0)}get data(){return this.view.getUint32(this._byteIndex+XZ,!0)}get dataType(){return this.data&ZY}get childMask(){if(this.dataType!==F0)return-1;return this.data&YY}getFileText($,Z){return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer,this.view.byteOffset+this.sourceFile._offsetStringTable+$,Z-$))}get sourceFile(){throw Error("sourceFile not available on base")}}class V$ 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+ZZ,!0)}get end(){return this.view.getUint32(this._byteIndex+YZ,!0)}get next(){return this.view.getUint32(this._byteIndex+U$,!0)}get data(){return this.view.getUint32(this._byteIndex+XZ,!0)}sourceFile;constructor($,Z,Y,Q,G){super();this.view=$,this.index=Z,this.parent=Y,this.sourceFile=Q,this._byteIndex=G+Z*t,this.length=this.data,this._cursorNodeIndex=Z+1;let J=this.length;for(let V=16;V<J;V++)Object.defineProperty(this,V,{get(){return this.at(V)}})}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 $=this.index+1;while($){let Z=this.getOrCreateChildAtNodeIndex($);$=Z.next,yield Z}}forEachNode($){if(!this.length)return;let Z=this.index+1;while(Z){let Y=this.getOrCreateChildAtNodeIndex(Z);Z=Y.next;let Q=$(Y);if(Q)return Q}}at($){if(!Number.isInteger($))return;if($>=this.data||$<0&&-$>this.data)return;if($<0)$=this.length+$;let Z=this.sourceFile._offsetNodes,Y,Q;if($>=this._cursorIndex)Y=this._cursorIndex,Q=this._cursorNodeIndex;else Y=0,Q=this.index+1;for(;Y<$;Y++)Q=this.view.getUint32(Z+Q*t+U$,!0);return this._cursorIndex=$,this._cursorNodeIndex=Q,this.getOrCreateChildAtNodeIndex(Q)}getOrCreateChildAtNodeIndex($){let Z=this.sourceFile.nodes[$];if(!Z){if(this.view.getUint32(this.sourceFile._offsetNodes+$*t+s0,!0)===d0)throw Error("NodeList cannot directly contain another NodeList");let Q=this.sourceFile;Z=new S0(this.view,$,this.parent,Q,Q._offsetNodes),Q.nodes[$]=Z,Q._timing?.recordMaterialization()}return Z}__print(){let $=[];return $.push("kind: NodeList"),$.push(`index: ${this.index}`),$.push(`byteIndex: ${this._byteIndex}`),$.push(`length: ${this.length}`),$.join(`
8
+ `)}}class S0 extends JZ{static NODE_LEN=t;get sourceFile(){return this._sourceFile}_sourceFile;get id(){return`${this.index}.${this.kind}.${this.sourceFile.path}`}constructor($,Z,Y,Q,G){super($,Z,Y,G+Z*t);this._sourceFile=Q}forEachChild($,Z){if(this.hasChildren()){let Y=this.index+1;do{let Q=this.getOrCreateChildAtNodeIndex(Y);if(Q instanceof V$)if(Z){let G=Z(Q);if(G)return G}else{let G=Q.forEachNode($);if(G)return G}else if(Q.kind!==X.JSDoc){let G=$(Q);if(G)return G}Y=Q.next}while(Y)}}get jsDoc(){if(!this.hasChildren())return;let $,Z=this.index+1;do{let Y=this.getOrCreateChildAtNodeIndex(Z);if(!(Y instanceof V$)&&Y.kind===X.JSDoc)($??=[]).push(Y);Z=Y.next}while(Z);return $}getSourceFile(){return this.sourceFile}getStart($,Z){return f$(this,$??this.getSourceFile(),Z)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth($){return this.getEnd()-this.getStart($)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth($){return this.getStart($)-this.pos}getFullText($){return($??this.getSourceFile()).text.substring(this.pos,this.end)}getText($){return $??=this.getSourceFile(),$.text.substring(this.getStart($),this.end)}getString($){let Z=this.sourceFile._offsetStringTableOffsets,Y=this.view.getUint32(Z+$*4,!0),Q=this.view.getUint32(Z+($+1)*4,!0),G=this.sourceFile._offsetStringTable,J=new Uint8Array(this.view.buffer,this.view.byteOffset+G+Y,Q-Y);return this.sourceFile._decoder.decode(J)}getOrCreateChildAtNodeIndex($){let Z=this.sourceFile.nodes[$];if(!Z){let Y=this.sourceFile,Q=Y._offsetNodes;Z=this.view.getUint32(Q+$*t+s0,!0)===d0?new V$(this.view,$,this,Y,Q):new S0(this.view,$,this,Y,Q),Y.nodes[$]=Z,Y._timing?.recordMaterialization()}return Z}hasChildren(){if(this._byteIndex>=this.view.byteLength-t)return!1;return this.view.getUint32(this.sourceFile._offsetNodes+(this.index+1)*t+i0,!0)===this.index}getNamedChild($){let Z=this.kind,Y=r0[Z];if(!Y)return;let Q=Y.indexOf($);if(Q===-1)return;return this.getChildAtOrder(Q)}getChildAtOrder($){let Z=this.childMask;if(!(Z&1<<$))return;let Y=$-$Y[~(Z|255<<$&255)&255],Q=this.index+1;for(let G=0;G<Y;G++)Q=this.view.getUint32(this.sourceFile._offsetNodes+Q*t+U$,!0);return this.getOrCreateChildAtNodeIndex(Q)}__print(){let $=[];$.push(`index: ${this.index}`),$.push(`byteIndex: ${this._byteIndex}`),$.push(`kind: ${X[this.kind]}`),$.push(`pos: ${this.pos}`),$.push(`end: ${this.end}`),$.push(`next: ${this.next}`),$.push(`parent: ${this.parentIndex}`),$.push(`data: ${this.data.toString(2).padStart(32,"0")}`);let Z=this.dataType===F0?"children":this.dataType===o0?"string":"extended";if($.push(`dataType: ${Z}`),this.dataType===F0)$.push(`childMask: ${this.childMask.toString(2).padStart(8,"0")}`),$.push(`childProperties: ${r0[this.kind]?.join(", ")}`);return $.join(`
9
+ `)}__printChildren(){let $=[],Z=this.index+1;while(Z){let Y=this.getOrCreateChildAtNodeIndex(Z);Z=Y.next,$.push(Y.__print())}return $.join(`
10
+
11
+ `)}__printSubtree(){let $=[this.__print()];return this.forEachChild(function Z(Y){$.push(Y.__print()),Y.forEachChild(Z)},(Z)=>{$.push(Z.__print())}),$.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 X.ModuleDeclaration:return this.data>>24&1?X.NamespaceKeyword:X.ModuleKeyword}}get keywordToken(){switch(this.kind){case X.MetaProperty:return this.data>>24&1?X.NewKeyword:X.ImportKeyword}}get operator(){switch(this.kind){case X.PrefixUnaryExpression:{let $=this.data>>24&7;if($===1)return X.MinusToken;if($===2)return X.TildeToken;if($===3)return X.ExclamationToken;if($===4)return X.PlusPlusToken;if($===5)return X.MinusMinusToken;return X.PlusToken}case X.PostfixUnaryExpression:return this.data>>24&1?X.MinusMinusToken:X.PlusPlusToken;case X.TypeOperator:{let $=this.data>>24&3;if($===1)return X.ReadonlyKeyword;if($===2)return X.UniqueKeyword;return X.KeyOfKeyword}}}get phaseModifier(){switch(this.kind){case X.ImportClause:{let $=this.data>>24&3;if($===0)return;return $===1?X.TypeKeyword:$===2?X.DeferKeyword:void 0}}}get token(){switch(this.kind){case X.HeritageClause:return this.data>>24&1?X.ImplementsKeyword:X.ExtendsKeyword;case X.ImportAttributes:return this.data>>25&1?X.AssertKeyword:X.WithKeyword}}get templateFlags(){switch(this.kind){case X.TemplateHead:case X.TemplateMiddle:case X.TemplateTail:let $=this.sourceFile._offsetExtendedData+(this.data&t0);return this.view.getUint32($+8,!0)}}get tokenFlags(){switch(this.kind){case X.StringLiteral:case X.NumericLiteral:case X.BigIntLiteral:case X.RegularExpressionLiteral:let $=this.sourceFile._offsetExtendedData+(this.data&t0);return this.view.getUint32($+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 X.Identifier:case X.PrivateIdentifier:case X.JsxText:case X.JSDocText:case X.JSDocLink:case X.JSDocLinkPlain:case X.JSDocLinkCode:{let $=this.data&XY;return this.getString($)}case X.StringLiteral:case X.NumericLiteral:case X.BigIntLiteral:case X.RegularExpressionLiteral:case X.NoSubstitutionTemplateLiteral:case X.TemplateHead:case X.TemplateMiddle:case X.TemplateTail:case X.SourceFile:{let $=this.sourceFile._offsetExtendedData+(this.data&t0),Z=this.view.getUint32($,!0);return this.getString(Z)}}}get rawText(){switch(this.kind){case X.TemplateHead:case X.TemplateMiddle:case X.TemplateTail:let $=this.sourceFile._offsetExtendedData+(this.data&t0),Z=this.view.getUint32($+4,!0);return this.getString(Z)}}get flags(){return this.view.getUint32(this._byteIndex+c7,!0)}get modifierFlags(){let $=this.modifiers;if(!$)return g.None;let Z=g.None;for(let Y of $)Z|=QY(Y.kind);return Z}}var rZ=4294967295;class UZ extends S0{nodes;_offsetNodes;_offsetStringTableOffsets;_offsetStringTable;_offsetExtendedData;_offsetStructuredData;_decoder;_timing;_lineStarts;_cachedText;_cachedReferencedFiles;_cachedTypeReferenceDirectives;_cachedLibReferenceDirectives;_cachedImports;_cachedModuleAugmentations;_cachedAmbientModuleNames;constructor($,Z,Y){let Q=new DataView($.buffer,$.byteOffset,$.byteLength),G=Q.getUint32($Z,!0);super(Q,1,void 0,void 0,G);this._sourceFile=this,this._offsetNodes=G,this._offsetStringTableOffsets=Q.getUint32(a$,!0),this._offsetStringTable=Q.getUint32(t$,!0),this._offsetExtendedData=Q.getUint32(n$,!0),this._offsetStructuredData=Q.getUint32(e$,!0),this._decoder=Z,this._timing=Y,this.nodes=Array((Q.byteLength-G)/t),this.nodes[1]=this,Y?.recordSourceFileFetched(Math.max(0,this.nodes.length-2))}readFileReferences($){if($===rZ)return[];let Z=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),Y=new C$(Z,this._offsetStructuredData+$),Q=Y.readArrayHeader(),G=[];for(let J=0;J<Q;J++){Y.readArrayHeader();let V=Y.readUint(),L=Y.readUint(),P=Y.readString(),_=Y.readUint(),k=Y.readBool();G.push({pos:V,end:L,fileName:P,resolutionMode:_,preserve:k})}return G}readNodeIndexArray($){if($===rZ)return[];let Z=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),Y=new C$(Z,this._offsetStructuredData+$),Q=Y.readArrayHeader(),G=[];for(let J=0;J<Q;J++){let V=Y.readUint();G.push(this.getOrCreateNodeAtIndex(V))}return G}readStringArray($){if($===rZ)return[];let Z=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),Y=new C$(Z,this._offsetStructuredData+$),Q=Y.readArrayHeader(),G=[];for(let J=0;J<Q;J++)G.push(Y.readString());return G}getOrCreateNodeAtIndex($){let Z=this.nodes[$];if(!Z){let Y=this.view.getUint32(this._offsetNodes+$*t+i0,!0);while(Y!==$&&this.view.getUint32(this._offsetNodes+Y*t+s0,!0)===d0)Y=this.view.getUint32(this._offsetNodes+Y*t+i0,!0);let Q=Y===$?this:this.getOrCreateNodeAtIndex(Y);Z=new S0(this.view,$,Q,this,this._offsetNodes),this.nodes[$]=Z,this._timing?.recordMaterialization()}return Z}get extendedDataOffset(){return this._offsetExtendedData+(this.data&t0)}get fileName(){let $=this.view.getUint32(this.extendedDataOffset+4,!0);return this.getString($)}get path(){let $=this.view.getUint32(this.extendedDataOffset+8,!0);return this.getString($)}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 $=this.view.getUint32(this.extendedDataOffset+20,!0),Z=this.readFileReferences($);return this._cachedReferencedFiles=Z,Z}get typeReferenceDirectives(){if(this._cachedTypeReferenceDirectives!==void 0)return this._cachedTypeReferenceDirectives;let $=this.view.getUint32(this.extendedDataOffset+24,!0),Z=this.readFileReferences($);return this._cachedTypeReferenceDirectives=Z,Z}get libReferenceDirectives(){if(this._cachedLibReferenceDirectives!==void 0)return this._cachedLibReferenceDirectives;let $=this.view.getUint32(this.extendedDataOffset+28,!0),Z=this.readFileReferences($);return this._cachedLibReferenceDirectives=Z,Z}get imports(){if(this._cachedImports!==void 0)return this._cachedImports;let $=this.view.getUint32(this.extendedDataOffset+32,!0),Z=this.readNodeIndexArray($);return this._cachedImports=Z,Z}get moduleAugmentations(){if(this._cachedModuleAugmentations!==void 0)return this._cachedModuleAugmentations;let $=this.view.getUint32(this.extendedDataOffset+36,!0),Z=this.readNodeIndexArray($);return this._cachedModuleAugmentations=Z,Z}get ambientModuleNames(){if(this._cachedAmbientModuleNames!==void 0)return this._cachedAmbientModuleNames;let $=this.view.getUint32(this.extendedDataOffset+40,!0),Z=this.readStringArray($);return this._cachedAmbientModuleNames=Z,Z}get externalModuleIndicator(){let $=this.view.getUint32(this.extendedDataOffset+44,!0);if($===0)return;if($===this.index)return!0;return this.getOrCreateNodeAtIndex($)}get isDeclarationFile(){return(this.flags&E0.Ambient)!==0}get text(){if(this._cachedText!==void 0)return this._cachedText;let $=super.text;return this._cachedText=$,$}getLineStarts(){return this._lineStarts??=u7(this.text??"")}getLineAndCharacterOfPosition($){let Z=this.getLineStarts(),Y=SJ(Z,$);return{line:Y,character:$-Z[Y]}}getPositionOfLineAndCharacter($,Z){let Y=this.getLineStarts();if($<0||$>=Y.length)throw Error(`Bad line number. Line: ${$}, lineStarts.length: ${Y.length}`);return Y[$]+Z}}function SJ($,Z){let Y=0,Q=$.length-1;while(Y<=Q){let G=Y+(Q-Y>>1),J=$[G];if(J<Z)Y=G+1;else if(J>Z)Q=G-1;else return G}return Y-1}function GY($){let Z=$.indexOf(".");if(Z===-1)throw Error(`Invalid node handle: ${$}`);let Y=$.indexOf(".",Z+1);if(Y===-1)throw Error(`Invalid node handle: ${$}`);return{index:parseInt($.slice(0,Z),10),kind:parseInt($.slice(Z+1,Y),10),path:$.slice(Y+1)}}function sZ($){return new UZ($,new a0)}function d($){if(!($ instanceof S0))throw Error("getNodeId requires a RemoteNode");return $.id}var xJ=/\\/g,JY=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function gJ($){return $===47||$===92}function iZ($){return $>=97&&$<=122||$>=65&&$<=90}function pJ($,Z){let Y=$.charCodeAt(Z);if(Y===58)return Z+1;if(Y===37&&$.charCodeAt(Z+1)===51){let Q=$.charCodeAt(Z+2);if(Q===97||Q===65)return Z+3}return-1}function dZ($){let Z=VY($);return Z<0?~Z:Z}function VY($){if(!$)return 0;let Z=$.charCodeAt(0);if(Z===47||Z===92){if($.charCodeAt(1)!==Z)return 1;let Q=$.indexOf(Z===47?"/":"\\",2);if(Q<0)return $.length;return Q+1}if(iZ(Z)&&$.charCodeAt(1)===58){let Q=$.charCodeAt(2);if(Q===47||Q===92)return 3;if($.length===2)return 2}let Y=$.indexOf("://");if(Y!==-1){let Q=Y+3,G=$.indexOf("/",Q);if(G!==-1){let J=$.slice(0,Y),V=$.slice(Q,G);if(J==="file"&&(V===""||V==="localhost")&&iZ($.charCodeAt(G+1))){let L=pJ($,G+2);if(L!==-1){if($.charCodeAt(L)===47)return~(L+1);if(L===$.length)return~L}}return~(G+1)}return~$.length}return 0}function oZ($){return $.length>0&&gJ($.charCodeAt($.length-1))}function UY($){if(oZ($))return $.substr(0,$.length-1);return $}function HY($){if(!oZ($))return $+"/";return $}function WZ($){return $.includes("\\")?$.replace(xJ,"/"):$}function yJ($,...Z){if($)$=WZ($);for(let Y of Z){if(!Y)continue;if(Y=WZ(Y),!$||dZ(Y)!==0)$=Y;else $=HY($)+Y}return $}function zY($){if(!JY.test($))return $;let Z=$.replace(/\/\.\//g,"/");if(Z.startsWith("./"))Z=Z.slice(2);if(Z!==$){if($=Z,!JY.test($))return $}return}function wY($,Z){let Y=dZ($);if(Y===0&&Z)$=yJ(Z,$),Y=dZ($);else $=WZ($);let Q=zY($);if(Q!==void 0)return Q.length>Y?UY(Q):Q;let G=$.length,J=$.substring(0,Y),V,L=Y,P=L,_=L,k=Y!==0;while(L<G){P=L;let x=$.charCodeAt(L);while(x===47&&L+1<G)L++,x=$.charCodeAt(L);if(L>P)V??=$.substring(0,P-1),P=L;let K=$.indexOf("/",L+1);if(K===-1)K=G;let i=K-P;if(i===1&&$.charCodeAt(L)===46)V??=$.substring(0,_);else if(i===2&&$.charCodeAt(L)===46&&$.charCodeAt(L+1)===46)if(!k)if(V!==void 0)V+=V.length===Y?"..":"/..";else _=L+2;else if(V===void 0)if(_-2>=0)V=$.substring(0,Math.max(Y,$.lastIndexOf("/",_-2)));else V=$.substring(0,_);else{let U0=V.lastIndexOf("/");if(U0!==-1)V=V.substring(0,Math.max(Y,U0));else V=J;if(V.length===Y)k=Y!==0}else if(V!==void 0){if(V.length!==Y)V+="/";k=!0,V+=$.substring(P,K)}else k=!0,_=K;L=K+1}return V??(G>Y?UY($):$)}function mJ($){$=WZ($);let Z=zY($);if(Z!==void 0)return Z;return Z=wY($,""),Z&&oZ($)?HY(Z):Z}function cJ($){return VY($)>0}function qY($,Z,Y){let Q=cJ($)?mJ($):wY($,Z);return Y(Q)}function BY($){return $?lJ:rJ}function lJ($){return $}function rJ($){return $.toLowerCase()}var sJ="bundled:///";function LY($){return $.startsWith(sJ)}function iJ($){return $.startsWith("^/")}function AY($){if($.length>=2&&iZ($.charCodeAt(0))&&$.charCodeAt(1)===58)return[$.substring(0,2).toLowerCase(),$.substring(2),!0];return["",$,!1]}var dJ={":":"%3A","/":"%2F","?":"%3F","#":"%23","[":"%5B","]":"%5D","@":"%40","!":"%21",$:"%24","&":"%26","'":"%27","(":"%28",")":"%29","*":"%2A","+":"%2B",",":"%2C",";":"%3B","=":"%3D"," ":"%20"};function WY($){let Z=$;for(let[Y,Q]of Object.entries(dJ))Z=Z.replaceAll(Y,Q);return Z}function RY($){if(LY($))return $;if(iJ($)){let J=$.substring(2),V=J.indexOf("/");if(V===-1)throw Error("invalid file name: "+$);let L=J.substring(0,V),P=J.substring(V+1),_=P.indexOf("/");if(_===-1)throw Error("invalid file name: "+$);let k=P.substring(0,_),x=P.substring(_+1);if(k==="ts-nul-authority")return L+":"+x;return L+"://"+k+"/"+x}let[Z,Y]=AY($);if(Z!=="")Z="/"+WY(Z);if(Y.startsWith("//"))Y=Y.substring(2);let G=Y.split("/").map((J)=>WY(encodeURIComponent(J)));return"file://"+Z+G.join("/")}function aZ($){if(LY($))return $;if($.startsWith("file://")){let J;try{J=new URL($)}catch{throw Error("invalid file URI: "+$)}if(J.host!=="")return"//"+J.host+J.pathname;let V=decodeURIComponent(J.pathname);if(V.length>=3&&V.charCodeAt(0)===47){let[L,P,_]=AY(V.substring(1));if(_)return L+P}return V}let Z=$.indexOf(":");if(Z===-1)throw Error("invalid URI: "+$);let Y=$.substring(0,Z),Q=$.substring(Z+1),G="ts-nul-authority";if(Q.startsWith("//")){let J=Q.substring(2),V=J.indexOf("/");if(V===-1)throw Error("invalid URI: "+$);G=J.substring(0,V),Q=J.substring(V+1)}return"^/"+Y+"/"+G+"/"+Q}function tZ($){if(typeof $==="string")return $;return aZ($.uri)}function IY($){let{openProject:Z,openProjects:Y,...Q}=$??{},G=Z!==void 0?[tZ(Z),...Y??[]]:Y;return{...Q,...G!==void 0?{openProjects:G}:{}}}function F$($,Z){return`${$}:${Z}`}class nZ{cache=new Map;snapshotProjectPaths=new Map;getRetained($,Z,Y){let Q=this.cache.get($);if(!Q)return;let G=F$(Z,Y);return Q.find((V)=>V.refs.has(G))?.file}set($,Z,Y,Q,G,J){let V=this.cache.get($);if(!V)V=[],this.cache.set($,V);let L=F$(G,J),P=V.find((_)=>_.parseOptionsKey===Y&&_.contentHash===Q);if(P)return P.refs.add(L),this.trackPath(G,J,$),P.file;return V.push({file:Z,contentHash:Q,parseOptionsKey:Y,refs:new Set([L])}),this.trackPath(G,J,$),Z}retainForSnapshot($,Z,Y){let Q=this.snapshotProjectPaths.get(Z);if(!Q)return;let G=new Set(Y?.removedProjects??[]),J=Y?.changedProjects??{};for(let[V,L]of Q){if(G.has(V))continue;let P=J[V],_;if(P){_=new Set;for(let K of P.changedFiles??[])_.add(K);for(let K of P.deletedFiles??[])_.add(K)}let k=F$(Z,V),x=F$($,V);for(let K of L){if(_?.has(K))continue;let i=this.cache.get(K);if(!i)continue;for(let U0 of i)if(U0.refs.has(k))U0.refs.add(x),this.trackPath($,V,K)}}}releaseSnapshot($){let Z=this.snapshotProjectPaths.get($);if(!Z)return;for(let[Y,Q]of Z){let G=F$($,Y);for(let J of Q){let V=this.cache.get(J);if(!V)continue;for(let L=V.length-1;L>=0;L--)if(V[L].refs.delete(G),V[L].refs.size===0)V.splice(L,1);if(V.length===0)this.cache.delete(J)}}this.snapshotProjectPaths.delete($)}trackPath($,Z,Y){let Q=this.snapshotProjectPaths.get($);if(!Q)Q=new Map,this.snapshotProjectPaths.set($,Q);let G=Q.get(Z);if(!G)G=new Set,Q.set(Z,G);G.add(Y)}clear(){this.cache.clear(),this.snapshotProjectPaths.clear()}get size(){return this.cache.size}has($){return this.cache.has($)}}var X0=qU(cX(),1);var F6=["readFile","fileExists","directoryExists","getAccessibleEntries","realpath"];import lX from"node:fs";import wU from"node:module";import N0 from"node:path";import{fileURLToPath as rX}from"node:url";function h6(){let $=N0.dirname(rX(import.meta.url)),Z=$.replace(/\\/g,"/"),Y=JSON.parse(lX.readFileSync(N0.join($,"..","package.json"),"utf8")),Q=Y.name,G=Q.startsWith("@")?Q.split("/")[1]:Q,J=G==="typescript"?"tsc":"tsgo",V=Y.bin&&typeof Y.bin==="object"?Object.keys(Y.bin):[];if(V.length!==1||V[0]!==J)throw Error(`Expected ${Q} to declare exactly one bin entry named ${J}.`);let L=J,P,_=G+"-"+process.platform+"-"+process.arch;if(Z.endsWith("/_packages/"+G+"/lib"))P=N0.resolve($,"..","..","..","built","local"),L="tsgo";else if(Z.endsWith("/built/npm/"+G+"/lib"))P=N0.resolve($,"..","..",_,"lib");else{let x="@typescript/"+_;try{if(typeof import.meta.resolve>"u"){let i=wU.createRequire(import.meta.url).resolve(x+"/package.json");P=N0.join(N0.dirname(i),"lib")}else{let K=import.meta.resolve(x+"/package.json"),i=rX(K);P=N0.join(N0.dirname(i),"lib")}}catch(K){throw Error("Unable to resolve "+x+". Either your platform is unsupported, or you are missing the package on disk.")}}let k=N0.join(P,L);if(process.platform==="win32"){if(k+=".exe",k.length>=248)k="\\\\?\\"+k}if(!lX.existsSync(k))throw Error("Executable not found: "+k);return k}function N6($){return!("pipe"in $)}function sX($){return $.tsserverPath??h6()}function u6(){return{requestCount:0,roundTripMs:0,bytesSent:0,bytesReceived:0,serverTimeMs:0,transportOverheadMs:0,nodesMaterialized:0,sourceFilesFetched:0,nodesFetched:0}}function iX(){return{enabled:!1,totals:u6(),recentRequests:[]}}function dX(){return{enabled:!1,totals:{requestCount:0,totalProcessingTimeMs:0},recentRequests:[]}}function oX($,Z){if(!$.enabled)return $;let Y=Z.totals.totalProcessingTimeMs,Q={...$.totals,serverTimeMs:Y,transportOverheadMs:Math.max(0,$.totals.roundTripMs-Y)},G=$.recentRequests.map((L)=>({...L})),J=Z.recentRequests,V=Math.min(G.length,J.length);for(let L=1;L<=V;L++){let P=G[G.length-L],_=J[J.length-L];if(P.method===_.method)P.serverTimeMs=_.processingTimeMs,P.transportOverheadMs=Math.max(0,P.roundTripMs-_.processingTimeMs)}return{enabled:!0,totals:Q,recentRequests:G}}class K6{totals=u6();ring=[];head=0;record($){this.totals.requestCount++,this.totals.roundTripMs+=$.roundTripMs,this.totals.bytesSent+=$.bytesSent,this.totals.bytesReceived+=$.bytesReceived;let Z={method:$.method,roundTripMs:$.roundTripMs,bytesSent:$.bytesSent,bytesReceived:$.bytesReceived,timestamp:Date.now()};if(this.ring.length<5)this.ring.push(Z);else this.ring[this.head]=Z,this.head=(this.head+1)%5}recordMaterialization(){this.totals.nodesMaterialized++}recordSourceFileFetched($){this.totals.sourceFilesFetched++,this.totals.nodesFetched+=$}getInfo(){let $=[];for(let Z=0;Z<this.ring.length;Z++)$.push(this.ring[(this.head+Z)%this.ring.length]);return{enabled:!0,totals:{...this.totals},recentRequests:$}}reset(){this.totals=u6(),this.ring=[],this.head=0}}class b6{socket;process;connection;options;connected=!1;timing;constructor($){if(this.options=$,N6($)&&$.collectTiming)this.timing=new K6}async connect(){if(this.connected)return;if(N6(this.options))await this.connectViaSpawn(this.options);else await this.connectViaSocket(this.options)}async connectViaSpawn($){let{spawn:Z}=await import("node:child_process");return new Promise((Y,Q)=>{let G=["--api","--async","--cwd",$.cwd??process.cwd()];if($.collectTiming)G.push("--timing");let J=[];if($.fs){for(let P of F6)if($.fs[P])J.push(P)}if(J.length>0)G.push(`--callbacks=${J.join(",")}`);this.process=Z(sX($),G,{stdio:["pipe","pipe","inherit"]}),this.process.once("error",(P)=>{Q(Error(`Failed to start tsgo process: ${P.message}`))}),this.process.once("spawn",()=>{this.connected=!0,Y()});let V=new X0.StreamMessageReader(this.process.stdout),L=new X0.StreamMessageWriter(this.process.stdin);this.connection=X0.createMessageConnection(V,L),this.registerFSCallbacks(this.connection,$.fs),this.connection.listen()})}async connectViaSocket($){let{createConnection:Z}=await import("node:net");return new Promise((Y,Q)=>{this.socket=Z($.pipe,()=>{let G=new X0.SocketMessageReader(this.socket),J=new X0.SocketMessageWriter(this.socket);this.connection=X0.createMessageConnection(G,J),this.connection.listen(),this.connected=!0,Y()}),this.socket.once("error",(G)=>{Q(Error(`Socket error: ${G.message}`))})})}registerFSCallbacks($,Z){if(!Z)return;for(let Y of F6){let Q=Z[Y];if(Q){let G=new X0.RequestType(Y);$.onRequest(G,(J)=>{let V=Q(J);if(Y==="readFile"){if(V===void 0)return null;return{content:V}}return V??null})}}}async apiRequest($,Z){if(!this.connected)await this.connect();if(!this.connection)throw Error("Connection not established");let Y=new X0.RequestType($);if(!this.timing)return this.connection.sendRequest(Y,Z);let Q=Z===void 0?0:Buffer.byteLength(JSON.stringify(Z),"utf-8"),G=performance.now(),J=await this.connection.sendRequest(Y,Z),V=performance.now()-G;return this.timing.record({method:$,roundTripMs:V,bytesSent:Q,bytesReceived:J===void 0||J===null?0:Buffer.byteLength(JSON.stringify(J),"utf-8")}),J}async apiRequestBinary($,Z){let Y=await this.apiRequest($,Z);if(!Y)return;let Q=Buffer.from(Y.data,"base64");return new Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength)}getTimingCollector(){return this.timing}async getTimingInfo(){if(!this.timing)return iX();let $=this.timing.getInfo();if(!this.connected||!this.connection)return $;return oX($,await this.fetchServerTiming())}async resetTimingInfo(){if(!this.timing)return;if(this.timing.reset(),this.connected&&this.connection){let $=new X0.RequestType("resetServerTiming");await this.connection.sendRequest($,void 0)}}async fetchServerTiming(){if(!this.connection)return dX();let $=new X0.RequestType("getServerTiming");return this.connection.sendRequest($,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 aX{client;sourceFileCache;toPath;initialized=!1;activeSnapshots=new Set;latestSnapshot;internal;constructor($={}){this.client=new b6($),this.sourceFileCache=new nZ,this.internal=new tX(this.client,()=>this.ensureInitialized())}static async fromLSPConnection($){let Z=new aX($);return await Z.ensureInitialized(),Z}async ensureInitialized(){if(!this.initialized){let $=await this.client.apiRequest("initialize",null),Z=BY($.useCaseSensitiveFileNames),Y=$.currentDirectory;this.toPath=(Q)=>qY(Q,Y,Z),this.initialized=!0}}async parseConfigFile($){return await this.ensureInitialized(),this.client.apiRequest("parseConfigFile",{file:$})}async updateSnapshot($){await this.ensureInitialized();let Z=IY($),Y=await this.client.apiRequest("updateSnapshot",Z);if(this.latestSnapshot){if(this.sourceFileCache.retainForSnapshot(Y.snapshot,this.latestSnapshot.id,Y.changes),this.latestSnapshot.isDisposed())this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id)}let Q=new nX(Y,this.client,this.sourceFileCache,this.toPath,()=>{if(this.activeSnapshots.delete(Q),Q!==this.latestSnapshot)this.sourceFileCache.releaseSnapshot(Q.id)});return this.latestSnapshot=Q,this.activeSnapshots.add(Q),Q}async close(){for(let $ of[...this.activeSnapshots])await $.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 tX{client;ensureInitialized;constructor($,Z){this.client=$,this.ensureInitialized=Z}async startCPUProfile($){await this.ensureInitialized(),await this.client.apiRequest("startCPUProfile",{dir:$})}async stopCPUProfile(){return await this.ensureInitialized(),(await this.client.apiRequest("stopCPUProfile",null)).file}async saveHeapProfile($){return await this.ensureInitialized(),(await this.client.apiRequest("saveHeapProfile",{dir:$})).file}}class nX{id;projectMap;toPath;client;disposed=!1;onDispose;snapshotRegistry;constructor($,Z,Y,Q,G){this.id=$.snapshot,this.client=Z,this.toPath=Q,this.onDispose=G,this.projectMap=new Map,this.snapshotRegistry=new eX(Z,this.id,(J)=>this.projectMap.get(J));for(let J of $.projects){let V=new Z1(J,this.id,Z,Y,Q,this.snapshotRegistry);this.projectMap.set(Q(J.configFileName),V)}}getProjects(){return this.ensureNotDisposed(),[...this.projectMap.values()]}getProject($){return this.ensureNotDisposed(),this.projectMap.get(this.toPath($))}async getDefaultProjectForFile($){this.ensureNotDisposed();let Z=await this.client.apiRequest("getDefaultProjectForFile",{snapshot:this.id,file:$});if(!Z)return;return this.projectMap.get(this.toPath(Z.configFileName))}[globalThis.Symbol.dispose](){this.dispose()}async dispose(){if(this.disposed)return;this.disposed=!0;for(let $ of this.projectMap.values())$.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 eX{symbols=new Map;client;snapshotId;resolveProject;constructor($,Z,Y){this.client=$,this.snapshotId=Z,this.resolveProject=Y}getProject($){return this.resolveProject($)}getOrCreateSymbol($){let Z=this.symbols.get($.id);if(!Z)Z=new G1($,this),this.symbols.set($.id,Z);return Z}getSymbol($){return this.symbols.get($)}clear(){this.symbols.clear()}async fetchSymbol($,Z,Y,Q){if(!Y)return;let G=this.getSymbol(Y);if(G)return G;let J=await this.client.apiRequest(Z,{snapshot:this.snapshotId,project:Q,objectId:$.id});if(!J)throw Error(`${Z} returned null symbol for ${$.constructor.name} ${$.id}`);return this.getOrCreateSymbol(J)}async fetchSymbols($,Z,Y,Q){if(Y){let J=Array(Y.length),V=!0;for(let L=0;L<Y.length;L++){let P=this.getSymbol(Y[L]);if(!P){V=!1;break}J[L]=P}if(V)return J}let G=await this.client.apiRequest(Z,{snapshot:this.snapshotId,project:Q,objectId:$.id});if(G==null)return[];else return G.map((J)=>this.getOrCreateSymbol(J))}}class $1{client;snapshotId;project;snapshotRegistry;types=new Map;signatures=new Map;constructor($,Z,Y,Q){this.client=$,this.snapshotId=Z,this.project=Y,this.snapshotRegistry=Q}getOrCreateSymbol($){return this.snapshotRegistry.getOrCreateSymbol($)}getSymbol($){return this.snapshotRegistry.getSymbol($)}getOrCreateType($){let Z=this.types.get($.id);if(!Z)Z=new J1($,this),this.types.set($.id,Z);return Z}getType($){return this.types.get($)}getOrCreateSignature($){let Z=this.signatures.get($.id);if(!Z)Z=new W1($,this.project,this),this.signatures.set($.id,Z);return Z}getSignature($){return this.signatures.get($)}clear(){this.types.clear(),this.signatures.clear()}async fetchType($,Z,Y){if(Y!==!1){if(!Y)return;let G=this.getType(Y);if(G)return G}let Q=await this.client.apiRequest(Z,{snapshot:this.snapshotId,project:this.project.id,objectId:$.id});if(!Q)throw Error(`${Z} returned null type for ${$.constructor.name} ${$.id}`);return this.getOrCreateType(Q)}async fetchSymbol($,Z,Y){return this.snapshotRegistry.fetchSymbol($,Z,Y,this.project.id)}async fetchSignature($,Z,Y){if(!Y)return;let Q=this.getSignature(Y);if(Q)return Q;let G=await this.client.apiRequest(Z,{snapshot:this.snapshotId,project:this.project.id,objectId:$.id});if(!G)throw Error(`${Z} returned null signature for ${$.constructor.name} ${$.id}`);return this.getOrCreateSignature(G)}async fetchTypes($,Z,Y){if(Y){let G=Array(Y.length),J=!0;for(let V=0;V<Y.length;V++){let L=this.getType(Y[V]);if(!L){J=!1;break}G[V]=L}if(J)return G}let Q=await this.client.apiRequest(Z,{snapshot:this.snapshotId,project:this.project.id,objectId:$.id});if(Q==null)return[];else return Q.map((G)=>this.getOrCreateType(G))}async fetchSymbols($,Z,Y){return this.snapshotRegistry.fetchSymbols($,Z,Y,this.project.id)}async fetchBaseTypes($){let Z=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:$.id});if(Z==null)return[];return Z.map((Y)=>this.getOrCreateType(Y))}}class Z1{id;configFileName;compilerOptions;rootFiles;program;checker;emitter;client;constructor($,Z,Y,Q,G,J){this.id=$.id,this.configFileName=$.configFileName,this.compilerOptions=$.compilerOptions,this.rootFiles=$.rootFiles,this.client=Y,this.program=new Y1(Z,this,Y,Q,G);let V=new $1(Y,Z,this,J);this.checker=new X1(Z,this,Y,V),this.emitter=new Q1(Y)}dispose(){this.checker.dispose()}}class Y1{snapshotId;project;client;sourceFileCache;toPath;decoder=new a0;sourceFileMetadataCache=new Map;constructor($,Z,Y,Q,G){this.snapshotId=$,this.project=Z,this.client=Y,this.sourceFileCache=Q,this.toPath=G}getCompilerOptions(){return this.project.compilerOptions}async getSourceFile($){let Z=tZ($),Y=this.toPath(Z),Q=this.sourceFileCache.getRetained(Y,this.snapshotId,this.project.id);if(Q)return Q;let G=await this.client.apiRequestBinary("getSourceFile",{snapshot:this.snapshotId,project:this.project.id,file:$});if(!G)return;let J=new DataView(G.buffer,G.byteOffset,G.byteLength),V=cZ(J),L=lZ(J),P=new UZ(G,this.decoder,this.client.getTimingCollector());return this.sourceFileCache.set(Y,P,L,V,this.snapshotId,this.project.id)}async getSourceFileNames(){return await this.client.apiRequest("getSourceFileNames",{snapshot:this.snapshotId,project:this.project.id})??[]}getSourceFileMetadata($){return this.getSourceFileMetadataByPath(this.toPath($))}getSourceFileMetadataByPath($){let Z=this.sourceFileMetadataCache.get($);if(Z===void 0)Z=this.fetchSourceFileMetadata($),this.sourceFileMetadataCache.set($,Z);return Z}async fetchSourceFileMetadata($){return await this.client.apiRequest("getSourceFileMetadata",{snapshot:this.snapshotId,project:this.project.id,file:$})??void 0}async isSourceFileFromExternalLibrary($){return(await this.getSourceFileMetadataByPath($.path))?.isFromExternalLibrary??!1}async isSourceFileDefaultLibrary($){return(await this.getSourceFileMetadataByPath($.path))?.isDefaultLibrary??!1}async getSyntacticDiagnostics($){return await this.client.apiRequest("getSyntacticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...$!==void 0?{file:$}:{}})??[]}async getBindDiagnostics($){return await this.client.apiRequest("getBindDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...$!==void 0?{file:$}:{}})??[]}async getSemanticDiagnostics($){return await this.client.apiRequest("getSemanticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...$!==void 0?{file:$}:{}})??[]}async getSuggestionDiagnostics($){return await this.client.apiRequest("getSuggestionDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...$!==void 0?{file:$}:{}})??[]}async getDeclarationDiagnostics($){return await this.client.apiRequest("getDeclarationDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...$!==void 0?{file:$}:{}})??[]}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 X1{snapshotId;project;client;objectRegistry;wellKnownSymbols;constructor($,Z,Y,Q){this.snapshotId=$,this.project=Z,this.client=Y,this.objectRegistry=Q}dispose(){this.objectRegistry.clear()}async getSymbolAtLocation($){if(Array.isArray($))return(await this.client.apiRequest("getSymbolsAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:$.map((Q)=>d(Q))})).map((Q)=>Q?this.objectRegistry.getOrCreateSymbol(Q):void 0);let Z=await this.client.apiRequest("getSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateSymbol(Z):void 0}async getSymbolAtPosition($,Z){if(typeof Z==="number"){let Q=await this.client.apiRequest("getSymbolAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:$,position:Z});return Q?this.objectRegistry.getOrCreateSymbol(Q):void 0}return(await this.client.apiRequest("getSymbolsAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:$,positions:Z})).map((Q)=>Q?this.objectRegistry.getOrCreateSymbol(Q):void 0)}async getTypeOfSymbol($){if(Array.isArray($))return(await this.client.apiRequest("getTypesOfSymbols",{snapshot:this.snapshotId,project:this.project.id,symbols:$.map((Q)=>Q.id)})).map((Q)=>Q?this.objectRegistry.getOrCreateType(Q):void 0);let Z=await this.client.apiRequest("getTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getDeclaredTypeOfSymbol($){let Z=await this.client.apiRequest("getDeclaredTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id});if(!Z)throw Error(`getDeclaredTypeOfSymbol returned no type for symbol ${$.id}`);return this.objectRegistry.getOrCreateType(Z)}async getReferencesToSymbolInFile($,Z){return(await this.client.apiRequest("getReferencesToSymbolInFile",{snapshot:this.snapshotId,project:this.project.id,file:$,symbol:Z.id})??[]).map((Q)=>new _0(Q,this.project))}async getReferencedSymbolsForNode($,Z){return(await this.client.apiRequest("getReferencedSymbolsForNode",{snapshot:this.snapshotId,project:this.project.id,node:d($),position:Z})??[]).map((Q)=>({definition:new _0(Q.definition,this.project),symbol:Q.symbol?this.objectRegistry.getOrCreateSymbol(Q.symbol):void 0,references:(Q.references??[]).map((G)=>new _0(G,this.project))}))}async getSignatureUsage($){return(await this.client.apiRequest("getSignatureUsages",{snapshot:this.snapshotId,project:this.project.id,signatureDecl:d($)})??[]).map((Y)=>({name:new _0(Y.name,this.project),call:Y.call?new _0(Y.call,this.project):void 0}))}async getCompletionsAtPosition($,Z,Y){let Q=await this.client.apiRequest("getCompletionsAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:$,position:Z,triggerCharacter:Y?.triggerCharacter,includeSymbol:Y?.includeSymbol});if(!Q)return;return{isIncomplete:Q.isIncomplete,entries:Q.entries.map((G)=>({...G,symbol:G.symbol?this.objectRegistry.getOrCreateSymbol(G.symbol):void 0}))}}async getTypeAtLocation($){if(Array.isArray($))return(await this.client.apiRequest("getTypeAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:$.map((Q)=>d(Q))})).map((Q)=>Q?this.objectRegistry.getOrCreateType(Q):void 0);let Z=await this.client.apiRequest("getTypeAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getSignaturesOfType($,Z){return(await this.client.apiRequest("getSignaturesOfType",{snapshot:this.snapshotId,project:this.project.id,type:$.id,kind:Z})).map((Q)=>this.objectRegistry.getOrCreateSignature(Q))}async getResolvedSignature($){let Z=await this.client.apiRequest("getResolvedSignature",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateSignature(Z):void 0}async getTypeAtPosition($,Z){if(typeof Z==="number"){let Q=await this.client.apiRequest("getTypeAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:$,position:Z});return Q?this.objectRegistry.getOrCreateType(Q):void 0}return(await this.client.apiRequest("getTypesAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:$,positions:Z})).map((Q)=>Q?this.objectRegistry.getOrCreateType(Q):void 0)}async resolveName($,Z,Y,Q){let G=Y&&"kind"in Y,J=await this.client.apiRequest("resolveName",{snapshot:this.snapshotId,project:this.project.id,name:$,meaning:Z,location:G?d(Y):void 0,file:!G&&Y?Y.document:void 0,position:!G&&Y?Y.position:void 0,excludeGlobals:Q});return J?this.objectRegistry.getOrCreateSymbol(J):void 0}async getResolvedSymbol($){let Z=$.text;if(!Z)return;return this.resolveName(Z,D$.Value|D$.ExportValue,$)}async getContextualType($){let Z=await this.client.apiRequest("getContextualType",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getBaseTypeOfLiteralType($){let Z=await this.client.apiRequest("getBaseTypeOfLiteralType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getNonNullableType($){let Z=await this.client.apiRequest("getNonNullableType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getTypeFromTypeNode($){let Z=await this.client.apiRequest("getTypeFromTypeNode",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getWidenedType($){let Z=await this.client.apiRequest("getWidenedType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getParameterType($,Z){let Y=await this.client.apiRequest("getParameterType",{snapshot:this.snapshotId,project:this.project.id,signature:$.id,index:Z});return Y?this.objectRegistry.getOrCreateType(Y):void 0}async isArrayLikeType($){return this.client.apiRequest("isArrayLikeType",{snapshot:this.snapshotId,project:this.project.id,type:$.id})}async isTypeAssignableTo($,Z){return this.client.apiRequest("isTypeAssignableTo",{snapshot:this.snapshotId,project:this.project.id,source:$.id,target:Z.id})}async getShorthandAssignmentValueSymbol($){let Z=await this.client.apiRequest("getShorthandAssignmentValueSymbol",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateSymbol(Z):void 0}async getTypeOfSymbolAtLocation($,Z){let Y=await this.client.apiRequest("getTypeOfSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id,location:d(Z)});if(!Y)throw Error(`getTypeOfSymbolAtLocation returned no type for symbol ${$.id}`);return this.objectRegistry.getOrCreateType(Y)}async getIntrinsicType($){let Z=await this.client.apiRequest($,{snapshot:this.snapshotId,project:this.project.id});return this.objectRegistry.getOrCreateType(Z)}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($,Z,Y){let Q=await this.client.apiRequestBinary("typeToTypeNode",{snapshot:this.snapshotId,project:this.project.id,type:$.id,location:Z?d(Z):void 0,flags:Y});if(!Q)return;return sZ(Q)}async signatureToSignatureDeclaration($,Z,Y,Q){let G=await this.client.apiRequestBinary("signatureToSignatureDeclaration",{snapshot:this.snapshotId,project:this.project.id,signature:$.id,kind:Z,location:Y?d(Y):void 0,flags:Q});if(!G)return;return sZ(G)}async typeToString($,Z,Y){return this.client.apiRequest("typeToString",{snapshot:this.snapshotId,project:this.project.id,type:$.id,location:Z?d(Z):void 0,flags:Y})}async isContextSensitive($){return this.client.apiRequest("isContextSensitive",{snapshot:this.snapshotId,project:this.project.id,location:d($)})}async isArrayType($){return this.client.apiRequest("isArrayType",{snapshot:this.snapshotId,project:this.project.id,type:$.id})}async isTupleType($){return this.client.apiRequest("isTupleType",{snapshot:this.snapshotId,project:this.project.id,type:$.id})}async getReturnTypeOfSignature($){let Z=await this.client.apiRequest("getReturnTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getRestTypeOfSignature($){let Z=await this.client.apiRequest("getRestTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getTypePredicateOfSignature($){let Z=await this.client.apiRequest("getTypePredicateOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:$.id});if(!Z)return;return{kind:Z.kind,parameterIndex:Z.parameterIndex,parameterName:Z.parameterName,type:Z.type?this.objectRegistry.getOrCreateType(Z.type):void 0}}async getBaseTypes($){let Z=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?Z.map((Y)=>this.objectRegistry.getOrCreateType(Y)):[]}async getApparentType($){let Z=await this.client.apiRequest("getApparentType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getPropertiesOfType($){let Z=await this.client.apiRequest("getPropertiesOfType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?Z.map((Y)=>this.objectRegistry.getOrCreateSymbol(Y)):[]}async getIndexInfosOfType($){let Z=await this.client.apiRequest("getIndexInfosOfType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});if(!Z)return[];return Z.map((Y)=>({keyType:this.objectRegistry.getOrCreateType(Y.keyType),valueType:this.objectRegistry.getOrCreateType(Y.valueType),isReadonly:Y.isReadonly??!1,declaration:Y.declaration?new _0(Y.declaration,this.project):void 0}))}async getConstraintOfTypeParameter($){let Z=await this.client.apiRequest("getConstraintOfTypeParameter",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getBaseConstraintOfType($){let Z=await this.client.apiRequest("getBaseConstraintOfType",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?this.objectRegistry.getOrCreateType(Z):void 0}async getPropertyOfType($,Z){let Y=await this.client.apiRequest("getPropertyOfType",{snapshot:this.snapshotId,project:this.project.id,type:$.id,name:Z});return Y?this.objectRegistry.getOrCreateSymbol(Y):void 0}async getConstantValue($){return await this.client.apiRequest("getConstantValue",{snapshot:this.snapshotId,project:this.project.id,location:d($)})??void 0}async getSignatureFromDeclaration($){let Z=await this.client.apiRequest("getSignatureFromDeclaration",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateSignature(Z):void 0}async getExportSpecifierLocalTargetSymbol($){let Z=await this.client.apiRequest("getExportSpecifierLocalTargetSymbol",{snapshot:this.snapshotId,project:this.project.id,location:d($)});return Z?this.objectRegistry.getOrCreateSymbol(Z):void 0}async getAliasedSymbol($){let Z=await this.client.apiRequest("getAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id});if(!Z)throw Error(`getAliasedSymbol returned no symbol for symbol ${$.id}`);return this.objectRegistry.getOrCreateSymbol(Z)}async getImmediateAliasedSymbol($){let Z=await this.client.apiRequest("getImmediateAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id});return Z?this.objectRegistry.getOrCreateSymbol(Z):void 0}getWellKnownSymbols(){return this.wellKnownSymbols??=this.client.apiRequest("getWellKnownSymbols",{snapshot:this.snapshotId,project:this.project.id})}async isUnknownSymbol($){return $.id===(await this.getWellKnownSymbols()).unknown}async isUndefinedSymbol($){return $.id===(await this.getWellKnownSymbols()).undefined}async isArgumentsSymbol($){return $.id===(await this.getWellKnownSymbols()).arguments}async getExportsOfModule($){let Z=await this.client.apiRequest("getExportsOfModule",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id});return Z?Z.map((Y)=>this.objectRegistry.getOrCreateSymbol(Y)):[]}async getMemberInModuleExports($,Z){let Y=await this.client.apiRequest("getMemberInModuleExports",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id,name:Z});return Y?this.objectRegistry.getOrCreateSymbol(Y):void 0}async getJsDocTagsOfSymbol($){return await this.client.apiRequest("getJsDocTags",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id})??[]}async getDocumentationCommentOfSymbol($){return this.client.apiRequest("getDocumentationComment",{snapshot:this.snapshotId,project:this.project.id,symbol:$.id})}async getTypeArguments($){let Z=await this.client.apiRequest("getTypeArguments",{snapshot:this.snapshotId,project:this.project.id,type:$.id});return Z?Z.map((Y)=>this.objectRegistry.getOrCreateType(Y)):[]}}class Q1{client;constructor($){this.client=$}async printNode($,Z={}){let Y=n7($),Q=e7(Y);return this.client.apiRequest("printNode",{data:Q,...Z})}}class _0{canonicalProject;index;kind;path;constructor($,Z){let Y=GY($);this.index=Y.index,this.kind=Y.kind,this.path=Y.path,this.canonicalProject=Z}async resolve($=this.canonicalProject){let Z=await $.program.getSourceFile(this.path);if(!Z)return;return Z.getOrCreateNodeAtIndex(this.index)}}class G1{objectRegistry;canonicalProject;id;escapedName;name;flags;checkFlags;declarations;valueDeclaration;parent;exportSymbol;membersCache;exportsCache;constructor($,Z){this.objectRegistry=Z,this.id=$.id,this.escapedName=$.name,this.name=r6($.name),this.flags=$.flags,this.checkFlags=$.checkFlags;let Y=Z.getProject($.project);if(!Y)throw Error(`Symbol ${$.id} references unknown canonical project '${$.project}'`);if(this.canonicalProject=Y,this.declarations=($.declarations??[]).map((Q)=>new _0(Q,Y)),this.valueDeclaration=$.valueDeclaration?new _0($.valueDeclaration,Y):void 0,$.parent!==void 0)this.parent=$.parent;if($.exportSymbol!==void 0)this.exportSymbol=$.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($){let Z=await this.objectRegistry.fetchSymbols(this,$,void 0,this.canonicalProject.id),Y=new Map;for(let Q of Z)Y.set(Q.escapedName,Q);return Y}async getExportSymbol(){if(!this.exportSymbol)return this;return this.objectRegistry.fetchSymbol(this,"getExportSymbolOfSymbol",this.exportSymbol,this.canonicalProject.id)}async getJsDocTags($){return $.getJsDocTagsOfSymbol(this)}async getDocumentationComment($){return $.getDocumentationCommentOfSymbol(this)}}class J1{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($,Z){if(this.objectRegistry=Z,this.id=$.id,this.flags=$.flags,$.objectFlags!==void 0)this.objectFlags=$.objectFlags;if($.symbol!==void 0)this.symbol=$.symbol;if($.value!=null)this.value=$.flags&s.BigIntLiteral?BigInt($.value):$.value;if($.intrinsicName!==void 0)this.intrinsicName=$.intrinsicName;if($.isThisType!==void 0)this.isThisType=$.isThisType;if($.freshType!==void 0)this.freshType=$.freshType;if($.regularType!==void 0)this.regularType=$.regularType;if($.target!==void 0)this.target=$.target;if(this.typeParameters=$.typeParameters??[],this.outerTypeParameters=$.outerTypeParameters??[],this.localTypeParameters=$.localTypeParameters??[],this.aliasTypeArguments=$.aliasTypeArguments??[],$.aliasSymbol!==void 0)this.aliasSymbol=$.aliasSymbol;if($.elementFlags!==void 0)this.elementFlags=$.elementFlags;if($.fixedLength!==void 0)this.fixedLength=$.fixedLength;if($.readonly!==void 0)this.readonly=$.readonly;if($.texts!==void 0)this.texts=$.texts;if($.objectType!==void 0)this.objectType=$.objectType;if($.indexType!==void 0)this.indexType=$.indexType;if($.checkType!==void 0)this.checkType=$.checkType;if($.extendsType!==void 0)this.extendsType=$.extendsType;if($.baseType!==void 0)this.baseType=$.baseType;if($.substConstraint!==void 0)this.substConstraint=$.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&(s.UnionOrIntersection|s.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 $=await this.objectRegistry.fetchType(this,"getTrueTypeOfConditionalType",this.trueType);return this.trueType=$.id,$}async getFalseType(){let $=await this.objectRegistry.fetchType(this,"getFalseTypeOfConditionalType",this.falseType);return this.falseType=$.id,$}async getBaseTypes(){if(!this.isClassOrInterface())return;return this.objectRegistry.fetchBaseTypes(this)}isClassOrInterface(){return AU(this)}isUnionType(){return BU(this)}isIntersectionType(){return LU(this)}isObjectType(){return PZ(this)}isIntrinsicType(){return U1(this)}isErrorType(){return RU(this)}isLiteralType(){return IU(this)}isStringLiteralType(){return PU(this)}isNumberLiteralType(){return DU(this)}isBigIntLiteralType(){return MU(this)}isBooleanLiteralType(){return jU(this)}isTypeReference(){return EU(this)}isTupleType(){return OU(this)}isIndexType(){return _U(this)}isIndexedAccessType(){return TU(this)}isConditionalType(){return vU(this)}isSubstitutionType(){return fU(this)}isTemplateLiteralType(){return kU(this)}isStringMappingType(){return CU(this)}isTypeParameter(){return FU(this)}}function BU($){return($.flags&s.Union)!==0}function LU($){return($.flags&s.Intersection)!==0}function PZ($){return($.flags&s.Object)!==0}function AU($){return PZ($)&&($.objectFlags&X$.ClassOrInterface)!==0}function U1($){return($.flags&s.Intrinsic)!==0}function RU($){return U1($)&&$.intrinsicName==="error"}function IU($){return($.flags&s.Literal)!==0}function PU($){return($.flags&s.StringLiteral)!==0}function DU($){return($.flags&s.NumberLiteral)!==0}function MU($){return($.flags&s.BigIntLiteral)!==0}function jU($){return($.flags&s.BooleanLiteral)!==0}function EU($){return PZ($)&&($.objectFlags&X$.Reference)!==0}function OU($){return PZ($)&&($.objectFlags&X$.Tuple)!==0}function _U($){return($.flags&s.Index)!==0}function TU($){return($.flags&s.IndexedAccess)!==0}function vU($){return($.flags&s.Conditional)!==0}function fU($){return($.flags&s.Substitution)!==0}function kU($){return($.flags&s.TemplateLiteral)!==0}function CU($){return($.flags&s.StringMapping)!==0}function FU($){return($.flags&s.TypeParameter)!==0}class W1{flags;objectRegistry;id;declaration;typeParameters;parameters;thisParameter;target;constructor($,Z,Y){this.id=$.id,this.flags=$.flags,this.objectRegistry=Y,this.declaration=$.declaration?new _0($.declaration,Z):void 0,this.typeParameters=$.typeParameters??[],this.parameters=$.parameters??[],this.thisParameter=$.thisParameter,this.target=$.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&Q$.HasRestParameter)!==0}get isConstruct(){return(this.flags&Q$.Construct)!==0}get isAbstract(){return(this.flags&Q$.Abstract)!==0}}export{BU as isUnionType,EU as isTypeReference,FU as isTypeParameter,OU as isTupleType,kU as isTemplateLiteralType,fU as isSubstitutionType,CU as isStringMappingType,PU as isStringLiteralType,PZ as isObjectType,DU as isNumberLiteralType,IU as isLiteralType,U1 as isIntrinsicType,LU as isIntersectionType,TU as isIndexedAccessType,_U as isIndexType,RU as isErrorType,vU as isConditionalType,AU as isClassOrInterfaceType,jU as isBooleanLiteralType,MU as isBigIntLiteralType,RY as fileNameToDocumentURI,aZ as documentURIToFileName,CZ as TypePredicateKind,s as TypeFlags,D$ as SymbolFlags,G1 as Symbol,nX as Snapshot,kZ as SignatureKind,Q$ as SignatureFlags,W1 as Signature,Z1 as Project,Y1 as Program,X$ as ObjectFlags,_0 as NodeHandle,fZ as NodeBuilderFlags,vZ as ModuleKind,g as ModifierFlags,tX as InternalAPI,Q1 as Emitter,TZ as ElementFlags,_Z as DiagnosticCategory,OZ as CompletionItemKind,X1 as Checker,aX as API};