sveld 0.36.3 → 0.36.5

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.
@@ -1,4 +1,4 @@
1
- import{ga as qU,ha as e,ja as p0}from"./chunk-ndh639r1.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.
1
+ import{ta as qU,ua as e,wa as p0}from"./chunk-0q7qnmx3.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
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
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
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 ':'
@@ -1,2 +1,2 @@
1
1
  import{createRequire as s}from"node:module";var j=Object.create;var{getPrototypeOf:k,defineProperty:f,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,t=(a,b,c)=>{var g=a!=null&&typeof a==="object";if(g){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of l(a))if(!m.call(d,e))f(d,e,{get:n.bind(a,e),enumerable:!0});if(g)h.set(a,d);return d};var u=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var v=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var x=s(import.meta.url);
2
- export{t as ga,u as ha,v as ia,x as ja};
2
+ export{t as ta,u as ua,v as va,x as wa};
@@ -0,0 +1,17 @@
1
+ function C(w){return typeof w==="object"&&w!==null}function Sw(w){return C(w)&&w.type==="VariableDeclaration"&&Array.isArray(w.declarations)}function W0(w){return C(w)&&w.type==="Literal"}function h0(w){return C(w)&&w.type==="Identifier"&&typeof w.name==="string"}function fw(w){return C(w)&&w.type==="MemberExpression"}function F0(w){return C(w)&&w.type==="ObjectExpression"&&Array.isArray(w.properties)}function i0(w){return C(w)&&w.type==="CallExpression"}function Dw(w,O){if(!i0(w))return!1;return!!w.callee&&C(w.callee)&&w.callee.type==="Identifier"&&w.callee.name===O}function p0(w){if(C(w)&&(w.type==="TSAsExpression"||w.type==="TSSatisfiesExpression")&&"expression"in w)return p0(w.expression);return w}function Ew(w){if(C(w)&&(w.type==="TSAsExpression"||w.type==="TSSatisfiesExpression")&&"typeAnnotation"in w)return w.typeAnnotation;return}function o0(w){return C(w)&&w.type==="NewExpression"}function K0(w,O){if(!o0(w))return!1;return!!w.callee&&C(w.callee)&&w.callee.type==="Identifier"&&w.callee.name===O}var n0=Symbol("sveld.parsedComponentTypeScriptMetadata");function vw(w){return w[n0]}function Nw(w,O){if(O.length===0)return;let j=new Set(w.props.map((W)=>W.name));for(let W of O){if(j.has(W.name))continue;j.add(W.name),w.props.push({name:W.name,kind:"let",constant:!1,type:W.type,typeSource:"typescript",...W.description?{description:W.description}:{},isFunction:W.type.includes("=>"),isFunctionDeclaration:!1,isRequired:W.isRequired,reactive:!1})}}var r0=/\w/;function c0(w,O){let j=w.trim();if(!j.startsWith("{")||!j.endsWith("}"))return;let W=j.slice(1,-1),K=[],Z=0,$="";for(let Q of W)if(Q==="{"||Q==="<"||Q==="("||Q==="[")Z++,$+=Q;else if(Q==="}"||Q===">"||Q===")"||Q==="]")Z--,$+=Q;else if((Q===";"||Q===",")&&Z===0)K.push($.trim()),$="";else $+=Q;if($.trim())K.push($.trim());for(let Q of K){if(!Q.startsWith(O))continue;let J=Q.slice(O.length);if(J.length>0&&r0.test(J[0]))continue;let M=J.trimStart();if(M.startsWith("?"))M=M.slice(1).trimStart();if(M.startsWith(":"))return M.slice(1).trim()}return}function C0(w,O,j){let W=j;if(W.computed||W.object?.type!=="Identifier"||W.property?.type!=="Identifier")return;let K=W.object.name,Z=W.property.name;if(!K||!Z)return;if(w.wholePropsLocals.has(K))return O.getPropTypeByLocalOrPublic(Z);let $=O.getPropTypeByLocalOrPublic(K)??O.findVariableTypeAndDescription(K)?.type;if(!$)return;return c0($,Z)}var s0=/[\r\n]+/g;function a0(w){if(w.sourceLineStartOffsetsCache)return w.sourceLineStartOffsetsCache;let O=[0];if(w.source){for(let j=0;j<w.source.length;j++)if(w.source[j]===`
2
+ `)O.push(j+1)}return w.sourceLineStartOffsetsCache=O,O}function I0(w,O){if(!w.source||O<0||O>w.source.length)return;let j=a0(w),W=0,K=j.length-1;while(W<=K){let Z=Math.floor((W+K)/2),$=j[Z],Q=j[Z+1]??Number.POSITIVE_INFINITY;if(O<$)K=Z-1;else if(O>=Q)W=Z+1;else return{line:Z+1,column:O-$}}return}function b0(w,O,j){if(O===void 0||j===void 0||j<O)return;let W=I0(w,O),K=I0(w,j);if(!W||!K)return;return{start:W,end:K}}function L0(w,O){if(!O||typeof O!=="object")return;let j="start"in O&&typeof O.start==="number"?O.start:void 0,W="end"in O&&typeof O.end==="number"?O.end:void 0;return b0(w,j,W)}function Z0(w,O,j,W){if(!j||j.length===0||W===void 0)return;let K=[...j];while(K.length>1){let X=K[K.length-1];if(X.tokens.tag||!X.source.trim().endsWith("*/"))break;K.pop()}let Z=W;for(let X=0;X<K[0].number-1;X++)Z+=O[X]?.source.length??0,Z+=1;let $=K[0],Q=$.source.indexOf($.tokens.tag??""),J=Z+Math.max(Q,0),M=W,Y=K[K.length-1],z=Y.number;for(let X=0;X<z-1;X++)M+=O[X]?.source.length??0,M+=1;return M+=Y.source.length,b0(w,J,M)}function l(w,O,j){return w.source?.slice(O,j)}function yw(w,O){if(!O||typeof O!=="object")return;let j="start"in O&&typeof O.start==="number"?O.start:void 0,W="end"in O&&typeof O.end==="number"?O.end:void 0;if(j===void 0||W===void 0)return;return l(w,j,W)?.replace(s0," ")}function N(w){return w===void 0||w===""?void 0:w}function t0(w){return typeof w==="string"?JSON.stringify(w):String(w)}function $0(w,{name:O,detail:j,has_argument:W,description:K,deprecated:Z,tags:$,source:Q}){if(O===void 0)return;let J=!W&&!j?"null":N(j),M=K,Y=w.events.get(O);if(Y?.type==="forwarded")w.events.set(O,{type:"dispatched",name:O,detail:J,description:M||Y.description,deprecated:Z??Y.deprecated,tags:$??Y.tags,source:Q||Y.source});else if(Y){let z=Y.tags??$;w.events.set(O,{...Y,detail:Y.detail===void 0?J:Y.detail,description:Y.description||M,deprecated:Y.deprecated??Z,tags:z,source:Q||Y.source})}else w.events.set(O,{type:"dispatched",name:O,detail:J,description:M,deprecated:Z,tags:$,source:Q})}function iw(w,O){let j=O.arguments[0],W=K0(j,"CustomEvent");if(!W&&!K0(j,"Event"))return;let K=j.arguments[0],Z=W0(K)?K.value:void 0;if(Z==null)return;let $=W?j.arguments[1]:void 0,Q=!1,J;if(F0($)){let M=$.properties.find((Y)=>Y.type==="Property"&&h0(Y.key)&&Y.key.name==="detail");if(M?.type==="Property")Q=!0,J=W0(M.value)?M.value.value:void 0}return $0(w,{name:String(Z),detail:J==null?"":t0(J),has_argument:Q,source:L0(w,O)}),String(Z)}function Q0(w,O,j=!1){if(w.length===0)return"null";let W=w.map(({name:K,type:Z,description:$,optional:Q,default:J})=>{let M=Q?"?":"",Y=$||"";if(J&&Y)Y=`${Y} @default ${J}`;else if(J)Y=`@default ${J}`;if(Y){if(j)return`/** ${Y} */
3
+ ${K}${M}: ${Z};`;return`/** ${Y} */ ${K}${M}: ${Z};`}return`${K}${M}: ${Z};`}).join(j?`
4
+ `:" ");return j?`{
5
+ ${W}
6
+ }`:`{ ${W} }`}var e0=/[A-Za-z_$][\w$]*/g;function ww(w,O){if(!O)return!1;let j=new Set(O[0].split(",").map((W)=>W.trim()));for(let[W]of w.matchAll(e0))if(j.has(W))return!0;return!1}function Ow(w,O){if(O===void 0)return;return w.runesPropsDeclarationMetadataByDeclaratorStart.get(O)}function nw(w,O,j){return Ow(w,O)?.props.get(j)}function rw(w){if(!w||typeof w!=="object"||!("type"in w))return;if(w.type==="Identifier"&&"name"in w&&typeof w.name==="string")return w.name;if(w.type==="TSQualifiedName"&&"right"in w&&w.right&&typeof w.right==="object"&&"name"in w.right&&typeof w.right.name==="string")return w.right.name;return}function _0(w){if(!w||typeof w!=="object"||!("type"in w))return;if(w.type==="Identifier"&&"name"in w&&typeof w.name==="string")return w.name;if(w.type==="TSQualifiedName"&&"left"in w&&w.left&&typeof w.left==="object")return _0(w.left);return}function cw(w,O){let j=O?.start,W=O?.end;if(j===void 0||W===void 0)return;return l(w,j+1,W)?.trim()}function sw(w,O){let j=O?.start,W=O?.end;if(j===void 0||W===void 0)return;return l(w,j,W)?.trim()}function D(w,O,j,W,K=new Set){if(!O?.type)return;switch(O.type){case"TSInterfaceDeclaration":D(w,{type:"TSTypeLiteral",members:O.body?.body},j,W,K);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":D(w,O.typeAnnotation,j,W,K);return;case"TSIntersectionType":case"TSUnionType":for(let Z of O.types??[])D(w,Z,j,W,K);return;case"TSTypeLiteral":for(let Z of O.members??[]){if(Z?.type!=="TSPropertySignature")continue;D(w,Z.typeAnnotation?.typeAnnotation,j,W,K)}return;case"TSTypeReference":{let Z=_0(O.typeName);if(Z){if(w.typeImportBindingsByLocalName.has(Z))j.add(Z);let $=w.localTypeDeclarationsByName.get(Z);if($&&!K.has(Z))W.add(Z),K.add(Z),D(w,$.node,j,W,K),K.delete(Z)}if("typeParameters"in O&&O.typeParameters&&typeof O.typeParameters==="object"){let $=O.typeParameters;for(let Q of $.params??[])D(w,Q,j,W,K)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let Z of Object.values(O)){if(!Z||typeof Z!=="object")continue;if(Array.isArray(Z)){for(let $ of Z){if(!$||typeof $!=="object"||!("type"in $))continue;D(w,$,j,W,K)}continue}if("type"in Z)D(w,Z,j,W,K)}}function jw(w,O){let j=new Map;for(let W of Array.from(O).sort()){let K=w.typeImportBindingsByLocalName.get(W);if(!K)continue;let Z=j.get(K.source)??{default:[],named:[],namespace:[]};if(K.specifierType==="default")Z.default.push(K.localName);else if(K.specifierType==="namespace")Z.namespace.push(K.localName);else Z.named.push({imported:K.importedName,local:K.localName});j.set(K.source,Z)}return Array.from(j.entries()).sort(([W],[K])=>W.localeCompare(K)).map(([W,K])=>{if(K.namespace.length>0)return K.namespace.map((J)=>`import type * as ${J} from "${W}";`).join(`
7
+ `);let Z=K.named.map(({imported:J,local:M})=>{if(!J||J===M)return M;return`${J} as ${M}`}),$=K.default[0],Q=Z.length>0?`{ ${Z.join(", ")} }`:"";if($&&Q)return`import type ${$}, ${Q} from "${W}";`;if($)return`import type ${$} from "${W}";`;return`import type ${Q} from "${W}";`})}function aw(w){let O=w.pendingCallDefaultCandidates.length>0?w.pendingCallDefaultCandidates.slice():void 0;if(w.typedRunesPropsDeclarations.length!==1)return O?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],pendingCallDefaultCandidates:O}:void 0;let[j]=w.typedRunesPropsDeclarations;if(!j.canonicalType)return O?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],pendingCallDefaultCandidates:O}:void 0;let W=Array.from(j.referencedLocalTypes).map((K)=>w.localTypeDeclarationsByName.get(K)).filter((K)=>K!==void 0).sort((K,Z)=>K.start-Z.start).map((K)=>K.code);return{canonicalPropsType:j.canonicalType,canonicalPropNames:Array.from(j.props.keys()).sort(),localTypeDeclarations:W,typeImportStatements:jw(w,j.referencedImportedTypes),referencesComponentGenerics:ww(j.canonicalType,w.generics),...O?{pendingCallDefaultCandidates:O}:{}}}var Ww=/^[A-Za-z_$][\w$]*/,Kw=/[A-Za-z_$][\w$]*/g,S0=/^(?:const|in|out)\s+/;function Y0(w){let O=[],j=0,W=0;for(let K=0;K<w.length;K++){let Z=w[K];if(Z==="<"||Z==="("||Z==="["||Z==="{")j++;else if(Z===">"||Z===")"||Z==="]"||Z==="}")j=Math.max(j-1,0);else if(Z===","&&j===0)O.push(w.slice(W,K)),W=K+1}return O.push(w.slice(W)),O}function wO(w){let O=Y0(w).map((W)=>W.trim()).filter((W)=>W.length>0);if(O.length===0)return null;return[O.map((W)=>{let K=W;while(S0.test(K))K=K.replace(S0,"");return K.match(Ww)?.[0]??W}).join(", "),O.join(", ")]}function OO(w,O,j){let W=w.scriptGenericsAttribute?.value;if(!W)return;for(let[K]of W.matchAll(Kw)){if(w.typeImportBindingsByLocalName.has(K))O.add(K);if(j.has(K))continue;let Z=w.localTypeDeclarationsByName.get(K);if(!Z)continue;j.add(K),D(w,Z.node,O,j)}}var Zw=null;function $w(w,O,j){let W={value:void 0,replace:!1};if(!j||typeof j!=="object"||!("type"in j))return W;if(j.type==="Identifier")W.value=j.name,W.replace=!0;else if(j.type==="Literal")W.value=String(j.value);else if(j.type==="MemberExpression")W.value=C0(w,O,j);else if((j.type==="ObjectExpression"||j.type==="TemplateLiteral")&&"start"in j&&"end"in j&&typeof j.start==="number"&&typeof j.end==="number")W.value=l(w,j.start,j.end);return W}function $O(w,O,j){let W={};for(let K of j.properties){if(K.type!=="Property"||K.computed)continue;let Z=O.getPropertyName(K.key);if(!Z)continue;W[Z]=$w(w,O,K.value)}return W}function Qw(w,O){if(!O||typeof O!=="object"||!("type"in O))return null;if(O.type==="Identifier"){let Z=O,$=w.propLocalToPublicName.get(Z.name);if(!$)return null;return{publicName:$,trackingName:Z.name}}if(O.type!=="MemberExpression")return null;let j=O,W=j.object&&typeof j.object==="object"&&"type"in j.object&&j.object.type==="Identifier"?j.object.name:void 0;if(!W||!w.wholePropsLocals.has(W))return null;let K;if(!j.computed&&j.property&&typeof j.property==="object"&&"type"in j.property){if(j.property.type==="Identifier")K=j.property.name;else if(j.property.type==="Literal"&&j.property.value!=null)K=String(j.property.value)}else if(j.computed&&j.property&&typeof j.property==="object"&&"type"in j.property&&j.property.type==="Literal"&&"value"in j.property&&j.property.value!=null)K=String(j.property.value);if(!K)return null;return{publicName:K,trackingName:K}}function QO(w,O){let j=O;if(j&&typeof j==="object"&&"type"in j&&j.type==="ChainExpression")j=j.expression;if(!j||typeof j!=="object"||!("type"in j)||j.type!=="CallExpression")return null;let W=j;if(!W.callee||typeof W.callee!=="object"||!("type"in W.callee))return null;let K=Qw(w,W.callee);if(!K)return null;return{...K,arguments:W.arguments}}function f0(w,{slot_name:O,slot_props:j,slot_fallback:W,slot_description:K,slot_deprecated:Z,slot_tags:$,source:Q}){let J=O===void 0||O==="",M=J?Zw:O??"",Y=N(W),z=j===void 0||j===""?void 0:j,X=K?.trim()||void 0;if(w.slots.has(M)){let B=w.slots.get(M);if(B)w.slots.set(M,{...B,default:B.default??J,fallback:Y,slot_props:B.slot_props===void 0?z:B.slot_props,description:B.description||X,deprecated:B.deprecated??Z,tags:B.tags||$,source:Q||B.source})}else w.slots.set(M,{name:M,default:J,fallback:Y,slot_props:j,description:X,deprecated:Z,tags:$,source:Q})}var I;(function(w){w.start="/**",w.nostart="/***",w.delim="*",w.end="*/"})(I||(I={}));function M0(w){return/^\s+$/.test(w)}function D0(w){let O=w.match(/\r+$/);return O==null?["",w]:[w.slice(-O[0].length),w.slice(0,-O[0].length)]}function k(w){let O=w.match(/^\s+/);return O==null?["",w]:[w.slice(0,O[0].length),w.slice(O[0].length)]}function E0(w){return w.split(/\n/)}function k0(w={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},w)}function J0(w={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},w)}var Yw=/^@[^\s/]+(?=\s|$)/;function z0({fence:w="```"}={}){let O=Mw(w),j=(W,K)=>O(W)?!K:K;return function(K){let Z=[[]],$=!1;for(let Q of K){if(Yw.test(Q.tokens.description)&&!$)Z.push([Q]);else Z[Z.length-1].push(Q);$=j(Q.tokens.description,$)}return Z}}function Mw(w){if(typeof w==="string")return(O)=>O.split(w).length%2===0;return w}function H0({startLine:w=0,markers:O=I}={}){let j=null,W=w;return function(Z){let $=Z,Q=J0();if([Q.lineEnd,$]=D0($),[Q.start,$]=k($),j===null&&$.startsWith(O.start)&&!$.startsWith(O.nostart))j=[],Q.delimiter=$.slice(0,O.start.length),$=$.slice(O.start.length),[Q.postDelimiter,$]=k($);if(j===null)return W++,null;let J=$.trimRight().endsWith(O.end);if(Q.delimiter===""&&$.startsWith(O.delim)&&!$.startsWith(O.end))Q.delimiter=O.delim,$=$.slice(O.delim.length),[Q.postDelimiter,$]=k($);if(J){let M=$.trimRight();Q.end=$.slice(M.length-O.end.length),$=M.slice(0,-O.end.length)}if(Q.description=$,j.push({number:W,source:Z,tokens:Q}),W++,J){let M=j.slice();return j=null,M}return null}}function X0({tokenizers:w}){return function(j){var W;let K=k0({source:j});for(let Z of w)if(K=Z(K),(W=K.problems[K.problems.length-1])===null||W===void 0?void 0:W.critical)break;return K}}function n(){return(w)=>{let{tokens:O}=w.source[0],j=O.description.match(/\s*(@(\S+))(\s*)/);if(j===null)return w.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:w.source[0].number,critical:!0}),w;if(j[1].includes("/"))return w;return O.tag=j[1],O.postTag=j[3],O.description=O.description.slice(j[0].length),w.tag=j[2],w}}function r(w="compact"){let O=zw(w);return(j)=>{let W=0,K=[],Z=!1,$=!0;for(let{tokens:M}of j.source.values()){let Y="";if(!Z&&M.description.trim())Z=!0;else if(!Z)continue;if($&&M.description[0]!=="{")return j;$=!1;for(let z of M.description){if(z==="{")W++;if(z==="}")W--;if(Y+=z,W===0)break}if(K.push([M,Y]),W===0)break}if(!Z)return j;if(W!==0)return j.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:j.source[0].number,critical:!0}),j;let Q=[],J=K[0][0].postDelimiter.length;for(let[M,[Y,z]]of K.entries()){if(Y.type=z,M>0)Y.type=Y.postDelimiter.slice(J)+z,Y.postDelimiter=Y.postDelimiter.slice(0,J);[Y.postType,Y.description]=k(Y.description.slice(z.length)),Q.push(Y.type)}return Q[0]=Q[0].slice(1),Q[Q.length-1]=Q[Q.length-1].slice(0,-1),j.type=O(Q),j}}var Jw=(w)=>w.trim();function zw(w){if(w==="compact")return(O)=>O.map(Jw).join("");else if(w==="preserve")return(O)=>O.join(`
8
+ `);else return w}var v0=(w)=>w&&w.startsWith('"')&&w.endsWith('"');function c(){let w=(O,{tokens:j},W)=>j.type===""?O:W;return(O)=>{let j=O.source.reduce(w,0),W;if(O.type)do{if({tokens:W}=O.source[j],W.description.trim())break;j++}while(O.source[j]);else({tokens:W}=O.source[j]);let K=W.description.trimStart(),Z=K.split('"');if(Z.length>1&&Z[0]===""&&Z.length%2===1)return O.name=Z[1],W.name=`"${Z[1]}"`,[W.postName,W.description]=k(K.slice(W.name.length)),O;let $=0,Q="",J=!1,M;for(let z of K){if($===0&&M0(z))break;if(z==="[")$++;if(z==="]")$--;Q+=z}if($!==0)return O.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:O.source[0].number,critical:!0}),O;let Y=Q;if(Q[0]==="["&&Q[Q.length-1]==="]"){J=!0,Q=Q.slice(1,-1);let z=Q.split("=");if(Q=z[0].trim(),z[1]!==void 0)M=z.slice(1).join("=").trim();if(Q==="")return O.problems.push({code:"spec:name:empty-name",message:"empty name",line:O.source[0].number,critical:!0}),O;if(M==="")return O.problems.push({code:"spec:name:empty-default",message:"empty default value",line:O.source[0].number,critical:!0}),O;if(!v0(M)&&/=(?!>)/.test(M))return O.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:O.source[0].number,critical:!0}),O}if(!J){let z=Q.search(/=(?!>)/);if(z!==-1){let X=Q.slice(0,z).trim(),B=Q.slice(z+1).trim();if(X==="")return O.problems.push({code:"spec:name:empty-name",message:"empty name",line:O.source[0].number,critical:!0}),O;if(B==="")return O.problems.push({code:"spec:name:empty-default",message:"empty default value",line:O.source[0].number,critical:!0}),O;if(/^[\p{ID_Start}$_\.][\p{ID_Continue}$_\u200c\u200d\.]*=/u.test(Q)){if(!v0(B)&&/=(?!>)/.test(B))return O.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:O.source[0].number,critical:!0}),O;Q=X,M=B}}}if(O.optional=J,O.name=Q,W.name=Y,M!==void 0)O.default=M;return[W.postName,W.description]=k(K.slice(W.name.length)),O}}function s(w="compact",O=I){let j=q0(w);return(W)=>{return W.description=j(W.source,O),W}}function q0(w){if(w==="compact")return Hw;if(w==="preserve")return Uw;return w}function Hw(w,O=I){return w.map(({tokens:{description:j}})=>j.trim()).filter((j)=>j!=="").join(" ")}var Xw=(w,{tokens:O},j)=>O.type===""?w:j,qw=({tokens:w})=>(w.delimiter===""?w.start:w.postDelimiter.slice(1))+w.description;function Uw(w,O=I){if(w.length===0)return"";if(w[0].tokens.description===""&&w[0].tokens.delimiter===O.start)w=w.slice(1);let j=w[w.length-1];if(j!==void 0&&j.tokens.description===""&&j.tokens.end.endsWith(O.end))w=w.slice(0,-1);return w=w.slice(w.reduce(Xw,0)),w.map(qw).join(`
9
+ `)}function U0({startLine:w=0,fence:O="```",spacing:j="compact",markers:W=I,tokenizers:K=[n(),r(j),c(),s(j)]}={}){if(w<0||w%1>0)throw Error("Invalid startLine");let Z=H0({startLine:w,markers:W}),$=z0({fence:O}),Q=X0({tokenizers:K}),J=q0(j);return function(M){let Y=[];for(let z of E0(M)){let X=Z(z);if(X===null)continue;let B=$(X),b=B.slice(1).map(Q);Y.push({description:J(B[0],W),tags:b,source:X,problems:b.reduce((L,_)=>L.concat(_.problems),[])})}return Y}}function Bw(w){return w.start+w.delimiter+w.postDelimiter+w.tag+w.postTag+w.type+w.postType+w.name+w.postName+w.description+w.end+w.lineEnd}function B0(){return(w)=>w.source.map(({tokens:O})=>Bw(O)).join(`
10
+ `)}var Gw={line:0,start:0,delimiter:0,postDelimiter:0,tag:0,postTag:0,name:0,postName:0,type:0,postType:0,description:0,end:0,lineEnd:0};var iO=Object.keys(Gw);function a(w,O={}){return U0(O)(w)}var Jj=B0();var Vw=/\s*=\s*/;function N0(w){let O=w.indexOf("<");if(O===-1||!w.endsWith(">"))return w;let j=w.slice(0,O),W=w.slice(O+1,-1),K=Y0(W).map((Z)=>Z.trim().replace(Vw," = ")).join(", ");return`${j}<${K}>`}var Aw=/^\s*$/,Rw=/;$/,Pw=/^-\s*/;function T(w){if(w===void 0)return;let O=w.replace(Pw,"").trim();return O===""?"":O}function i(w){if(!w||w.length===0)return;return w[0].tokens.description}var x0=new Set(["since","example"]);function T0(w){if(!w||w.length===0)return"";let O=[];for(let j of w){let W=j.tokens;if((W.end??"").trim()==="*/")break;if(W.tag){let K=`${W.name??""}${W.postName??""}${W.description??""}`.trimEnd();if(K)O.push(K)}else O.push(`${W.postDelimiter??""}${W.description??""}`)}return O.join(`
11
+ `)}function hw(w){let O=w.trim();return O===""?!0:O}function y0(w,O){return hw(`${w??""}${O?` ${O}`:""}`)}function Fw(w){let O=w.trim().replace(Rw,"").trimEnd();if(!O.startsWith("{")||!O.endsWith("}"))return!1;let j=0,W=null;for(let K=0;K<O.length;K++){let Z=O[K];if(W!==null){if(Z==="\\"){K++;continue}if(Z===W)W=null;continue}if(Z==='"'||Z==="'"||Z==="`"){W=Z;continue}if(Z==="{"||Z==="["||Z==="(")j++;else if(Z==="}"||Z==="]"||Z===")"){if(j--,j===0&&K<O.length-1)return!1}}return j===0}function u0(w){let O=w;if(!O.startsWith("/*"))O=`/*${O}`;if(!O.endsWith("*/"))O+="*/";return O}function Cw(w){if(w==="*")return"any";return w.trim()}function Rj(w){let O=a(u0(w),{spacing:"preserve"}),{returns:j}=g0(O);return j?Cw(j.type):void 0}function g0(w){let O=w[0]?.tags??[],j=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated"]),W,K=[],Z,$,Q,J=[],M=[];for(let Y of O)if(Y.tag==="type")W=Y;else if(Y.tag==="param")K.push(Y);else if(Y.tag==="returns"||Y.tag==="return")Z=Y;else if(Y.tag==="deprecated")Q??=y0(Y.name,Y.description);else if(x0.has(Y.tag))M.push(Y);else if(Y.tag==="bindable"){if(Y.type)continue;let z=`${Y.name}${Y.description?` ${Y.description}`:""}`.trim();if(z==="readonly"||z==="writable")$??=z}else if(!j.has(Y.tag))J.push(Y);return{type:W,param:K,returns:Z,binding:$,deprecated:Q,additional:J,passthrough:M,description:w[0]?.description}}function Iw(w){if(!w||w.length===0)return;let O=w[w.length-1];return O&&typeof O==="object"&&"value"in O?O:void 0}function bw(w,O,j){if(!O||O.length===0||j===void 0||!w.source)return;for(let W=O.length-1;W>=0;W--){let K=O[W];if(!K||typeof K!=="object"||!("value"in K)||!("end"in K))continue;if(typeof K.end!=="number")continue;let Z=w.source.slice(K.end,j);if(Aw.test(Z))return K}return}function Lw(w,O,j){if(!j?.leadingComments)return;let W=bw(w,j.leadingComments,j.start);if(!W)return;return _w(O,[W])}function Pj(w,O,j){if(!j?.leadingComments)return;return Lw(w,O,j)}function _w(w,O){if(!O)return;let j=Iw(O);if(!j)return;let W=a(u0(j.value),{spacing:"preserve"}),{type:K,param:Z,returns:$,binding:Q,deprecated:J,additional:M,passthrough:Y,description:z}=g0(W),X,B,b,L;if(K)X=w.aliasType(K.type);if(Z.length>0)B=Z.filter((G)=>!G.name.includes(".")).map((G)=>({name:G.name,type:w.aliasType(G.type),description:T(G.description),optional:G.optional||!1}));if($)b=w.aliasType($.type);let _=N(z?.trim());if(_||M.length>0){let G=[];if(_)G.push(_);for(let S of M){let x=`@${S.tag}${S.name?` ${S.name}`:""}${S.description?` ${S.description}`:""}`;G.push(x)}L=G.join(`
12
+ `)}let y=Y.length>0?Y.map((G)=>({name:G.tag,body:T0(G.source)})):void 0;return{type:X,params:B,returnType:b,description:L,binding:Q,deprecated:J,tags:y}}function hj(w,O,j=w.source){if(!j)return;let W=0;for(let{tags:K,description:Z,source:$}of a(j,{spacing:"preserve"})){let Q=$.map((H)=>H.source).join(`
13
+ `),J=j.indexOf(Q,W),M=J===-1?void 0:J;if(J!==-1)W=J+Q.length;let Y,z,X,B,b,L,_=[],y=[],G,S,x,p=[],v,d,t=[],e,f=!1,A=!0,m=[],w0,o=new Map,V0=new Set,O0=new Set;for(let H of K)if(H.source&&H.source.length>0)V0.add(H.source[0].number);for(let H of $)if(!H.tokens.tag&&H.tokens.description&&H.tokens.description.trim()!=="}")o.set(H.number,H.tokens.description);let l0=(H)=>{if(!H||H.length===0)return;let h=H[0].number,U=[],F=[],E=!1;for(let q=h-1;q>=1;q--){if(V0.has(q))break;let V=o.get(q);if(V)U.unshift(V),F.unshift(q),E=!0;else if(E){let R=$.find((P)=>P.number===q);if(!(!R||!R.tokens.tag&&(!R.tokens.description||R.tokens.description.trim()==="")))break}}if(U.length===0)return;for(let q of F)O0.add(q);return U.join(`
14
+ `).trim()},A0=()=>{if(Y!==void 0){let H=z&&z!=="object"&&z!=="Object"?z:void 0,h;if(H)h=H;else if(y.length>0)h=Q0(y,Y,!0);else h=z||"";if(L!==void 0){let U;for(let q of K){let V=q.source?.[0]?.number;if(typeof V!=="number")continue;if(V<=L)continue;if(q.tag==="property"||q.tag==="type")continue;U=V;break}let F=[],E=Array.from(o.keys()).sort((q,V)=>q-V);for(let q of E){if(q<=L)continue;if(U!==void 0&&q>=U)continue;if(O0.has(q))continue;let R=o.get(q)?.trim();if(R)F.push(R),O0.add(q)}if(F.length>0){let q=F.join(`
15
+ `);X=X?`${X}
16
+ ${q}`:q}}$0(w,{name:Y,detail:h,has_argument:!1,description:X,deprecated:B,tags:_.length>0?_:void 0,source:b}),w.eventDescriptions.set(Y,X),w.jsDocEventNames.add(Y),w.jsDocEventSources.set(Y,b),y.length=0,Y=void 0,z=void 0,X=void 0,B=void 0,b=void 0,L=void 0,_=[]}},R0=()=>{if(G!==void 0){let H,h;if(p.length>0)H=Q0(p,void 0,!0),h=`type ${G} = ${H};`;else if(S)H=S,h=Fw(H)?`interface ${G} ${H}`:`type ${G} = ${H};`;else H="{}",h=`type ${G} = ${H};`;w.typedefs.set(G,{type:H,name:G,description:N(x),ts:h}),p.length=0,G=void 0,S=void 0,x=void 0}},P0=()=>{if(v!==void 0){let U=`(${t.map(({name:E,type:q,optional:V})=>{return`${E}${V?"?":""}: ${q}`}).join(", ")}) => ${e||"void"}`,F=`type ${v} = ${U};`;w.typedefs.set(v,{type:U,name:v,description:N(d),ts:F}),t.length=0,e=void 0,v=void 0,d=void 0}},d0=K.some((H)=>H.tag==="slot"||H.tag==="snippet"),m0=K.some((H)=>H.tag==="extends"||H.tag==="extendProps");for(let{tag:H,type:h,name:U,description:F,optional:E,default:q,source:V}of K){let R=O.aliasType(h),u=l0(V);switch(H){case"extends":case"extendProps":if(w.extends={interface:U,import:R},A)A=!1;break;case"restProps":{let P=U?F?`${U} ${F}`:U:F,j0=T(P)||u;if(!j0&&A&&!f&&Z)j0=Z,f=!0;if(w.rest_props={type:"Element",name:R,description:j0||void 0},A)A=!1;break}case"slot":case"snippet":{let g=T(i(V));if(!g&&A&&!f&&Z)g=Z,f=!0;if(!g&&m.length===0)g=u;if(A)A=!1;f0(w,{slot_name:U,slot_props:R,slot_description:g||void 0,slot_deprecated:w0,slot_tags:m.length>0?[...m]:void 0,source:Z0(w,$,V,M)}),m.length=0,w0=void 0;break}case"event":{if(A0(),Y=U,z=R,L=V&&V.length>0?V[0].number:void 0,X=T(i(V))||u,!X&&A&&!f&&Z)X=Z,f=!0;if(b=Z0(w,$,V,M),A)A=!1;break}case"type":if(Y!==void 0)z=R;break;case"param":if(v!==void 0)t.push({name:U,type:R,optional:E||!1});break;case"returns":case"return":if(v!==void 0)e=R;break;case"property":{let P={name:U,type:R,description:T(i(V)),optional:E||!1,default:q};if(Y!==void 0)y.push(P);else if(G!==void 0)p.push(P);break}case"typedef":{if(R0(),G=N0(U),S=R,x=T(i(V))||u,!x&&A&&!f&&Z)x=Z,f=!0;if(A)A=!1;break}case"callback":{if(P0(),v=N0(U),d=T(i(V))||u,!d&&A&&!f&&Z)d=Z,f=!0;if(A)A=!1;break}case"generics":if(w.generics=[U,R],A)A=!1;break;case"template":{let P=U;if(R)P=`${U} extends ${R}`;if(q)P+=` = ${q}`;if(d0&&!m0){w.deferredSlotBlockGenerics.push({name:U,constraint:P});break}if(O.accumulateGeneric(U,P),A)A=!1;break}case"deprecated":{let P=y0(U,F);if(Y===void 0)w0??=P;else B??=P;break}case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let P={name:H,body:T0(V)};if(Y!==void 0&&x0.has(H))_.push(P);else m.push(P)}break}}A0(),R0(),P0()}}
17
+ export{C as u,Sw as v,W0 as w,h0 as x,fw as y,F0 as z,Dw as A,p0 as B,Ew as C,n0 as D,vw as E,Nw as F,C0 as G,s0 as H,b0 as I,L0 as J,l as K,yw as L,N as M,t0 as N,$0 as O,iw as P,Ow as Q,nw as R,rw as S,cw as T,sw as U,D as V,aw as W,Y0 as X,wO as Y,OO as Z,a as _,$O as $,QO as aa,f0 as ba,Aw as ca,Rj as da,g0 as ea,Lw as fa,Pj as ga,hj as ha};