UNPKG

code-server

Version:

Run VS Code on a remote server.

38 lines • 214 kB
"use strict";(()=>{var bf=Object.create;var Hr=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var wf=Object.getOwnPropertyNames;var Sf=Object.getPrototypeOf,Ef=Object.prototype.hasOwnProperty;var I=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var g=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var Tf=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wf(e))!Ef.call(t,i)&&i!==n&&Hr(t,i,{get:()=>e[i],enumerable:!(r=qo(e,i))||r.enumerable});return t};var W=(t,e,n)=>(n=t!=null?bf(Sf(t)):{},Tf(e||!t||!t.__esModule?Hr(n,"default",{value:t,enumerable:!0}):n,t));var vn=(t,e,n,r)=>{for(var i=r>1?void 0:r?qo(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&Hr(e,n,i),i};var Wo=g(()=>{var Go;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:u(),r=i(t);typeof n.Reflect<"u"&&(r=i(n.Reflect,r)),e(r,n),typeof n.Reflect>"u"&&(n.Reflect=t);function i(c,a){return function(l,p){Object.defineProperty(c,l,{configurable:!0,writable:!0,value:p}),a&&a(l,p)}}function o(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function u(){return o()||s()}})(function(e,n){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create=="function",c={__proto__:[]}instanceof Array,a=!u&&!c,l={create:u?function(){return $r(Object.create(null))}:c?function(){return $r({__proto__:null})}:function(){return $r({})},has:a?function(f,d){return r.call(f,d)}:function(f,d){return d in f},get:a?function(f,d){return r.call(f,d)?f[d]:void 0}:function(f,d){return f[d]}},p=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:gf(),w=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:mf(),C=typeof WeakMap=="function"?WeakMap:yf(),x=i?Symbol.for("@reflect-metadata:registry"):void 0,R=df(),Y=pf(R);function ae(f,d,h,y){if(O(h)){if(!Mo(f))throw new TypeError;if(!Do(d))throw new TypeError;return rf(f,d)}else{if(!Mo(f))throw new TypeError;if(!k(d))throw new TypeError;if(!k(y)&&!O(y)&&!gt(y))throw new TypeError;return gt(y)&&(y=void 0),h=we(h),of(f,d,h,y)}}e("decorate",ae);function ht(f,d){function h(y,A){if(!k(y))throw new TypeError;if(!O(A)&&!lf(A))throw new TypeError;Io(f,d,y,A)}return h}e("metadata",ht);function ge(f,d,h,y){if(!k(h))throw new TypeError;return O(y)||(y=we(y)),Io(f,d,h,y)}e("defineMetadata",ge);function be(f,d,h){if(!k(d))throw new TypeError;return O(h)||(h=we(h)),xo(f,d,h)}e("hasMetadata",be);function Ze(f,d,h){if(!k(d))throw new TypeError;return O(h)||(h=we(h)),Gr(f,d,h)}e("hasOwnMetadata",Ze);function Ke(f,d,h){if(!k(d))throw new TypeError;return O(h)||(h=we(h)),Co(f,d,h)}e("getMetadata",Ke);function _n(f,d,h){if(!k(d))throw new TypeError;return O(h)||(h=we(h)),Ao(f,d,h)}e("getOwnMetadata",_n);function Vt(f,d){if(!k(f))throw new TypeError;return O(d)||(d=we(d)),Oo(f,d)}e("getMetadataKeys",Vt);function qr(f,d){if(!k(f))throw new TypeError;return O(d)||(d=we(d)),No(f,d)}e("getOwnMetadataKeys",qr);function nf(f,d,h){if(!k(d))throw new TypeError;if(O(h)||(h=we(h)),!k(d))throw new TypeError;O(h)||(h=we(h));var y=$t(d,h,!1);return O(y)?!1:y.OrdinaryDeleteMetadata(f,d,h)}e("deleteMetadata",nf);function rf(f,d){for(var h=f.length-1;h>=0;--h){var y=f[h],A=y(d);if(!O(A)&&!gt(A)){if(!Do(A))throw new TypeError;d=A}}return d}function of(f,d,h,y){for(var A=f.length-1;A>=0;--A){var L=f[A],q=L(d,h,y);if(!O(q)&&!gt(q)){if(!k(q))throw new TypeError;y=q}}return y}function xo(f,d,h){var y=Gr(f,d,h);if(y)return!0;var A=Vr(d);return gt(A)?!1:xo(f,A,h)}function Gr(f,d,h){var y=$t(d,h,!1);return O(y)?!1:Ro(y.OrdinaryHasOwnMetadata(f,d,h))}function Co(f,d,h){var y=Gr(f,d,h);if(y)return Ao(f,d,h);var A=Vr(d);if(!gt(A))return Co(f,A,h)}function Ao(f,d,h){var y=$t(d,h,!1);if(!O(y))return y.OrdinaryGetOwnMetadata(f,d,h)}function Io(f,d,h,y){var A=$t(h,y,!0);A.OrdinaryDefineOwnMetadata(f,d,h,y)}function Oo(f,d){var h=No(f,d),y=Vr(f);if(y===null)return h;var A=Oo(y,d);if(A.length<=0)return h;if(h.length<=0)return A;for(var L=new w,q=[],N=0,_=h;N<_.length;N++){var E=_[N],S=L.has(E);S||(L.add(E),q.push(E))}for(var T=0,P=A;T<P.length;T++){var E=P[T],S=L.has(E);S||(L.add(E),q.push(E))}return q}function No(f,d){var h=$t(f,d,!1);return h?h.OrdinaryOwnMetadataKeys(f,d):[]}function Po(f){if(f===null)return 1;switch(typeof f){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return f===null?1:6;default:return 6}}function O(f){return f===void 0}function gt(f){return f===null}function sf(f){return typeof f=="symbol"}function k(f){return typeof f=="object"?f!==null:typeof f=="function"}function af(f,d){switch(Po(f)){case 0:return f;case 1:return f;case 2:return f;case 3:return f;case 4:return f;case 5:return f}var h=d===3?"string":d===5?"number":"default",y=Bo(f,o);if(y!==void 0){var A=y.call(f,h);if(k(A))throw new TypeError;return A}return uf(f,h==="default"?"number":h)}function uf(f,d){if(d==="string"){var h=f.toString;if(mt(h)){var y=h.call(f);if(!k(y))return y}var A=f.valueOf;if(mt(A)){var y=A.call(f);if(!k(y))return y}}else{var A=f.valueOf;if(mt(A)){var y=A.call(f);if(!k(y))return y}var L=f.toString;if(mt(L)){var y=L.call(f);if(!k(y))return y}}throw new TypeError}function Ro(f){return!!f}function cf(f){return""+f}function we(f){var d=af(f,3);return sf(d)?d:cf(d)}function Mo(f){return Array.isArray?Array.isArray(f):f instanceof Object?f instanceof Array:Object.prototype.toString.call(f)==="[object Array]"}function mt(f){return typeof f=="function"}function Do(f){return typeof f=="function"}function lf(f){switch(Po(f)){case 3:return!0;case 4:return!0;default:return!1}}function Wr(f,d){return f===d||f!==f&&d!==d}function Bo(f,d){var h=f[d];if(h!=null){if(!mt(h))throw new TypeError;return h}}function ko(f){var d=Bo(f,s);if(!mt(d))throw new TypeError;var h=d.call(f);if(!k(h))throw new TypeError;return h}function Lo(f){return f.value}function jo(f){var d=f.next();return d.done?!1:d}function Fo(f){var d=f.return;d&&d.call(f)}function Vr(f){var d=Object.getPrototypeOf(f);if(typeof f!="function"||f===p||d!==p)return d;var h=f.prototype,y=h&&Object.getPrototypeOf(h);if(y==null||y===Object.prototype)return d;var A=y.constructor;return typeof A!="function"||A===f?d:A}function ff(){var f;!O(x)&&typeof n.Reflect<"u"&&!(x in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(f=hf(n.Reflect));var d,h,y,A=new C,L={registerProvider:q,getProvider:_,setProvider:S};return L;function q(T){if(!Object.isExtensible(L))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case f===T:break;case O(d):d=T;break;case d===T:break;case O(h):h=T;break;case h===T:break;default:y===void 0&&(y=new w),y.add(T);break}}function N(T,P){if(!O(d)){if(d.isProviderFor(T,P))return d;if(!O(h)){if(h.isProviderFor(T,P))return d;if(!O(y))for(var D=ko(y);;){var j=jo(D);if(!j)return;var me=Lo(j);if(me.isProviderFor(T,P))return Fo(D),me}}}if(!O(f)&&f.isProviderFor(T,P))return f}function _(T,P){var D=A.get(T),j;return O(D)||(j=D.get(P)),O(j)&&(j=N(T,P),O(j)||(O(D)&&(D=new m,A.set(T,D)),D.set(P,j))),j}function E(T){if(O(T))throw new TypeError;return d===T||h===T||!O(y)&&y.has(T)}function S(T,P,D){if(!E(D))throw new Error("Metadata provider not registered.");var j=_(T,P);if(j!==D){if(!O(j))return!1;var me=A.get(T);O(me)&&(me=new m,A.set(T,me)),me.set(P,D)}return!0}}function df(){var f;return!O(x)&&k(n.Reflect)&&Object.isExtensible(n.Reflect)&&(f=n.Reflect[x]),O(f)&&(f=ff()),!O(x)&&k(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,x,{enumerable:!1,configurable:!1,writable:!1,value:f}),f}function pf(f){var d=new C,h={isProviderFor:function(E,S){var T=d.get(E);return O(T)?!1:T.has(S)},OrdinaryDefineOwnMetadata:q,OrdinaryHasOwnMetadata:A,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:N,OrdinaryDeleteMetadata:_};return R.registerProvider(h),h;function y(E,S,T){var P=d.get(E),D=!1;if(O(P)){if(!T)return;P=new m,d.set(E,P),D=!0}var j=P.get(S);if(O(j)){if(!T)return;if(j=new m,P.set(S,j),!f.setProvider(E,S,h))throw P.delete(S),D&&d.delete(E),new Error("Wrong provider for target.")}return j}function A(E,S,T){var P=y(S,T,!1);return O(P)?!1:Ro(P.has(E))}function L(E,S,T){var P=y(S,T,!1);if(!O(P))return P.get(E)}function q(E,S,T,P){var D=y(T,P,!0);D.set(E,S)}function N(E,S){var T=[],P=y(E,S,!1);if(O(P))return T;for(var D=P.keys(),j=ko(D),me=0;;){var Uo=jo(j);if(!Uo)return T.length=me,T;var _f=Lo(Uo);try{T[me]=_f}catch(vf){try{Fo(j)}finally{throw vf}}me++}}function _(E,S,T){var P=y(S,T,!1);if(O(P)||!P.delete(E))return!1;if(P.size===0){var D=d.get(S);O(D)||(D.delete(T),D.size===0&&d.delete(D))}return!0}}function hf(f){var d=f.defineMetadata,h=f.hasOwnMetadata,y=f.getOwnMetadata,A=f.getOwnMetadataKeys,L=f.deleteMetadata,q=new C,N={isProviderFor:function(_,E){var S=q.get(_);return O(S)?A(_,E).length?(O(S)&&(S=new w,q.set(_,S)),S.add(E),!0):!1:S.has(E)},OrdinaryDefineOwnMetadata:d,OrdinaryHasOwnMetadata:h,OrdinaryGetOwnMetadata:y,OrdinaryOwnMetadataKeys:A,OrdinaryDeleteMetadata:L};return N}function $t(f,d,h){var y=R.getProvider(f,d);if(!O(y))return y;if(h){if(R.setProvider(f,d,Y))return Y;throw new Error("Illegal state.")}}function gf(){var f={},d=[],h=(function(){function N(_,E,S){this._index=0,this._keys=_,this._values=E,this._selector=S}return N.prototype["@@iterator"]=function(){return this},N.prototype[s]=function(){return this},N.prototype.next=function(){var _=this._index;if(_>=0&&_<this._keys.length){var E=this._selector(this._keys[_],this._values[_]);return _+1>=this._keys.length?(this._index=-1,this._keys=d,this._values=d):this._index++,{value:E,done:!1}}return{value:void 0,done:!0}},N.prototype.throw=function(_){throw this._index>=0&&(this._index=-1,this._keys=d,this._values=d),_},N.prototype.return=function(_){return this._index>=0&&(this._index=-1,this._keys=d,this._values=d),{value:_,done:!0}},N})(),y=(function(){function N(){this._keys=[],this._values=[],this._cacheKey=f,this._cacheIndex=-2}return Object.defineProperty(N.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),N.prototype.has=function(_){return this._find(_,!1)>=0},N.prototype.get=function(_){var E=this._find(_,!1);return E>=0?this._values[E]:void 0},N.prototype.set=function(_,E){var S=this._find(_,!0);return this._values[S]=E,this},N.prototype.delete=function(_){var E=this._find(_,!1);if(E>=0){for(var S=this._keys.length,T=E+1;T<S;T++)this._keys[T-1]=this._keys[T],this._values[T-1]=this._values[T];return this._keys.length--,this._values.length--,Wr(_,this._cacheKey)&&(this._cacheKey=f,this._cacheIndex=-2),!0}return!1},N.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=f,this._cacheIndex=-2},N.prototype.keys=function(){return new h(this._keys,this._values,A)},N.prototype.values=function(){return new h(this._keys,this._values,L)},N.prototype.entries=function(){return new h(this._keys,this._values,q)},N.prototype["@@iterator"]=function(){return this.entries()},N.prototype[s]=function(){return this.entries()},N.prototype._find=function(_,E){if(!Wr(this._cacheKey,_)){this._cacheIndex=-1;for(var S=0;S<this._keys.length;S++)if(Wr(this._keys[S],_)){this._cacheIndex=S;break}}return this._cacheIndex<0&&E&&(this._cacheIndex=this._keys.length,this._keys.push(_),this._values.push(void 0)),this._cacheIndex},N})();return y;function A(N,_){return N}function L(N,_){return _}function q(N,_){return[N,_]}}function mf(){var f=(function(){function d(){this._map=new m}return Object.defineProperty(d.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),d.prototype.has=function(h){return this._map.has(h)},d.prototype.add=function(h){return this._map.set(h,h),this},d.prototype.delete=function(h){return this._map.delete(h)},d.prototype.clear=function(){this._map.clear()},d.prototype.keys=function(){return this._map.keys()},d.prototype.values=function(){return this._map.keys()},d.prototype.entries=function(){return this._map.entries()},d.prototype["@@iterator"]=function(){return this.keys()},d.prototype[s]=function(){return this.keys()},d})();return f}function yf(){var f=16,d=l.create(),h=y();return(function(){function _(){this._key=y()}return _.prototype.has=function(E){var S=A(E,!1);return S!==void 0?l.has(S,this._key):!1},_.prototype.get=function(E){var S=A(E,!1);return S!==void 0?l.get(S,this._key):void 0},_.prototype.set=function(E,S){var T=A(E,!0);return T[this._key]=S,this},_.prototype.delete=function(E){var S=A(E,!1);return S!==void 0?delete S[this._key]:!1},_.prototype.clear=function(){this._key=y()},_})();function y(){var _;do _="@@WeakMap@@"+N();while(l.has(d,_));return d[_]=!0,_}function A(_,E){if(!r.call(_,h)){if(!E)return;Object.defineProperty(_,h,{value:l.create()})}return _[h]}function L(_,E){for(var S=0;S<E;++S)_[S]=Math.random()*255|0;return _}function q(_){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(_)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(_)):L(new Uint8Array(_),_):L(new Array(_),_)}function N(){var _=q(f);_[6]=_[6]&79|64,_[8]=_[8]&191|128;for(var E="",S=0;S<f;++S){var T=_[S];(S===4||S===6||S===8)&&(E+="-"),T<16&&(E+="0"),E+=T.toString(16).toLowerCase()}return E}}function $r(f){return f.__=void 0,delete f.__,f}})})(Go||(Go={}))});var F=g(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.NON_CUSTOM_TAG_KEYS=M.PRE_DESTROY=M.POST_CONSTRUCT=M.DESIGN_PARAM_TYPES=M.PARAM_TYPES=M.TAGGED_PROP=M.TAGGED=M.MULTI_INJECT_TAG=M.INJECT_TAG=M.OPTIONAL_TAG=M.UNMANAGED_TAG=M.NAME_TAG=M.NAMED_TAG=void 0;M.NAMED_TAG="named";M.NAME_TAG="name";M.UNMANAGED_TAG="unmanaged";M.OPTIONAL_TAG="optional";M.INJECT_TAG="inject";M.MULTI_INJECT_TAG="multi_inject";M.TAGGED="inversify:tagged";M.TAGGED_PROP="inversify:tagged_props";M.PARAM_TYPES="inversify:paramtypes";M.DESIGN_PARAM_TYPES="design:paramtypes";M.POST_CONSTRUCT="post_construct";M.PRE_DESTROY="pre_destroy";function Cf(){return[M.INJECT_TAG,M.MULTI_INJECT_TAG,M.NAME_TAG,M.UNMANAGED_TAG,M.NAMED_TAG,M.OPTIONAL_TAG]}M.NON_CUSTOM_TAG_KEYS=Cf()});var ue=g(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.TargetTypeEnum=Ye.BindingTypeEnum=Ye.BindingScopeEnum=void 0;var Af={Request:"Request",Singleton:"Singleton",Transient:"Transient"};Ye.BindingScopeEnum=Af;var If={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};Ye.BindingTypeEnum=If;var Of={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};Ye.TargetTypeEnum=Of});var ze=g(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.id=void 0;var Nf=0;function Pf(){return Nf++}bn.id=Pf});var $o=g(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.Binding=void 0;var Vo=ue(),Rf=ze(),Mf=(function(){function t(e,n){this.id=(0,Rf.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=n,this.type=Vo.BindingTypeEnum.Invalid,this.constraint=function(r){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===Vo.BindingScopeEnum.Singleton?this.activated:!1,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.onDeactivation=this.onDeactivation,e.cache=this.cache,e},t})();wn.Binding=Mf});var z=g(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.STACK_OVERFLOW=b.CIRCULAR_DEPENDENCY_IN_FACTORY=b.ON_DEACTIVATION_ERROR=b.PRE_DESTROY_ERROR=b.POST_CONSTRUCT_ERROR=b.ASYNC_UNBIND_REQUIRED=b.MULTIPLE_POST_CONSTRUCT_METHODS=b.MULTIPLE_PRE_DESTROY_METHODS=b.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=b.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=b.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=b.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=b.ARGUMENTS_LENGTH_MISMATCH=b.INVALID_DECORATOR_OPERATION=b.INVALID_TO_SELF_VALUE=b.LAZY_IN_SYNC=b.INVALID_FUNCTION_BINDING=b.INVALID_MIDDLEWARE_RETURN=b.NO_MORE_SNAPSHOTS_AVAILABLE=b.INVALID_BINDING_TYPE=b.NOT_IMPLEMENTED=b.CIRCULAR_DEPENDENCY=b.UNDEFINED_INJECT_ANNOTATION=b.MISSING_INJECT_ANNOTATION=b.MISSING_INJECTABLE_ANNOTATION=b.NOT_REGISTERED=b.CANNOT_UNBIND=b.AMBIGUOUS_MATCH=b.KEY_NOT_FOUND=b.NULL_ARGUMENT=b.DUPLICATED_METADATA=b.DUPLICATED_INJECTABLE_DECORATOR=void 0;b.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";b.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";b.NULL_ARGUMENT="NULL argument";b.KEY_NOT_FOUND="Key Not Found";b.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";b.CANNOT_UNBIND="Could not unbind serviceIdentifier:";b.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";b.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";b.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var Df=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifier to  overcome this limitation."};b.UNDEFINED_INJECT_ANNOTATION=Df;b.CIRCULAR_DEPENDENCY="Circular dependency found:";b.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";b.INVALID_BINDING_TYPE="Invalid binding type:";b.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";b.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";b.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var Bf=function(t){return"You are attempting to construct '"+t+`' in a synchronous way
 but it has asynchronous dependencies.`};b.LAZY_IN_SYNC=Bf;b.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";b.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";var kf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+(t[0]+" must be >= than the number of constructor arguments of its base class.")};b.ARGUMENTS_LENGTH_MISMATCH=kf;b.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";b.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE='Invalid Container option. Default scope must be a string ("singleton" or "transient").';b.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";b.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";b.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";b.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";b.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var Lf=function(t,e){return"@postConstruct error in class "+t+": "+e};b.POST_CONSTRUCT_ERROR=Lf;var jf=function(t,e){return"@preDestroy error in class "+t+": "+e};b.PRE_DESTROY_ERROR=jf;var Ff=function(t,e){return"onDeactivation() error in class "+t+": "+e};b.ON_DEACTIVATION_ERROR=Ff;var Uf=function(t,e){return"It looks like there is a circular dependency in one of the '"+t+"' bindings. Please investigate bindings with "+("service identifier '"+e+"'.")};b.CIRCULAR_DEPENDENCY_IN_FACTORY=Uf;b.STACK_OVERFLOW="Maximum call stack size exceeded"});var Yr=g(Se=>{"use strict";var qf=Se&&Se.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Gf=Se&&Se.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wf=Se&&Se.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&qf(e,t,n);return Gf(e,t),e};Object.defineProperty(Se,"__esModule",{value:!0});Se.MetadataReader=void 0;var Kr=Wf(F()),Vf=(function(){function t(){}return t.prototype.getConstructorMetadata=function(e){var n=Reflect.getMetadata(Kr.PARAM_TYPES,e),r=Reflect.getMetadata(Kr.TAGGED,e);return{compilerGeneratedMetadata:n,userGeneratedMetadata:r||{}}},t.prototype.getPropertiesMetadata=function(e){var n=Reflect.getMetadata(Kr.TAGGED_PROP,e)||[];return n},t})();Se.MetadataReader=Vf});var Ho=g(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.BindingCount=void 0;Sn.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}});var zr=g(ce=>{"use strict";var $f=ce&&ce.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Hf=ce&&ce.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kf=ce&&ce.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&$f(e,t,n);return Hf(e,t),e};Object.defineProperty(ce,"__esModule",{value:!0});ce.tryAndThrowErrorIfStackOverflow=ce.isStackOverflowExeption=void 0;var Yf=Kf(z());function Ko(t){return t instanceof RangeError||t.message===Yf.STACK_OVERFLOW}ce.isStackOverflowExeption=Ko;var zf=function(t,e){try{return t()}catch(n){throw Ko(n)&&(n=e()),n}};ce.tryAndThrowErrorIfStackOverflow=zf});var et=g(U=>{"use strict";var Jf=U&&U.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Xf=U&&U.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qf=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Jf(e,t,n);return Xf(e,t),e};Object.defineProperty(U,"__esModule",{value:!0});U.getSymbolDescription=U.circularDependencyToException=U.listMetadataForTarget=U.listRegisteredBindingsForServiceIdentifier=U.getServiceIdentifierAsString=U.getFunctionName=void 0;var Zf=Qf(z());function Yo(t){if(typeof t=="function"){var e=t;return e.name}else{if(typeof t=="symbol")return t.toString();var e=t;return e}}U.getServiceIdentifierAsString=Yo;function ed(t,e,n){var r="",i=n(t,e);return i.length!==0&&(r=`
Registered bindings:`,i.forEach(function(o){var s="Object";o.implementationType!==null&&(s=Xo(o.implementationType)),r=r+`
 `+s,o.constraint.metaData&&(r=r+" - "+o.constraint.metaData)})),r}U.listRegisteredBindingsForServiceIdentifier=ed;function zo(t,e){return t.parentRequest===null?!1:t.parentRequest.serviceIdentifier===e?!0:zo(t.parentRequest,e)}function td(t){function e(r,i){i===void 0&&(i=[]);var o=Yo(r.serviceIdentifier);return i.push(o),r.parentRequest!==null?e(r.parentRequest,i):i}var n=e(t);return n.reverse().join(" --> ")}function Jo(t){t.childRequests.forEach(function(e){if(zo(e,e.serviceIdentifier)){var n=td(e);throw new Error(Zf.CIRCULAR_DEPENDENCY+" "+n)}else Jo(e)})}U.circularDependencyToException=Jo;function nd(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return r!==null&&(n+=r.toString()+`
`),i!==null&&i.forEach(function(o){n+=o.toString()+`
`})," "+t+`
 `+t+" - "+n}else return" "+t}U.listMetadataForTarget=nd;function Xo(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}U.getFunctionName=Xo;function rd(t){return t.toString().slice(7,-1)}U.getSymbolDescription=rd});var Qo=g(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.Context=void 0;var id=ze(),od=(function(){function t(e){this.id=(0,id.id)(),this.container=e}return t.prototype.addPlan=function(e){this.plan=e},t.prototype.setCurrentRequest=function(e){this.currentRequest=e},t})();En.Context=od});var ye=g(Ee=>{"use strict";var sd=Ee&&Ee.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),ad=Ee&&Ee.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ud=Ee&&Ee.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&sd(e,t,n);return ad(e,t),e};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Metadata=void 0;var cd=ud(F()),ld=(function(){function t(e,n){this.key=e,this.value=n}return t.prototype.toString=function(){return this.key===cd.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},t})();Ee.Metadata=ld});var Zo=g(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.Plan=void 0;var fd=(function(){function t(e,n){this.parentContext=e,this.rootRequest=n}return t})();Tn.Plan=fd});var Cn=g(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.LazyServiceIdentifier=void 0;var dd=(function(){function t(e){this._cb=e}return t.prototype.unwrap=function(){return this._cb()},t})();xn.LazyServiceIdentifier=dd});var es=g(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.QueryableString=void 0;var pd=(function(){function t(e){this.str=e}return t.prototype.startsWith=function(e){return this.str.indexOf(e)===0},t.prototype.endsWith=function(e){var n="",r=e.split("").reverse().join("");return n=this.str.split("").reverse().join(""),this.startsWith.call({str:n},r)},t.prototype.contains=function(e){return this.str.indexOf(e)!==-1},t.prototype.equals=function(e){return this.str===e},t.prototype.value=function(){return this.str},t})();An.QueryableString=pd});var Jr=g(Te=>{"use strict";var hd=Te&&Te.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),gd=Te&&Te.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),md=Te&&Te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&hd(e,t,n);return gd(e,t),e};Object.defineProperty(Te,"__esModule",{value:!0});Te.Target=void 0;var Ue=md(F()),yd=ze(),_d=et(),ts=ye(),vd=es(),bd=(function(){function t(e,n,r,i){this.id=(0,yd.id)(),this.type=e,this.serviceIdentifier=r;var o=typeof n=="symbol"?(0,_d.getSymbolDescription)(n):n;this.name=new vd.QueryableString(o||""),this.identifier=n,this.metadata=new Array;var s=null;typeof i=="string"?s=new ts.Metadata(Ue.NAMED_TAG,i):i instanceof ts.Metadata&&(s=i),s!==null&&this.metadata.push(s)}return t.prototype.hasTag=function(e){for(var n=0,r=this.metadata;n<r.length;n++){var i=r[n];if(i.key===e)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(Ue.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(e){return this.matchesTag(Ue.MULTI_INJECT_TAG)(e)},t.prototype.isNamed=function(){return this.hasTag(Ue.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some(function(e){return Ue.NON_CUSTOM_TAG_KEYS.every(function(n){return e.key!==n})})},t.prototype.isOptional=function(){return this.matchesTag(Ue.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(e){return e.key===Ue.NAMED_TAG})[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return Ue.NON_CUSTOM_TAG_KEYS.every(function(n){return e.key!==n})}):null},t.prototype.matchesNamedTag=function(e){return this.matchesTag(Ue.NAMED_TAG)(e)},t.prototype.matchesTag=function(e){var n=this;return function(r){for(var i=0,o=n.metadata;i<o.length;i++){var s=o[i];if(s.key===e&&s.value===r)return!0}return!1}},t})();Te.Target=bd});var cs=g(J=>{"use strict";var wd=J&&J.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Sd=J&&J.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ns=J&&J.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&wd(e,t,n);return Sd(e,t),e},In=J&&J.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(J,"__esModule",{value:!0});J.getFunctionName=J.getBaseClassDependencyCount=J.getDependencies=void 0;var Ed=Cn(),Xr=ns(z()),rs=ue(),Ht=ns(F()),Qr=et();Object.defineProperty(J,"getFunctionName",{enumerable:!0,get:function(){return Qr.getFunctionName}});var is=Jr();function Td(t,e){var n=(0,Qr.getFunctionName)(e);return os(t,n,e,!1)}J.getDependencies=Td;function os(t,e,n,r){var i=t.getConstructorMetadata(n),o=i.compilerGeneratedMetadata;if(o===void 0){var s=Xr.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(s)}var u=i.userGeneratedMetadata,c=Object.keys(u),a=n.length===0&&c.length>0,l=c.length>n.length,p=a||l?c.length:n.length,m=Cd(r,e,o,u,p),w=ss(t,n,e),C=In(In([],m,!0),w,!0);return C}function xd(t,e,n,r,i){var o=i[t.toString()]||[],s=us(o),u=s.unmanaged!==!0,c=r[t],a=s.inject||s.multiInject;if(c=a||c,c instanceof Ed.LazyServiceIdentifier&&(c=c.unwrap()),u){var l=c===Object,p=c===Function,m=c===void 0,w=l||p||m;if(!e&&w){var C=Xr.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(C)}var x=new is.Target(rs.TargetTypeEnum.ConstructorArgument,s.targetName,c);return x.metadata=o,x}return null}function Cd(t,e,n,r,i){for(var o=[],s=0;s<i;s++){var u=s,c=xd(u,t,e,n,r);c!==null&&o.push(c)}return o}function Ad(t,e,n,r){var i=t||e;if(i===void 0){var o=Xr.MISSING_INJECTABLE_ANNOTATION+" for property "+String(n)+" in class "+r+".";throw new Error(o)}return i}function ss(t,e,n){for(var r=t.getPropertiesMetadata(e),i=[],o=Object.getOwnPropertySymbols(r),s=Object.keys(r),u=s.concat(o),c=0,a=u;c<a.length;c++){var l=a[c],p=r[l],m=us(p),w=m.targetName||l,C=Ad(m.inject,m.multiInject,l,n),x=new is.Target(rs.TargetTypeEnum.ClassProperty,w,C);x.metadata=p,i.push(x)}var R=Object.getPrototypeOf(e.prototype).constructor;if(R!==Object){var Y=ss(t,R,n);i=In(In([],i,!0),Y,!0)}return i}function as(t,e){var n=Object.getPrototypeOf(e.prototype).constructor;if(n!==Object){var r=(0,Qr.getFunctionName)(n),i=os(t,r,n,!0),o=i.map(function(c){return c.metadata.filter(function(a){return a.key===Ht.UNMANAGED_TAG})}),s=[].concat.apply([],o).length,u=i.length-s;return u>0?u:as(t,n)}else return 0}J.getBaseClassDependencyCount=as;function us(t){var e={};return t.forEach(function(n){e[n.key.toString()]=n.value}),{inject:e[Ht.INJECT_TAG],multiInject:e[Ht.MULTI_INJECT_TAG],targetName:e[Ht.NAME_TAG],unmanaged:e[Ht.UNMANAGED_TAG]}}});var ls=g(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.Request=void 0;var Id=ze(),Od=(function(){function t(e,n,r,i,o){this.id=(0,Id.id)(),this.serviceIdentifier=e,this.parentContext=n,this.parentRequest=r,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=r===null?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t})();On.Request=Od});var ri=g(re=>{"use strict";var Nd=re&&re.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Pd=re&&re.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ps=re&&re.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nd(e,t,n);return Pd(e,t),e};Object.defineProperty(re,"__esModule",{value:!0});re.getBindingDictionary=re.createMockRequest=re.plan=void 0;var Nn=Ho(),ei=ps(z()),hs=ue(),fs=ps(F()),Rd=zr(),yt=et(),gs=Qo(),ti=ye(),Md=Zo(),Zr=cs(),ni=ls(),ms=Jr();function ys(t){return t._bindingDictionary}re.getBindingDictionary=ys;function Dd(t,e,n,r,i,o){var s=t?fs.MULTI_INJECT_TAG:fs.INJECT_TAG,u=new ti.Metadata(s,n),c=new ms.Target(e,r,n,u);if(i!==void 0){var a=new ti.Metadata(i,o);c.metadata.push(a)}return c}function ds(t,e,n,r,i){var o=Kt(n.container,i.serviceIdentifier),s=[];return o.length===Nn.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&typeof i.serviceIdentifier=="function"&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=Kt(n.container,i.serviceIdentifier)),e?s=o:s=o.filter(function(u){var c=new ni.Request(u.serviceIdentifier,n,r,u,i);return u.constraint(c)}),Bd(i.serviceIdentifier,s,i,n.container),s}function Bd(t,e,n,r){switch(e.length){case Nn.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var i=(0,yt.getServiceIdentifierAsString)(t),o=ei.NOT_REGISTERED;throw o+=(0,yt.listMetadataForTarget)(i,n),o+=(0,yt.listRegisteredBindingsForServiceIdentifier)(r,i,Kt),new Error(o);case Nn.BindingCount.OnlyOneBindingAvailable:return e;case Nn.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;var i=(0,yt.getServiceIdentifierAsString)(t),o=ei.AMBIGUOUS_MATCH+" "+i;throw o+=(0,yt.listRegisteredBindingsForServiceIdentifier)(r,i,Kt),new Error(o)}}function _s(t,e,n,r,i,o){var s,u;if(i===null){s=ds(t,e,r,null,o),u=new ni.Request(n,r,null,s,o);var c=new Md.Plan(r,u);r.addPlan(c)}else s=ds(t,e,r,i,o),u=i.addChildRequest(o.serviceIdentifier,s,o);s.forEach(function(a){var l=null;if(o.isArray())l=u.addChildRequest(a.serviceIdentifier,a,o);else{if(a.cache)return;l=u}if(a.type===hs.BindingTypeEnum.Instance&&a.implementationType!==null){var p=(0,Zr.getDependencies)(t,a.implementationType);if(!r.container.options.skipBaseClassChecks){var m=(0,Zr.getBaseClassDependencyCount)(t,a.implementationType);if(p.length<m){var w=ei.ARGUMENTS_LENGTH_MISMATCH((0,Zr.getFunctionName)(a.implementationType));throw new Error(w)}}p.forEach(function(C){_s(t,!1,C.serviceIdentifier,r,l,C)})}})}function Kt(t,e){var n=[],r=ys(t);return r.hasKey(e)?n=r.get(e):t.parent!==null&&(n=Kt(t.parent,e)),n}function kd(t,e,n,r,i,o,s,u){u===void 0&&(u=!1);var c=new gs.Context(e),a=Dd(n,r,i,"",o,s);try{return _s(t,u,i,c,null,a),c}catch(l){throw(0,Rd.isStackOverflowExeption)(l)&&(0,yt.circularDependencyToException)(c.plan.rootRequest),l}}re.plan=kd;function Ld(t,e,n,r){var i=new ms.Target(hs.TargetTypeEnum.Variable,"",e,new ti.Metadata(n,r)),o=new gs.Context(t),s=new ni.Request(e,o,null,[],i);return s}re.createMockRequest=Ld});var Yt=g(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.isPromiseOrContainsPromise=_t.isPromise=void 0;function ii(t){var e=typeof t=="object"&&t!==null||typeof t=="function";return e&&typeof t.then=="function"}_t.isPromise=ii;function jd(t){return ii(t)?!0:Array.isArray(t)&&t.some(ii)}_t.isPromiseOrContainsPromise=jd});var vs=g(xe=>{"use strict";var Fd=xe&&xe.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},Ud=xe&&xe.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1],o=a;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(a);break}o[2]&&n.ops.pop(),n.trys.pop();continue}a=e.call(t,n)}catch(l){a=[6,l],i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(xe,"__esModule",{value:!0});xe.saveToScope=xe.tryGetFromScope=void 0;var Pn=ue(),qd=Yt(),Gd=function(t,e){return e.scope===Pn.BindingScopeEnum.Singleton&&e.activated?e.cache:e.scope===Pn.BindingScopeEnum.Request&&t.has(e.id)?t.get(e.id):null};xe.tryGetFromScope=Gd;var Wd=function(t,e,n){e.scope===Pn.BindingScopeEnum.Singleton&&$d(e,n),e.scope===Pn.BindingScopeEnum.Request&&Vd(t,e,n)};xe.saveToScope=Wd;var Vd=function(t,e,n){t.has(e.id)||t.set(e.id,n)},$d=function(t,e){t.cache=e,t.activated=!0,(0,qd.isPromise)(e)&&Hd(t,e)},Hd=function(t,e){return Fd(void 0,void 0,void 0,function(){var n,r;return Ud(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e];case 1:return n=i.sent(),t.cache=n,[3,3];case 2:throw r=i.sent(),t.cache=null,t.activated=!1,r;case 3:return[2]}})})}});var bs=g(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.FactoryType=void 0;var Kd;(function(t){t.DynamicValue="toDynamicValue",t.Factory="toFactory",t.Provider="toProvider"})(Kd=zt.FactoryType||(zt.FactoryType={}))});var si=g(ie=>{"use strict";var Yd=ie&&ie.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),zd=ie&&ie.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jd=ie&&ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Yd(e,t,n);return zd(e,t),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.getFactoryDetails=ie.ensureFullyBound=ie.multiBindToService=void 0;var Xd=et(),Qd=Jd(z()),Ce=ue(),oi=bs(),Zd=function(t){return function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach(function(i){return t.bind(i).toService(e)})}}};ie.multiBindToService=Zd;var ep=function(t){var e=null;switch(t.type){case Ce.BindingTypeEnum.ConstantValue:case Ce.BindingTypeEnum.Function:e=t.cache;break;case Ce.BindingTypeEnum.Constructor:case Ce.BindingTypeEnum.Instance:e=t.implementationType;break;case Ce.BindingTypeEnum.DynamicValue:e=t.dynamicValue;break;case Ce.BindingTypeEnum.Provider:e=t.provider;break;case Ce.BindingTypeEnum.Factory:e=t.factory;break}if(e===null){var n=(0,Xd.getServiceIdentifierAsString)(t.serviceIdentifier);throw new Error(Qd.INVALID_BINDING_TYPE+" "+n)}};ie.ensureFullyBound=ep;var tp=function(t){switch(t.type){case Ce.BindingTypeEnum.Factory:return{factory:t.factory,factoryType:oi.FactoryType.Factory};case Ce.BindingTypeEnum.Provider:return{factory:t.provider,factoryType:oi.FactoryType.Provider};case Ce.BindingTypeEnum.DynamicValue:return{factory:t.dynamicValue,factoryType:oi.FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+t.type)}};ie.getFactoryDetails=tp});var Cs=g(V=>{"use strict";var vt=V&&V.__assign||function(){return vt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},vt.apply(this,arguments)},np=V&&V.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),rp=V&&V.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ip=V&&V.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&np(e,t,n);return rp(e,t),e},Es=V&&V.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},Ts=V&&V.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1],o=a;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(a);break}o[2]&&n.ops.pop(),n.trys.pop();continue}a=e.call(t,n)}catch(l){a=[6,l],i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},op=V&&V.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty(V,"__esModule",{value:!0});V.resolveInstance=void 0;var ai=z(),ci=ue(),ui=ip(F()),li=Yt();function sp(t,e){return t.reduce(function(n,r){var i=e(r),o=r.target.type;return o===ci.TargetTypeEnum.ConstructorArgument?n.constructorInjections.push(i):(n.propertyRequests.push(r),n.propertyInjections.push(i)),n.isAsync||(n.isAsync=(0,li.isPromiseOrContainsPromise)(i)),n},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function ap(t,e,n){var r;if(e.length>0){var i=sp(e,n),o=vt(vt({},i),{constr:t});i.isAsync?r=up(o):r=xs(o)}else r=new t;return r}function xs(t){var e,n=new((e=t.constr).bind.apply(e,op([void 0],t.constructorInjections,!1)));return t.propertyRequests.forEach(function(r,i){var o=r.target.identifier,s=t.propertyInjections[i];(!r.target.isOptional()||s!==void 0)&&(n[o]=s)}),n}function up(t){return Es(this,void 0,void 0,function(){var e,n;return Ts(this,function(r){switch(r.label){case 0:return[4,ws(t.constructorInjections)];case 1:return e=r.sent(),[4,ws(t.propertyInjections)];case 2:return n=r.sent(),[2,xs(vt(vt({},t),{constructorInjections:e,propertyInjections:n}))]}})})}function ws(t){return Es(this,void 0,void 0,function(){var e,n,r,i;return Ts(this,function(o){for(e=[],n=0,r=t;n<r.length;n++)i=r[n],Array.isArray(i)?e.push(Promise.all(i)):e.push(i);return[2,Promise.all(e)]})})}function Ss(t,e){var n=cp(t,e);return(0,li.isPromise)(n)?n.then(function(){return e}):e}function cp(t,e){var n,r;if(Reflect.hasMetadata(ui.POST_CONSTRUCT,t)){var i=Reflect.getMetadata(ui.POST_CONSTRUCT,t);try{return(r=(n=e)[i.value])===null||r===void 0?void 0:r.call(n)}catch(o){if(o instanceof Error)throw new Error((0,ai.POST_CONSTRUCT_ERROR)(t.name,o.message))}}}function lp(t,e){t.scope!==ci.BindingScopeEnum.Singleton&&fp(t,e)}function fp(t,e){var n="Class cannot be instantiated in "+(t.scope===ci.BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof t.onDeactivation=="function")throw new Error((0,ai.ON_DEACTIVATION_ERROR)(e.name,n));if(Reflect.hasMetadata(ui.PRE_DESTROY,e))throw new Error((0,ai.PRE_DESTROY_ERROR)(e.name,n))}function dp(t,e,n,r){lp(t,e);var i=ap(e,n,r);return(0,li.isPromise)(i)?i.then(function(o){return Ss(e,o)}):Ss(e,i)}V.resolveInstance=dp});var Ps=g(oe=>{"use strict";var pp=oe&&oe.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),hp=oe&&oe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gp=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&pp(e,t,n);return hp(e,t),e},mp=oe&&oe.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},yp=oe&&oe.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1],o=a;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(a);break}o[2]&&n.ops.pop(),n.trys.pop();continue}a=e.call(t,n)}catch(l){a=[6,l],i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(oe,"__esModule",{value:!0});oe.resolve=void 0;var _p=gp(z()),Rn=ue(),vp=ri(),As=vs(),fi=Yt(),Os=si(),bp=zr(),wp=Cs(),di=function(t){return function(e){e.parentContext.setCurrentRequest(e);var n=e.bindings,r=e.childRequests,i=e.target&&e.target.isArray(),o=!e.parentRequest||!e.parentRequest.target||!e.target||!e.parentRequest.target.matchesArray(e.target.serviceIdentifier);if(i&&o)return r.map(function(u){var c=di(t);return c(u)});if(e.target.isOptional()&&n.length===0)return;var s=n[0];return xp(t,e,s)}},Sp=function(t,e){var n=(0,Os.getFactoryDetails)(t);return(0,bp.tryAndThrowErrorIfStackOverflow)(function(){return n.factory.bind(t)(e)},function(){return new Error(_p.CIRCULAR_DEPENDENCY_IN_FACTORY(n.factoryType,e.currentRequest.serviceIdentifier.toString()))})},Ep=function(t,e,n){var r,i=e.childRequests;switch((0,Os.ensureFullyBound)(n),n.type){case Rn.BindingTypeEnum.ConstantValue:case Rn.BindingTypeEnum.Function:r=n.cache;break;case Rn.BindingTypeEnum.Constructor:r=n.implementationType;break;case Rn.BindingTypeEnum.Instance:r=(0,wp.resolveInstance)(n,n.implementationType,i,di(t));break;default:r=Sp(n,e.parentContext)}return r},Tp=function(t,e,n){var r=(0,As.tryGetFromScope)(t,e);return r!==null||(r=n(),(0,As.saveToScope)(t,e,r)),r},xp=function(t,e,n){return Tp(t,n,function(){var r=Ep(t,e,n);return(0,fi.isPromise)(r)?r=r.then(function(i){return Is(e,n,i)}):r=Is(e,n,r),r})};function Is(t,e,n){var r=Cp(t.parentContext,e,n),i=Op(t.parentContext.container),o,s=i.next();do{o=s.value;var u=t.parentContext,c=t.serviceIdentifier,a=Ip(o,c);(0,fi.isPromise)(r)?r=Ns(a,u,r):r=Ap(a,u,r),s=i.next()}while(s.done!==!0&&!(0,vp.getBindingDictionary)(o).hasKey(t.serviceIdentifier));return r}var Cp=function(t,e,n){var r;return typeof e.onActivation=="function"?r=e.onActivation(t,n):r=n,r},Ap=function(t,e,n){for(var r=t.next();!r.done;){if(n=r.value(e,n),(0,fi.isPromise)(n))return Ns(t,e,n);r=t.next()}return n},Ns=function(t,e,n){return mp(void 0,void 0,void 0,function(){var r,i;return yp(this,function(o){switch(o.label){case 0:return[4,n];case 1:r=o.sent(),i=t.next(),o.label=2;case 2:return i.done?[3,4]:[4,i.value(e,r)];case 3:return r=o.sent(),i=t.next(),[3,2];case 4:return[2,r]}})})},Ip=function(t,e){var n=t._activations;return n.hasKey(e)?n.get(e).values():[].values()},Op=function(t){for(var e=[t],n=t.parent;n!==null;)e.push(n),n=n.parent;var r=function(){var o=e.pop();return o!==void 0?{done:!1,value:o}:{done:!0,value:void 0}},i={next:r};return i};function Np(t){var e=di(t.plan.rootRequest.requestScope);return e(t.plan.rootRequest)}oe.resolve=Np});var pi=g(X=>{"use strict";var Pp=X&&X.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Rp=X&&X.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mp=X&&X.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Pp(e,t,n);return Rp(e,t),e};Object.defineProperty(X,"__esModule",{value:!0});X.typeConstraint=X.namedConstraint=X.taggedConstraint=X.traverseAncerstors=void 0;var Dp=Mp(F()),Bp=ye(),Rs=function(t,e){var n=t.parentRequest;return n!==null?e(n)?!0:Rs(n,e):!1};X.traverseAncerstors=Rs;var Ms=function(t){return function(e){var n=function(r){return r!==null&&r.target!==null&&r.target.matchesTag(t)(e)};return n.metaData=new Bp.Metadata(t,e),n}};X.taggedConstraint=Ms;var kp=Ms(Dp.NAMED_TAG);X.namedConstraint=kp;var Lp=function(t){return function(e){var n=null;if(e!==null)if(n=e.bindings[0],typeof t=="string"){var r=n.serviceIdentifier;return r===t}else{var i=e.bindings[0].implementationType;return t===i}return!1}};X.typeConstraint=Lp});var Dn=g(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.BindingWhenSyntax=void 0;var Z=Bn(),G=pi(),jp=(function(){function t(e){this._binding=e}return t.prototype.when=function(e){return this._binding.constraint=e,new Z.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,G.namedConstraint)(e),new Z.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){if(e===null)return!1;var n=e.target!==null&&!e.target.isNamed()&&!e.target.isTagged();return n},new Z.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(e,n){return this._binding.constraint=(0,G.taggedConstraint)(e)(n),new Z.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(n){return n!==null&&(0,G.typeConstraint)(e)(n.parentRequest)},new Z.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(e){return this._binding.constraint=function(n){return n!==null&&(0,G.namedConstraint)(e)(n.parentRequest)},new Z.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&(0,G.taggedConstraint)(e)(n)(r.parentRequest)},new Z.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(n){return n!==null&&(0,G.traverseAncerstors)(n,(0,G.typeConstraint)(e))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,G.traverseAncerstors)(n,(0,G.typeConstraint)(e))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(n){return n!==null&&(0,G.traverseAncerstors)(n,(0,G.namedConstraint)(e))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,G.traverseAncerstors)(n,(0,G.namedConstraint)(e))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&(0,G.traverseAncerstors)(r,(0,G.taggedConstraint)(e)(n))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&!(0,G.traverseAncerstors)(r,(0,G.taggedConstraint)(e)(n))},new Z.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(n){return n!==null&&(0,G.traverseAncerstors)(n,e)},new Z.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,G.traverseAncerstors)(n,e)},new Z.BindingOnSyntax(this._binding)},t})();Mn.BindingWhenSyntax=jp});var Bn=g(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.BindingOnSyntax=void 0;var Ds=Dn(),Fp=(function(){function t(e){this._binding=e}return t.prototype.onActivation=function(e){return this._binding.onActivation=e,new Ds.BindingWhenSyntax(this._binding)},t.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new Ds.BindingWhenSyntax(this._binding)},t})();kn.BindingOnSyntax=Fp});var hi=g(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.BindingWhenOnSyntax=void 0;var Up=Bn(),qp=Dn(),Gp=(function(){function t(e){this._binding=e,this._bindingWhenSyntax=new qp.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Up.BindingOnSyntax(this._binding)}return t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,n){return this._bindingWhenSyntax.whenTargetTagged(e,n)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,n){return this._bindingWhenSyntax.whenParentTagged(e,n)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,n)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenNoAncestorTagged(e,n)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t})();Ln.BindingWhenOnSyntax=Gp});var Bs=g(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.BindingInSyntax=void 0;var gi=ue(),mi=hi(),Wp=(function(){function t(e){this._binding=e}return t.prototype.inRequestScope=function(){return this._binding.scope=gi.BindingScopeEnum.Request,new mi.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=gi.BindingScopeEnum.Singleton,new mi.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=gi.BindingScopeEnum.Transient,new mi.BindingWhenOnSyntax(this._binding)},t})();jn.BindingInSyntax=Wp});var ks=g(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.BindingInWhenOnSyntax=void 0;var Vp=Bs(),$p=Bn(),Hp=Dn(),Kp=(function(){function t(e){this._binding=e,this._bindingWhenSyntax=new Hp.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new $p.BindingOnSyntax(this._binding),this._bindingInSyntax=new Vp.BindingInSyntax(e)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,n){return this._bindingWhenSyntax.whenTargetTagged(e,n)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,n){return this._bindingWhenSyntax.whenParentTagged(e,n)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,n)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenNoAncestorTagged(e,n)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t})();Fn.BindingInWhenOnSyntax=Kp});var Fs=g(Ae=>{"use strict";var Yp=Ae&&Ae.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),zp=Ae&&Ae.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jp=Ae&&Ae.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Yp(e,t,n);return zp(e,t),e};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.BindingToSyntax=void 0;var Ls=Jp(z()),ee=ue(),js=ks(),bt=hi(),Xp=(function(){function t(e){this._binding=e}return t.prototype.to=function(e){return this._binding.type=ee.BindingTypeEnum.Instance,this._binding.implementationType=e,new js.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+Ls.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},t.prototype.toConstantValue=function(e){return this._binding.type=ee.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=ee.BindingScopeEnum.Singleton,new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(e){return this._binding.type=ee.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new js.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(e){return this._binding.type=ee.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=ee.BindingScopeEnum.Singleton,new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(e){return this._binding.type=ee.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=ee.BindingScopeEnum.Singleton,new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(Ls.INVALID_FUNCTION_BINDING);var n=this.toConstantValue(e);return this._binding.type=ee.BindingTypeEnum.Function,this._binding.scope=ee.BindingScopeEnum.Singleton,n},t.prototype.toAutoFactory=function(e){return this._binding.type=ee.BindingTypeEnum.Factory,this._binding.factory=function(n){var r=function(){return n.container.get(e)};return r},this._binding.scope=ee.BindingScopeEnum.Singleton,new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toAutoNamedFactory=function(e){return this._binding.type=ee.BindingTypeEnum.Factory,this._binding.factory=function(n){return function(r){return n.container.getNamed(e,r)}},new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(e){return this._binding.type=ee.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=ee.BindingScopeEnum.Singleton,new bt.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(e){this.toDynamicValue(function(n){return n.container.get(e)})},t})();Ae.BindingToSyntax=Xp});var Us=g(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.ContainerSnapshot=void 0;var Qp=(function(){function t(){}return t.of=function(e,n,r,i,o){var s=new t;return s.bindings=e,s.middleware=n,s.deactivations=i,s.activations=r,s.moduleActivationStore=o,s},t})();Un.ContainerSnapshot=Qp});var qs=g(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.isClonable=void 0;function Zp(t){return typeof t=="object"&&t!==null&&"clone"in t&&typeof t.clone=="function"}qn.isClonable=Zp});var yi=g(Ie=>{"use strict";var eh=Ie&&Ie.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),th=Ie&&Ie.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nh=Ie&&Ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&eh(e,t,n);return th(e,t),e};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Lookup=void 0;var tt=nh(z()),rh=qs(),ih=(function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(e,n){if(e==null)throw new Error(tt.NULL_ARGUMENT);if(n==null)throw new Error(tt.NULL_ARGUMENT);var r=this._map.get(e);r!==void 0?r.push(n):this._map.set(e,[n])},t.prototype.get=function(e){if(e==null)throw new Error(tt.NULL_ARGUMENT);var n=this._map.get(e);if(n!==void 0)return n;throw new Error(tt.KEY_NOT_FOUND)},t.prototype.remove=function(e){if(e==null)throw new Error(tt.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(tt.KEY_NOT_FOUND)},t.prototype.removeIntersection=function(e){var n=this;this.traverse(function(r,i){var o=e.hasKey(r)?e.get(r):void 0;if(o!==void 0){var s=i.filter(function(u){return!o.some(function(c){return u===c})});n._setValue(r,s)}})},t.prototype.removeByCondition=function(e){var n=this,r=[];return this._map.forEach(function(i,o){for(var s=[],u=0,c=i;u<c.length;u++){var a=c[u],l=e(a);l?r.push(a):s.push(a)}n._setValue(o,s)}),r},t.prototype.hasKey=function(e){if(e==null)throw new Error(tt.NULL_ARGUMENT);return this._map.has(e)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(n,r){n.forEach(function(i){return e.add(r,(0,rh.isClonable)(i)?i.clone():i)})}),e},t.prototype.traverse=function(e){this._map.forEach(function(n,r){e(r,n)})},t.prototype._setValue=function(e,n){n.length>0?this._map.set(e,n):this._map.delete(e)},t})();Ie.Lookup=ih});var Ws=g(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ModuleActivationStore=void 0;var Gs=yi(),oh=(function(){function t(){this._map=new Map}return t.prototype.remove=function(e){if(this._map.has(e)){var n=this._map.get(e);return this._map.delete(e),n}return this._getEmptyHandlersStore()},t.prototype.addDeactivation=function(e,n,r){this._getModuleActivationHandlers(e).onDeactivations.add(n,r)},t.prototype.addActivation=function(e,n,r){this._getModuleActivationHandlers(e).onActivations.add(n,r)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(n,r){e._map.set(r,{onActivations:n.onActivations.clone(),onDeactivations:n.onDeactivations.clone()})}),e},t.prototype._getModuleActivationHandlers=function(e){var n=this._map.get(e);return n===void 0&&(n=this._getEmptyHandlersStore(),this._map.set(e,n)),n},t.prototype._getEmptyHandlersStore=function(){var e={onActivations:new Gs.Lookup,onDeactivations:new Gs.Lookup};return e},t})();Gn.ModuleActivationStore=oh});var $s=g($=>{"use strict";var Vn=$&&$.__assign||function(){return Vn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Vn.apply(this,arguments)},sh=$&&$.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),ah=$&&$.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vs=$&&$.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&sh(e,t,n);return ah(e,t),e},le=$&&$.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},fe=$&&$.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1],o=a;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(a);break}o[2]&&n.ops.pop(),n.trys.pop();continue}a=e.call(t,n)}catch(l){a=[6,l],i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},uh=$&&$.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};Object.defineProperty($,"__esModule",{value:!0});$.Container=void 0;var ch=$o(),_e=Vs(z()),wt=ue(),nt=Vs(F()),lh=Yr(),Wn=ri(),fh=Ps(),dh=Fs(),rt=Yt(),ph=ze(),hh=et(),gh=Us(),Jt=yi(),mh=Ws(),yh=(function(){function t(e){var n=e||{};if(typeof n!="object")throw new Error(""+_e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(n.defaultScope===void 0)n.defaultScope=wt.BindingScopeEnum.Transient;else if(n.defaultScope!==wt.BindingScopeEnum.Singleton&&n.defaultScope!==wt.BindingScopeEnum.Transient&&n.defaultScope!==wt.BindingScopeEnum.Request)throw new Error(""+_e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(n.autoBindInjectable===void 0)n.autoBindInjectable=!1;else if(typeof n.autoBindInjectable!="boolean")throw new Error(""+_e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(n.skipBaseClassChecks===void 0)n.skipBaseClassChecks=!1;else if(typeof n.skipBaseClassChecks!="boolean")throw new Error(""+_e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:n.autoBindInjectable,defaultScope:n.defaultScope,skipBaseClassChecks:n.skipBaseClassChecks},this.id=(0,ph.id)(),this._bindingDictionary=new Jt.Lookup,this._snapshots=[],this._middleware=null,this._activations=new Jt.Lookup,this._deactivations=new Jt.Lookup,this.parent=null,this._metadataReader=new lh.MetadataReader,this._moduleActivationStore=new mh.ModuleActivationStore}return t.merge=function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=new t,s=uh([e,n],r,!0).map(function(a){return(0,Wn.getBindingDictionary)(a)}),u=(0,Wn.getBindingDictionary)(o);function c(a,l){a.traverse(function(p,m){m.forEach(function(w){l.add(w.serviceIdentifier,w.clone())})})}return s.forEach(function(a){c(a,u)}),o},t.prototype.load=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=this._getContainerModuleHelpersFactory(),i=0,o=e;i<o.length;i++){var s=o[i],u=r(s.id);s.registry(u.bindFunction,u.unbindFunction,u.isboundFunction,u.rebindFunction,u.unbindAsyncFunction,u.onActivationFunction,u.onDeactivationFunction)}},t.prototype.loadAsync=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return le(this,void 0,void 0,function(){var r,i,o,s,u;return fe(this,function(c){switch(c.label){case 0:r=this._getContainerModuleHelpersFactory(),i=0,o=e,c.label=1;case 1:return i<o.length?(s=o[i],u=r(s.id),[4,s.registry(u.bindFunction,u.unbindFunction,u.isboundFunction,u.rebindFunction,u.unbindAsyncFunction,u.onActivationFunction,u.onDeactivationFunction)]):[3,4];case 2:c.sent(),c.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.unload=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];n.forEach(function(i){var o=e._removeModuleBindings(i.id);e._deactivateSingletons(o),e._removeModuleHandlers(i.id)})},t.prototype.unloadAsync=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return le(this,void 0,void 0,function(){var r,i,o,s;return fe(this,function(u){switch(u.label){case 0:r=0,i=e,u.label=1;case 1:return r<i.length?(o=i[r],s=this._removeModuleBindings(o.id),[4,this._deactivateSingletonsAsync(s)]):[3,4];case 2:u.sent(),this._removeModuleHandlers(o.id),u.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},t.prototype.bind=function(e){var n=this.options.defaultScope||wt.BindingScopeEnum.Transient,r=new ch.Binding(e,n);return this._bindingDictionary.add(e,r),new dh.BindingToSyntax(r)},t.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},t.prototype.rebindAsync=function(e){return le(this,void 0,void 0,function(){return fe(this,function(n){switch(n.label){case 0:return[4,this.unbindAsync(e)];case 1:return n.sent(),[2,this.bind(e)]}})})},t.prototype.unbind=function(e){if(this._bindingDictionary.hasKey(e)){var n=this._bindingDictionary.get(e);this._deactivateSingletons(n)}this._removeServiceFromDictionary(e)},t.prototype.unbindAsync=function(e){return le(this,void 0,void 0,function(){var n;return fe(this,function(r){switch(r.label){case 0:return this._bindingDictionary.hasKey(e)?(n=this._bindingDictionary.get(e),[4,this._deactivateSingletonsAsync(n)]):[3,2];case 1:r.sent(),r.label=2;case 2:return this._removeServiceFromDictionary(e),[2]}})})},t.prototype.unbindAll=function(){var e=this;this._bindingDictionary.traverse(function(n,r){e._deactivateSingletons(r)}),this._bindingDictionary=new Jt.Lookup},t.prototype.unbindAllAsync=function(){return le(this,void 0,void 0,function(){var e,n=this;return fe(this,function(r){switch(r.label){case 0:return e=[],this._bindingDictionary.traverse(function(i,o){e.push(n._deactivateSingletonsAsync(o))}),[4,Promise.all(e)];case 1:return r.sent(),this._bindingDictionary=new Jt.Lookup,[2]}})})},t.prototype.onActivation=function(e,n){this._activations.add(e,n)},t.prototype.onDeactivation=function(e,n){this._deactivations.add(e,n)},t.prototype.isBound=function(e){var n=this._bindingDictionary.hasKey(e);return!n&&this.parent&&(n=this.parent.isBound(e)),n},t.prototype.isCurrentBound=function(e){return this._bindingDictionary.hasKey(e)},t.prototype.isBoundNamed=function(e,n){return this.isBoundTagged(e,nt.NAMED_TAG,n)},t.prototype.isBoundTagged=function(e,n,r){var i=!1;if(this._bindingDictionary.hasKey(e)){var o=this._bindingDictionary.get(e),s=(0,Wn.createMockRequest)(this,e,n,r);i=o.some(function(u){return u.constraint(s)})}return!i&&this.parent&&(i=this.parent.isBoundTagged(e,n,r)),i},t.prototype.snapshot=function(){this._snapshots.push(gh.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},t.prototype.restore=function(){var e=this._snapshots.pop();if(e===void 0)throw new Error(_e.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._activations=e.activations,this._deactivations=e.deactivations,this._middleware=e.middleware,this._moduleActivationStore=e.moduleActivationStore},t.prototype.createChild=function(e){var n=new t(e||this.options);return n.parent=this,n},t.prototype.applyMiddleware=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce(function(i,o){return o(i)},r)},t.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},t.prototype.get=function(e){var n=this._getNotAllArgs(e,!1);return this._getButThrowIfAsync(n)},t.prototype.getAsync=function(e){return le(this,void 0,void 0,function(){var n;return fe(this,function(r){return n=this._getNotAllArgs(e,!1),[2,this._get(n)]})})},t.prototype.getTagged=function(e,n,r){var i=this._getNotAllArgs(e,!1,n,r);return this._getButThrowIfAsync(i)},t.prototype.getTaggedAsync=function(e,n,r){return le(this,void 0,void 0,function(){var i;return fe(this,function(o){return i=this._getNotAllArgs(e,!1,n,r),[2,this._get(i)]})})},t.prototype.getNamed=function(e,n){return this.getTagged(e,nt.NAMED_TAG,n)},t.prototype.getNamedAsync=function(e,n){return this.getTaggedAsync(e,nt.NAMED_TAG,n)},t.prototype.getAll=function(e){var n=this._getAllArgs(e);return this._getButThrowIfAsync(n)},t.prototype.getAllAsync=function(e){var n=this._getAllArgs(e);return this._getAll(n)},t.prototype.getAllTagged=function(e,n,r){var i=this._getNotAllArgs(e,!0,n,r);return this._getButThrowIfAsync(i)},t.prototype.getAllTaggedAsync=function(e,n,r){var i=this._getNotAllArgs(e,!0,n,r);return this._getAll(i)},t.prototype.getAllNamed=function(e,n){return this.getAllTagged(e,nt.NAMED_TAG,n)},t.prototype.getAllNamedAsync=function(e,n){return this.getAllTaggedAsync(e,nt.NAMED_TAG,n)},t.prototype.resolve=function(e){var n=this.isBound(e);n||this.bind(e).toSelf();var r=this.get(e);return n||this.unbind(e),r},t.prototype._preDestroy=function(e,n){var r,i;if(Reflect.hasMetadata(nt.PRE_DESTROY,e)){var o=Reflect.getMetadata(nt.PRE_DESTROY,e);return(i=(r=n)[o.value])===null||i===void 0?void 0:i.call(r)}},t.prototype._removeModuleHandlers=function(e){var n=this._moduleActivationStore.remove(e);this._activations.removeIntersection(n.onActivations),this._deactivations.removeIntersection(n.onDeactivations)},t.prototype._removeModuleBindings=function(e){return this._bindingDictionary.removeByCondition(function(n){return n.moduleId===e})},t.prototype._deactivate=function(e,n){var r=this,i=Object.getPrototypeOf(n).constructor;try{if(this._deactivations.hasKey(e.serviceIdentifier)){var o=this._deactivateContainer(n,this._deactivations.get(e.serviceIdentifier).values());if((0,rt.isPromise)(o))return this._handleDeactivationError(o.then(function(){return r._propagateContainerDeactivationThenBindingAndPreDestroyAsync(e,n,i)}),i)}var s=this._propagateContainerDeactivationThenBindingAndPreDestroy(e,n,i);if((0,rt.isPromise)(s))return this._handleDeactivationError(s,i)}catch(u){if(u instanceof Error)throw new Error(_e.ON_DEACTIVATION_ERROR(i.name,u.message))}},t.prototype._handleDeactivationError=function(e,n){return le(this,void 0,void 0,function(){var r;return fe(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e];case 1:return i.sent(),[3,3];case 2:if(r=i.sent(),r instanceof Error)throw new Error(_e.ON_DEACTIVATION_ERROR(n.name,r.message));return[3,3];case 3:return[2]}})})},t.prototype._deactivateContainer=function(e,n){for(var r=this,i=n.next();i.value;){var o=i.value(e);if((0,rt.isPromise)(o))return o.then(function(){return r._deactivateContainerAsync(e,n)});i=n.next()}},t.prototype._deactivateContainerAsync=function(e,n){return le(this,void 0,void 0,function(){var r;return fe(this,function(i){switch(i.label){case 0:r=n.next(),i.label=1;case 1:return r.value?[4,r.value(e)]:[3,3];case 2:return i.sent(),r=n.next(),[3,1];case 3:return[2]}})})},t.prototype._getContainerModuleHelpersFactory=function(){var e=this,n=function(l,p){l._binding.moduleId=p},r=function(l){return function(p){var m=e.bind(p);return n(m,l),m}},i=function(){return function(l){return e.unbind(l)}},o=function(){return function(l){return e.unbindAsync(l)}},s=function(){return function(l){return e.isBound(l)}},u=function(l){return function(p){var m=e.rebind(p);return n(m,l),m}},c=function(l){return function(p,m){e._moduleActivationStore.addActivation(l,p,m),e.onActivation(p,m)}},a=function(l){return function(p,m){e._moduleActivationStore.addDeactivation(l,p,m),e.onDeactivation(p,m)}};return function(l){return{bindFunction:r(l),isboundFunction:s(),onActivationFunction:c(l),onDeactivationFunction:a(l),rebindFunction:u(l),unbindFunction:i(),unbindAsyncFunction:o()}}},t.prototype._getAll=function(e){return Promise.all(this._get(e))},t.prototype._get=function(e){var n=Vn(Vn({},e),{contextInterceptor:function(i){return i},targetType:wt.TargetTypeEnum.Variable});if(this._middleware){var r=this._middleware(n);if(r==null)throw new Error(_e.INVALID_MIDDLEWARE_RETURN);return r}return this._planAndResolve()(n)},t.prototype._getButThrowIfAsync=function(e){var n=this._get(e);if((0,rt.isPromiseOrContainsPromise)(n))throw new Error(_e.LAZY_IN_SYNC(e.serviceIdentifier));return n},t.prototype._getAllArgs=function(e){var n={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:e};return n},t.prototype._getNotAllArgs=function(e,n,r,i){var o={avoidConstraints:!1,isMultiInject:n,serviceIdentifier:e,key:r,value:i};return o},t.prototype._planAndResolve=function(){var e=this;return function(n){var r=(0,Wn.plan)(e._metadataReader,e,n.isMultiInject,n.targetType,n.serviceIdentifier,n.key,n.value,n.avoidConstraints);r=n.contextInterceptor(r);var i=(0,fh.resolve)(r);return i}},t.prototype._deactivateIfSingleton=function(e){var n=this;if(e.activated)return(0,rt.isPromise)(e.cache)?e.cache.then(function(r){return n._deactivate(e,r)}):this._deactivate(e,e.cache)},t.prototype._deactivateSingletons=function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n],o=this._deactivateIfSingleton(i);if((0,rt.isPromise)(o))throw new Error(_e.ASYNC_UNBIND_REQUIRED)}},t.prototype._deactivateSingletonsAsync=function(e){return le(this,void 0,void 0,function(){var n=this;return fe(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(i){return n._deactivateIfSingleton(i)}))];case 1:return r.sent(),[2]}})})},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(e,n,r){return this.parent?this._deactivate.bind(this.parent)(e,n):this._bindingDeactivationAndPreDestroy(e,n,r)},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(e,n,r){return le(this,void 0,void 0,function(){return fe(this,function(i){switch(i.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(e,n)]:[3,2];case 1:return i.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(e,n,r)];case 3:i.sent(),i.label=4;case 4:return[2]}})})},t.prototype._removeServiceFromDictionary=function(e){try{this._bindingDictionary.remove(e)}catch{throw new Error(_e.CANNOT_UNBIND+" "+(0,hh.getServiceIdentifierAsString)(e))}},t.prototype._bindingDeactivationAndPreDestroy=function(e,n,r){var i=this;if(typeof e.onDeactivation=="function"){var o=e.onDeactivation(n);if((0,rt.isPromise)(o))return o.then(function(){return i._preDestroy(r,n)})}return this._preDestroy(r,n)},t.prototype._bindingDeactivationAndPreDestroyAsync=function(e,n,r){return le(this,void 0,void 0,function(){return fe(this,function(i){switch(i.label){case 0:return typeof e.onDeactivation!="function"?[3,2]:[4,e.onDeactivation(n)];case 1:i.sent(),i.label=2;case 2:return[4,this._preDestroy(r,n)];case 3:return i.sent(),[2]}})})},t})();$.Container=yh});var Ks=g(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.AsyncContainerModule=St.ContainerModule=void 0;var Hs=ze(),_h=(function(){function t(e){this.id=(0,Hs.id)(),this.registry=e}return t})();St.ContainerModule=_h;var vh=(function(){function t(e){this.id=(0,Hs.id)(),this.registry=e}return t})();St.AsyncContainerModule=vh});var Ys=g($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.getFirstArrayDuplicate=void 0;function bh(t){for(var e=new Set,n=0,r=t;n<r.length;n++){var i=r[n];if(e.has(i))return i;e.add(i)}}$n.getFirstArrayDuplicate=bh});var qe=g(Q=>{"use strict";var wh=Q&&Q.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Sh=Q&&Q.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Js=Q&&Q.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&wh(e,t,n);return Sh(e,t),e};Object.defineProperty(Q,"__esModule",{value:!0});Q.createTaggedDecorator=Q.tagProperty=Q.tagParameter=Q.decorate=void 0;var Hn=Js(z()),Xs=Js(F()),Eh=Ys();function Th(t){return t.prototype!==void 0}function xh(t){if(t!==void 0)throw new Error(Hn.INVALID_DECORATOR_OPERATION)}function Qs(t,e,n,r){xh(e),ea(Xs.TAGGED,t,n.toString(),r)}Q.tagParameter=Qs;function Zs(t,e,n){if(Th(t))throw new Error(Hn.INVALID_DECORATOR_OPERATION);ea(Xs.TAGGED_PROP,t.constructor,e,n)}Q.tagProperty=Zs;function Ch(t){var e=[];if(Array.isArray(t)){e=t;var n=(0,Eh.getFirstArrayDuplicate)(e.map(function(r){return r.key}));if(n!==void 0)throw new Error(Hn.DUPLICATED_METADATA+" "+n.toString())}else e=[t];return e}function ea(t,e,n,r){var i=Ch(r),o={};Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var s=o[n];if(s===void 0)s=[];else for(var u=function(p){if(i.some(function(m){return m.key===p.key}))throw new Error(Hn.DUPLICATED_METADATA+" "+p.key.toString())},c=0,a=s;c<a.length;c++){var l=a[c];u(l)}s.push.apply(s,i),o[n]=s,Reflect.defineMetadata(t,o,e)}function Ah(t){return function(e,n,r){typeof r=="number"?Qs(e,n,r,t):Zs(e,n,t)}}Q.createTaggedDecorator=Ah;function zs(t,e){Reflect.decorate(t,e)}function Ih(t,e){return function(n,r){e(n,r,t)}}function Oh(t,e,n){typeof n=="number"?zs([Ih(n,t)],e):typeof n=="string"?Reflect.decorate([t],e,n):zs([t],e)}Q.decorate=Oh});var na=g(Oe=>{"use strict";var Nh=Oe&&Oe.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Ph=Oe&&Oe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ta=Oe&&Oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nh(e,t,n);return Ph(e,t),e};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.injectable=void 0;var Rh=ta(z()),_i=ta(F());function Mh(){return function(t){if(Reflect.hasOwnMetadata(_i.PARAM_TYPES,t))throw new Error(Rh.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(_i.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(_i.PARAM_TYPES,e,t),t}}Oe.injectable=Mh});var ra=g(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.tagged=void 0;var Dh=ye(),Bh=qe();function kh(t,e){return(0,Bh.createTaggedDecorator)(new Dh.Metadata(t,e))}Kn.tagged=kh});var ia=g(Ne=>{"use strict";var Lh=Ne&&Ne.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),jh=Ne&&Ne.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Fh=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Lh(e,t,n);return jh(e,t),e};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.named=void 0;var Uh=Fh(F()),qh=ye(),Gh=qe();function Wh(t){return(0,Gh.createTaggedDecorator)(new qh.Metadata(Uh.NAMED_TAG,t))}Ne.named=Wh});var vi=g(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.injectBase=void 0;var Vh=z(),$h=ye(),Hh=qe();function Kh(t){return function(e){return function(n,r,i){if(e===void 0){var o=typeof n=="function"?n.name:n.constructor.name;throw new Error((0,Vh.UNDEFINED_INJECT_ANNOTATION)(o))}return(0,Hh.createTaggedDecorator)(new $h.Metadata(t,e))(n,r,i)}}}Yn.injectBase=Kh});var oa=g(Pe=>{"use strict";var Yh=Pe&&Pe.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),zh=Pe&&Pe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jh=Pe&&Pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Yh(e,t,n);return zh(e,t),e};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.inject=void 0;var Xh=Jh(F()),Qh=vi(),Zh=(0,Qh.injectBase)(Xh.INJECT_TAG);Pe.inject=Zh});var sa=g(Re=>{"use strict";var eg=Re&&Re.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),tg=Re&&Re.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ng=Re&&Re.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&eg(e,t,n);return tg(e,t),e};Object.defineProperty(Re,"__esModule",{value:!0});Re.optional=void 0;var rg=ng(F()),ig=ye(),og=qe();function sg(){return(0,og.createTaggedDecorator)(new ig.Metadata(rg.OPTIONAL_TAG,!0))}Re.optional=sg});var aa=g(Me=>{"use strict";var ag=Me&&Me.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),ug=Me&&Me.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cg=Me&&Me.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&ag(e,t,n);return ug(e,t),e};Object.defineProperty(Me,"__esModule",{value:!0});Me.unmanaged=void 0;var lg=cg(F()),fg=ye(),dg=qe();function pg(){return function(t,e,n){var r=new fg.Metadata(lg.UNMANAGED_TAG,!0);(0,dg.tagParameter)(t,e,n,r)}}Me.unmanaged=pg});var ua=g(De=>{"use strict";var hg=De&&De.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),gg=De&&De.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mg=De&&De.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&hg(e,t,n);return gg(e,t),e};Object.defineProperty(De,"__esModule",{value:!0});De.multiInject=void 0;var yg=mg(F()),_g=vi(),vg=(0,_g.injectBase)(yg.MULTI_INJECT_TAG);De.multiInject=vg});var ca=g(Be=>{"use strict";var bg=Be&&Be.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),wg=Be&&Be.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sg=Be&&Be.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&bg(e,t,n);return wg(e,t),e};Object.defineProperty(Be,"__esModule",{value:!0});Be.targetName=void 0;var Eg=Sg(F()),Tg=ye(),xg=qe();function Cg(t){return function(e,n,r){var i=new Tg.Metadata(Eg.NAME_TAG,t);(0,xg.tagParameter)(e,n,r,i)}}Be.targetName=Cg});var bi=g(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.propertyEventDecorator=void 0;var Ag=ye();function Ig(t,e){return function(){return function(n,r){var i=new Ag.Metadata(t,r);if(Reflect.hasOwnMetadata(t,n.constructor))throw new Error(e);Reflect.defineMetadata(t,i,n.constructor)}}}zn.propertyEventDecorator=Ig});var fa=g(ke=>{"use strict";var Og=ke&&ke.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Ng=ke&&ke.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),la=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Og(e,t,n);return Ng(e,t),e};Object.defineProperty(ke,"__esModule",{value:!0});ke.postConstruct=void 0;var Pg=la(z()),Rg=la(F()),Mg=bi(),Dg=(0,Mg.propertyEventDecorator)(Rg.POST_CONSTRUCT,Pg.MULTIPLE_POST_CONSTRUCT_METHODS);ke.postConstruct=Dg});var pa=g(Le=>{"use strict";var Bg=Le&&Le.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),kg=Le&&Le.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),da=Le&&Le.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Bg(e,t,n);return kg(e,t),e};Object.defineProperty(Le,"__esModule",{value:!0});Le.preDestroy=void 0;var Lg=da(z()),jg=da(F()),Fg=bi(),Ug=(0,Fg.propertyEventDecorator)(jg.PRE_DESTROY,Lg.MULTIPLE_PRE_DESTROY_METHODS);Le.preDestroy=Ug});var ha=g(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.interfaces=void 0;var wi;wi||(wi={});Jn.interfaces=wi});var Ei=g(v=>{"use strict";var qg=v&&v.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Gg=v&&v.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wg=v&&v.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&qg(e,t,n);return Gg(e,t),e};Object.defineProperty(v,"__esModule",{value:!0});v.multiBindToService=v.getServiceIdentifierAsString=v.typeConstraint=v.namedConstraint=v.taggedConstraint=v.traverseAncerstors=v.decorate=v.interfaces=v.id=v.MetadataReader=v.preDestroy=v.postConstruct=v.targetName=v.multiInject=v.unmanaged=v.optional=v.LazyServiceIdentifer=v.LazyServiceIdentifier=v.inject=v.named=v.tagged=v.injectable=v.createTaggedDecorator=v.ContainerModule=v.AsyncContainerModule=v.TargetTypeEnum=v.BindingTypeEnum=v.BindingScopeEnum=v.Container=v.METADATA_KEY=void 0;var Vg=Wg(F());v.METADATA_KEY=Vg;var $g=$s();Object.defineProperty(v,"Container",{enumerable:!0,get:function(){return $g.Container}});var Si=ue();Object.defineProperty(v,"BindingScopeEnum",{enumerable:!0,get:function(){return Si.BindingScopeEnum}});Object.defineProperty(v,"BindingTypeEnum",{enumerable:!0,get:function(){return Si.BindingTypeEnum}});Object.defineProperty(v,"TargetTypeEnum",{enumerable:!0,get:function(){return Si.TargetTypeEnum}});var ga=Ks();Object.defineProperty(v,"AsyncContainerModule",{enumerable:!0,get:function(){return ga.AsyncContainerModule}});Object.defineProperty(v,"ContainerModule",{enumerable:!0,get:function(){return ga.ContainerModule}});var Hg=qe();Object.defineProperty(v,"createTaggedDecorator",{enumerable:!0,get:function(){return Hg.createTaggedDecorator}});var Kg=na();Object.defineProperty(v,"injectable",{enumerable:!0,get:function(){return Kg.injectable}});var Yg=ra();Object.defineProperty(v,"tagged",{enumerable:!0,get:function(){return Yg.tagged}});var zg=ia();Object.defineProperty(v,"named",{enumerable:!0,get:function(){return zg.named}});var Jg=oa();Object.defineProperty(v,"inject",{enumerable:!0,get:function(){return Jg.inject}});var Xg=Cn();Object.defineProperty(v,"LazyServiceIdentifier",{enumerable:!0,get:function(){return Xg.LazyServiceIdentifier}});var Qg=Cn();Object.defineProperty(v,"LazyServiceIdentifer",{enumerable:!0,get:function(){return Qg.LazyServiceIdentifier}});var Zg=sa();Object.defineProperty(v,"optional",{enumerable:!0,get:function(){return Zg.optional}});var em=aa();Object.defineProperty(v,"unmanaged",{enumerable:!0,get:function(){return em.unmanaged}});var tm=ua();Object.defineProperty(v,"multiInject",{enumerable:!0,get:function(){return tm.multiInject}});var nm=ca();Object.defineProperty(v,"targetName",{enumerable:!0,get:function(){return nm.targetName}});var rm=fa();Object.defineProperty(v,"postConstruct",{enumerable:!0,get:function(){return rm.postConstruct}});var im=pa();Object.defineProperty(v,"preDestroy",{enumerable:!0,get:function(){return im.preDestroy}});var om=Yr();Object.defineProperty(v,"MetadataReader",{enumerable:!0,get:function(){return om.MetadataReader}});var sm=ze();Object.defineProperty(v,"id",{enumerable:!0,get:function(){return sm.id}});var am=ha();Object.defineProperty(v,"interfaces",{enumerable:!0,get:function(){return am.interfaces}});var um=qe();Object.defineProperty(v,"decorate",{enumerable:!0,get:function(){return um.decorate}});var Xn=pi();Object.defineProperty(v,"traverseAncerstors",{enumerable:!0,get:function(){return Xn.traverseAncerstors}});Object.defineProperty(v,"taggedConstraint",{enumerable:!0,get:function(){return Xn.taggedConstraint}});Object.defineProperty(v,"namedConstraint",{enumerable:!0,get:function(){return Xn.namedConstraint}});Object.defineProperty(v,"typeConstraint",{enumerable:!0,get:function(){return Xn.typeConstraint}});var cm=et();Object.defineProperty(v,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return cm.getServiceIdentifierAsString}});var lm=si();Object.defineProperty(v,"multiBindToService",{enumerable:!0,get:function(){return lm.multiBindToService}})});var Ge=g((AS,Aa)=>{"use strict";var xa=["nodebuffer","arraybuffer","fragments"],Ca=typeof Blob<"u";Ca&&xa.push("blob");Aa.exports={BINARY_TYPES:xa,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ca,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Qt=g((IS,ir)=>{"use strict";var{EMPTY_BUFFER:Sm}=Ge(),Pi=Buffer[Symbol.species];function Em(t,e){if(t.length===0)return Sm;if(t.length===1)return t[0];let n=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let o=t[i];n.set(o,r),r+=o.length}return r<e?new Pi(n.buffer,n.byteOffset,r):n}function Ia(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[o]^e[o&3]}function Oa(t,e){for(let n=0;n<t.length;n++)t[n]^=e[n&3]}function Tm(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Ri(t){if(Ri.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Pi(t):ArrayBuffer.isView(t)?e=new Pi(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Ri.readOnly=!1),e}ir.exports={concat:Em,mask:Ia,toArrayBuffer:Tm,toBuffer:Ri,unmask:Oa};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=I("bufferutil");ir.exports.mask=function(e,n,r,i,o){o<48?Ia(e,n,r,i,o):t.mask(e,n,r,i,o)},ir.exports.unmask=function(e,n){e.length<32?Oa(e,n):t.unmask(e,n)}}catch{}});var Ra=g((OS,Pa)=>{"use strict";var Na=Symbol("kDone"),Mi=Symbol("kRun"),Di=class{constructor(e){this[Na]=()=>{this.pending--,this[Mi]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Mi]()}[Mi](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Na])}}};Pa.exports=Di});var At=g((NS,ka)=>{"use strict";var Zt=I("zlib"),Ma=Qt(),xm=Ra(),{kStatusCode:Da}=Ge(),Cm=Buffer[Symbol.species],Am=Buffer.from([0,0,255,255]),sr=Symbol("permessage-deflate"),We=Symbol("total-length"),xt=Symbol("callback"),Je=Symbol("buffers"),Ct=Symbol("error"),or,Bi=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!or){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;or=new xm(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[xt];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let n=this._options,r=e.find(i=>!(n.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>i.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(r.server_no_context_takeover=!0),n.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(r.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?r.client_max_window_bits=n.clientMaxWindowBits:(r.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let n=e[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(e){return e.forEach(n=>{Object.keys(n).forEach(r=>{let i=n[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=o}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);n[r]=i})}),e}decompress(e,n,r){or.add(i=>{this._decompress(e,n,(o,s)=>{i(),r(o,s)})})}compress(e,n,r){or.add(i=>{this._compress(e,n,(o,s)=>{i(),r(o,s)})})}_decompress(e,n,r){let i=this._isServer?"client":"server";if(!this._inflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?Zt.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=Zt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[sr]=this,this._inflate[We]=0,this._inflate[Je]=[],this._inflate.on("error",Om),this._inflate.on("data",Ba)}this._inflate[xt]=r,this._inflate.write(e),n&&this._inflate.write(Am),this._inflate.flush(()=>{let o=this._inflate[Ct];if(o){this._inflate.close(),this._inflate=null,r(o);return}let s=Ma.concat(this._inflate[Je],this._inflate[We]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[We]=0,this._inflate[Je]=[],n&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,s)})}_compress(e,n,r){let i=this._isServer?"server":"client";if(!this._deflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?Zt.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=Zt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[We]=0,this._deflate[Je]=[],this._deflate.on("data",Im)}this._deflate[xt]=r,this._deflate.write(e),this._deflate.flush(Zt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=Ma.concat(this._deflate[Je],this._deflate[We]);n&&(o=new Cm(o.buffer,o.byteOffset,o.length-4)),this._deflate[xt]=null,this._deflate[We]=0,this._deflate[Je]=[],n&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,o)})}};ka.exports=Bi;function Im(t){this[Je].push(t),this[We]+=t.length}function Ba(t){if(this[We]+=t.length,this[sr]._maxPayload<1||this[We]<=this[sr]._maxPayload){this[Je].push(t);return}this[Ct]=new RangeError("Max payload size exceeded"),this[Ct].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ct][Da]=1009,this.removeListener("data",Ba),this.reset()}function Om(t){if(this[sr]._inflate=null,this[Ct]){this[xt](this[Ct]);return}t[Da]=1007,this[xt](t)}});var It=g((PS,ar)=>{"use strict";var{isUtf8:La}=I("buffer"),{hasBlob:Nm}=Ge(),Pm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Rm(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function ki(t){let e=t.length,n=0;for(;n<e;)if((t[n]&128)===0)n++;else if((t[n]&224)===192){if(n+1===e||(t[n+1]&192)!==128||(t[n]&254)===192)return!1;n+=2}else if((t[n]&240)===224){if(n+2>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||t[n]===224&&(t[n+1]&224)===128||t[n]===237&&(t[n+1]&224)===160)return!1;n+=3}else if((t[n]&248)===240){if(n+3>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||(t[n+3]&192)!==128||t[n]===240&&(t[n+1]&240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}function Mm(t){return Nm&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}ar.exports={isBlob:Mm,isValidStatusCode:Rm,isValidUTF8:ki,tokenChars:Pm};if(La)ar.exports.isValidUTF8=function(t){return t.length<24?ki(t):La(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=I("utf-8-validate");ar.exports.isValidUTF8=function(e){return e.length<32?ki(e):t(e)}}catch{}});var qi=g((RS,Va)=>{"use strict";var{Writable:Dm}=I("stream"),ja=At(),{BINARY_TYPES:Bm,EMPTY_BUFFER:Fa,kStatusCode:km,kWebSocket:Lm}=Ge(),{concat:Li,toArrayBuffer:jm,unmask:Fm}=Qt(),{isValidStatusCode:Um,isValidUTF8:Ua}=It(),ur=Buffer[Symbol.species],pe=0,qa=1,Ga=2,Wa=3,ji=4,Fi=5,cr=6,Ui=class extends Dm{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Bm[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Lm]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=pe}_write(e,n,r){if(this._opcode===8&&this._state==pe)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ur(r.buffer,r.byteOffset+e,r.length-e),new ur(r.buffer,r.byteOffset,e)}let n=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=n.length-e;e>=r.length?n.set(this._buffers.shift(),i):(n.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ur(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return n}startLoop(e){this._loop=!0;do switch(this._state){case pe:this.getInfo(e);break;case qa:this.getPayloadLength16(e);break;case Ga:this.getPayloadLength64(e);break;case Wa:this.getMask();break;case ji:this.getData(e);break;case Fi:case cr:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if((n[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(n[0]&64)===64;if(r&&!this._extensions[ja.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=qa:this._payloadLength===127?this._state=Ga:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),r=n.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(n);return}this._masked?this._state=Wa:this._state=ji}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ji}getData(e){let n=Fa;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}n=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Fm(n,this._mask)}if(this._opcode>7){this.controlMessage(n,e);return}if(this._compressed){this._state=Fi,this.decompress(n,e);return}if(n.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(n)}this.dataMessage(e)}decompress(e,n){this._extensions[ja.extensionName].decompress(e,this._fin,(i,o)=>{if(i)return n(i);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(s);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let s=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");n(s);return}this._fragments.push(o)}this.dataMessage(n),this._state===pe&&this.startLoop(n)})}dataMessage(e){if(!this._fin){this._state=pe;return}let n=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Li(r,n):this._binaryType==="arraybuffer"?i=jm(Li(r,n)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=pe):(this._state=cr,setImmediate(()=>{this.emit("message",i,!0),this._state=pe,this.startLoop(e)}))}else{let i=Li(r,n);if(!this._skipUTF8Validation&&!Ua(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===Fi||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=pe):(this._state=cr,setImmediate(()=>{this.emit("message",i,!1),this._state=pe,this.startLoop(e)}))}}controlMessage(e,n){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fa),this.end();else{let r=e.readUInt16BE(0);if(!Um(r)){let o=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(o);return}let i=new ur(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Ua(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(o);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=pe;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=pe):(this._state=cr,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=pe,this.startLoop(n)}))}createError(e,n,r,i,o){this._loop=!1,this._errored=!0;let s=new e(r?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(s,this.createError),s.code=o,s[km]=i,s}};Va.exports=Ui});var Vi=g((DS,Ka)=>{"use strict";var{Duplex:MS}=I("stream"),{randomFillSync:qm}=I("crypto"),{types:{isUint8Array:Gm}}=I("util"),$a=At(),{EMPTY_BUFFER:Wm,kWebSocket:Vm,NOOP:$m}=Ge(),{isBlob:Ot,isValidStatusCode:Hm}=It(),{mask:Ha,toBuffer:it}=Qt(),he=Symbol("kByteLength"),Km=Buffer.alloc(4),lr=8*1024,ot,Nt=lr,ve=0,Ym=1,zm=2,Gi=class t{constructor(e,n,r){this._extensions=n||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=ve,this.onerror=$m,this[Vm]=void 0}static frame(e,n){let r,i=!1,o=2,s=!1;n.mask&&(r=n.maskBuffer||Km,n.generateMask?n.generateMask(r):(Nt===lr&&(ot===void 0&&(ot=Buffer.alloc(lr)),qm(ot,0,lr),Nt=0),r[0]=ot[Nt++],r[1]=ot[Nt++],r[2]=ot[Nt++],r[3]=ot[Nt++]),s=(r[0]|r[1]|r[2]|r[3])===0,o=6);let u;typeof e=="string"?(!n.mask||s)&&n[he]!==void 0?u=n[he]:(e=Buffer.from(e),u=e.length):(u=e.length,i=n.mask&&n.readOnly&&!s);let c=u;u>=65536?(o+=8,c=127):u>125&&(o+=2,c=126);let a=Buffer.allocUnsafe(i?u+o:o);return a[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(a[0]|=64),a[1]=c,c===126?a.writeUInt16BE(u,2):c===127&&(a[2]=a[3]=0,a.writeUIntBE(u,4,6)),n.mask?(a[1]|=128,a[o-4]=r[0],a[o-3]=r[1],a[o-2]=r[2],a[o-1]=r[3],s?[a,e]:i?(Ha(e,r,a,o,u),[a]):(Ha(e,r,e,0,u),[a,e])):[a,e]}close(e,n,r,i){let o;if(e===void 0)o=Wm;else{if(typeof e!="number"||!Hm(e))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let u=Buffer.byteLength(n);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");if(o=Buffer.allocUnsafe(2+u),o.writeUInt16BE(e,0),typeof n=="string")o.write(n,2);else if(Gm(n))o.set(n,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let s={[he]:o.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==ve?this.enqueue([this.dispatch,o,!1,s,i]):this.sendFrame(t.frame(o,s),i)}ping(e,n,r){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):Ot(e)?(i=e.size,o=!1):(e=it(e),i=e.length,o=it.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[he]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};Ot(e)?this._state!==ve?this.enqueue([this.getBlobData,e,!1,s,r]):this.getBlobData(e,!1,s,r):this._state!==ve?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}pong(e,n,r){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):Ot(e)?(i=e.size,o=!1):(e=it(e),i=e.length,o=it.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[he]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};Ot(e)?this._state!==ve?this.enqueue([this.getBlobData,e,!1,s,r]):this.getBlobData(e,!1,s,r):this._state!==ve?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}send(e,n,r){let i=this._extensions[$a.extensionName],o=n.binary?2:1,s=n.compress,u,c;typeof e=="string"?(u=Buffer.byteLength(e),c=!1):Ot(e)?(u=e.size,c=!1):(e=it(e),u=e.length,c=it.readOnly),this._firstFragment?(this._firstFragment=!1,s&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=u>=i._threshold),this._compress=s):(s=!1,o=0),n.fin&&(this._firstFragment=!0);let a={[he]:u,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:s};Ot(e)?this._state!==ve?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==ve?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,n,r,i){this._bufferedBytes+=r[he],this._state=zm,e.arrayBuffer().then(o=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(Wi,this,u,i);return}this._bufferedBytes-=r[he];let s=it(o);n?this.dispatch(s,n,r,i):(this._state=ve,this.sendFrame(t.frame(s,r),i),this.dequeue())}).catch(o=>{process.nextTick(Jm,this,o,i)})}dispatch(e,n,r,i){if(!n){this.sendFrame(t.frame(e,r),i);return}let o=this._extensions[$a.extensionName];this._bufferedBytes+=r[he],this._state=Ym,o.compress(e,r.fin,(s,u)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");Wi(this,c,i);return}this._bufferedBytes-=r[he],this._state=ve,r.readOnly=!1,this.sendFrame(t.frame(u,r),i),this.dequeue()})}dequeue(){for(;this._state===ve&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][he],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][he],this._queue.push(e)}sendFrame(e,n){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],n),this._socket.uncork()):this._socket.write(e[0],n)}};Ka.exports=Gi;function Wi(t,e,n){typeof n=="function"&&n(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],o=i[i.length-1];typeof o=="function"&&o(e)}}function Jm(t,e,n){Wi(t,e,n),t.onerror(e)}});var nu=g((BS,tu)=>{"use strict";var{kForOnEventAttribute:en,kListener:$i}=Ge(),Ya=Symbol("kCode"),za=Symbol("kData"),Ja=Symbol("kError"),Xa=Symbol("kMessage"),Qa=Symbol("kReason"),Pt=Symbol("kTarget"),Za=Symbol("kType"),eu=Symbol("kWasClean"),Ve=class{constructor(e){this[Pt]=null,this[Za]=e}get target(){return this[Pt]}get type(){return this[Za]}};Object.defineProperty(Ve.prototype,"target",{enumerable:!0});Object.defineProperty(Ve.prototype,"type",{enumerable:!0});var st=class extends Ve{constructor(e,n={}){super(e),this[Ya]=n.code===void 0?0:n.code,this[Qa]=n.reason===void 0?"":n.reason,this[eu]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[Ya]}get reason(){return this[Qa]}get wasClean(){return this[eu]}};Object.defineProperty(st.prototype,"code",{enumerable:!0});Object.defineProperty(st.prototype,"reason",{enumerable:!0});Object.defineProperty(st.prototype,"wasClean",{enumerable:!0});var Rt=class extends Ve{constructor(e,n={}){super(e),this[Ja]=n.error===void 0?null:n.error,this[Xa]=n.message===void 0?"":n.message}get error(){return this[Ja]}get message(){return this[Xa]}};Object.defineProperty(Rt.prototype,"error",{enumerable:!0});Object.defineProperty(Rt.prototype,"message",{enumerable:!0});var tn=class extends Ve{constructor(e,n={}){super(e),this[za]=n.data===void 0?null:n.data}get data(){return this[za]}};Object.defineProperty(tn.prototype,"data",{enumerable:!0});var Xm={addEventListener(t,e,n={}){for(let i of this.listeners(t))if(!n[en]&&i[$i]===e&&!i[en])return;let r;if(t==="message")r=function(o,s){let u=new tn("message",{data:s?o:o.toString()});u[Pt]=this,fr(e,this,u)};else if(t==="close")r=function(o,s){let u=new st("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[Pt]=this,fr(e,this,u)};else if(t==="error")r=function(o){let s=new Rt("error",{error:o,message:o.message});s[Pt]=this,fr(e,this,s)};else if(t==="open")r=function(){let o=new Ve("open");o[Pt]=this,fr(e,this,o)};else return;r[en]=!!n[en],r[$i]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let n of this.listeners(t))if(n[$i]===e&&!n[en]){this.removeListener(t,n);break}}};tu.exports={CloseEvent:st,ErrorEvent:Rt,Event:Ve,EventTarget:Xm,MessageEvent:tn};function fr(t,e,n){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var dr=g((kS,ru)=>{"use strict";var{tokenChars:nn}=It();function je(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}function Qm(t){let e=Object.create(null),n=Object.create(null),r=!1,i=!1,o=!1,s,u,c=-1,a=-1,l=-1,p=0;for(;p<t.length;p++)if(a=t.charCodeAt(p),s===void 0)if(l===-1&&nn[a]===1)c===-1&&(c=p);else if(p!==0&&(a===32||a===9))l===-1&&c!==-1&&(l=p);else if(a===59||a===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let w=t.slice(c,l);a===44?(je(e,w,n),n=Object.create(null)):s=w,c=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(u===void 0)if(l===-1&&nn[a]===1)c===-1&&(c=p);else if(a===32||a===9)l===-1&&c!==-1&&(l=p);else if(a===59||a===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p),je(n,t.slice(c,l),!0),a===44&&(je(e,s,n),n=Object.create(null),s=void 0),c=l=-1}else if(a===61&&c!==-1&&l===-1)u=t.slice(c,p),c=l=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(i){if(nn[a]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1?c=p:r||(r=!0),i=!1}else if(o)if(nn[a]===1)c===-1&&(c=p);else if(a===34&&c!==-1)o=!1,l=p;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(a===34&&t.charCodeAt(p-1)===61)o=!0;else if(l===-1&&nn[a]===1)c===-1&&(c=p);else if(c!==-1&&(a===32||a===9))l===-1&&(l=p);else if(a===59||a===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let w=t.slice(c,l);r&&(w=w.replace(/\\/g,""),r=!1),je(n,u,w),a===44&&(je(e,s,n),n=Object.create(null),s=void 0),u=void 0,c=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(c===-1||o||a===32||a===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=p);let m=t.slice(c,l);return s===void 0?je(e,m,n):(u===void 0?je(n,m,!0):r?je(n,u,m.replace(/\\/g,"")):je(n,u,m),je(e,s,n)),e}function Zm(t){return Object.keys(t).map(e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(r=>[e].concat(Object.keys(r).map(i=>{let o=r[i];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?i:`${i}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}ru.exports={format:Zm,parse:Qm}});var mr=g((FS,gu)=>{"use strict";var ey=I("events"),ty=I("https"),ny=I("http"),su=I("net"),ry=I("tls"),{randomBytes:iy,createHash:oy}=I("crypto"),{Duplex:LS,Readable:jS}=I("stream"),{URL:Hi}=I("url"),Xe=At(),sy=qi(),ay=Vi(),{isBlob:uy}=It(),{BINARY_TYPES:iu,CLOSE_TIMEOUT:cy,EMPTY_BUFFER:pr,GUID:ly,kForOnEventAttribute:Ki,kListener:fy,kStatusCode:dy,kWebSocket:H,NOOP:au}=Ge(),{EventTarget:{addEventListener:py,removeEventListener:hy}}=nu(),{format:gy,parse:my}=dr(),{toBuffer:yy}=Qt(),uu=Symbol("kAborted"),Yi=[8,13],$e=["CONNECTING","OPEN","CLOSING","CLOSED"],_y=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,B=class t extends ey{constructor(e,n,r){super(),this._binaryType=iu[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=pr,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(r=n,n=[]):n=[n]),cu(this,e,n,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){iu.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,n,r){let i=new sy({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),o=new ay(e,this._extensions,r.generateMask);this._receiver=i,this._sender=o,this._socket=e,i[H]=this,o[H]=this,e[H]=this,i.on("conclude",wy),i.on("drain",Sy),i.on("error",Ey),i.on("message",Ty),i.on("ping",xy),i.on("pong",Cy),o.onerror=Ay,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),n.length>0&&e.unshift(n),e.on("close",du),e.on("data",gr),e.on("end",pu),e.on("error",hu),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Xe.extensionName]&&this._extensions[Xe.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,n){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){se(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,n,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),fu(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(e||pr,n,r)}pong(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(e||pr,n,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(r=n,n={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Xe.extensionName]||(i.compress=!1),this._sender.send(e||pr,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){se(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(B,"CONNECTING",{enumerable:!0,value:$e.indexOf("CONNECTING")});Object.defineProperty(B.prototype,"CONNECTING",{enumerable:!0,value:$e.indexOf("CONNECTING")});Object.defineProperty(B,"OPEN",{enumerable:!0,value:$e.indexOf("OPEN")});Object.defineProperty(B.prototype,"OPEN",{enumerable:!0,value:$e.indexOf("OPEN")});Object.defineProperty(B,"CLOSING",{enumerable:!0,value:$e.indexOf("CLOSING")});Object.defineProperty(B.prototype,"CLOSING",{enumerable:!0,value:$e.indexOf("CLOSING")});Object.defineProperty(B,"CLOSED",{enumerable:!0,value:$e.indexOf("CLOSED")});Object.defineProperty(B.prototype,"CLOSED",{enumerable:!0,value:$e.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(B.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(B.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Ki])return e[fy];return null},set(e){for(let n of this.listeners(t))if(n[Ki]){this.removeListener(t,n);break}typeof e=="function"&&this.addEventListener(t,e,{[Ki]:!0})}})});B.prototype.addEventListener=py;B.prototype.removeEventListener=hy;gu.exports=B;function cu(t,e,n,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:cy,protocolVersion:Yi[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Yi.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Yi.join(", ")})`);let o;if(e instanceof Hi)o=e;else try{o=new Hi(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),t._url=o.href;let s=o.protocol==="wss:",u=o.protocol==="ws+unix:",c;if(o.protocol!=="ws:"&&!s&&!u?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:u&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"),c){let x=new SyntaxError(c);if(t._redirects===0)throw x;hr(t,x);return}let a=s?443:80,l=iy(16).toString("base64"),p=s?ty.request:ny.request,m=new Set,w;if(i.createConnection=i.createConnection||(s?by:vy),i.defaultPort=i.defaultPort||a,i.port=o.port||a,i.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},i.path=o.pathname+o.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(w=new Xe({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=gy({[Xe.extensionName]:w.offer()})),n.length){for(let x of n){if(typeof x!="string"||!_y.test(x)||m.has(x))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(x)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(o.username||o.password)&&(i.auth=`${o.username}:${o.password}`),u){let x=i.path.split(":");i.socketPath=x[0],i.path=x[1]}let C;if(i.followRedirects){if(t._redirects===0){t._originalIpc=u,t._originalSecure=s,t._originalHostOrSocketPath=u?i.socketPath:o.host;let x=r&&r.headers;if(r={...r,headers:{}},x)for(let[R,Y]of Object.entries(x))r.headers[R.toLowerCase()]=Y}else if(t.listenerCount("redirect")===0){let x=u?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:o.host===t._originalHostOrSocketPath;(!x||t._originalSecure&&!s)&&(delete i.headers.authorization,delete i.headers.cookie,x||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),C=t._req=p(i),t._redirects&&t.emit("redirect",t.url,C)}else C=t._req=p(i);i.timeout&&C.on("timeout",()=>{se(t,C,"Opening handshake has timed out")}),C.on("error",x=>{C===null||C[uu]||(C=t._req=null,hr(t,x))}),C.on("response",x=>{let R=x.headers.location,Y=x.statusCode;if(R&&i.followRedirects&&Y>=300&&Y<400){if(++t._redirects>i.maxRedirects){se(t,C,"Maximum redirects exceeded");return}C.abort();let ae;try{ae=new Hi(R,e)}catch{let ge=new SyntaxError(`Invalid URL: ${R}`);hr(t,ge);return}cu(t,ae,n,r)}else t.emit("unexpected-response",C,x)||se(t,C,`Unexpected server response: ${x.statusCode}`)}),C.on("upgrade",(x,R,Y)=>{if(t.emit("upgrade",x),t.readyState!==B.CONNECTING)return;C=t._req=null;let ae=x.headers.upgrade;if(ae===void 0||ae.toLowerCase()!=="websocket"){se(t,R,"Invalid Upgrade header");return}let ht=oy("sha1").update(l+ly).digest("base64");if(x.headers["sec-websocket-accept"]!==ht){se(t,R,"Invalid Sec-WebSocket-Accept header");return}let ge=x.headers["sec-websocket-protocol"],be;if(ge!==void 0?m.size?m.has(ge)||(be="Server sent an invalid subprotocol"):be="Server sent a subprotocol but none was requested":m.size&&(be="Server sent no subprotocol"),be){se(t,R,be);return}ge&&(t._protocol=ge);let Ze=x.headers["sec-websocket-extensions"];if(Ze!==void 0){if(!w){se(t,R,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Ke;try{Ke=my(Ze)}catch{se(t,R,"Invalid Sec-WebSocket-Extensions header");return}let _n=Object.keys(Ke);if(_n.length!==1||_n[0]!==Xe.extensionName){se(t,R,"Server indicated an extension that was not requested");return}try{w.accept(Ke[Xe.extensionName])}catch{se(t,R,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Xe.extensionName]=w}t.setSocket(R,Y,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(C,t):C.end()}function hr(t,e){t._readyState=B.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function vy(t){return t.path=t.socketPath,su.connect(t)}function by(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=su.isIP(t.host)?"":t.host),ry.connect(t)}function se(t,e,n){t._readyState=B.CLOSING;let r=new Error(n);Error.captureStackTrace(r,se),e.setHeader?(e[uu]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(hr,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function zi(t,e,n){if(e){let r=uy(e)?e.size:yy(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(n){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${$e[t.readyState]})`);process.nextTick(n,r)}}function wy(t,e){let n=this[H];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,n._socket[H]!==void 0&&(n._socket.removeListener("data",gr),process.nextTick(lu,n._socket),t===1005?n.close():n.close(t,e))}function Sy(){let t=this[H];t.isPaused||t._socket.resume()}function Ey(t){let e=this[H];e._socket[H]!==void 0&&(e._socket.removeListener("data",gr),process.nextTick(lu,e._socket),e.close(t[dy])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function ou(){this[H].emitClose()}function Ty(t,e){this[H].emit("message",t,e)}function xy(t){let e=this[H];e._autoPong&&e.pong(t,!this._isServer,au),e.emit("ping",t)}function Cy(t){this[H].emit("pong",t)}function lu(t){t.resume()}function Ay(t){let e=this[H];e.readyState!==B.CLOSED&&(e.readyState===B.OPEN&&(e._readyState=B.CLOSING,fu(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function fu(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function du(){let t=this[H];if(this.removeListener("close",du),this.removeListener("data",gr),this.removeListener("end",pu),t._readyState=B.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[H]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",ou),t._receiver.on("finish",ou))}function gr(t){this[H]._receiver.write(t)||this.pause()}function pu(){let t=this[H];t._readyState=B.CLOSING,t._receiver.end(),this.end()}function hu(){let t=this[H];this.removeListener("error",hu),this.on("error",au),t&&(t._readyState=B.CLOSING,this.destroy())}});var vu=g((qS,_u)=>{"use strict";var US=mr(),{Duplex:Iy}=I("stream");function mu(t){t.emit("close")}function Oy(){!this.destroyed&&this._writableState.finished&&this.destroy()}function yu(t){this.removeListener("error",yu),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function Ny(t,e){let n=!0,r=new Iy({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(o,s){let u=!s&&r._readableState.objectMode?o.toString():o;r.push(u)||t.pause()}),t.once("error",function(o){r.destroyed||(n=!1,r.destroy(o))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,o){if(t.readyState===t.CLOSED){o(i),process.nextTick(mu,r);return}let s=!1;t.once("error",function(c){s=!0,o(c)}),t.once("close",function(){s||o(i),process.nextTick(mu,r)}),n&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,o,s){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,o,s)});return}t.send(i,s)},r.on("end",Oy),r.on("error",yu),r}_u.exports=Ny});var Ji=g((GS,bu)=>{"use strict";var{tokenChars:Py}=It();function Ry(t){let e=new Set,n=-1,r=-1,i=0;for(i;i<t.length;i++){let s=t.charCodeAt(i);if(r===-1&&Py[s]===1)n===-1&&(n=i);else if(i!==0&&(s===32||s===9))r===-1&&n!==-1&&(r=i);else if(s===44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let u=t.slice(n,r);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),n=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(n===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let o=t.slice(n,i);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return e.add(o),e}bu.exports={parse:Ry}});var Au=g((VS,Cu)=>{"use strict";var My=I("events"),yr=I("http"),{Duplex:WS}=I("stream"),{createHash:Dy}=I("crypto"),wu=dr(),at=At(),By=Ji(),ky=mr(),{CLOSE_TIMEOUT:Ly,GUID:jy,kWebSocket:Fy}=Ge(),Uy=/^[+/0-9A-Za-z]{22}==$/,Su=0,Eu=1,xu=2,Xi=class extends My{constructor(e,n){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:Ly,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:ky,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=yr.createServer((r,i)=>{let o=yr.STATUS_CODES[426];i.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),i.end(o)}),this._server.listen(e.port,e.host,e.backlog,n)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=qy(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,o,s)=>{this.handleUpgrade(i,o,s,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Su}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===xu){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(rn,this);return}if(e&&this.once("close",e),this._state!==Eu)if(this._state=Eu,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(rn,this):process.nextTick(rn,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{rn(this)})}}shouldHandle(e){if(this.options.path){let n=e.url.indexOf("?");if((n!==-1?e.url.slice(0,n):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,n,r,i){n.on("error",Tu);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){ut(this,e,n,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){ut(this,e,n,400,"Invalid Upgrade header");return}if(o===void 0||!Uy.test(o)){ut(this,e,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==13&&u!==8){ut(this,e,n,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){on(n,400);return}let c=e.headers["sec-websocket-protocol"],a=new Set;if(c!==void 0)try{a=By.parse(c)}catch{ut(this,e,n,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&l!==void 0){let m=new at({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let w=wu.parse(l);w[at.extensionName]&&(m.accept(w[at.extensionName]),p[at.extensionName]=m)}catch{ut(this,e,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(w,C,x,R)=>{if(!w)return on(n,C||401,x,R);this.completeUpgrade(p,o,a,e,n,r,i)});return}if(!this.options.verifyClient(m))return on(n,401)}this.completeUpgrade(p,o,a,e,n,r,i)}completeUpgrade(e,n,r,i,o,s,u){if(!o.readable||!o.writable)return o.destroy();if(o[Fy])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Su)return on(o,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Dy("sha1").update(n+jy).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(r.size){let p=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;p&&(a.push(`Sec-WebSocket-Protocol: ${p}`),l._protocol=p)}if(e[at.extensionName]){let p=e[at.extensionName].params,m=wu.format({[at.extensionName]:[p]});a.push(`Sec-WebSocket-Extensions: ${m}`),l._extensions=e}this.emit("headers",a,i),o.write(a.concat(`\r
`).join(`\r
`)),o.removeListener("error",Tu),l.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(rn,this)})),u(l,i)}};Cu.exports=Xi;function qy(t,e){for(let n of Object.keys(e))t.on(n,e[n]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function rn(t){t._state=xu,t.emit("close")}function Tu(){this.destroy()}function on(t,e,n,r){n=n||yr.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${yr.STATUS_CODES[e]}\r
`+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
`)+`\r
\r
`+n)}function ut(t,e,n,r,i,o){if(t.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,ut),t.emit("wsClientError",s,n,e)}else on(n,r,i,o)}});var lc=g((bE,cc)=>{cc.exports=uc;uc.sync=__;var sc=I("fs");function y_(t,e){var n=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function ac(t,e,n){return!t.isSymbolicLink()&&!t.isFile()?!1:y_(e,n)}function uc(t,e,n){sc.stat(t,function(r,i){n(r,r?!1:ac(i,t,e))})}function __(t,e){return ac(sc.statSync(t),t,e)}});var gc=g((wE,hc)=>{hc.exports=dc;dc.sync=v_;var fc=I("fs");function dc(t,e,n){fc.stat(t,function(r,i){n(r,r?!1:pc(i,e))})}function v_(t,e){return pc(fc.statSync(t),e)}function pc(t,e){return t.isFile()&&b_(t,e)}function b_(t,e){var n=t.mode,r=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),l=u|c,p=n&a||n&c&&i===s||n&u&&r===o||n&l&&o===0;return p}});var yc=g((EE,mc)=>{var SE=I("fs"),xr;process.platform==="win32"||global.TESTING_WINDOWS?xr=lc():xr=gc();mc.exports=no;no.sync=w_;function no(t,e,n){if(typeof e=="function"&&(n=e,e={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){no(t,e||{},function(o,s){o?i(o):r(s)})})}xr(t,e||{},function(r,i){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function w_(t,e){try{return xr.sync(t,e||{})}catch(n){if(e&&e.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Tc=g((TE,Ec)=>{var jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",_c=I("path"),S_=jt?";":":",vc=yc(),bc=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),wc=(t,e)=>{let n=e.colon||S_,r=t.match(/\//)||jt&&t.match(/\\/)?[""]:[...jt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(n)],i=jt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=jt?i.split(n):[""];return jt&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},Sc=(t,e,n)=>{typeof e=="function"&&(n=e,e={}),e||(e={});let{pathEnv:r,pathExt:i,pathExtExe:o}=wc(t,e),s=[],u=a=>new Promise((l,p)=>{if(a===r.length)return e.all&&s.length?l(s):p(bc(t));let m=r[a],w=/^".*"$/.test(m)?m.slice(1,-1):m,C=_c.join(w,t),x=!w&&/^\.[\\\/]/.test(t)?t.slice(0,2)+C:C;l(c(x,a,0))}),c=(a,l,p)=>new Promise((m,w)=>{if(p===i.length)return m(u(l+1));let C=i[p];vc(a+C,{pathExt:o},(x,R)=>{if(!x&&R)if(e.all)s.push(a+C);else return m(a+C);return m(c(a,l,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},E_=(t,e)=>{e=e||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=wc(t,e),o=[];for(let s=0;s<n.length;s++){let u=n[s],c=/^".*"$/.test(u)?u.slice(1,-1):u,a=_c.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+a:a;for(let p=0;p<r.length;p++){let m=l+r[p];try{if(vc.sync(m,{pathExt:i}))if(e.all)o.push(m);else return m}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw bc(t)};Ec.exports=Sc;Sc.sync=E_});var io=g((xE,ro)=>{"use strict";var xc=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};ro.exports=xc;ro.exports.default=xc});var Oc=g((CE,Ic)=>{"use strict";var Cc=I("path"),T_=Tc(),x_=io();function Ac(t,e){let n=t.options.env||process.env,r=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let s;try{s=T_.sync(t.command,{path:n[x_({env:n})],pathExt:e?Cc.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=Cc.resolve(i?t.options.cwd:"",s)),s}function C_(t){return Ac(t)||Ac(t,!0)}Ic.exports=C_});var Nc=g((AE,so)=>{"use strict";var oo=/([()\][%!^"`<>&|;, *?])/g;function A_(t){return t=t.replace(oo,"^$1"),t}function I_(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(oo,"^$1"),e&&(t=t.replace(oo,"^$1")),t}so.exports.command=A_;so.exports.argument=I_});var Rc=g((IE,Pc)=>{"use strict";Pc.exports=/^#!(.*)/});var Dc=g((OE,Mc)=>{"use strict";var O_=Rc();Mc.exports=(t="")=>{let e=t.match(O_);if(!e)return null;let[n,r]=e[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var kc=g((NE,Bc)=>{"use strict";var ao=I("fs"),N_=Dc();function P_(t){let n=Buffer.alloc(150),r;try{r=ao.openSync(t,"r"),ao.readSync(r,n,0,150,0),ao.closeSync(r)}catch{}return N_(n.toString())}Bc.exports=P_});var Uc=g((PE,Fc)=>{"use strict";var R_=I("path"),Lc=Oc(),jc=Nc(),M_=kc(),D_=process.platform==="win32",B_=/\.(?:com|exe)$/i,k_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function L_(t){t.file=Lc(t);let e=t.file&&M_(t.file);return e?(t.args.unshift(t.file),t.command=e,Lc(t)):t.file}function j_(t){if(!D_)return t;let e=L_(t),n=!B_.test(e);if(t.options.forceShell||n){let r=k_.test(e);t.command=R_.normalize(t.command),t.command=jc.command(t.command),t.args=t.args.map(o=>jc.argument(o,r));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function F_(t,e,n){e&&!Array.isArray(e)&&(n=e,e=null),e=e?e.slice(0):[],n=Object.assign({},n);let r={command:t,args:e,options:n,file:void 0,original:{command:t,args:e}};return n.shell?r:j_(r)}Fc.exports=F_});var Wc=g((RE,Gc)=>{"use strict";var uo=process.platform==="win32";function co(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function U_(t,e){if(!uo)return;let n=t.emit;t.emit=function(r,i){if(r==="exit"){let o=qc(i,e);if(o)return n.call(t,"error",o)}return n.apply(t,arguments)}}function qc(t,e){return uo&&t===1&&!e.file?co(e.original,"spawn"):null}function q_(t,e){return uo&&t===1&&!e.file?co(e.original,"spawnSync"):null}Gc.exports={hookChildProcess:U_,verifyENOENT:qc,verifyENOENTSync:q_,notFoundError:co}});var Hc=g((ME,Ft)=>{"use strict";var Vc=I("child_process"),lo=Uc(),fo=Wc();function $c(t,e,n){let r=lo(t,e,n),i=Vc.spawn(r.command,r.args,r.options);return fo.hookChildProcess(i,r),i}function G_(t,e,n){let r=lo(t,e,n),i=Vc.spawnSync(r.command,r.args,r.options);return i.error=i.error||fo.verifyENOENTSync(i.status,r),i}Ft.exports=$c;Ft.exports.spawn=$c;Ft.exports.sync=G_;Ft.exports._parse=lo;Ft.exports._enoent=fo});var Yc=g((DE,Kc)=>{"use strict";Kc.exports=t=>{let e=typeof t=="string"?`
`:10,n=typeof t=="string"?"\r":13;return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===n&&(t=t.slice(0,t.length-1)),t}});var Xc=g((BE,ln)=>{"use strict";var cn=I("path"),zc=io(),Jc=t=>{t={cwd:process.cwd(),path:process.env[zc()],execPath:process.execPath,...t};let e,n=cn.resolve(t.cwd),r=[];for(;e!==n;)r.push(cn.join(n,"node_modules/.bin")),e=n,n=cn.resolve(n,"..");let i=cn.resolve(t.cwd,t.execPath,"..");return r.push(i),r.concat(t.path).join(cn.delimiter)};ln.exports=Jc;ln.exports.default=Jc;ln.exports.env=t=>{t={env:process.env,...t};let e={...t.env},n=zc({env:e});return t.path=e[n],e[n]=ln.exports(t),e}});var Zc=g((kE,po)=>{"use strict";var Qc=(t,e)=>{for(let n of Reflect.ownKeys(e))Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t};po.exports=Qc;po.exports.default=Qc});var tl=g((LE,Ar)=>{"use strict";var W_=Zc(),Cr=new WeakMap,el=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let n,r=0,i=t.displayName||t.name||"<anonymous>",o=function(...s){if(Cr.set(o,++r),r===1)n=t.apply(this,s),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return W_(o,t),Cr.set(o,r),o};Ar.exports=el;Ar.exports.default=el;Ar.exports.callCount=t=>{if(!Cr.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Cr.get(t)}});var nl=g(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.SIGNALS=void 0;var V_=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Ir.SIGNALS=V_});var ho=g(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.SIGRTMAX=Ut.getRealtimeSignals=void 0;var $_=function(){let t=il-rl+1;return Array.from({length:t},H_)};Ut.getRealtimeSignals=$_;var H_=function(t,e){return{name:`SIGRT${e+1}`,number:rl+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},rl=34,il=64;Ut.SIGRTMAX=il});var ol=g(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.getSignals=void 0;var K_=I("os"),Y_=nl(),z_=ho(),J_=function(){let t=(0,z_.getRealtimeSignals)();return[...Y_.SIGNALS,...t].map(X_)};Or.getSignals=J_;var X_=function({name:t,number:e,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[t]:s}}=K_.constants,u=s!==void 0;return{name:t,number:u?s:e,description:n,supported:u,action:r,forced:i,standard:o}}});var al=g(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.signalsByNumber=qt.signalsByName=void 0;var Q_=I("os"),sl=ol(),Z_=ho(),ev=function(){return(0,sl.getSignals)().reduce(tv,{})},tv=function(t,{name:e,number:n,description:r,supported:i,action:o,forced:s,standard:u}){return{...t,[e]:{name:e,number:n,description:r,supported:i,action:o,forced:s,standard:u}}},nv=ev();qt.signalsByName=nv;var rv=function(){let t=(0,sl.getSignals)(),e=Z_.SIGRTMAX+1,n=Array.from({length:e},(r,i)=>iv(i,t));return Object.assign({},...n)},iv=function(t,e){let n=ov(t,e);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:u,standard:c}=n;return{[t]:{name:r,number:t,description:i,supported:o,action:s,forced:u,standard:c}}},ov=function(t,e){let n=e.find(({name:r})=>Q_.constants.signals[r]===t);return n!==void 0?n:e.find(r=>r.number===t)},sv=rv();qt.signalsByNumber=sv});var cl=g((GE,ul)=>{"use strict";var{signalsByName:av}=al(),uv=({timedOut:t,timeout:e,errorCode:n,signal:r,signalDescription:i,exitCode:o,isCanceled:s})=>t?`timed out after ${e} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",cv=({stdout:t,stderr:e,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:u,timedOut:c,isCanceled:a,killed:l,parsed:{options:{timeout:p}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let m=i===void 0?void 0:av[i].description,w=r&&r.code,x=`Command ${uv({timedOut:c,timeout:p,errorCode:w,signal:i,signalDescription:m,exitCode:o,isCanceled:a})}: ${s}`,R=Object.prototype.toString.call(r)==="[object Error]",Y=R?`${x}
${r.message}`:x,ae=[Y,e,t].filter(Boolean).join(`
`);return R?(r.originalMessage=r.message,r.message=ae):r=new Error(ae),r.shortMessage=Y,r.command=s,r.escapedCommand=u,r.exitCode=o,r.signal=i,r.signalDescription=m,r.stdout=t,r.stderr=e,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=l&&!c,r};ul.exports=cv});var fl=g((WE,go)=>{"use strict";var Nr=["stdin","stdout","stderr"],lv=t=>Nr.some(e=>t[e]!==void 0),ll=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return Nr.map(r=>t[r]);if(lv(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Nr.map(r=>`\`${r}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let n=Math.max(e.length,Nr.length);return Array.from({length:n},(r,i)=>e[i])};go.exports=ll;go.exports.node=t=>{let e=ll(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var dl=g((VE,Pr)=>{Pr.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Pr.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Pr.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var gl=g(($E,pn)=>{var fv=I("assert"),fn=dl(),dv=/^win/i.test(process.platform),Rr=I("events");typeof Rr!="function"&&(Rr=Rr.EventEmitter);var K;process.__signal_exit_emitter__?K=process.__signal_exit_emitter__:(K=process.__signal_exit_emitter__=new Rr,K.count=0,K.emitted={});K.infinite||(K.setMaxListeners(1/0),K.infinite=!0);pn.exports=function(t,e){fv.equal(typeof t,"function","a callback must be provided for exit handler"),dn===!1&&pl();var n="exit";e&&e.alwaysLast&&(n="afterexit");var r=function(){K.removeListener(n,t),K.listeners("exit").length===0&&K.listeners("afterexit").length===0&&yo()};return K.on(n,t),r};pn.exports.unload=yo;function yo(){dn&&(dn=!1,fn.forEach(function(t){try{process.removeListener(t,_o[t])}catch{}}),process.emit=mo,process.reallyExit=hl,K.count-=1)}function Gt(t,e,n){K.emitted[t]||(K.emitted[t]=!0,K.emit(t,e,n))}var _o={};fn.forEach(function(t){_o[t]=function(){var n=process.listeners(t);n.length===K.count&&(yo(),Gt("exit",null,t),Gt("afterexit",null,t),dv&&t==="SIGHUP"&&(t="SIGINT"),process.kill(process.pid,t))}});pn.exports.signals=function(){return fn};pn.exports.load=pl;var dn=!1;function pl(){dn||(dn=!0,K.count+=1,fn=fn.filter(function(t){try{return process.on(t,_o[t]),!0}catch{return!1}}),process.emit=hv,process.reallyExit=pv)}var hl=process.reallyExit;function pv(t){process.exitCode=t||0,Gt("exit",process.exitCode,null),Gt("afterexit",process.exitCode,null),hl.call(process,process.exitCode)}var mo=process.emit;function hv(t,e){if(t==="exit"){e!==void 0&&(process.exitCode=e);var n=mo.apply(this,arguments);return Gt("exit",process.exitCode,null),Gt("afterexit",process.exitCode,null),n}else return mo.apply(this,arguments)}});var yl=g((HE,ml)=>{"use strict";var gv=I("os"),mv=gl(),yv=1e3*5,_v=(t,e="SIGTERM",n={})=>{let r=t(e);return vv(t,e,n,r),r},vv=(t,e,n,r)=>{if(!bv(e,n,r))return;let i=Sv(n),o=setTimeout(()=>{t("SIGKILL")},i);o.unref&&o.unref()},bv=(t,{forceKillAfterTimeout:e},n)=>wv(t)&&e!==!1&&n,wv=t=>t===gv.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",Sv=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return yv;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},Ev=(t,e)=>{t.kill()&&(e.isCanceled=!0)},Tv=(t,e,n)=>{t.kill(e),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},xv=(t,{timeout:e,killSignal:n="SIGTERM"},r)=>{if(e===0||e===void 0)return r;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{Tv(t,n,c)},e)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},Cv=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},Av=async(t,{cleanup:e,detached:n},r)=>{if(!e||n)return r;let i=mv(()=>{t.kill()});return r.finally(()=>{i()})};ml.exports={spawnedKill:_v,spawnedCancel:Ev,setupTimeout:xv,validateTimeout:Cv,setExitHandler:Av}});var vl=g((KE,_l)=>{"use strict";var Fe=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Fe.writable=t=>Fe(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Fe.readable=t=>Fe(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Fe.duplex=t=>Fe.writable(t)&&Fe.readable(t);Fe.transform=t=>Fe.duplex(t)&&typeof t._transform=="function"&&typeof t._transformState=="object";_l.exports=Fe});var wl=g((YE,bl)=>{"use strict";var{PassThrough:Iv}=I("stream");bl.exports=t=>{t={...t};let{array:e}=t,{encoding:n}=t,r=n==="buffer",i=!1;e?i=!(n||r):n=n||"utf8",r&&(n=null);let o=new Iv({objectMode:i});n&&o.setEncoding(n);let s=0,u=[];return o.on("data",c=>{u.push(c),i?s=u.length:s+=c.length}),o.getBufferedValue=()=>e?u:r?Buffer.concat(u,s):u.join(""),o.getBufferedLength=()=>s,o}});var Sl=g((zE,hn)=>{"use strict";var{constants:Ov}=I("buffer"),Nv=I("stream"),{promisify:Pv}=I("util"),Rv=wl(),Mv=Pv(Nv.pipeline),Mr=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function vo(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:n}=e,r=Rv(e);return await new Promise((i,o)=>{let s=u=>{u&&r.getBufferedLength()<=Ov.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),o(u)};(async()=>{try{await Mv(t,r),i()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Mr)})}),r.getBufferedValue()}hn.exports=vo;hn.exports.buffer=(t,e)=>vo(t,{...e,encoding:"buffer"});hn.exports.array=(t,e)=>vo(t,{...e,array:!0});hn.exports.MaxBufferError=Mr});var Tl=g((JE,El)=>{"use strict";var{PassThrough:Dv}=I("stream");El.exports=function(){var t=[],e=new Dv({objectMode:!0});return e.setMaxListeners(0),e.add=n,e.isEmpty=r,e.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),e;function n(o){return Array.isArray(o)?(o.forEach(n),this):(t.push(o),o.once("end",i.bind(null,o)),o.once("error",e.emit.bind(e,"error")),o.pipe(e,{end:!1}),this)}function r(){return t.length==0}function i(o){t=t.filter(function(s){return s!==o}),!t.length&&e.readable&&e.end()}}});var Il=g((XE,Al)=>{"use strict";var Cl=vl(),xl=Sl(),Bv=Tl(),kv=(t,e)=>{e===void 0||t.stdin===void 0||(Cl(e)?e.pipe(t.stdin):t.stdin.end(e))},Lv=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let n=Bv();return t.stdout&&n.add(t.stdout),t.stderr&&n.add(t.stderr),n},bo=async(t,e)=>{if(t){t.destroy();try{return await e}catch(n){return n.bufferedData}}},wo=(t,{encoding:e,buffer:n,maxBuffer:r})=>{if(!(!t||!n))return e?xl(t,{encoding:e,maxBuffer:r}):xl.buffer(t,{maxBuffer:r})},jv=async({stdout:t,stderr:e,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let u=wo(t,{encoding:r,buffer:i,maxBuffer:o}),c=wo(e,{encoding:r,buffer:i,maxBuffer:o}),a=wo(n,{encoding:r,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,u,c,a])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},bo(t,u),bo(e,c),bo(n,a)])}},Fv=({input:t})=>{if(Cl(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};Al.exports={handleInput:kv,makeAllStream:Lv,getSpawnedResult:jv,validateInputSync:Fv}});var Nl=g((QE,Ol)=>{"use strict";var Uv=(async()=>{})().constructor.prototype,qv=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(Uv,t)]),Gv=(t,e)=>{for(let[n,r]of qv){let i=typeof e=="function"?(...o)=>Reflect.apply(r.value,e(),o):r.value.bind(e);Reflect.defineProperty(t,n,{...r,value:i})}return t},Wv=t=>new Promise((e,n)=>{t.on("exit",(r,i)=>{e({exitCode:r,signal:i})}),t.on("error",r=>{n(r)}),t.stdin&&t.stdin.on("error",r=>{n(r)})});Ol.exports={mergePromise:Gv,getSpawnedPromise:Wv}});var Ml=g((ZE,Rl)=>{"use strict";var Pl=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],Vv=/^[\w.-]+$/,$v=/"/g,Hv=t=>typeof t!="string"||Vv.test(t)?t:`"${t.replace($v,'\\"')}"`,Kv=(t,e)=>Pl(t,e).join(" "),Yv=(t,e)=>Pl(t,e).map(n=>Hv(n)).join(" "),zv=/ +/g,Jv=t=>{let e=[];for(let n of t.trim().split(zv)){let r=e[e.length-1];r&&r.endsWith("\\")?e[e.length-1]=`${r.slice(0,-1)} ${n}`:e.push(n)}return e};Rl.exports={joinCommand:Kv,getEscapedCommand:Yv,parseCommand:Jv}});var Ul=g((eT,Wt)=>{"use strict";var Xv=I("path"),So=I("child_process"),Qv=Hc(),Zv=Yc(),eb=Xc(),tb=tl(),Dr=cl(),Bl=fl(),{spawnedKill:nb,spawnedCancel:rb,setupTimeout:ib,validateTimeout:ob,setExitHandler:sb}=yl(),{handleInput:ab,getSpawnedResult:ub,makeAllStream:cb,validateInputSync:lb}=Il(),{mergePromise:Dl,getSpawnedPromise:fb}=Nl(),{joinCommand:kl,parseCommand:Ll,getEscapedCommand:jl}=Ml(),db=1e3*1e3*100,pb=({env:t,extendEnv:e,preferLocal:n,localDir:r,execPath:i})=>{let o=e?{...process.env,...t}:t;return n?eb.env({env:o,cwd:r,execPath:i}):o},Fl=(t,e,n={})=>{let r=Qv._parse(t,e,n);return t=r.command,e=r.args,n=r.options,n={maxBuffer:db,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=pb(n),n.stdio=Bl(n),process.platform==="win32"&&Xv.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:n,parsed:r}},gn=(t,e,n)=>typeof e!="string"&&!Buffer.isBuffer(e)?n===void 0?void 0:"":t.stripFinalNewline?Zv(e):e,Br=(t,e,n)=>{let r=Fl(t,e,n),i=kl(t,e),o=jl(t,e);ob(r.options);let s;try{s=So.spawn(r.file,r.args,r.options)}catch(w){let C=new So.ChildProcess,x=Promise.reject(Dr({error:w,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return Dl(C,x)}let u=fb(s),c=ib(s,r.options,u),a=sb(s,r.options,c),l={isCanceled:!1};s.kill=nb.bind(null,s.kill.bind(s)),s.cancel=rb.bind(null,s,l);let m=tb(async()=>{let[{error:w,exitCode:C,signal:x,timedOut:R},Y,ae,ht]=await ub(s,r.options,a),ge=gn(r.options,Y),be=gn(r.options,ae),Ze=gn(r.options,ht);if(w||C!==0||x!==null){let Ke=Dr({error:w,exitCode:C,signal:x,stdout:ge,stderr:be,all:Ze,command:i,escapedCommand:o,parsed:r,timedOut:R,isCanceled:l.isCanceled,killed:s.killed});if(!r.options.reject)return Ke;throw Ke}return{command:i,escapedCommand:o,exitCode:0,stdout:ge,stderr:be,all:Ze,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return ab(s,r.options.input),s.all=cb(s,r.options),Dl(s,m)};Wt.exports=Br;Wt.exports.sync=(t,e,n)=>{let r=Fl(t,e,n),i=kl(t,e),o=jl(t,e);lb(r.options);let s;try{s=So.spawnSync(r.file,r.args,r.options)}catch(a){throw Dr({error:a,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let u=gn(r.options,s.stdout,s.error),c=gn(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let a=Dr({stdout:u,stderr:c,error:s.error,signal:s.signal,exitCode:s.status,command:i,escapedCommand:o,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return a;throw a}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};Wt.exports.command=(t,e)=>{let[n,...r]=Ll(t);return Br(n,r,e)};Wt.exports.commandSync=(t,e)=>{let[n,...r]=Ll(t);return Br.sync(n,r,e)};Wt.exports.node=(t,e,n={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(n=e,e=[]);let r=Bl.node(n),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:s=i}=n;return Br(o,[...s,t,...Array.isArray(e)?e:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var Ix=W(Wo());var xf={runtime:null,"runtime.sourcecreate":null,"runtime.assertion":null,"runtime.launch":null,"runtime.target":null,"runtime.welcome":null,"runtime.exception":null,"runtime.sourcemap":null,"runtime.breakpoints":null,"sourcemap.parsing":null,"perf.function":null,"cdp.send":null,"cdp.receive":null,"dap.send":null,"dap.receive":null,internal:null,proxyActivity:null},Ab=Object.keys(xf);var ba=W(Ei()),er=W(I("os"));var fm={"pwa-extensionHost":null,"node-terminal":null,"pwa-node":null,"pwa-chrome":null,"pwa-msedge":null,"pwa-editor-browser":null},dm={"extension.js-debug.addCustomBreakpoints":null,"extension.js-debug.addXHRBreakpoints":null,"extension.js-debug.editXHRBreakpoints":null,"extension.pwa-node-debug.attachNodeProcess":null,"extension.js-debug.clearAutoAttachVariables":null,"extension.js-debug.setAutoAttachVariables":null,"extension.js-debug.autoAttachToProcess":null,"extension.js-debug.createDebuggerTerminal":null,"extension.js-debug.createDiagnostics":null,"extension.js-debug.getDiagnosticLogs":null,"extension.js-debug.debugLink":null,"extension.js-debug.npmScript":null,"extension.js-debug.pickNodeProcess":null,"extension.js-debug.prettyPrint":null,"extension.js-debug.removeXHRBreakpoint":null,"extension.js-debug.removeAllCustomBreakpoints":null,"extension.js-debug.revealPage":null,"extension.js-debug.startProfile":null,"extension.js-debug.stopProfile":null,"extension.js-debug.toggleSkippingFile":null,"extension.node-debug.startWithStopOnEntry":null,"extension.js-debug.requestCDPProxy":null,"extension.js-debug.openEdgeDevTools":null,"extension.js-debug.callers.add":null,"extension.js-debug.callers.goToCaller":null,"extension.js-debug.callers.gotToTarget":null,"extension.js-debug.callers.remove":null,"extension.js-debug.callers.removeAll":null,"extension.js-debug.enableSourceMapStepping":null,"extension.js-debug.disableSourceMapStepping":null,"extension.js-debug.network.viewRequest":null,"extension.js-debug.network.copyUri":null,"extension.js-debug.network.openBody":null,"extension.js-debug.network.openBodyInHex":null,"extension.js-debug.network.replayXHR":null,"extension.js-debug.network.clear":null,"extension.js-debug.completion.nodeTool":null},Iw=new Set(Object.keys(dm)),Ow=new Set(Object.keys(fm));var ma="<node_internals>";var Ti=Symbol("unset");function xi(t){let e=Ti,n=(...r)=>(e===Ti&&(n.value=e=t(...r)),e);return n.forget=()=>{e=Ti,n.value=void 0},n.value=void 0,n}function ya(t){let e=new Map,n=r=>{if(e.has(r))return e.get(r);let i=t(r);return e.set(r,i),i};return n.clear=()=>e.clear(),n}var Rw=2**31-1;var Ci={type:"",name:"",request:"",trace:!1,outputCapture:"console",timeout:1e4,timeouts:{},showAsyncStacks:!0,skipFiles:[],smartStep:!0,sourceMaps:!0,sourceMapRenames:!0,pauseForSourceMap:!0,resolveSourceMapLocations:null,rootPath:"${workspaceFolder}",outFiles:["${workspaceFolder}/**/*.(m|c|)js","!**/node_modules/**"],sourceMapPathOverrides:Ai("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],enableDWARF:!0,__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},Xt={...Ci,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:[`${ma}/**`]},pm={...Xt,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},Uw={...Xt,type:"node-terminal",request:"attach",name:pm.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},qw={...Xt,type:"pwa-extensionHost",name:"Debug Extension",request:"launch",args:["--extensionDevelopmentPath=${workspaceFolder}"],outFiles:["${workspaceFolder}/out/**/*.js"],resolveSourceMapLocations:["${workspaceFolder}/**","!**/node_modules/**"],rendererDebugOptions:{},runtimeExecutable:"${execPath}",autoAttachChildProcesses:!1,debugWebviews:!1,debugWebWorkerHost:!1,__sessionId:""},Gw={...Xt,type:"pwa-node",request:"launch",program:"",cwd:"${workspaceFolder}",stopOnEntry:!1,console:"internalConsole",restart:!1,args:[],runtimeExecutable:"node",runtimeVersion:"default",runtimeArgs:[],profileStartup:!1,attachSimplePort:null,experimentalNetworking:"auto",killBehavior:"forceful"},_a={...Ci,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:Ai("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},Ww={..._a,type:"pwa-msedge",useWebView:!1},hm={..._a,type:"pwa-chrome",request:"launch",cwd:null,file:null,env:{},urlFilter:"*",includeDefaultArgs:!0,includeLaunchArgs:!0,runtimeArgs:null,runtimeExecutable:"*",userDataDir:!0,browserLaunchLocation:"workspace",profileStartup:!1,cleanUp:"wholeBrowser",killBehavior:"forceful"},Vw={...hm,type:"pwa-msedge",useWebView:!1},va={...Ci,disableNetworkCache:!0,pathMapping:{},url:null,urlFilter:"",sourceMapPathOverrides:Ai("${webRoot}"),webRoot:"${workspaceFolder}",server:null,vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},$w={...va,type:"pwa-editor-browser",request:"attach"},Hw={...va,type:"pwa-editor-browser",request:"launch",url:"http://localhost:8080"},Kw={...Xt,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function Ai(t){return{"webpack:///./~/*":`${t}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${t}/*`,"webpack://?:*/*":`${t}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${t}/*`,"turbopack://[project]/*":"${workspaceFolder}/*","turbopack:///[project]/*":"${workspaceFolder}/*"}}var Qn="js-debug",Ii="1.140.0",gm="ms-vscode",Yw=Qn.includes("nightly"),zw=`${gm}.${Qn}`;var Zn=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var Oi=class{constructor(e=512){this.size=e;this.items=[];this.i=0}write(e){this.items[this.i]=e,this.i=(this.i+1)%this.size}read(){return this.items.slice(this.i).concat(this.items.slice(0,this.i))}},de=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new Oi(1)}static async test(){let e=new de;return e.setup({sinks:[new Zn],showWelcome:!1}),e}info(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:1})}verbose(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:0})}warn(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:2})}error(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:3})}fatal(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:4})}assert(e,n){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",n,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(n);debugger;return!1}return!0}log(e){if(this.logBuffer.write(e),"queue"in this.logTarget){this.logTarget.queue.push(e);return}for(let n of this.logTarget.sinks)n.write(e)}getRecentLogs(){return this.logBuffer.read()}dispose(){if("sinks"in this.logTarget){for(let e of this.logTarget.sinks)e.dispose();this.logTarget={queue:[]}}}forTarget(){return this}async setup(e){if(await Promise.all(e.sinks.map(r=>r.setup())),e.showWelcome!==!1){let r=ym();for(let i of e.sinks)i.write(r)}let n=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in n?n.sinks.forEach(r=>r.dispose()):n.queue.forEach(r=>this.log(r))}};de.null=(()=>{let e=new de;return e.setup({sinks:[]}),e})(),de=vn([(0,ba.injectable)()],de);var ym=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${Qn} v${Ii} started`,metadata:{os:`${er.platform()} ${er.arch()}`,nodeVersion:process.version,adapterVersion:Ii}});var wa=W(Ei());var te=class{constructor(){this._listeners=new Set;this.event=(e,n,r)=>{let i={listener:e,thisArg:n};this._listeners.add(i);let o={dispose:()=>{o.dispose=()=>{},this._listeners.delete(i)}};return r&&r.push(o),o}}get size(){return this._listeners.size}fire(e){let n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(let r of this._listeners)this._deliveryQueue.push({data:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){let{data:i,event:o}=this._deliveryQueue[r];i.listener.call(i.thisArg,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}};var Et=class{constructor(){this.flushEmitter=new te;this.onFlush=this.flushEmitter.event}report(){}reportOperation(){}attachDap(){}flush(){this.flushEmitter.fire()}dispose(){}};Et=vn([(0,wa.injectable)()],Et);var tr=W(I("path"));function Ea(t,e,n){let r=Sa(t,e,"uncaughtException",n),i=Sa(t,e,"unhandledRejection",n);return process.addListener("uncaughtException",r),process.addListener("unhandledRejection",i),{dispose:()=>{process.removeListener("uncaughtException",r),process.removeListener("unhandledRejection",i)}}}var Sa=(t,e,n,r=!0)=>i=>{bm(i)&&(e.report("error",{"!error":i,error:r?void 0:i,exceptionType:n}),t.error("runtime.exception","Unhandled error in debug adapter",i))},_m=t=>typeof t=="object"&&!!t&&"stack"in t,vm=tr.dirname(tr.dirname(tr.dirname(__dirname)));function bm(t){var e;return!wm||_m(t)&&!!((e=t.stack)!=null&&e.includes(vm))}var wm=!1;var tf=W(I("net"));var Tt=class t{constructor(e=process.hrtime()){this.value=e}get ms(){return this.s*1e3}get s(){return this.value[0]+this.value[1]/1e9}elapsed(){return new t().subtract(this)}subtract(e){let n=this.value[1]-e.value[1],r=this.value[0]-e.value[0];return n<0&&(n+=1e9,r--),new t([r,n])}};var Ta=I("stream"),nr=class extends Ta.Transform{constructor(n){super();this.prefix=[];this.splitSuffix=Buffer.alloc(0);if(typeof n=="string"&&n.length===1)this.splitter=n.charCodeAt(0);else if(typeof n=="number")this.splitter=n;else throw new Error("not implemented here")}_transform(n,r,i){let o=0;for(;o<n.length;){let s=n.indexOf(this.splitter,o);if(s===-1)break;let u=n.subarray(o,s),c=this.prefix.length||this.splitSuffix.length?Buffer.concat([...this.prefix,u,this.splitSuffix]):u;this.push(c),this.prefix.length=0,o=s+1}o<n.length&&this.prefix.push(n.subarray(o)),i()}_flush(n){this.prefix.length&&this.push(Buffer.concat([...this.prefix,this.splitSuffix])),n()}};var rr=class{constructor(e,n,r){this.logger=e;this.pipeWrite=n;this.pipeRead=r;this.messageEmitter=new te;this.endEmitter=new te;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this.onceEnded=xi(()=>{var e;this.streams&&(this.beforeClose(),this.streams.read.removeAllListeners(),(e=this.pipeRead)==null||e.destroy(),this.streams.write.removeListener("end",this.onceEnded),this.streams.write.removeListener("error",this.onWriteError),this.streams.write.on("error",()=>{}),this.streams.write.end(),this.streams=void 0,this.endEmitter.fire())});this.onWriteError=e=>{this.logger.error("internal","pipeWrite error",{error:e})};let i=r||n;this.streams={read:i.on("error",o=>this.logger.error("internal","pipeRead error",{error:o})).pipe(new nr(0)).on("data",o=>this.messageEmitter.fire([o.toString(),new Tt])).on("end",this.onceEnded),write:n.on("end",this.onceEnded).on("error",this.onWriteError)}}send(e){var n;(n=this.streams)==null||n.write.write(e+"\0")}dispose(){this.onceEnded()}beforeClose(){}};var Gy=W(vu(),1),Wy=W(dr(),1),Vy=W(At(),1),$y=W(qi(),1),Hy=W(Vi(),1),Ky=W(Ji(),1),Iu=W(mr(),1),Yy=W(Au(),1);var Ou=Iu.default;var sn=class extends Error{get cause(){return this._cause}constructor(e){super("__errorMarker"in e?e.error.format:e.format),this._cause="__errorMarker"in e?e.error:e}};var Nu=t=>isFinite(t)?new Promise(e=>setTimeout(e,t)):new Promise(()=>{});function Pu(){let t=null,e=null,n=!1,r,i=new Promise((o,s)=>{t=u=>{n=!0,r=u,o(u)},e=u=>{n=!0,s(u)}});return{resolve:t,reject:e,promise:i,get settledValue(){return r},hasSettled:()=>n}}var _r=class extends sn{constructor(e){super({id:9243,format:e,showUser:!0}),this._cause={id:9243,format:e,showUser:!0}}};function Ru(t,e,n){if(e.isCancellationRequested)return Promise.reject(new _r(n||"Task cancelled"));let r=Pu(),i=e.onCancellationRequested(r.resolve);return Promise.race([r.promise.then(()=>{throw new _r(n||"Task cancelled")}),t.then(o=>(i.dispose(),o)).catch(o=>{throw i.dispose(),o})])}var Mu=Object.freeze(function(t,e){let n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}}),zy=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),Jy=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Mu}),Dt=class t{constructor(e){this._token=void 0;this._parentListener=void 0;this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}static withTimeout(e,n){let r=new t(n),i=r._token=new Mt,o=setTimeout(()=>i.cancel(),e);return i.onCancellationRequested(()=>clearTimeout(o)),r}get token(){return this._token||(this._token=new Mt),this._token}cancel(){this._token?this._token instanceof Mt&&this._token.cancel():this._token=Jy}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Mt&&this._token.dispose():this._token=zy}},Mt=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Mu:(this._emitter||(this._emitter=new te),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var Jl=I("dns"),pt=W(I("path")),yn=I("url");var He=class{constructor(e,n){this.lineNumber=e;this.columnNumber=n}get base0(){return this}get base1(){return new vr(this.lineNumber+1,this.columnNumber+1)}get base01(){return new br(this.lineNumber,this.columnNumber+1)}compare(e){let n=e.base0;return this.lineNumber-n.lineNumber||this.columnNumber-n.columnNumber}},vr=class{constructor(e,n){this.lineNumber=e;this.columnNumber=n}get base0(){return new He(this.lineNumber-1,this.columnNumber-1)}get base1(){return this}get base01(){return new br(this.lineNumber-1,this.columnNumber)}compare(e){let n=e.base1;return this.lineNumber-n.lineNumber||this.columnNumber-n.columnNumber||0}},br=class{constructor(e,n){this.lineNumber=e;this.columnNumber=n}get base0(){return new He(this.lineNumber-1,this.columnNumber)}get base1(){return new vr(this.lineNumber,this.columnNumber+1)}get base01(){return this}compare(e){let n=e.base01;return this.lineNumber-n.lineNumber||this.columnNumber-n.columnNumber}},ct=class ct{constructor(e,n){this.begin=e;this.end=n}static simplify(e){if(e.length===0)return[];let n=e.slice().sort((o,s)=>o.begin.compare(s.begin)),r=[],i=n[0];for(let o=1;o<n.length;o++){let s=n[o];i.end.compare(s.begin)>=0?i=new ct(i.begin,s.end):(r.push(i),i=s)}return r.push(i),r}contains(e){return e.compare(this.begin)>=0&&e.compare(this.end)<=0}containsRange(e){return this.contains(e.begin)&&this.contains(e.end)}toString(){let e=this.begin.base0,n=this.end.base0;return`Range[${e.lineNumber}:${e.columnNumber} -> ${n.lineNumber}:${n.columnNumber}]`}};ct.ZERO=new ct(new He(0,0),new He(0,0)),ct.INFINITE=new ct(new He(0,0),new He(1/0,1/0));var Qi=ct;var Xy=44;var Du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qy=new Uint8Array(64),ku=new Uint8Array(128);for(let t=0;t<Du.length;t++){let e=Du.charCodeAt(t);Qy[t]=e,ku[e]=t}function an(t,e){let n=0,r=0,i=0;do{let s=t.next();i=ku[s],n|=(i&31)<<r,r+=5}while(i&32);let o=n&1;return n>>>=1,o&&(n=-2147483648|-n),e+n}function Bu(t,e){return t.pos>=e?!1:t.peek()!==Xy}var iE=1024*16;var Zy=class{constructor(t){this.pos=0,this.buffer=t}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(t){let{buffer:e,pos:n}=this,r=e.indexOf(t,n);return r===-1?e.length:r}};function Lu(t){let{length:e}=t,n=new Zy(t),r=[],i=0,o=0,s=0,u=0,c=0;do{let a=n.indexOf(";"),l=[],p=!0,m=0;for(i=0;n.pos<a;){let w;i=an(n,i),i<m&&(p=!1),m=i,Bu(n,a)?(o=an(n,o),s=an(n,s),u=an(n,u),Bu(n,a)?(c=an(n,c),w=[i,o,s,u,c]):w=[i,o,s,u]):w=[i],l.push(w),n.pos++}p||e_(l),r.push(l),n.pos=a+1}while(n.pos<=e);return r}function e_(t){t.sort(t_)}function t_(t,e){return t[0]-e[0]}var ju;(function(t){t[t.Empty=1]="Empty",t[t.Hash=2]="Hash",t[t.Query=3]="Query",t[t.RelativePath=4]="RelativePath",t[t.AbsolutePath=5]="AbsolutePath",t[t.SchemeRelative=6]="SchemeRelative",t[t.Absolute=7]="Absolute"})(ju||(ju={}));var Qe=0,Fu=1,Uu=2,qu=3,r_=4,Gu=1,Wu=2;function i_(t,e){return t[Qe]-e[Qe]}function o_(t,e){let n=e.map(()=>[]);for(let r=0;r<t.length;r++){let i=t[r];for(let o=0;o<i.length;o++){let s=i[o];if(s.length===1)continue;let u=s[Fu],c=s[Uu],a=s[qu],l=n[u];(l[c]||(l[c]=[])).push([a,r,s[Qe]])}}for(let r=0;r<n.length;r++){let i=n[r];for(let o=0;o<i.length;o++){let s=i[o];s&&s.sort(i_)}}return n}var lt=!1;function s_(t,e,n,r){for(;n<=r;){let i=n+(r-n>>1),o=t[i][Qe]-e;if(o===0)return lt=!0,i;o<0?n=i+1:r=i-1}return lt=!1,n-1}function Vu(t,e,n){for(let r=n+1;r<t.length&&t[r][Qe]===e;n=r++);return n}function $u(t,e,n){for(let r=n-1;r>=0&&t[r][Qe]===e;n=r--);return n}function a_(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function u_(t,e,n,r){let{lastKey:i,lastNeedle:o,lastIndex:s}=n,u=0,c=t.length-1;if(r===i){if(e===o)return lt=s!==-1&&t[s][Qe]===e,s;e>=o?u=s===-1?0:s:c=s}return n.lastKey=r,n.lastNeedle=e,n.lastIndex=s_(t,e,u,c)}var Hu="`line` must be greater than 0 (lines start at line 1)",Ku="`column` must be greater than or equal to 0 (columns start at column 0)",Sr=-1,Bt=1;function kt(t){var e;return(e=t)._decoded||(e._decoded=Lu(t._encoded))}function Yu(t,e){let{line:n,column:r,bias:i}=e;if(n--,n<0)throw new Error(Hu);if(r<0)throw new Error(Ku);let o=kt(t);if(n>=o.length)return wr(null,null,null,null);let s=o[n],u=Zi(s,t._decodedMemo,n,r,i||Bt);if(u===-1)return wr(null,null,null,null);let c=s[u];if(c.length===1)return wr(null,null,null,null);let{names:a,resolvedSources:l}=t;return wr(l[c[Fu]],c[Uu]+1,c[qu],c.length===5?a[c[r_]]:null)}function zu(t,e){let{source:n,line:r,column:i,bias:o}=e;return Qu(t,n,r,i,o||Bt,!1)}function Ju(t,e){let{source:n,line:r,column:i,bias:o}=e;return Qu(t,n,r,i,o||Sr,!0)}function Xu(t,e){let n=kt(t),{names:r,resolvedSources:i}=t;for(let o=0;o<n.length;o++){let s=n[o];for(let u=0;u<s.length;u++){let c=s[u],a=o+1,l=c[0],p=null,m=null,w=null,C=null;c.length!==1&&(p=i[c[1]],m=c[2]+1,w=c[3]),c.length===5&&(C=r[c[4]]),e({generatedLine:a,generatedColumn:l,source:p,originalLine:m,originalColumn:w,name:C})}}}function wr(t,e,n,r){return{source:t,line:e,column:n,name:r}}function un(t,e){return{line:t,column:e}}function Zi(t,e,n,r,i){let o=u_(t,r,e,n);return lt?o=(i===Sr?Vu:$u)(t,r,o):i===Sr&&o++,o===-1||o===t.length?-1:o}function c_(t,e,n,r,i){let o=Zi(t,e,n,r,Bt);if(!lt&&i===Sr&&o++,o===-1||o===t.length)return[];let s=lt?r:t[o][Qe];lt||(o=$u(t,s,o));let u=Vu(t,s,o),c=[];for(;o<=u;o++){let a=t[o];c.push(un(a[Gu]+1,a[Wu]))}return c}function Qu(t,e,n,r,i,o){var s,u;if(n--,n<0)throw new Error(Hu);if(r<0)throw new Error(Ku);let{sources:c,resolvedSources:a}=t,l=c.indexOf(e);if(l===-1&&(l=a.indexOf(e)),l===-1)return o?[]:un(null,null);let p=(s=t)._bySourceMemos||(s._bySourceMemos=c.map(a_)),w=((u=t)._bySources||(u._bySources=o_(kt(t),p)))[l][n];if(w==null)return o?[]:un(null,null);let C=p[l];if(o)return c_(w,C,n,r,i);let x=Zi(w,C,n,r,i);if(x===-1)return un(null,null);let R=w[x];return un(R[Gu]+1,R[Wu])}var{stringify:f_}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");var Er={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},ft=17;function Lt(t,e){let{generator:n}=t;if(t.write("("),e!=null&&e.length>0){n[e[0].type](e[0],t);let{length:r}=e;for(let i=1;i<r;i++){let o=e[i];t.write(", "),n[o.type](o,t)}}t.write(")")}function oc(t,e,n,r){let i=t.expressionsPrecedence[e.type];if(i===ft)return!0;let o=t.expressionsPrecedence[n.type];return i!==o?!r&&i===15&&o===14&&n.operator==="**"||i<o:i!==13&&i!==14?!1:e.operator==="**"&&n.operator==="**"?!r:i===13&&o===13&&(e.operator==="??"||n.operator==="??")?!0:r?Er[e.operator]<=Er[n.operator]:Er[e.operator]<Er[n.operator]}function Tr(t,e,n,r){let{generator:i}=t;oc(t,e,n,r)?(t.write("("),i[e.type](e,t),t.write(")")):i[e.type](e,t)}function d_(t,e,n,r){let i=e.split(`
`),o=i.length-1;if(t.write(i[0].trim()),o>0){t.write(r);for(let s=1;s<o;s++)t.write(n+i[s].trim()+r);t.write(n+i[o].trim())}}function ne(t,e,n,r){let{length:i}=e;for(let o=0;o<i;o++){let s=e[o];t.write(n),s.type[0]==="L"?t.write("// "+s.value.trim()+`
`,s):(t.write("/*"),d_(t,s.value,n,r),t.write("*/"+r))}}function p_(t){let e=t;for(;e!=null;){let{type:n}=e;if(n[0]==="C"&&n[1]==="a")return!0;if(n[0]==="M"&&n[1]==="e"&&n[2]==="m")e=e.object;else return!1}}function eo(t,e){let{generator:n}=t,{declarations:r}=e;t.write(e.kind+" ");let{length:i}=r;if(i>0){n.VariableDeclarator(r[0],t);for(let o=1;o<i;o++)t.write(", "),n.VariableDeclarator(r[o],t)}}var Zu,ec,tc,nc,rc,ic,gE={Program(t,e){let n=e.indent.repeat(e.indentLevel),{lineEnd:r,writeComments:i}=e;i&&t.comments!=null&&ne(e,t.comments,n,r);let o=t.body,{length:s}=o;for(let u=0;u<s;u++){let c=o[u];i&&c.comments!=null&&ne(e,c.comments,n,r),e.write(n),this[c.type](c,e),e.write(r)}i&&t.trailingComments!=null&&ne(e,t.trailingComments,n,r)},BlockStatement:ic=function(t,e){let n=e.indent.repeat(e.indentLevel++),{lineEnd:r,writeComments:i}=e,o=n+e.indent;e.write("{");let s=t.body;if(s!=null&&s.length>0){e.write(r),i&&t.comments!=null&&ne(e,t.comments,o,r);let{length:u}=s;for(let c=0;c<u;c++){let a=s[c];i&&a.comments!=null&&ne(e,a.comments,o,r),e.write(o),this[a.type](a,e),e.write(r)}e.write(n)}else i&&t.comments!=null&&(e.write(r),ne(e,t.comments,o,r),e.write(n));i&&t.trailingComments!=null&&ne(e,t.trailingComments,o,r),e.write("}"),e.indentLevel--},ClassBody:ic,StaticBlock(t,e){e.write("static "),this.BlockStatement(t,e)},EmptyStatement(t,e){e.write(";")},ExpressionStatement(t,e){let n=e.expressionsPrecedence[t.expression.type];n===ft||n===3&&t.expression.left.type[0]==="O"?(e.write("("),this[t.expression.type](t.expression,e),e.write(")")):this[t.expression.type](t.expression,e),e.write(";")},IfStatement(t,e){e.write("if ("),this[t.test.type](t.test,e),e.write(") "),this[t.consequent.type](t.consequent,e),t.alternate!=null&&(e.write(" else "),this[t.alternate.type](t.alternate,e))},LabeledStatement(t,e){this[t.label.type](t.label,e),e.write(": "),this[t.body.type](t.body,e)},BreakStatement(t,e){e.write("break"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},ContinueStatement(t,e){e.write("continue"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},WithStatement(t,e){e.write("with ("),this[t.object.type](t.object,e),e.write(") "),this[t.body.type](t.body,e)},SwitchStatement(t,e){let n=e.indent.repeat(e.indentLevel++),{lineEnd:r,writeComments:i}=e;e.indentLevel++;let o=n+e.indent,s=o+e.indent;e.write("switch ("),this[t.discriminant.type](t.discriminant,e),e.write(") {"+r);let{cases:u}=t,{length:c}=u;for(let a=0;a<c;a++){let l=u[a];i&&l.comments!=null&&ne(e,l.comments,o,r),l.test?(e.write(o+"case "),this[l.test.type](l.test,e),e.write(":"+r)):e.write(o+"default:"+r);let{consequent:p}=l,{length:m}=p;for(let w=0;w<m;w++){let C=p[w];i&&C.comments!=null&&ne(e,C.comments,s,r),e.write(s),this[C.type](C,e),e.write(r)}}e.indentLevel-=2,e.write(n+"}")},ReturnStatement(t,e){e.write("return"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e)),e.write(";")},ThrowStatement(t,e){e.write("throw "),this[t.argument.type](t.argument,e),e.write(";")},TryStatement(t,e){if(e.write("try "),this[t.block.type](t.block,e),t.handler){let{handler:n}=t;n.param==null?e.write(" catch "):(e.write(" catch ("),this[n.param.type](n.param,e),e.write(") ")),this[n.body.type](n.body,e)}t.finalizer&&(e.write(" finally "),this[t.finalizer.type](t.finalizer,e))},WhileStatement(t,e){e.write("while ("),this[t.test.type](t.test,e),e.write(") "),this[t.body.type](t.body,e)},DoWhileStatement(t,e){e.write("do "),this[t.body.type](t.body,e),e.write(" while ("),this[t.test.type](t.test,e),e.write(");")},ForStatement(t,e){if(e.write("for ("),t.init!=null){let{init:n}=t;n.type[0]==="V"?eo(e,n):this[n.type](n,e)}e.write("; "),t.test&&this[t.test.type](t.test,e),e.write("; "),t.update&&this[t.update.type](t.update,e),e.write(") "),this[t.body.type](t.body,e)},ForInStatement:Zu=function(t,e){e.write(`for ${t.await?"await ":""}(`);let{left:n}=t;n.type[0]==="V"?eo(e,n):this[n.type](n,e),e.write(t.type[3]==="I"?" in ":" of "),this[t.right.type](t.right,e),e.write(") "),this[t.body.type](t.body,e)},ForOfStatement:Zu,DebuggerStatement(t,e){e.write("debugger;",t)},FunctionDeclaration:ec=function(t,e){e.write((t.async?"async ":"")+(t.generator?"function* ":"function ")+(t.id?t.id.name:""),t),Lt(e,t.params),e.write(" "),this[t.body.type](t.body,e)},FunctionExpression:ec,VariableDeclaration(t,e){eo(e,t),e.write(";")},VariableDeclarator(t,e){this[t.id.type](t.id,e),t.init!=null&&(e.write(" = "),this[t.init.type](t.init,e))},ClassDeclaration(t,e){if(e.write("class "+(t.id?`${t.id.name} `:""),t),t.superClass){e.write("extends ");let{superClass:n}=t,{type:r}=n,i=e.expressionsPrecedence[r];(r[0]!=="C"||r[1]!=="l"||r[5]!=="E")&&(i===ft||i<e.expressionsPrecedence.ClassExpression)?(e.write("("),this[t.superClass.type](n,e),e.write(")")):this[n.type](n,e),e.write(" ")}this.ClassBody(t.body,e)},ImportDeclaration(t,e){e.write("import ");let{specifiers:n}=t,{length:r}=n,i=0;if(r>0){for(;i<r;){i>0&&e.write(", ");let o=n[i],s=o.type[6];if(s==="D")e.write(o.local.name,o),i++;else if(s==="N")e.write("* as "+o.local.name,o),i++;else break}if(i<r){for(e.write("{");;){let o=n[i],{name:s}=o.imported;if(e.write(s,o),s!==o.local.name&&e.write(" as "+o.local.name),++i<r)e.write(", ");else break}e.write("}")}e.write(" from ")}this.Literal(t.source,e),e.write(";")},ImportExpression(t,e){e.write("import("),this[t.source.type](t.source,e),e.write(")")},ExportDefaultDeclaration(t,e){e.write("export default "),this[t.declaration.type](t.declaration,e),e.expressionsPrecedence[t.declaration.type]!=null&&t.declaration.type[0]!=="F"&&e.write(";")},ExportNamedDeclaration(t,e){if(e.write("export "),t.declaration)this[t.declaration.type](t.declaration,e);else{e.write("{");let{specifiers:n}=t,{length:r}=n;if(r>0)for(let i=0;;){let o=n[i],{name:s}=o.local;if(e.write(s,o),s!==o.exported.name&&e.write(" as "+o.exported.name),++i<r)e.write(", ");else break}e.write("}"),t.source&&(e.write(" from "),this.Literal(t.source,e)),e.write(";")}},ExportAllDeclaration(t,e){t.exported!=null?e.write("export * as "+t.exported.name+" from "):e.write("export * from "),this.Literal(t.source,e),e.write(";")},MethodDefinition(t,e){t.static&&e.write("static ");let n=t.kind[0];(n==="g"||n==="s")&&e.write(t.kind+" "),t.value.async&&e.write("async "),t.value.generator&&e.write("*"),t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),Lt(e,t.value.params),e.write(" "),this[t.value.body.type](t.value.body,e)},ClassExpression(t,e){this.ClassDeclaration(t,e)},ArrowFunctionExpression(t,e){e.write(t.async?"async ":"",t);let{params:n}=t;n!=null&&(n.length===1&&n[0].type[0]==="I"?e.write(n[0].name,n[0]):Lt(e,t.params)),e.write(" => "),t.body.type[0]==="O"?(e.write("("),this.ObjectExpression(t.body,e),e.write(")")):this[t.body.type](t.body,e)},ThisExpression(t,e){e.write("this",t)},Super(t,e){e.write("super",t)},RestElement:tc=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:tc,YieldExpression(t,e){e.write(t.delegate?"yield*":"yield"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e))},AwaitExpression(t,e){e.write("await ",t),Tr(e,t.argument,t)},TemplateLiteral(t,e){let{quasis:n,expressions:r}=t;e.write("`");let{length:i}=r;for(let s=0;s<i;s++){let u=r[s],c=n[s];e.write(c.value.raw,c),e.write("${"),this[u.type](u,e),e.write("}")}let o=n[n.length-1];e.write(o.value.raw,o),e.write("`")},TemplateElement(t,e){e.write(t.value.raw,t)},TaggedTemplateExpression(t,e){Tr(e,t.tag,t),this[t.quasi.type](t.quasi,e)},ArrayExpression:rc=function(t,e){if(e.write("["),t.elements.length>0){let{elements:n}=t,{length:r}=n;for(let i=0;;){let o=n[i];if(o!=null&&this[o.type](o,e),++i<r)e.write(", ");else{o==null&&e.write(", ");break}}}e.write("]")},ArrayPattern:rc,ObjectExpression(t,e){let n=e.indent.repeat(e.indentLevel++),{lineEnd:r,writeComments:i}=e,o=n+e.indent;if(e.write("{"),t.properties.length>0){e.write(r),i&&t.comments!=null&&ne(e,t.comments,o,r);let s=","+r,{properties:u}=t,{length:c}=u;for(let a=0;;){let l=u[a];if(i&&l.comments!=null&&ne(e,l.comments,o,r),e.write(o),this[l.type](l,e),++a<c)e.write(s);else break}e.write(r),i&&t.trailingComments!=null&&ne(e,t.trailingComments,o,r),e.write(n+"}")}else i?t.comments!=null?(e.write(r),ne(e,t.comments,o,r),t.trailingComments!=null&&ne(e,t.trailingComments,o,r),e.write(n+"}")):t.trailingComments!=null?(e.write(r),ne(e,t.trailingComments,o,r),e.write(n+"}")):e.write("}"):e.write("}");e.indentLevel--},Property(t,e){t.method||t.kind[0]!=="i"?this.MethodDefinition(t,e):(t.shorthand||(t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),e.write(": ")),this[t.value.type](t.value,e))},PropertyDefinition(t,e){if(t.static&&e.write("static "),t.computed&&e.write("["),this[t.key.type](t.key,e),t.computed&&e.write("]"),t.value==null){t.key.type[0]!=="F"&&e.write(";");return}e.write(" = "),this[t.value.type](t.value,e),e.write(";")},ObjectPattern(t,e){if(e.write("{"),t.properties.length>0){let{properties:n}=t,{length:r}=n;for(let i=0;this[n[i].type](n[i],e),++i<r;)e.write(", ")}e.write("}")},SequenceExpression(t,e){Lt(e,t.expressions)},UnaryExpression(t,e){if(t.prefix){let{operator:n,argument:r,argument:{type:i}}=t;e.write(n);let o=oc(e,r,t);!o&&(n.length>1||i[0]==="U"&&(i[1]==="n"||i[1]==="p")&&r.prefix&&r.operator[0]===n&&(n==="+"||n==="-"))&&e.write(" "),o?(e.write(n.length>1?" (":"("),this[i](r,e),e.write(")")):this[i](r,e)}else this[t.argument.type](t.argument,e),e.write(t.operator)},UpdateExpression(t,e){t.prefix?(e.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.write(t.operator))},AssignmentExpression(t,e){this[t.left.type](t.left,e),e.write(" "+t.operator+" "),this[t.right.type](t.right,e)},AssignmentPattern(t,e){this[t.left.type](t.left,e),e.write(" = "),this[t.right.type](t.right,e)},BinaryExpression:nc=function(t,e){let n=t.operator==="in";n&&e.write("("),Tr(e,t.left,t,!1),e.write(" "+t.operator+" "),Tr(e,t.right,t,!0),n&&e.write(")")},LogicalExpression:nc,ConditionalExpression(t,e){let{test:n}=t,r=e.expressionsPrecedence[n.type];r===ft||r<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[n.type](n,e),e.write(")")):this[n.type](n,e),e.write(" ? "),this[t.consequent.type](t.consequent,e),e.write(" : "),this[t.alternate.type](t.alternate,e)},NewExpression(t,e){e.write("new ");let n=e.expressionsPrecedence[t.callee.type];n===ft||n<e.expressionsPrecedence.CallExpression||p_(t.callee)?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),Lt(e,t.arguments)},CallExpression(t,e){let n=e.expressionsPrecedence[t.callee.type];n===ft||n<e.expressionsPrecedence.CallExpression?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),t.optional&&e.write("?."),Lt(e,t.arguments)},ChainExpression(t,e){this[t.expression.type](t.expression,e)},MemberExpression(t,e){let n=e.expressionsPrecedence[t.object.type];n===ft||n<e.expressionsPrecedence.MemberExpression?(e.write("("),this[t.object.type](t.object,e),e.write(")")):this[t.object.type](t.object,e),t.computed?(t.optional&&e.write("?."),e.write("["),this[t.property.type](t.property,e),e.write("]")):(t.optional?e.write("?."):e.write("."),this[t.property.type](t.property,e))},MetaProperty(t,e){e.write(t.meta.name+"."+t.property.name,t)},Identifier(t,e){e.write(t.name,t)},PrivateIdentifier(t,e){e.write(`#${t.name}`,t)},Literal(t,e){t.raw!=null?e.write(t.raw,t):t.regex!=null?this.RegExpLiteral(t,e):t.bigint!=null?e.write(t.bigint+"n",t):e.write(f_(t.value),t)},RegExpLiteral(t,e){let{regex:n}=t;e.write(`/${n.pattern}/${n.flags}`,t)}};var to={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},h_=Object.keys(to);for(let t of h_)Object.freeze(to[t]);Object.freeze(to);var hb=W(Ul()),Gl=I("os");var dt=W(I("fs")),ql=W(I("util"));var tT=ql.promisify(dt.writeFile);var aT=process.platform==="win32"?"\\\\.\\pipe\\":(0,Gl.tmpdir)();var mn="file:///",Wl=t=>t.startsWith(mn)&&t[mn.length+1]===":";function gb(t,e=!1){if(!t)return t;if(Wl(t)){let n=mn.length;t=mn+t[n].toLowerCase()+t.substr(n+1)}else $l(t)&&(t=(e?t[0].toUpperCase():t[0].toLowerCase())+t.substr(1));return t}function Eo(t,e=!1){if(!t)return t;if(t=gb(t,e),Wl(t)){let n=mn.length;t=t.substr(0,n+1)+t.substr(n+1).replace(/\//g,"\\")}else $l(t)&&(t=t.replace(/\//g,"\\"));return t}var Vl=t=>t.startsWith("\\\\"),$l=t=>/^[A-Za-z]:/.test(t)||Vl(t);var kr=class kr{constructor(e,n,r,i,o){this.original=e;this.metadata=n;this.actualRoot=r;this.actualSources=i;this.hasNames=o;this.sourceActualToOriginal=new Map;this.sourceOriginalToActual=new Map;this.id=kr.idCounter++;if(i.length!==e.sources.length)throw new Error("Expected actualSources.length === original.source.length");for(let s=0;s<i.length;s++){let u=i[s],c=e.sources[s];u!==null&&c!==null&&(this.sourceActualToOriginal.set(u,c),this.sourceOriginalToActual.set(c,u))}}get sources(){return this.actualSources.slice()}get sourceRoot(){return this.actualRoot}computedSourceUrl(e){return Eo(Hl(Kl(this.metadata.sourceMapUrl)?this.metadata.compiledPath:this.metadata.sourceMapUrl,this.sourceRoot+e))}originalPositionFor(e){var r;let n=Yu(this.original,e);return n.source&&(n.source=(r=this.sourceOriginalToActual.get(n.source))!=null?r:n.source),n}generatedPositionFor(e){var r;let n=(r=this.sourceActualToOriginal.get(e.source))!=null?r:e.source;if(!isFinite(e.line)){let i=e.bias||Bt;return this.getBestGeneratedForOriginal(n,(o,s)=>mb(o,s)*i)}return zu(this.original,{...e,source:n})}allGeneratedPositionsFor(e){var n;return Ju(this.original,{...e,source:(n=this.sourceActualToOriginal.get(e.source))!=null?n:e.source})}sourceContentFor(e){var r,i,o;e=(r=this.sourceActualToOriginal.get(e))!=null?r:e;let n=this.original.sources.indexOf(e);return n===-1?null:(o=(i=this.original.sourcesContent)==null?void 0:i[n])!=null?o:null}eachMapping(e){Xu(this.original,e)}decodedMappings(){return kt(this.original)}names(){return this.original.names}getBestGeneratedForOriginal(e,n){let r;return this.eachMapping(i=>{i.source===e&&(!r||n(i,r)>0)&&(r=i)}),r?{column:r.generatedColumn,line:r.generatedLine}:{column:null,line:null}}};kr.idCounter=0;var To=kr,mb=({originalLine:t,originalColumn:e},{originalLine:n,originalColumn:r})=>(t||0)-(n||0)||(e||0)-(r||0);var lx=process.platform!=="win32";var zl,fx=process.platform==="win32"?(zl=process.env.PATHEXT)==null?void 0:zl.toLowerCase().split(";"):void 0;var _b=new Set(["localhost","127.0.0.1","::1"]);var Yl=t=>_b.has(t.toLowerCase()),vb=t=>{try{return new yn.URL(t).hostname.replace(/^\[|\]$/g,"")}catch{return t}};var Xl=ya(async t=>{let e=vb(t);if(Yl(e))return!0;try{let n=await Jl.promises.lookup(e);return Yl(n.address)}catch{return!1}});function Hl(t,e){try{return new yn.URL(e),e}catch{}let n;try{n=new yn.URL(t||"")}catch{return e}let r=n.protocol+"//";return n.username&&(r+=n.username+":"+n.password+"@"),r+=n.host,r+=pt.dirname(n.pathname),r[r.length-1]!=="/"&&(r+="/"),r+=e,r}function Kl(t){return!!t&&t.startsWith("data:")}var dx=process.platform;var bb=50,Lr=class t{constructor(e){this.messageEmitter=new te;this.endEmitter=new te;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this._ws=e,this._ws.addEventListener("message",n=>{this.messageEmitter.fire([n.data.toString("utf-8"),new Tt])}),this._ws.addEventListener("close",()=>{this.endEmitter.fire(),this._ws=void 0}),this._ws.addEventListener("error",()=>{})}static async create(e,n,r){let i=!e.startsWith("ws://"),o=await Xl(e);for(;;){let s=Date.now()+bb;try{let u={headers:{host:r!=null?r:"localhost"},perMessageDeflate:!1,maxPayload:268435456,rejectUnauthorized:!(i&&o),followRedirects:!0},c=new Ou(e,[],u);return await Ru(new Promise((a,l)=>{c.addEventListener("open",()=>a(new t(c))),c.addEventListener("error",p=>{let m=e===c.url?e:c.url.replace(/^http(s?):/,"ws$1:");if(m===e){l(p.error);return}this.create(m,n,r).then(a,l)})}),Dt.withTimeout(2e3,n).token,`Could not open ${e}`).catch(a=>{throw c.close(),a})}catch(u){if(n.isCancellationRequested)throw u;let c=s-Date.now();c>0&&await Nu(c)}}}send(e){var n;(n=this._ws)==null||n.send(e)}dispose(){return new Promise(e=>{if(!this._ws)return e();this._ws.addEventListener("close",()=>e()),this._ws.close()})}};var Ql=I("crypto"),Zl=()=>(0,Ql.randomBytes)(12).toString("hex");var ef,jr=class t{constructor(e,n){this.info=e;this.server=n;this.onEndEmitter=new te;this.cts=new Dt;this.gracefulExit=!1;this.targetAlive=!1;this.targetInfo={targetId:(ef=this.info.ownId)!=null?ef:Zl(),processId:Number(this.info.pid)||0,type:this.info.waitForDebugger?"waitingForDebugger":"",title:this.info.scriptName,url:"file://"+this.info.scriptName,openerId:this.info.openerId,attached:!0,canAccessOpener:!1,processInspectorPort:Number(new URL(this.info.inspectorURL).port)};this.onEnd=this.onEndEmitter.event;this.listenToServer()}get isTargetAlive(){return this.targetAlive}static async attach(e){let n=await new Promise((i,o)=>{let s=tf.createConnection(e.ipcAddress,()=>i(s));s.on("error",o)}),r=new rr(de.null,n);return new t(e,r)}listenToServer(){let{server:e,targetInfo:n}=this;e.send(JSON.stringify({method:"Target.targetCreated",params:{targetInfo:n}})),e.onMessage(async([r])=>{if(this.target&&!r.includes("Target.attachToTarget")&&!r.includes("Target.detachFromTarget")){this.target.send(r);return}let i=await this.execute(r);i&&e.send(JSON.stringify(i))}),e.onEnd(()=>{this.disposeTarget(),this.onEndEmitter.fire({killed:this.gracefulExit,code:this.gracefulExit?0:1})})}dispose(){this.gracefulExit=!0,this.cts.dispose(!0),this.disposeTarget(),this.server.dispose()}async execute(e){var r;let n=JSON.parse(e);switch(n.method){case"Target.attachToTarget":return this.target&&this.disposeTarget(),this.target=await this.createTarget(),{id:n.id,result:{sessionId:this.targetInfo.targetId,__dynamicAttach:this.info.dynamicAttach?!0:void 0}};case"Target.detachFromTarget":return this.gracefulExit=!0,this.disposeTarget(),{id:n.id,result:{}};default:(r=this.target)==null||r.send(n);return}}async createTarget(){this.gracefulExit=!1;let e=await Lr.create(this.info.inspectorURL,this.cts.token,this.info.remoteHostHeader);return e.onMessage(([n])=>this.server.send(n)),e.onEnd(()=>{e&&this.server.send(JSON.stringify({method:"Target.targetDestroyed",params:{targetId:this.targetInfo.targetId,sessionId:this.targetInfo.targetId}})),this.targetAlive=!1,this.server.dispose()}),e}disposeTarget(){this.target&&(this.target.dispose(),this.target=void 0)}};var Fr=JSON.parse(process.env.NODE_INSPECTOR_INFO),Ur=new de;Ur.setup({sinks:[]});Ea(Ur,new Et);(async()=>{process.on("exit",()=>{Ur.info("runtime","Process exiting"),Ur.dispose(),Fr.pid&&!Fr.dynamicAttach&&(!t||t.isTargetAlive)&&process.kill(Number(Fr.pid))});let t=await jr.attach(Fr);t.onEnd(()=>process.exit())})();})();
/*! Bundled license information:

reflect-metadata/Reflect.js:
  (*! *****************************************************************************
  Copyright (C) Microsoft. All rights reserved.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of the
  License at http://www.apache.org/licenses/LICENSE-2.0
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** *)
*/
//# sourceMappingURL=watchdog.js.map