@bool-ts/core 1.9.7 → 1.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__test/firstModule.ts +1 -1
- package/__test/interceptor.ts +16 -0
- package/__test/secondModule.ts +2 -2
- package/dist/decorators/index.d.ts +3 -3
- package/dist/decorators/interceptor.d.ts +6 -0
- package/dist/decorators/module.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/interfaces/index.d.ts +1 -1
- package/{src/interfaces/dispatcher.ts → dist/interfaces/interceptor.d.ts} +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/decorators/index.ts +8 -3
- package/src/decorators/interceptor.ts +15 -0
- package/src/decorators/module.ts +8 -8
- package/src/interfaces/index.ts +1 -1
- package/{dist/interfaces/dispatcher.d.ts → src/interfaces/interceptor.ts} +1 -1
- package/src/keys/index.ts +1 -1
- package/src/producers/factory.ts +31 -32
- package/src/producers/injector.ts +2 -2
- package/__test/dispatcher.ts +0 -16
- package/dist/decorators/dispatcher.d.ts +0 -6
- package/src/decorators/dispatcher.ts +0 -15
package/__test/firstModule.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { TestWebSocket } from "./webSocket";
|
|
|
15
15
|
},
|
|
16
16
|
// middlewares: [FirstMiddleware, SecondMiddleware],
|
|
17
17
|
// guards: [FirstGuard, SecondGuard],
|
|
18
|
-
//
|
|
18
|
+
// interceptors: [CustomInterceptor],
|
|
19
19
|
controllers: [TestController],
|
|
20
20
|
dependencies: [TestService, TestRepository],
|
|
21
21
|
webSockets: [TestWebSocket]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IInterceptor } from "@dist";
|
|
2
|
+
|
|
3
|
+
import { Interceptor } from "@dist";
|
|
4
|
+
|
|
5
|
+
@Interceptor()
|
|
6
|
+
export class CustomInterceptor implements IInterceptor {
|
|
7
|
+
open() {
|
|
8
|
+
console.log("Interceptor -- Open");
|
|
9
|
+
console.log("===========================");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
close() {
|
|
13
|
+
console.log("Interceptor -- Close");
|
|
14
|
+
console.log("===========================");
|
|
15
|
+
}
|
|
16
|
+
}
|
package/__test/secondModule.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Module } from "@dist";
|
|
2
2
|
import { TestController } from "./controller";
|
|
3
|
-
import { CustomDispatcher } from "./dispatcher";
|
|
4
3
|
import { FirstGuard } from "./firstGuard";
|
|
5
4
|
import { FirstMiddleware } from "./firstMiddleware";
|
|
5
|
+
import { CustomInterceptor } from "./interceptor";
|
|
6
6
|
import { TestRepository } from "./repository";
|
|
7
7
|
import { SecondGuard } from "./secondGuard";
|
|
8
8
|
import { SecondMiddleware } from "./secondMiddleware";
|
|
@@ -21,7 +21,7 @@ import { TestWebSocket } from "./webSocket";
|
|
|
21
21
|
},
|
|
22
22
|
middlewares: [FirstMiddleware, SecondMiddleware],
|
|
23
23
|
guards: [FirstGuard, SecondGuard],
|
|
24
|
-
|
|
24
|
+
interceptors: [CustomInterceptor],
|
|
25
25
|
controllers: [TestController],
|
|
26
26
|
dependencies: [TestService, TestRepository],
|
|
27
27
|
webSockets: [TestWebSocket]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { Context, HttpServer, Param, Params, Query, Request, RequestBody, RequestHeader, RequestHeaders, ResponseHeaders, RouteModel } from "./arguments";
|
|
2
2
|
export { Container } from "./container";
|
|
3
3
|
export { Controller } from "./controller";
|
|
4
|
-
export { Dispatcher } from "./dispatcher";
|
|
5
4
|
export { Guard } from "./guard";
|
|
6
5
|
export { Delete, Get, Options, Patch, Post, Put } from "./http";
|
|
7
6
|
export { Inject } from "./inject";
|
|
8
7
|
export { Injectable } from "./injectable";
|
|
8
|
+
export { Interceptor } from "./interceptor";
|
|
9
9
|
export { Middleware } from "./middleware";
|
|
10
10
|
export { Module } from "./module";
|
|
11
11
|
export { WebSocket } from "./webSocket";
|
|
@@ -15,10 +15,10 @@ export { ZodSchema } from "./zodSchema";
|
|
|
15
15
|
export type { TArgumentsMetadata } from "./arguments";
|
|
16
16
|
export type { TContainerConfig, TContainerMetadata, TContainerOptions } from "./container";
|
|
17
17
|
export type { TControllerMetadata } from "./controller";
|
|
18
|
-
export type { TDispatcherMetadata } from "./dispatcher";
|
|
19
18
|
export type { TGuardMetadata } from "./guard";
|
|
20
19
|
export type { THttpMetadata } from "./http";
|
|
20
|
+
export type { TInterceptorMetadata } from "./interceptor";
|
|
21
21
|
export type { TMiddlewareMetadata } from "./middleware";
|
|
22
22
|
export type { TModuleConfig, TModuleMetadata, TModuleOptions } from "./module";
|
|
23
|
-
export type { TWebSocketMetadata } from "./webSocket";
|
|
23
|
+
export type { TWebSocketHttpMetadata, TWebSocketHttpRouteMetadata, TWebSocketMetadata, TWebSocketUpgradeData } from "./webSocket";
|
|
24
24
|
export type { TWebSocketEventHandlerMetadata, TWebSocketEventMetadata } from "./webSocketEvent";
|
|
@@ -15,7 +15,7 @@ export type TModuleOptions<TConfig extends {} = {}> = Partial<{
|
|
|
15
15
|
middlewares: TInstances;
|
|
16
16
|
guards: TInstances;
|
|
17
17
|
controllers: TInstances;
|
|
18
|
-
|
|
18
|
+
interceptors: TInstances;
|
|
19
19
|
webSockets: TInstances;
|
|
20
20
|
}> | undefined;
|
|
21
21
|
export type TModuleMetadata<TConfig extends {} = {}> = Partial<{
|
|
@@ -26,7 +26,7 @@ export type TModuleMetadata<TConfig extends {} = {}> = Partial<{
|
|
|
26
26
|
middlewares: TInstances;
|
|
27
27
|
guards: TInstances;
|
|
28
28
|
controllers: TInstances;
|
|
29
|
-
|
|
29
|
+
interceptors: TInstances;
|
|
30
30
|
webSockets: TInstances;
|
|
31
31
|
}> | undefined;
|
|
32
32
|
export declare const Module: <TConfig extends {} = {}>(args?: TModuleOptions<TConfig>) => <T extends {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var S0=Object.create;var{getPrototypeOf:q0,defineProperty:_A,getOwnPropertyNames:
|
|
1
|
+
var S0=Object.create;var{getPrototypeOf:q0,defineProperty:_A,getOwnPropertyNames:B0}=Object;var D0=Object.prototype.hasOwnProperty;var h_=(_,T,E)=>{E=_!=null?S0(q0(_)):{};let A=T||!_||!_.__esModule?_A(E,"default",{value:_,enumerable:!0}):E;for(let C of B0(_))if(!D0.call(A,C))_A(A,C,{get:()=>_[C],enumerable:!0});return A};var k=(_,T)=>()=>(T||_((T={exports:{}}).exports,T),T.exports);var x0=(_,T)=>{for(var E in T)_A(_,E,{get:T[E],enumerable:!0,configurable:!0,set:(A)=>T[E]=()=>A})};var z0=((_)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(_,{get:(T,E)=>(typeof require!=="undefined"?require:T)[E]}):_)(function(_){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+_+'" is not supported')});var O_=k(()=>{/*! *****************************************************************************
|
|
2
2
|
Copyright (C) Microsoft. All rights reserved.
|
|
3
3
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
4
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -11,7 +11,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
11
11
|
|
|
12
12
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
13
|
and limitations under the License.
|
|
14
|
-
***************************************************************************** */var yA;(function(_){(function(T){var E=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:Z(),A=C(_);if(typeof E.Reflect!=="undefined")A=C(E.Reflect,A);if(T(A,E),typeof E.Reflect==="undefined")E.Reflect=_;function C(W,X){return function(w,x){if(Object.defineProperty(W,w,{configurable:!0,writable:!0,value:x}),X)X(w,x)}}function R(){try{return Function("return this;")()}catch(W){}}function H(){try{return(0,eval)("(function() { return this; })()")}catch(W){}}function Z(){return R()||H()}})(function(T,E){var A=Object.prototype.hasOwnProperty,C=typeof Symbol==="function",R=C&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive",H=C&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator",Z=typeof Object.create==="function",W={__proto__:[]}instanceof Array,X=!Z&&!W,w={create:Z?function(){return TA(Object.create(null))}:W?function(){return TA({__proto__:null})}:function(){return TA({})},has:X?function(L,Y){return A.call(L,Y)}:function(L,Y){return Y in L},get:X?function(L,Y){return A.call(L,Y)?L[Y]:void 0}:function(L,Y){return L[Y]}},x=Object.getPrototypeOf(Function),U=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:Q0(),G=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:U0(),q=typeof WeakMap==="function"?WeakMap:X0(),z=C?Symbol.for("@reflect-metadata:registry"):void 0,K=Z0(),J=f0(K);function h(L,Y,F,D){if(!M(F)){if(!PA(L))throw new TypeError;if(!p(Y))throw new TypeError;if(!p(D)&&!M(D)&&!LT(D))throw new TypeError;if(LT(D))D=void 0;return F=qT(F),d(L,Y,F,D)}else{if(!PA(L))throw new TypeError;if(!MA(Y))throw new TypeError;return s(L,Y)}}T("decorate",h);function f(L,Y){function F(D,m){if(!p(D))throw new TypeError;if(!M(m)&&!W0(m))throw new TypeError;t(L,Y,D,m)}return F}T("metadata",f);function S(L,Y,F,D){if(!p(F))throw new TypeError;if(!M(D))D=qT(D);return t(L,Y,F,D)}T("defineMetadata",S);function B(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return CT(L,Y,F)}T("hasMetadata",B);function u(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return AT(L,Y,F)}T("hasOwnMetadata",u);function Q(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return RT(L,Y,F)}T("getMetadata",Q);function O(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return JT(L,Y,F)}T("getOwnMetadata",O);function P(L,Y){if(!p(L))throw new TypeError;if(!M(Y))Y=qT(Y);return TT(L,Y)}T("getMetadataKeys",P);function $(L,Y){if(!p(L))throw new TypeError;if(!M(Y))Y=qT(Y);return YT(L,Y)}T("getOwnMetadataKeys",$);function j(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);var D=Y_(Y,F,!1);if(M(D))return!1;return D.OrdinaryDeleteMetadata(L,Y,F)}T("deleteMetadata",j);function s(L,Y){for(var F=L.length-1;F>=0;--F){var D=L[F],m=D(Y);if(!M(m)&&!LT(m)){if(!MA(m))throw new TypeError;Y=m}}return Y}function d(L,Y,F,D){for(var m=L.length-1;m>=0;--m){var o=L[m],e=o(Y,F,D);if(!M(e)&&!LT(e)){if(!p(e))throw new TypeError;D=e}}return D}function CT(L,Y,F){var D=AT(L,Y,F);if(D)return!0;var m=a_(Y);if(!LT(m))return CT(L,m,F);return!1}function AT(L,Y,F){var D=Y_(Y,F,!1);if(M(D))return!1;return mA(D.OrdinaryHasOwnMetadata(L,Y,F))}function RT(L,Y,F){var D=AT(L,Y,F);if(D)return JT(L,Y,F);var m=a_(Y);if(!LT(m))return RT(L,m,F);return}function JT(L,Y,F){var D=Y_(Y,F,!1);if(M(D))return;return D.OrdinaryGetOwnMetadata(L,Y,F)}function t(L,Y,F,D){var m=Y_(F,D,!0);m.OrdinaryDefineOwnMetadata(L,Y,F,D)}function TT(L,Y){var F=YT(L,Y),D=a_(L);if(D===null)return F;var m=TT(D,Y);if(m.length<=0)return F;if(F.length<=0)return m;var o=new G,e=[];for(var b=0,V=F;b<V.length;b++){var N=V[b],I=o.has(N);if(!I)o.add(N),e.push(N)}for(var c=0,g=m;c<g.length;c++){var N=g[c],I=o.has(N);if(!I)o.add(N),e.push(N)}return e}function YT(L,Y){var F=Y_(L,Y,!1);if(!F)return[];return F.OrdinaryOwnMetadataKeys(L,Y)}function bT(L){if(L===null)return 1;switch(typeof L){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return L===null?1:6;default:return 6}}function M(L){return L===void 0}function LT(L){return L===null}function nT(L){return typeof L==="symbol"}function p(L){return typeof L==="object"?L!==null:typeof L==="function"}function W_(L,Y){switch(bT(L)){case 0:return L;case 1:return L;case 2:return L;case 3:return L;case 4:return L;case 5:return L}var F=Y===3?"string":Y===5?"number":"default",D=kA(L,R);if(D!==void 0){var m=D.call(L,F);if(p(m))throw new TypeError;return m}return t_(L,F==="default"?"number":F)}function t_(L,Y){if(Y==="string"){var F=L.toString;if(oT(F)){var D=F.call(L);if(!p(D))return D}var m=L.valueOf;if(oT(m)){var D=m.call(L);if(!p(D))return D}}else{var m=L.valueOf;if(oT(m)){var D=m.call(L);if(!p(D))return D}var o=L.toString;if(oT(o)){var D=o.call(L);if(!p(D))return D}}throw new TypeError}function mA(L){return!!L}function H0(L){return""+L}function qT(L){var Y=W_(L,3);if(nT(Y))return Y;return H0(Y)}function PA(L){return Array.isArray?Array.isArray(L):L instanceof Object?L instanceof Array:Object.prototype.toString.call(L)==="[object Array]"}function oT(L){return typeof L==="function"}function MA(L){return typeof L==="function"}function W0(L){switch(bT(L)){case 3:return!0;case 4:return!0;default:return!1}}function e_(L,Y){return L===Y||L!==L&&Y!==Y}function kA(L,Y){var F=L[Y];if(F===void 0||F===null)return;if(!oT(F))throw new TypeError;return F}function uA(L){var Y=kA(L,H);if(!oT(Y))throw new TypeError;var F=Y.call(L);if(!p(F))throw new TypeError;return F}function bA(L){return L.value}function gA(L){var Y=L.next();return Y.done?!1:Y}function vA(L){var Y=L.return;if(Y)Y.call(L)}function a_(L){var Y=Object.getPrototypeOf(L);if(typeof L!=="function"||L===x)return Y;if(Y!==x)return Y;var F=L.prototype,D=F&&Object.getPrototypeOf(F);if(D==null||D===Object.prototype)return Y;var m=D.constructor;if(typeof m!=="function")return Y;if(m===L)return Y;return m}function Y0(){var L;if(!M(z)&&typeof E.Reflect!=="undefined"&&!(z in E.Reflect)&&typeof E.Reflect.defineMetadata==="function")L=F0(E.Reflect);var Y,F,D,m=new q,o={registerProvider:e,getProvider:V,setProvider:I};return o;function e(c){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case L===c:break;case M(Y):Y=c;break;case Y===c:break;case M(F):F=c;break;case F===c:break;default:if(D===void 0)D=new G;D.add(c);break}}function b(c,g){if(!M(Y)){if(Y.isProviderFor(c,g))return Y;if(!M(F)){if(F.isProviderFor(c,g))return Y;if(!M(D)){var l=uA(D);while(!0){var r=gA(l);if(!r)return;var ST=bA(r);if(ST.isProviderFor(c,g))return vA(l),ST}}}}if(!M(L)&&L.isProviderFor(c,g))return L;return}function V(c,g){var l=m.get(c),r;if(!M(l))r=l.get(g);if(!M(r))return r;if(r=b(c,g),!M(r)){if(M(l))l=new U,m.set(c,l);l.set(g,r)}return r}function N(c){if(M(c))throw new TypeError;return Y===c||F===c||!M(D)&&D.has(c)}function I(c,g,l){if(!N(l))throw new Error("Metadata provider not registered.");var r=V(c,g);if(r!==l){if(!M(r))return!1;var ST=m.get(c);if(M(ST))ST=new U,m.set(c,ST);ST.set(g,l)}return!0}}function Z0(){var L;if(!M(z)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))L=E.Reflect[z];if(M(L))L=Y0();if(!M(z)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))Object.defineProperty(E.Reflect,z,{enumerable:!1,configurable:!1,writable:!1,value:L});return L}function f0(L){var Y=new q,F={isProviderFor:function(N,I){var c=Y.get(N);if(M(c))return!1;return c.has(I)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:m,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:b,OrdinaryDeleteMetadata:V};return K.registerProvider(F),F;function D(N,I,c){var g=Y.get(N),l=!1;if(M(g)){if(!c)return;g=new U,Y.set(N,g),l=!0}var r=g.get(I);if(M(r)){if(!c)return;if(r=new U,g.set(I,r),!L.setProvider(N,I,F)){if(g.delete(I),l)Y.delete(N);throw new Error("Wrong provider for target.")}}return r}function m(N,I,c){var g=D(I,c,!1);if(M(g))return!1;return mA(g.has(N))}function o(N,I,c){var g=D(I,c,!1);if(M(g))return;return g.get(N)}function e(N,I,c,g){var l=D(c,g,!0);l.set(N,I)}function b(N,I){var c=[],g=D(N,I,!1);if(M(g))return c;var l=g.keys(),r=uA(l),ST=0;while(!0){var nA=gA(r);if(!nA)return c.length=ST,c;var w0=bA(nA);try{c[ST]=w0}catch(J0){try{vA(r)}finally{throw J0}}ST++}}function V(N,I,c){var g=D(I,c,!1);if(M(g))return!1;if(!g.delete(N))return!1;if(g.size===0){var l=Y.get(I);if(!M(l)){if(l.delete(c),l.size===0)Y.delete(l)}}return!0}}function F0(L){var{defineMetadata:Y,hasOwnMetadata:F,getOwnMetadata:D,getOwnMetadataKeys:m,deleteMetadata:o}=L,e=new q,b={isProviderFor:function(V,N){var I=e.get(V);if(!M(I)&&I.has(N))return!0;if(m(V,N).length){if(M(I))I=new G,e.set(V,I);return I.add(N),!0}return!1},OrdinaryDefineOwnMetadata:Y,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:D,OrdinaryOwnMetadataKeys:m,OrdinaryDeleteMetadata:o};return b}function Y_(L,Y,F){var D=K.getProvider(L,Y);if(!M(D))return D;if(F){if(K.setProvider(L,Y,J))return J;throw new Error("Illegal state.")}return}function Q0(){var L={},Y=[],F=function(){function b(V,N,I){this._index=0,this._keys=V,this._values=N,this._selector=I}return b.prototype["@@iterator"]=function(){return this},b.prototype[H]=function(){return this},b.prototype.next=function(){var V=this._index;if(V>=0&&V<this._keys.length){var N=this._selector(this._keys[V],this._values[V]);if(V+1>=this._keys.length)this._index=-1,this._keys=Y,this._values=Y;else this._index++;return{value:N,done:!1}}return{value:void 0,done:!0}},b.prototype.throw=function(V){if(this._index>=0)this._index=-1,this._keys=Y,this._values=Y;throw V},b.prototype.return=function(V){if(this._index>=0)this._index=-1,this._keys=Y,this._values=Y;return{value:V,done:!0}},b}(),D=function(){function b(){this._keys=[],this._values=[],this._cacheKey=L,this._cacheIndex=-2}return Object.defineProperty(b.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),b.prototype.has=function(V){return this._find(V,!1)>=0},b.prototype.get=function(V){var N=this._find(V,!1);return N>=0?this._values[N]:void 0},b.prototype.set=function(V,N){var I=this._find(V,!0);return this._values[I]=N,this},b.prototype.delete=function(V){var N=this._find(V,!1);if(N>=0){var I=this._keys.length;for(var c=N+1;c<I;c++)this._keys[c-1]=this._keys[c],this._values[c-1]=this._values[c];if(this._keys.length--,this._values.length--,e_(V,this._cacheKey))this._cacheKey=L,this._cacheIndex=-2;return!0}return!1},b.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=L,this._cacheIndex=-2},b.prototype.keys=function(){return new F(this._keys,this._values,m)},b.prototype.values=function(){return new F(this._keys,this._values,o)},b.prototype.entries=function(){return new F(this._keys,this._values,e)},b.prototype["@@iterator"]=function(){return this.entries()},b.prototype[H]=function(){return this.entries()},b.prototype._find=function(V,N){if(!e_(this._cacheKey,V)){this._cacheIndex=-1;for(var I=0;I<this._keys.length;I++)if(e_(this._keys[I],V)){this._cacheIndex=I;break}}if(this._cacheIndex<0&&N)this._cacheIndex=this._keys.length,this._keys.push(V),this._values.push(void 0);return this._cacheIndex},b}();return D;function m(b,V){return b}function o(b,V){return V}function e(b,V){return[b,V]}}function U0(){var L=function(){function Y(){this._map=new U}return Object.defineProperty(Y.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Y.prototype.has=function(F){return this._map.has(F)},Y.prototype.add=function(F){return this._map.set(F,F),this},Y.prototype.delete=function(F){return this._map.delete(F)},Y.prototype.clear=function(){this._map.clear()},Y.prototype.keys=function(){return this._map.keys()},Y.prototype.values=function(){return this._map.keys()},Y.prototype.entries=function(){return this._map.entries()},Y.prototype["@@iterator"]=function(){return this.keys()},Y.prototype[H]=function(){return this.keys()},Y}();return L}function X0(){var L=16,Y=w.create(),F=D();return function(){function V(){this._key=D()}return V.prototype.has=function(N){var I=m(N,!1);return I!==void 0?w.has(I,this._key):!1},V.prototype.get=function(N){var I=m(N,!1);return I!==void 0?w.get(I,this._key):void 0},V.prototype.set=function(N,I){var c=m(N,!0);return c[this._key]=I,this},V.prototype.delete=function(N){var I=m(N,!1);return I!==void 0?delete I[this._key]:!1},V.prototype.clear=function(){this._key=D()},V}();function D(){var V;do V="@@WeakMap@@"+b();while(w.has(Y,V));return Y[V]=!0,V}function m(V,N){if(!A.call(V,F)){if(!N)return;Object.defineProperty(V,F,{value:w.create()})}return V[F]}function o(V,N){for(var I=0;I<N;++I)V[I]=Math.random()*255|0;return V}function e(V){if(typeof Uint8Array==="function"){var N=new Uint8Array(V);if(typeof crypto!=="undefined")crypto.getRandomValues(N);else if(typeof msCrypto!=="undefined")msCrypto.getRandomValues(N);else o(N,V);return N}return o(new Array(V),V)}function b(){var V=e(L);V[6]=V[6]&79|64,V[8]=V[8]&191|128;var N="";for(var I=0;I<L;++I){var c=V[I];if(I===4||I===6||I===8)N+="-";if(c<16)N+="0";N+=c.toString(16).toLowerCase()}return N}}function TA(L){return L.__=void 0,delete L.__,L}})})(yA||(yA={}))});var dT=k((bL,dA)=>{dA.exports=TypeError});var D_=k((gL,fE)=>{var FA=typeof Map==="function"&&Map.prototype,EA=Object.getOwnPropertyDescriptor&&FA?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,u_=FA&&EA&&typeof EA.get==="function"?EA.get:null,pA=FA&&Map.prototype.forEach,QA=typeof Set==="function"&&Set.prototype,CA=Object.getOwnPropertyDescriptor&&QA?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,b_=QA&&CA&&typeof CA.get==="function"?CA.get:null,sA=QA&&Set.prototype.forEach,R1=typeof WeakMap==="function"&&WeakMap.prototype,S_=R1?WeakMap.prototype.has:null,L1=typeof WeakSet==="function"&&WeakSet.prototype,q_=L1?WeakSet.prototype.has:null,H1=typeof WeakRef==="function"&&WeakRef.prototype,iA=H1?WeakRef.prototype.deref:null,W1=Boolean.prototype.valueOf,Y1=Object.prototype.toString,Z1=Function.prototype.toString,f1=String.prototype.match,UA=String.prototype.slice,gT=String.prototype.replace,F1=String.prototype.toUpperCase,oA=String.prototype.toLowerCase,CE=RegExp.prototype.test,rA=Array.prototype.concat,KT=Array.prototype.join,Q1=Array.prototype.slice,tA=Math.floor,HA=typeof BigInt==="function"?BigInt.prototype.valueOf:null,RA=Object.getOwnPropertySymbols,WA=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,T_=typeof Symbol==="function"&&typeof Symbol.iterator==="object",ET=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T_?"object":"symbol")?Symbol.toStringTag:null,RE=Object.prototype.propertyIsEnumerable,eA=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function aA(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||CE.call(/e/,T))return T;var E=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var A=_<0?-tA(-_):tA(_);if(A!==_){var C=String(A),R=UA.call(T,C.length+1);return gT.call(C,E,"$&_")+"."+gT.call(gT.call(R,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gT.call(T,E,"$&_")}var YA=(()=>({})),TE=YA.custom,_E=WE(TE)?TE:null,LE={__proto__:null,double:'"',single:"'"},U1={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};fE.exports=function _(T,E,A,C){var R=E||{};if(kT(R,"quoteStyle")&&!kT(LE,R.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(kT(R,"maxStringLength")&&(typeof R.maxStringLength==="number"?R.maxStringLength<0&&R.maxStringLength!==1/0:R.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var H=kT(R,"customInspect")?R.customInspect:!0;if(typeof H!=="boolean"&&H!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(kT(R,"indent")&&R.indent!==null&&R.indent!=="\t"&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(kT(R,"numericSeparator")&&typeof R.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Z=R.numericSeparator;if(typeof T==="undefined")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return ZE(T,R);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var W=String(T);return Z?aA(T,W):W}if(typeof T==="bigint"){var X=String(T)+"n";return Z?aA(T,X):X}var w=typeof R.depth==="undefined"?5:R.depth;if(typeof A==="undefined")A=0;if(A>=w&&w>0&&typeof T==="object")return ZA(T)?"[Array]":"[Object]";var x=O1(R,A);if(typeof C==="undefined")C=[];else if(YE(C,T)>=0)return"[Circular]";function U(d,CT,AT){if(CT)C=Q1.call(C),C.push(CT);if(AT){var RT={depth:R.depth};if(kT(R,"quoteStyle"))RT.quoteStyle=R.quoteStyle;return _(d,RT,A+1,C)}return _(d,R,A+1,C)}if(typeof T==="function"&&!AE(T)){var G=z1(T),q=k_(T,U);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(q.length>0?" { "+KT.call(q,", ")+" }":"")}if(WE(T)){var z=T_?gT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):WA.call(T);return typeof T==="object"&&!T_?J_(z):z}if(c1(T)){var K="<"+oA.call(String(T.nodeName)),J=T.attributes||[];for(var h=0;h<J.length;h++)K+=" "+J[h].name+"="+HE(X1(J[h].value),"double",R);if(K+=">",T.childNodes&&T.childNodes.length)K+="...";return K+="</"+oA.call(String(T.nodeName))+">",K}if(ZA(T)){if(T.length===0)return"[]";var f=k_(T,U);if(x&&!h1(f))return"["+fA(f,x)+"]";return"[ "+KT.call(f,", ")+" ]"}if(J1(T)){var S=k_(T,U);if(!("cause"in Error.prototype)&&"cause"in T&&!RE.call(T,"cause"))return"{ ["+String(T)+"] "+KT.call(rA.call("[cause]: "+U(T.cause),S),", ")+" }";if(S.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+KT.call(S,", ")+" }"}if(typeof T==="object"&&H){if(_E&&typeof T[_E]==="function"&&YA)return YA(T,{depth:w-A});else if(H!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(G1(T)){var B=[];if(pA)pA.call(T,function(d,CT){B.push(U(CT,T,!0)+" => "+U(d,T))});return EE("Map",u_.call(T),B,x)}if(I1(T)){var u=[];if(sA)sA.call(T,function(d){u.push(U(d,T))});return EE("Set",b_.call(T),u,x)}if(V1(T))return LA("WeakMap");if($1(T))return LA("WeakSet");if(N1(T))return LA("WeakRef");if(q1(T))return J_(U(Number(T)));if(B1(T))return J_(U(HA.call(T)));if(D1(T))return J_(W1.call(T));if(S1(T))return J_(U(String(T)));if(typeof window!=="undefined"&&T===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&T===globalThis||typeof global!=="undefined"&&T===global)return"{ [object globalThis] }";if(!w1(T)&&!AE(T)){var Q=k_(T,U),O=eA?eA(T)===Object.prototype:T instanceof Object||T.constructor===Object,P=T instanceof Object?"":"null prototype",$=!O&&ET&&Object(T)===T&&ET in T?UA.call(vT(T),8,-1):P?"Object":"",j=O||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",s=j+($||P?"["+KT.call(rA.call([],$||[],P||[]),": ")+"] ":"");if(Q.length===0)return s+"{}";if(x)return s+"{"+fA(Q,x)+"}";return s+"{ "+KT.call(Q,", ")+" }"}return String(T)};function HE(_,T,E){var A=E.quoteStyle||T,C=LE[A];return C+_+C}function X1(_){return gT.call(String(_),/"/g,""")}function ZA(_){return vT(_)==="[object Array]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function w1(_){return vT(_)==="[object Date]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function AE(_){return vT(_)==="[object RegExp]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function J1(_){return vT(_)==="[object Error]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function S1(_){return vT(_)==="[object String]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function q1(_){return vT(_)==="[object Number]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function D1(_){return vT(_)==="[object Boolean]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function WE(_){if(T_)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!WA)return!1;try{return WA.call(_),!0}catch(T){}return!1}function B1(_){if(!_||typeof _!=="object"||!HA)return!1;try{return HA.call(_),!0}catch(T){}return!1}var x1=Object.prototype.hasOwnProperty||function(_){return _ in this};function kT(_,T){return x1.call(_,T)}function vT(_){return Y1.call(_)}function z1(_){if(_.name)return _.name;var T=f1.call(Z1.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function YE(_,T){if(_.indexOf)return _.indexOf(T);for(var E=0,A=_.length;E<A;E++)if(_[E]===T)return E;return-1}function G1(_){if(!u_||!_||typeof _!=="object")return!1;try{u_.call(_);try{b_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function V1(_){if(!S_||!_||typeof _!=="object")return!1;try{S_.call(_,S_);try{q_.call(_,q_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function N1(_){if(!iA||!_||typeof _!=="object")return!1;try{return iA.call(_),!0}catch(T){}return!1}function I1(_){if(!b_||!_||typeof _!=="object")return!1;try{b_.call(_);try{u_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function $1(_){if(!q_||!_||typeof _!=="object")return!1;try{q_.call(_,q_);try{S_.call(_,S_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function c1(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement!=="undefined"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function ZE(_,T){if(_.length>T.maxStringLength){var E=_.length-T.maxStringLength,A="... "+E+" more character"+(E>1?"s":"");return ZE(UA.call(_,0,T.maxStringLength),T)+A}var C=U1[T.quoteStyle||"single"];C.lastIndex=0;var R=gT.call(gT.call(_,C,"\\$1"),/[\x00-\x1f]/g,K1);return HE(R,"single",T)}function K1(_){var T=_.charCodeAt(0),E={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(E)return"\\"+E;return"\\x"+(T<16?"0":"")+F1.call(T.toString(16))}function J_(_){return"Object("+_+")"}function LA(_){return _+" { ? }"}function EE(_,T,E,A){var C=A?fA(E,A):KT.call(E,", ");return _+" ("+T+") {"+C+"}"}function h1(_){for(var T=0;T<_.length;T++)if(YE(_[T],`
|
|
14
|
+
***************************************************************************** */var jA;(function(_){(function(T){var E=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:Z(),A=C(_);if(typeof E.Reflect!=="undefined")A=C(E.Reflect,A);if(T(A,E),typeof E.Reflect==="undefined")E.Reflect=_;function C(W,X){return function(w,x){if(Object.defineProperty(W,w,{configurable:!0,writable:!0,value:x}),X)X(w,x)}}function R(){try{return Function("return this;")()}catch(W){}}function H(){try{return(0,eval)("(function() { return this; })()")}catch(W){}}function Z(){return R()||H()}})(function(T,E){var A=Object.prototype.hasOwnProperty,C=typeof Symbol==="function",R=C&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive",H=C&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator",Z=typeof Object.create==="function",W={__proto__:[]}instanceof Array,X=!Z&&!W,w={create:Z?function(){return TA(Object.create(null))}:W?function(){return TA({__proto__:null})}:function(){return TA({})},has:X?function(L,Y){return A.call(L,Y)}:function(L,Y){return Y in L},get:X?function(L,Y){return A.call(L,Y)?L[Y]:void 0}:function(L,Y){return L[Y]}},x=Object.getPrototypeOf(Function),U=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:Q0(),G=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:U0(),q=typeof WeakMap==="function"?WeakMap:X0(),z=C?Symbol.for("@reflect-metadata:registry"):void 0,K=Z0(),J=f0(K);function h(L,Y,F,B){if(!M(F)){if(!MA(L))throw new TypeError;if(!p(Y))throw new TypeError;if(!p(B)&&!M(B)&&!LT(B))throw new TypeError;if(LT(B))B=void 0;return F=qT(F),d(L,Y,F,B)}else{if(!MA(L))throw new TypeError;if(!kA(Y))throw new TypeError;return s(L,Y)}}T("decorate",h);function f(L,Y){function F(B,m){if(!p(B))throw new TypeError;if(!M(m)&&!W0(m))throw new TypeError;t(L,Y,B,m)}return F}T("metadata",f);function S(L,Y,F,B){if(!p(F))throw new TypeError;if(!M(B))B=qT(B);return t(L,Y,F,B)}T("defineMetadata",S);function D(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return CT(L,Y,F)}T("hasMetadata",D);function b(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return AT(L,Y,F)}T("hasOwnMetadata",b);function Q(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return RT(L,Y,F)}T("getMetadata",Q);function O(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);return JT(L,Y,F)}T("getOwnMetadata",O);function P(L,Y){if(!p(L))throw new TypeError;if(!M(Y))Y=qT(Y);return TT(L,Y)}T("getMetadataKeys",P);function $(L,Y){if(!p(L))throw new TypeError;if(!M(Y))Y=qT(Y);return YT(L,Y)}T("getOwnMetadataKeys",$);function j(L,Y,F){if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);if(!p(Y))throw new TypeError;if(!M(F))F=qT(F);var B=Y_(Y,F,!1);if(M(B))return!1;return B.OrdinaryDeleteMetadata(L,Y,F)}T("deleteMetadata",j);function s(L,Y){for(var F=L.length-1;F>=0;--F){var B=L[F],m=B(Y);if(!M(m)&&!LT(m)){if(!kA(m))throw new TypeError;Y=m}}return Y}function d(L,Y,F,B){for(var m=L.length-1;m>=0;--m){var o=L[m],e=o(Y,F,B);if(!M(e)&&!LT(e)){if(!p(e))throw new TypeError;B=e}}return B}function CT(L,Y,F){var B=AT(L,Y,F);if(B)return!0;var m=a_(Y);if(!LT(m))return CT(L,m,F);return!1}function AT(L,Y,F){var B=Y_(Y,F,!1);if(M(B))return!1;return PA(B.OrdinaryHasOwnMetadata(L,Y,F))}function RT(L,Y,F){var B=AT(L,Y,F);if(B)return JT(L,Y,F);var m=a_(Y);if(!LT(m))return RT(L,m,F);return}function JT(L,Y,F){var B=Y_(Y,F,!1);if(M(B))return;return B.OrdinaryGetOwnMetadata(L,Y,F)}function t(L,Y,F,B){var m=Y_(F,B,!0);m.OrdinaryDefineOwnMetadata(L,Y,F,B)}function TT(L,Y){var F=YT(L,Y),B=a_(L);if(B===null)return F;var m=TT(B,Y);if(m.length<=0)return F;if(F.length<=0)return m;var o=new G,e=[];for(var u=0,V=F;u<V.length;u++){var N=V[u],I=o.has(N);if(!I)o.add(N),e.push(N)}for(var c=0,g=m;c<g.length;c++){var N=g[c],I=o.has(N);if(!I)o.add(N),e.push(N)}return e}function YT(L,Y){var F=Y_(L,Y,!1);if(!F)return[];return F.OrdinaryOwnMetadataKeys(L,Y)}function uT(L){if(L===null)return 1;switch(typeof L){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return L===null?1:6;default:return 6}}function M(L){return L===void 0}function LT(L){return L===null}function nT(L){return typeof L==="symbol"}function p(L){return typeof L==="object"?L!==null:typeof L==="function"}function W_(L,Y){switch(uT(L)){case 0:return L;case 1:return L;case 2:return L;case 3:return L;case 4:return L;case 5:return L}var F=Y===3?"string":Y===5?"number":"default",B=bA(L,R);if(B!==void 0){var m=B.call(L,F);if(p(m))throw new TypeError;return m}return t_(L,F==="default"?"number":F)}function t_(L,Y){if(Y==="string"){var F=L.toString;if(oT(F)){var B=F.call(L);if(!p(B))return B}var m=L.valueOf;if(oT(m)){var B=m.call(L);if(!p(B))return B}}else{var m=L.valueOf;if(oT(m)){var B=m.call(L);if(!p(B))return B}var o=L.toString;if(oT(o)){var B=o.call(L);if(!p(B))return B}}throw new TypeError}function PA(L){return!!L}function H0(L){return""+L}function qT(L){var Y=W_(L,3);if(nT(Y))return Y;return H0(Y)}function MA(L){return Array.isArray?Array.isArray(L):L instanceof Object?L instanceof Array:Object.prototype.toString.call(L)==="[object Array]"}function oT(L){return typeof L==="function"}function kA(L){return typeof L==="function"}function W0(L){switch(uT(L)){case 3:return!0;case 4:return!0;default:return!1}}function e_(L,Y){return L===Y||L!==L&&Y!==Y}function bA(L,Y){var F=L[Y];if(F===void 0||F===null)return;if(!oT(F))throw new TypeError;return F}function uA(L){var Y=bA(L,H);if(!oT(Y))throw new TypeError;var F=Y.call(L);if(!p(F))throw new TypeError;return F}function gA(L){return L.value}function vA(L){var Y=L.next();return Y.done?!1:Y}function nA(L){var Y=L.return;if(Y)Y.call(L)}function a_(L){var Y=Object.getPrototypeOf(L);if(typeof L!=="function"||L===x)return Y;if(Y!==x)return Y;var F=L.prototype,B=F&&Object.getPrototypeOf(F);if(B==null||B===Object.prototype)return Y;var m=B.constructor;if(typeof m!=="function")return Y;if(m===L)return Y;return m}function Y0(){var L;if(!M(z)&&typeof E.Reflect!=="undefined"&&!(z in E.Reflect)&&typeof E.Reflect.defineMetadata==="function")L=F0(E.Reflect);var Y,F,B,m=new q,o={registerProvider:e,getProvider:V,setProvider:I};return o;function e(c){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case L===c:break;case M(Y):Y=c;break;case Y===c:break;case M(F):F=c;break;case F===c:break;default:if(B===void 0)B=new G;B.add(c);break}}function u(c,g){if(!M(Y)){if(Y.isProviderFor(c,g))return Y;if(!M(F)){if(F.isProviderFor(c,g))return Y;if(!M(B)){var l=uA(B);while(!0){var r=vA(l);if(!r)return;var ST=gA(r);if(ST.isProviderFor(c,g))return nA(l),ST}}}}if(!M(L)&&L.isProviderFor(c,g))return L;return}function V(c,g){var l=m.get(c),r;if(!M(l))r=l.get(g);if(!M(r))return r;if(r=u(c,g),!M(r)){if(M(l))l=new U,m.set(c,l);l.set(g,r)}return r}function N(c){if(M(c))throw new TypeError;return Y===c||F===c||!M(B)&&B.has(c)}function I(c,g,l){if(!N(l))throw new Error("Metadata provider not registered.");var r=V(c,g);if(r!==l){if(!M(r))return!1;var ST=m.get(c);if(M(ST))ST=new U,m.set(c,ST);ST.set(g,l)}return!0}}function Z0(){var L;if(!M(z)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))L=E.Reflect[z];if(M(L))L=Y0();if(!M(z)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))Object.defineProperty(E.Reflect,z,{enumerable:!1,configurable:!1,writable:!1,value:L});return L}function f0(L){var Y=new q,F={isProviderFor:function(N,I){var c=Y.get(N);if(M(c))return!1;return c.has(I)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:m,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:u,OrdinaryDeleteMetadata:V};return K.registerProvider(F),F;function B(N,I,c){var g=Y.get(N),l=!1;if(M(g)){if(!c)return;g=new U,Y.set(N,g),l=!0}var r=g.get(I);if(M(r)){if(!c)return;if(r=new U,g.set(I,r),!L.setProvider(N,I,F)){if(g.delete(I),l)Y.delete(N);throw new Error("Wrong provider for target.")}}return r}function m(N,I,c){var g=B(I,c,!1);if(M(g))return!1;return PA(g.has(N))}function o(N,I,c){var g=B(I,c,!1);if(M(g))return;return g.get(N)}function e(N,I,c,g){var l=B(c,g,!0);l.set(N,I)}function u(N,I){var c=[],g=B(N,I,!1);if(M(g))return c;var l=g.keys(),r=uA(l),ST=0;while(!0){var yA=vA(r);if(!yA)return c.length=ST,c;var w0=gA(yA);try{c[ST]=w0}catch(J0){try{nA(r)}finally{throw J0}}ST++}}function V(N,I,c){var g=B(I,c,!1);if(M(g))return!1;if(!g.delete(N))return!1;if(g.size===0){var l=Y.get(I);if(!M(l)){if(l.delete(c),l.size===0)Y.delete(l)}}return!0}}function F0(L){var{defineMetadata:Y,hasOwnMetadata:F,getOwnMetadata:B,getOwnMetadataKeys:m,deleteMetadata:o}=L,e=new q,u={isProviderFor:function(V,N){var I=e.get(V);if(!M(I)&&I.has(N))return!0;if(m(V,N).length){if(M(I))I=new G,e.set(V,I);return I.add(N),!0}return!1},OrdinaryDefineOwnMetadata:Y,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:m,OrdinaryDeleteMetadata:o};return u}function Y_(L,Y,F){var B=K.getProvider(L,Y);if(!M(B))return B;if(F){if(K.setProvider(L,Y,J))return J;throw new Error("Illegal state.")}return}function Q0(){var L={},Y=[],F=function(){function u(V,N,I){this._index=0,this._keys=V,this._values=N,this._selector=I}return u.prototype["@@iterator"]=function(){return this},u.prototype[H]=function(){return this},u.prototype.next=function(){var V=this._index;if(V>=0&&V<this._keys.length){var N=this._selector(this._keys[V],this._values[V]);if(V+1>=this._keys.length)this._index=-1,this._keys=Y,this._values=Y;else this._index++;return{value:N,done:!1}}return{value:void 0,done:!0}},u.prototype.throw=function(V){if(this._index>=0)this._index=-1,this._keys=Y,this._values=Y;throw V},u.prototype.return=function(V){if(this._index>=0)this._index=-1,this._keys=Y,this._values=Y;return{value:V,done:!0}},u}(),B=function(){function u(){this._keys=[],this._values=[],this._cacheKey=L,this._cacheIndex=-2}return Object.defineProperty(u.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),u.prototype.has=function(V){return this._find(V,!1)>=0},u.prototype.get=function(V){var N=this._find(V,!1);return N>=0?this._values[N]:void 0},u.prototype.set=function(V,N){var I=this._find(V,!0);return this._values[I]=N,this},u.prototype.delete=function(V){var N=this._find(V,!1);if(N>=0){var I=this._keys.length;for(var c=N+1;c<I;c++)this._keys[c-1]=this._keys[c],this._values[c-1]=this._values[c];if(this._keys.length--,this._values.length--,e_(V,this._cacheKey))this._cacheKey=L,this._cacheIndex=-2;return!0}return!1},u.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=L,this._cacheIndex=-2},u.prototype.keys=function(){return new F(this._keys,this._values,m)},u.prototype.values=function(){return new F(this._keys,this._values,o)},u.prototype.entries=function(){return new F(this._keys,this._values,e)},u.prototype["@@iterator"]=function(){return this.entries()},u.prototype[H]=function(){return this.entries()},u.prototype._find=function(V,N){if(!e_(this._cacheKey,V)){this._cacheIndex=-1;for(var I=0;I<this._keys.length;I++)if(e_(this._keys[I],V)){this._cacheIndex=I;break}}if(this._cacheIndex<0&&N)this._cacheIndex=this._keys.length,this._keys.push(V),this._values.push(void 0);return this._cacheIndex},u}();return B;function m(u,V){return u}function o(u,V){return V}function e(u,V){return[u,V]}}function U0(){var L=function(){function Y(){this._map=new U}return Object.defineProperty(Y.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Y.prototype.has=function(F){return this._map.has(F)},Y.prototype.add=function(F){return this._map.set(F,F),this},Y.prototype.delete=function(F){return this._map.delete(F)},Y.prototype.clear=function(){this._map.clear()},Y.prototype.keys=function(){return this._map.keys()},Y.prototype.values=function(){return this._map.keys()},Y.prototype.entries=function(){return this._map.entries()},Y.prototype["@@iterator"]=function(){return this.keys()},Y.prototype[H]=function(){return this.keys()},Y}();return L}function X0(){var L=16,Y=w.create(),F=B();return function(){function V(){this._key=B()}return V.prototype.has=function(N){var I=m(N,!1);return I!==void 0?w.has(I,this._key):!1},V.prototype.get=function(N){var I=m(N,!1);return I!==void 0?w.get(I,this._key):void 0},V.prototype.set=function(N,I){var c=m(N,!0);return c[this._key]=I,this},V.prototype.delete=function(N){var I=m(N,!1);return I!==void 0?delete I[this._key]:!1},V.prototype.clear=function(){this._key=B()},V}();function B(){var V;do V="@@WeakMap@@"+u();while(w.has(Y,V));return Y[V]=!0,V}function m(V,N){if(!A.call(V,F)){if(!N)return;Object.defineProperty(V,F,{value:w.create()})}return V[F]}function o(V,N){for(var I=0;I<N;++I)V[I]=Math.random()*255|0;return V}function e(V){if(typeof Uint8Array==="function"){var N=new Uint8Array(V);if(typeof crypto!=="undefined")crypto.getRandomValues(N);else if(typeof msCrypto!=="undefined")msCrypto.getRandomValues(N);else o(N,V);return N}return o(new Array(V),V)}function u(){var V=e(L);V[6]=V[6]&79|64,V[8]=V[8]&191|128;var N="";for(var I=0;I<L;++I){var c=V[I];if(I===4||I===6||I===8)N+="-";if(c<16)N+="0";N+=c.toString(16).toLowerCase()}return N}}function TA(L){return L.__=void 0,delete L.__,L}})})(jA||(jA={}))});var dT=k((uL,pA)=>{pA.exports=TypeError});var B_=k((gL,FE)=>{var FA=typeof Map==="function"&&Map.prototype,EA=Object.getOwnPropertyDescriptor&&FA?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b_=FA&&EA&&typeof EA.get==="function"?EA.get:null,sA=FA&&Map.prototype.forEach,QA=typeof Set==="function"&&Set.prototype,CA=Object.getOwnPropertyDescriptor&&QA?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u_=QA&&CA&&typeof CA.get==="function"?CA.get:null,iA=QA&&Set.prototype.forEach,R1=typeof WeakMap==="function"&&WeakMap.prototype,S_=R1?WeakMap.prototype.has:null,L1=typeof WeakSet==="function"&&WeakSet.prototype,q_=L1?WeakSet.prototype.has:null,H1=typeof WeakRef==="function"&&WeakRef.prototype,oA=H1?WeakRef.prototype.deref:null,W1=Boolean.prototype.valueOf,Y1=Object.prototype.toString,Z1=Function.prototype.toString,f1=String.prototype.match,UA=String.prototype.slice,gT=String.prototype.replace,F1=String.prototype.toUpperCase,rA=String.prototype.toLowerCase,RE=RegExp.prototype.test,tA=Array.prototype.concat,KT=Array.prototype.join,Q1=Array.prototype.slice,eA=Math.floor,HA=typeof BigInt==="function"?BigInt.prototype.valueOf:null,RA=Object.getOwnPropertySymbols,WA=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,T_=typeof Symbol==="function"&&typeof Symbol.iterator==="object",ET=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T_?"object":"symbol")?Symbol.toStringTag:null,LE=Object.prototype.propertyIsEnumerable,aA=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function TE(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||RE.call(/e/,T))return T;var E=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var A=_<0?-eA(-_):eA(_);if(A!==_){var C=String(A),R=UA.call(T,C.length+1);return gT.call(C,E,"$&_")+"."+gT.call(gT.call(R,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gT.call(T,E,"$&_")}var YA=(()=>({})),_E=YA.custom,AE=YE(_E)?_E:null,HE={__proto__:null,double:'"',single:"'"},U1={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};FE.exports=function _(T,E,A,C){var R=E||{};if(kT(R,"quoteStyle")&&!kT(HE,R.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(kT(R,"maxStringLength")&&(typeof R.maxStringLength==="number"?R.maxStringLength<0&&R.maxStringLength!==1/0:R.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var H=kT(R,"customInspect")?R.customInspect:!0;if(typeof H!=="boolean"&&H!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(kT(R,"indent")&&R.indent!==null&&R.indent!=="\t"&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(kT(R,"numericSeparator")&&typeof R.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Z=R.numericSeparator;if(typeof T==="undefined")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return fE(T,R);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var W=String(T);return Z?TE(T,W):W}if(typeof T==="bigint"){var X=String(T)+"n";return Z?TE(T,X):X}var w=typeof R.depth==="undefined"?5:R.depth;if(typeof A==="undefined")A=0;if(A>=w&&w>0&&typeof T==="object")return ZA(T)?"[Array]":"[Object]";var x=O1(R,A);if(typeof C==="undefined")C=[];else if(ZE(C,T)>=0)return"[Circular]";function U(d,CT,AT){if(CT)C=Q1.call(C),C.push(CT);if(AT){var RT={depth:R.depth};if(kT(R,"quoteStyle"))RT.quoteStyle=R.quoteStyle;return _(d,RT,A+1,C)}return _(d,R,A+1,C)}if(typeof T==="function"&&!EE(T)){var G=z1(T),q=k_(T,U);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(q.length>0?" { "+KT.call(q,", ")+" }":"")}if(YE(T)){var z=T_?gT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):WA.call(T);return typeof T==="object"&&!T_?J_(z):z}if(c1(T)){var K="<"+rA.call(String(T.nodeName)),J=T.attributes||[];for(var h=0;h<J.length;h++)K+=" "+J[h].name+"="+WE(X1(J[h].value),"double",R);if(K+=">",T.childNodes&&T.childNodes.length)K+="...";return K+="</"+rA.call(String(T.nodeName))+">",K}if(ZA(T)){if(T.length===0)return"[]";var f=k_(T,U);if(x&&!h1(f))return"["+fA(f,x)+"]";return"[ "+KT.call(f,", ")+" ]"}if(J1(T)){var S=k_(T,U);if(!("cause"in Error.prototype)&&"cause"in T&&!LE.call(T,"cause"))return"{ ["+String(T)+"] "+KT.call(tA.call("[cause]: "+U(T.cause),S),", ")+" }";if(S.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+KT.call(S,", ")+" }"}if(typeof T==="object"&&H){if(AE&&typeof T[AE]==="function"&&YA)return YA(T,{depth:w-A});else if(H!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(G1(T)){var D=[];if(sA)sA.call(T,function(d,CT){D.push(U(CT,T,!0)+" => "+U(d,T))});return CE("Map",b_.call(T),D,x)}if(I1(T)){var b=[];if(iA)iA.call(T,function(d){b.push(U(d,T))});return CE("Set",u_.call(T),b,x)}if(V1(T))return LA("WeakMap");if($1(T))return LA("WeakSet");if(N1(T))return LA("WeakRef");if(q1(T))return J_(U(Number(T)));if(D1(T))return J_(U(HA.call(T)));if(B1(T))return J_(W1.call(T));if(S1(T))return J_(U(String(T)));if(typeof window!=="undefined"&&T===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&T===globalThis||typeof global!=="undefined"&&T===global)return"{ [object globalThis] }";if(!w1(T)&&!EE(T)){var Q=k_(T,U),O=aA?aA(T)===Object.prototype:T instanceof Object||T.constructor===Object,P=T instanceof Object?"":"null prototype",$=!O&&ET&&Object(T)===T&&ET in T?UA.call(vT(T),8,-1):P?"Object":"",j=O||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",s=j+($||P?"["+KT.call(tA.call([],$||[],P||[]),": ")+"] ":"");if(Q.length===0)return s+"{}";if(x)return s+"{"+fA(Q,x)+"}";return s+"{ "+KT.call(Q,", ")+" }"}return String(T)};function WE(_,T,E){var A=E.quoteStyle||T,C=HE[A];return C+_+C}function X1(_){return gT.call(String(_),/"/g,""")}function ZA(_){return vT(_)==="[object Array]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function w1(_){return vT(_)==="[object Date]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function EE(_){return vT(_)==="[object RegExp]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function J1(_){return vT(_)==="[object Error]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function S1(_){return vT(_)==="[object String]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function q1(_){return vT(_)==="[object Number]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function B1(_){return vT(_)==="[object Boolean]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function YE(_){if(T_)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!WA)return!1;try{return WA.call(_),!0}catch(T){}return!1}function D1(_){if(!_||typeof _!=="object"||!HA)return!1;try{return HA.call(_),!0}catch(T){}return!1}var x1=Object.prototype.hasOwnProperty||function(_){return _ in this};function kT(_,T){return x1.call(_,T)}function vT(_){return Y1.call(_)}function z1(_){if(_.name)return _.name;var T=f1.call(Z1.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function ZE(_,T){if(_.indexOf)return _.indexOf(T);for(var E=0,A=_.length;E<A;E++)if(_[E]===T)return E;return-1}function G1(_){if(!b_||!_||typeof _!=="object")return!1;try{b_.call(_);try{u_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function V1(_){if(!S_||!_||typeof _!=="object")return!1;try{S_.call(_,S_);try{q_.call(_,q_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function N1(_){if(!oA||!_||typeof _!=="object")return!1;try{return oA.call(_),!0}catch(T){}return!1}function I1(_){if(!u_||!_||typeof _!=="object")return!1;try{u_.call(_);try{b_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function $1(_){if(!q_||!_||typeof _!=="object")return!1;try{q_.call(_,q_);try{S_.call(_,S_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function c1(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement!=="undefined"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function fE(_,T){if(_.length>T.maxStringLength){var E=_.length-T.maxStringLength,A="... "+E+" more character"+(E>1?"s":"");return fE(UA.call(_,0,T.maxStringLength),T)+A}var C=U1[T.quoteStyle||"single"];C.lastIndex=0;var R=gT.call(gT.call(_,C,"\\$1"),/[\x00-\x1f]/g,K1);return WE(R,"single",T)}function K1(_){var T=_.charCodeAt(0),E={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(E)return"\\"+E;return"\\x"+(T<16?"0":"")+F1.call(T.toString(16))}function J_(_){return"Object("+_+")"}function LA(_){return _+" { ? }"}function CE(_,T,E,A){var C=A?fA(E,A):KT.call(E,", ");return _+" ("+T+") {"+C+"}"}function h1(_){for(var T=0;T<_.length;T++)if(ZE(_[T],`
|
|
15
15
|
`)>=0)return!1;return!0}function O1(_,T){var E;if(_.indent==="\t")E="\t";else if(typeof _.indent==="number"&&_.indent>0)E=KT.call(Array(_.indent+1)," ");else return null;return{base:E,prev:KT.call(Array(T+1),E)}}function fA(_,T){if(_.length===0)return"";var E=`
|
|
16
16
|
`+T.prev+T.base;return E+KT.call(_,","+E)+`
|
|
17
|
-
`+T.prev}function k_(_,T){var E=ZA(_),A=[];if(E){A.length=_.length;for(var C=0;C<_.length;C++)A[C]=kT(_,C)?T(_[C],_):""}var R=typeof RA==="function"?RA(_):[],H;if(T_){H={};for(var Z=0;Z<R.length;Z++)H["$"+R[Z]]=R[Z]}for(var W in _){if(!kT(_,W))continue;if(E&&String(Number(W))===W&&W<_.length)continue;if(T_&&H["$"+W]instanceof Symbol)continue;else if(CE.call(/[^\w$]/,W))A.push(T(W,_)+": "+T(_[W],_));else A.push(W+": "+T(_[W],_))}if(typeof RA==="function"){for(var X=0;X<R.length;X++)if(RE.call(_,R[X]))A.push("["+T(R[X])+"]: "+T(_[R[X]],_))}return A}});var QE=k((vL,FE)=>{var m1=D_(),P1=dT(),g_=function(_,T,E){var A=_,C;for(;(C=A.next)!=null;A=C)if(C.key===T){if(A.next=C.next,!E)C.next=_.next,_.next=C;return C}},M1=function(_,T){if(!_)return;var E=g_(_,T);return E&&E.value},k1=function(_,T,E){var A=g_(_,T);if(A)A.value=E;else _.next={key:T,next:_.next,value:E}},u1=function(_,T){if(!_)return!1;return!!g_(_,T)},b1=function(_,T){if(_)return g_(_,T,!0)};FE.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new P1("Side channel does not contain "+m1(A))},delete:function(A){var C=T&&T.next,R=b1(T,A);if(R&&C&&C===R)T=void 0;return!!R},get:function(A){return M1(T,A)},has:function(A){return u1(T,A)},set:function(A,C){if(!T)T={next:void 0};k1(T,A,C)}};return E}});var XA=k((nL,UE)=>{UE.exports=Object});var wE=k((yL,XE)=>{XE.exports=Error});var SE=k((jL,JE)=>{JE.exports=EvalError});var DE=k((lL,qE)=>{qE.exports=RangeError});var xE=k((dL,BE)=>{BE.exports=ReferenceError});var GE=k((pL,zE)=>{zE.exports=SyntaxError});var NE=k((sL,VE)=>{VE.exports=URIError});var $E=k((iL,IE)=>{IE.exports=Math.abs});var KE=k((oL,cE)=>{cE.exports=Math.floor});var OE=k((rL,hE)=>{hE.exports=Math.max});var PE=k((tL,mE)=>{mE.exports=Math.min});var kE=k((eL,ME)=>{ME.exports=Math.pow});var bE=k((aL,uE)=>{uE.exports=Math.round});var vE=k((TH,gE)=>{gE.exports=Number.isNaN||function _(T){return T!==T}});var yE=k((_H,nE)=>{var g1=vE();nE.exports=function _(T){if(g1(T)||T===0)return T;return T<0?-1:1}});var lE=k((AH,jE)=>{jE.exports=Object.getOwnPropertyDescriptor});var wA=k((EH,dE)=>{var v_=lE();if(v_)try{v_([],"length")}catch(_){v_=null}dE.exports=v_});var sE=k((CH,pE)=>{var n_=Object.defineProperty||!1;if(n_)try{n_({},"a",{value:1})}catch(_){n_=!1}pE.exports=n_});var oE=k((RH,iE)=>{iE.exports=function _(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},E=Symbol("test"),A=Object(E);if(typeof E==="string")return!1;if(Object.prototype.toString.call(E)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;var C=42;T[E]=C;for(var R in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var H=Object.getOwnPropertySymbols(T);if(H.length!==1||H[0]!==E)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,E))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Z=Object.getOwnPropertyDescriptor(T,E);if(Z.value!==C||Z.enumerable!==!0)return!1}return!0}});var eE=k((LH,tE)=>{var rE=typeof Symbol!=="undefined"&&Symbol,v1=oE();tE.exports=function _(){if(typeof rE!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof rE("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return v1()}});var JA=k((HH,aE)=>{aE.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null});var SA=k((WH,TC)=>{var n1=XA();TC.exports=n1.getPrototypeOf||null});var EC=k((YH,AC)=>{var y1="Function.prototype.bind called on incompatible ",j1=Object.prototype.toString,l1=Math.max,d1="[object Function]",_C=function _(T,E){var A=[];for(var C=0;C<T.length;C+=1)A[C]=T[C];for(var R=0;R<E.length;R+=1)A[R+T.length]=E[R];return A},p1=function _(T,E){var A=[];for(var C=E||0,R=0;C<T.length;C+=1,R+=1)A[R]=T[C];return A},s1=function(_,T){var E="";for(var A=0;A<_.length;A+=1)if(E+=_[A],A+1<_.length)E+=T;return E};AC.exports=function _(T){var E=this;if(typeof E!=="function"||j1.apply(E)!==d1)throw new TypeError(y1+E);var A=p1(arguments,1),C,R=function(){if(this instanceof C){var w=E.apply(this,_C(A,arguments));if(Object(w)===w)return w;return this}return E.apply(T,_C(A,arguments))},H=l1(0,E.length-A.length),Z=[];for(var W=0;W<H;W++)Z[W]="$"+W;if(C=Function("binder","return function ("+s1(Z,",")+"){ return binder.apply(this,arguments); }")(R),E.prototype){var X=function w(){};X.prototype=E.prototype,C.prototype=new X,X.prototype=null}return C}});var B_=k((ZH,CC)=>{var i1=EC();CC.exports=Function.prototype.bind||i1});var y_=k((fH,RC)=>{RC.exports=Function.prototype.call});var qA=k((FH,LC)=>{LC.exports=Function.prototype.apply});var WC=k((QH,HC)=>{HC.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply});var ZC=k((UH,YC)=>{var o1=B_(),r1=qA(),t1=y_(),e1=WC();YC.exports=e1||o1.call(t1,r1)});var DA=k((XH,fC)=>{var a1=B_(),TR=dT(),_R=y_(),AR=ZC();fC.exports=function _(T){if(T.length<1||typeof T[0]!=="function")throw new TR("a function is required");return AR(a1,_R,T)}});var JC=k((wH,wC)=>{var ER=DA(),FC=wA(),UC;try{UC=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var BA=!!UC&&FC&&FC(Object.prototype,"__proto__"),XC=Object,QC=XC.getPrototypeOf;wC.exports=BA&&typeof BA.get==="function"?ER([BA.get]):typeof QC==="function"?function _(T){return QC(T==null?T:XC(T))}:!1});var xC=k((JH,BC)=>{var SC=JA(),qC=SA(),DC=JC();BC.exports=SC?function _(T){return SC(T)}:qC?function _(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw new TypeError("getProto: not an object");return qC(T)}:DC?function _(T){return DC(T)}:null});var GC=k((SH,zC)=>{var CR=Function.prototype.call,RR=Object.prototype.hasOwnProperty,LR=B_();zC.exports=LR.call(CR,RR)});var d_=k((qH,KC)=>{var v,HR=XA(),WR=wE(),YR=SE(),ZR=DE(),fR=xE(),C_=GE(),E_=dT(),FR=NE(),QR=$E(),UR=KE(),XR=OE(),wR=PE(),JR=kE(),SR=bE(),qR=yE(),$C=Function,xA=function(_){try{return $C('"use strict"; return ('+_+").constructor;")()}catch(T){}},x_=wA(),DR=sE(),zA=function(){throw new E_},BR=x_?function(){try{return arguments.callee,zA}catch(_){try{return x_(arguments,"callee").get}catch(T){return zA}}}():zA,__=eE()(),_T=xC(),xR=SA(),zR=JA(),cC=qA(),z_=y_(),A_={},GR=typeof Uint8Array==="undefined"||!_T?v:_T(Uint8Array),pT={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?v:ArrayBuffer,"%ArrayIteratorPrototype%":__&&_T?_T([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":A_,"%AsyncGenerator%":A_,"%AsyncGeneratorFunction%":A_,"%AsyncIteratorPrototype%":A_,"%Atomics%":typeof Atomics==="undefined"?v:Atomics,"%BigInt%":typeof BigInt==="undefined"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":WR,"%eval%":eval,"%EvalError%":YR,"%Float32Array%":typeof Float32Array==="undefined"?v:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?v:FinalizationRegistry,"%Function%":$C,"%GeneratorFunction%":A_,"%Int8Array%":typeof Int8Array==="undefined"?v:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?v:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":__&&_T?_T(_T([][Symbol.iterator]())):v,"%JSON%":typeof JSON==="object"?JSON:v,"%Map%":typeof Map==="undefined"?v:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!__||!_T?v:_T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":HR,"%Object.getOwnPropertyDescriptor%":x_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?v:Promise,"%Proxy%":typeof Proxy==="undefined"?v:Proxy,"%RangeError%":ZR,"%ReferenceError%":fR,"%Reflect%":typeof Reflect==="undefined"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?v:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!__||!_T?v:_T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":__&&_T?_T(""[Symbol.iterator]()):v,"%Symbol%":__?Symbol:v,"%SyntaxError%":C_,"%ThrowTypeError%":BR,"%TypedArray%":GR,"%TypeError%":E_,"%Uint8Array%":typeof Uint8Array==="undefined"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?v:Uint32Array,"%URIError%":FR,"%WeakMap%":typeof WeakMap==="undefined"?v:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?v:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?v:WeakSet,"%Function.prototype.call%":z_,"%Function.prototype.apply%":cC,"%Object.defineProperty%":DR,"%Object.getPrototypeOf%":xR,"%Math.abs%":QR,"%Math.floor%":UR,"%Math.max%":XR,"%Math.min%":wR,"%Math.pow%":JR,"%Math.round%":SR,"%Math.sign%":qR,"%Reflect.getPrototypeOf%":zR};if(_T)try{null.error}catch(_){VC=_T(_T(_)),pT["%Error.prototype%"]=VC}var VC,VR=function _(T){var E;if(T==="%AsyncFunction%")E=xA("async function () {}");else if(T==="%GeneratorFunction%")E=xA("function* () {}");else if(T==="%AsyncGeneratorFunction%")E=xA("async function* () {}");else if(T==="%AsyncGenerator%"){var A=_("%AsyncGeneratorFunction%");if(A)E=A.prototype}else if(T==="%AsyncIteratorPrototype%"){var C=_("%AsyncGenerator%");if(C&&_T)E=_T(C.prototype)}return pT[T]=E,E},NC={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G_=B_(),j_=GC(),NR=G_.call(z_,Array.prototype.concat),IR=G_.call(cC,Array.prototype.splice),IC=G_.call(z_,String.prototype.replace),l_=G_.call(z_,String.prototype.slice),$R=G_.call(z_,RegExp.prototype.exec),cR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,KR=/\\(\\)?/g,hR=function _(T){var E=l_(T,0,1),A=l_(T,-1);if(E==="%"&&A!=="%")throw new C_("invalid intrinsic syntax, expected closing `%`");else if(A==="%"&&E!=="%")throw new C_("invalid intrinsic syntax, expected opening `%`");var C=[];return IC(T,cR,function(R,H,Z,W){C[C.length]=Z?IC(W,KR,"$1"):H||R}),C},OR=function _(T,E){var A=T,C;if(j_(NC,A))C=NC[A],A="%"+C[0]+"%";if(j_(pT,A)){var R=pT[A];if(R===A_)R=VR(A);if(typeof R==="undefined"&&!E)throw new E_("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:C,name:A,value:R}}throw new C_("intrinsic "+T+" does not exist!")};KC.exports=function _(T,E){if(typeof T!=="string"||T.length===0)throw new E_("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!=="boolean")throw new E_('"allowMissing" argument must be a boolean');if($R(/^%?[^%]*%?$/,T)===null)throw new C_("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var A=hR(T),C=A.length>0?A[0]:"",R=OR("%"+C+"%",E),H=R.name,Z=R.value,W=!1,X=R.alias;if(X)C=X[0],IR(A,NR([0,1],X));for(var w=1,x=!0;w<A.length;w+=1){var U=A[w],G=l_(U,0,1),q=l_(U,-1);if((G==='"'||G==="'"||G==="`"||(q==='"'||q==="'"||q==="`"))&&G!==q)throw new C_("property names with quotes must have matching quotes");if(U==="constructor"||!x)W=!0;if(C+="."+U,H="%"+C+"%",j_(pT,H))Z=pT[H];else if(Z!=null){if(!(U in Z)){if(!E)throw new E_("base intrinsic for "+T+" exists, but the property is not available.");return}if(x_&&w+1>=A.length){var z=x_(Z,U);if(x=!!z,x&&"get"in z&&!("originalValue"in z.get))Z=z.get;else Z=Z[U]}else x=j_(Z,U),Z=Z[U];if(x&&!W)pT[H]=Z}}return Z}});var GA=k((DH,mC)=>{var hC=d_(),OC=DA(),mR=OC([hC("%String.prototype.indexOf%")]);mC.exports=function _(T,E){var A=hC(T,!!E);if(typeof A==="function"&&mR(T,".prototype.")>-1)return OC([A]);return A}});var VA=k((BH,MC)=>{var PR=d_(),V_=GA(),MR=D_(),kR=dT(),PC=PR("%Map%",!0),uR=V_("Map.prototype.get",!0),bR=V_("Map.prototype.set",!0),gR=V_("Map.prototype.has",!0),vR=V_("Map.prototype.delete",!0),nR=V_("Map.prototype.size",!0);MC.exports=!!PC&&function _(){var T,E={assert:function(A){if(!E.has(A))throw new kR("Side channel does not contain "+MR(A))},delete:function(A){if(T){var C=vR(T,A);if(nR(T)===0)T=void 0;return C}return!1},get:function(A){if(T)return uR(T,A)},has:function(A){if(T)return gR(T,A);return!1},set:function(A,C){if(!T)T=new PC;bR(T,A,C)}};return E}});var uC=k((xH,kC)=>{var yR=d_(),s_=GA(),jR=D_(),p_=VA(),lR=dT(),R_=yR("%WeakMap%",!0),dR=s_("WeakMap.prototype.get",!0),pR=s_("WeakMap.prototype.set",!0),sR=s_("WeakMap.prototype.has",!0),iR=s_("WeakMap.prototype.delete",!0);kC.exports=R_?function _(){var T,E,A={assert:function(C){if(!A.has(C))throw new lR("Side channel does not contain "+jR(C))},delete:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return iR(T,C)}else if(p_){if(E)return E.delete(C)}return!1},get:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return dR(T,C)}return E&&E.get(C)},has:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return sR(T,C)}return!!E&&E.has(C)},set:function(C,R){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(!T)T=new R_;pR(T,C,R)}else if(p_){if(!E)E=p_();E.set(C,R)}}};return A}:p_});var gC=k((zH,bC)=>{var oR=dT(),rR=D_(),tR=QE(),eR=VA(),aR=uC(),T4=aR||eR||tR;bC.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new oR("Side channel does not contain "+rR(A))},delete:function(A){return!!T&&T.delete(A)},get:function(A){return T&&T.get(A)},has:function(A){return!!T&&T.has(A)},set:function(A,C){if(!T)T=T4();T.set(A,C)}};return E}});var i_=k((GH,vC)=>{var _4=String.prototype.replace,A4=/%20/g,NA={RFC1738:"RFC1738",RFC3986:"RFC3986"};vC.exports={default:NA.RFC3986,formatters:{RFC1738:function(_){return _4.call(_,A4,"+")},RFC3986:function(_){return String(_)}},RFC1738:NA.RFC1738,RFC3986:NA.RFC3986}});var cA=k((VH,yC)=>{var E4=i_(),IA=Object.prototype.hasOwnProperty,sT=Array.isArray,hT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),C4=function _(T){while(T.length>1){var E=T.pop(),A=E.obj[E.prop];if(sT(A)){var C=[];for(var R=0;R<A.length;++R)if(typeof A[R]!=="undefined")C.push(A[R]);E.obj[E.prop]=C}}},nC=function _(T,E){var A=E&&E.plainObjects?{__proto__:null}:{};for(var C=0;C<T.length;++C)if(typeof T[C]!=="undefined")A[C]=T[C];return A},R4=function _(T,E,A){if(!E)return T;if(typeof E!=="object"&&typeof E!=="function"){if(sT(T))T.push(E);else if(T&&typeof T==="object"){if(A&&(A.plainObjects||A.allowPrototypes)||!IA.call(Object.prototype,E))T[E]=!0}else return[T,E];return T}if(!T||typeof T!=="object")return[T].concat(E);var C=T;if(sT(T)&&!sT(E))C=nC(T,A);if(sT(T)&&sT(E))return E.forEach(function(R,H){if(IA.call(T,H)){var Z=T[H];if(Z&&typeof Z==="object"&&R&&typeof R==="object")T[H]=_(Z,R,A);else T.push(R)}else T[H]=R}),T;return Object.keys(E).reduce(function(R,H){var Z=E[H];if(IA.call(R,H))R[H]=_(R[H],Z,A);else R[H]=Z;return R},C)},L4=function _(T,E){return Object.keys(E).reduce(function(A,C){return A[C]=E[C],A},T)},H4=function(_,T,E){var A=_.replace(/\+/g," ");if(E==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch(C){return A}},$A=1024,W4=function _(T,E,A,C,R){if(T.length===0)return T;var H=T;if(typeof T==="symbol")H=Symbol.prototype.toString.call(T);else if(typeof T!=="string")H=String(T);if(A==="iso-8859-1")return escape(H).replace(/%u[0-9a-f]{4}/gi,function(G){return"%26%23"+parseInt(G.slice(2),16)+"%3B"});var Z="";for(var W=0;W<H.length;W+=$A){var X=H.length>=$A?H.slice(W,W+$A):H,w=[];for(var x=0;x<X.length;++x){var U=X.charCodeAt(x);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||R===E4.RFC1738&&(U===40||U===41)){w[w.length]=X.charAt(x);continue}if(U<128){w[w.length]=hT[U];continue}if(U<2048){w[w.length]=hT[192|U>>6]+hT[128|U&63];continue}if(U<55296||U>=57344){w[w.length]=hT[224|U>>12]+hT[128|U>>6&63]+hT[128|U&63];continue}x+=1,U=65536+((U&1023)<<10|X.charCodeAt(x)&1023),w[w.length]=hT[240|U>>18]+hT[128|U>>12&63]+hT[128|U>>6&63]+hT[128|U&63]}Z+=w.join("")}return Z},Y4=function _(T){var E=[{obj:{o:T},prop:"o"}],A=[];for(var C=0;C<E.length;++C){var R=E[C],H=R.obj[R.prop],Z=Object.keys(H);for(var W=0;W<Z.length;++W){var X=Z[W],w=H[X];if(typeof w==="object"&&w!==null&&A.indexOf(w)===-1)E.push({obj:H,prop:X}),A.push(w)}}return C4(E),T},Z4=function _(T){return Object.prototype.toString.call(T)==="[object RegExp]"},f4=function _(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},F4=function _(T,E){return[].concat(T,E)},Q4=function _(T,E){if(sT(T)){var A=[];for(var C=0;C<T.length;C+=1)A.push(E(T[C]));return A}return E(T)};yC.exports={arrayToObject:nC,assign:L4,combine:F4,compact:Y4,decode:H4,encode:W4,isBuffer:f4,isRegExp:Z4,maybeMap:Q4,merge:R4}});var iC=k((NH,sC)=>{var lC=gC(),o_=cA(),N_=i_(),U4=Object.prototype.hasOwnProperty,dC={brackets:function _(T){return T+"[]"},comma:"comma",indices:function _(T,E){return T+"["+E+"]"},repeat:function _(T){return T}},OT=Array.isArray,X4=Array.prototype.push,pC=function(_,T){X4.apply(_,OT(T)?T:[T])},w4=Date.prototype.toISOString,jC=N_.default,a={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o_.encode,encodeValuesOnly:!1,filter:void 0,format:jC,formatter:N_.formatters[jC],indices:!1,serializeDate:function _(T){return w4.call(T)},skipNulls:!1,strictNullHandling:!1},J4=function _(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},KA={},S4=function _(T,E,A,C,R,H,Z,W,X,w,x,U,G,q,z,K,J,h){var f=T,S=h,B=0,u=!1;while((S=S.get(KA))!==void 0&&!u){var Q=S.get(T);if(B+=1,typeof Q!=="undefined")if(Q===B)throw new RangeError("Cyclic object value");else u=!0;if(typeof S.get(KA)==="undefined")B=0}if(typeof w==="function")f=w(E,f);else if(f instanceof Date)f=G(f);else if(A==="comma"&&OT(f))f=o_.maybeMap(f,function(YT){if(YT instanceof Date)return G(YT);return YT});if(f===null){if(H)return X&&!K?X(E,a.encoder,J,"key",q):E;f=""}if(J4(f)||o_.isBuffer(f)){if(X){var O=K?E:X(E,a.encoder,J,"key",q);return[z(O)+"="+z(X(f,a.encoder,J,"value",q))]}return[z(E)+"="+z(String(f))]}var P=[];if(typeof f==="undefined")return P;var $;if(A==="comma"&&OT(f)){if(K&&X)f=o_.maybeMap(f,X);$=[{value:f.length>0?f.join(",")||null:void 0}]}else if(OT(w))$=w;else{var j=Object.keys(f);$=x?j.sort(x):j}var s=W?String(E).replace(/\./g,"%2E"):String(E),d=C&&OT(f)&&f.length===1?s+"[]":s;if(R&&OT(f)&&f.length===0)return d+"[]";for(var CT=0;CT<$.length;++CT){var AT=$[CT],RT=typeof AT==="object"&&AT&&typeof AT.value!=="undefined"?AT.value:f[AT];if(Z&&RT===null)continue;var JT=U&&W?String(AT).replace(/\./g,"%2E"):String(AT),t=OT(f)?typeof A==="function"?A(d,JT):d:d+(U?"."+JT:"["+JT+"]");h.set(T,B);var TT=lC();TT.set(KA,h),pC(P,_(RT,t,A,C,R,H,Z,W,A==="comma"&&K&&OT(f)?null:X,w,x,U,G,q,z,K,J,TT))}return P},q4=function _(T){if(!T)return a;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys!=="undefined"&&typeof T.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder!=="undefined"&&typeof T.encoder!=="function")throw new TypeError("Encoder has to be a function.");var E=T.charset||a.charset;if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=N_.default;if(typeof T.format!=="undefined"){if(!U4.call(N_.formatters,T.format))throw new TypeError("Unknown format option provided.");A=T.format}var C=N_.formatters[A],R=a.filter;if(typeof T.filter==="function"||OT(T.filter))R=T.filter;var H;if(T.arrayFormat in dC)H=T.arrayFormat;else if("indices"in T)H=T.indices?"indices":"repeat";else H=a.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Z=typeof T.allowDots==="undefined"?T.encodeDotInKeys===!0?!0:a.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:a.addQueryPrefix,allowDots:Z,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:a.allowEmptyArrays,arrayFormat:H,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:a.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter==="undefined"?a.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:a.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:a.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:a.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:a.encodeValuesOnly,filter:R,format:A,formatter:C,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:a.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:a.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:a.strictNullHandling}};sC.exports=function(_,T){var E=_,A=q4(T),C,R;if(typeof A.filter==="function")R=A.filter,E=R("",E);else if(OT(A.filter))R=A.filter,C=R;var H=[];if(typeof E!=="object"||E===null)return"";var Z=dC[A.arrayFormat],W=Z==="comma"&&A.commaRoundTrip;if(!C)C=Object.keys(E);if(A.sort)C.sort(A.sort);var X=lC();for(var w=0;w<C.length;++w){var x=C[w],U=E[x];if(A.skipNulls&&U===null)continue;pC(H,S4(U,x,Z,W,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,X))}var G=H.join(A.delimiter),q=A.addQueryPrefix===!0?"?":"";if(A.charsetSentinel)if(A.charset==="iso-8859-1")q+="utf8=%26%2310003%3B&";else q+="utf8=%E2%9C%93&";return G.length>0?q+G:""}});var eC=k((IH,tC)=>{var iT=cA(),hA=Object.prototype.hasOwnProperty,oC=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:iT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},D4=function(_){return _.replace(/&#(\d+);/g,function(T,E){return String.fromCharCode(parseInt(E,10))})},rC=function(_,T,E){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&E>=T.arrayLimit)throw new RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},B4="utf8=%26%2310003%3B",x4="utf8=%E2%9C%93",z4=function _(T,E){var A={__proto__:null},C=E.ignoreQueryPrefix?T.replace(/^\?/,""):T;C=C.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var R=E.parameterLimit===1/0?void 0:E.parameterLimit,H=C.split(E.delimiter,E.throwOnLimitExceeded?R+1:R);if(E.throwOnLimitExceeded&&H.length>R)throw new RangeError("Parameter limit exceeded. Only "+R+" parameter"+(R===1?"":"s")+" allowed.");var Z=-1,W,X=E.charset;if(E.charsetSentinel){for(W=0;W<H.length;++W)if(H[W].indexOf("utf8=")===0){if(H[W]===x4)X="utf-8";else if(H[W]===B4)X="iso-8859-1";Z=W,W=H.length}}for(W=0;W<H.length;++W){if(W===Z)continue;var w=H[W],x=w.indexOf("]="),U=x===-1?w.indexOf("="):x+1,G,q;if(U===-1)G=E.decoder(w,i.decoder,X,"key"),q=E.strictNullHandling?null:"";else G=E.decoder(w.slice(0,U),i.decoder,X,"key"),q=iT.maybeMap(rC(w.slice(U+1),E,oC(A[G])?A[G].length:0),function(K){return E.decoder(K,i.decoder,X,"value")});if(q&&E.interpretNumericEntities&&X==="iso-8859-1")q=D4(String(q));if(w.indexOf("[]=")>-1)q=oC(q)?[q]:q;var z=hA.call(A,G);if(z&&E.duplicates==="combine")A[G]=iT.combine(A[G],q);else if(!z||E.duplicates==="last")A[G]=q}return A},G4=function(_,T,E,A){var C=0;if(_.length>0&&_[_.length-1]==="[]"){var R=_.slice(0,-1).join("");C=Array.isArray(T)&&T[R]?T[R].length:0}var H=A?T:rC(T,E,C);for(var Z=_.length-1;Z>=0;--Z){var W,X=_[Z];if(X==="[]"&&E.parseArrays)W=E.allowEmptyArrays&&(H===""||E.strictNullHandling&&H===null)?[]:iT.combine([],H);else{W=E.plainObjects?{__proto__:null}:{};var w=X.charAt(0)==="["&&X.charAt(X.length-1)==="]"?X.slice(1,-1):X,x=E.decodeDotInKeys?w.replace(/%2E/g,"."):w,U=parseInt(x,10);if(!E.parseArrays&&x==="")W={0:H};else if(!isNaN(U)&&X!==x&&String(U)===x&&U>=0&&(E.parseArrays&&U<=E.arrayLimit))W=[],W[U]=H;else if(x!=="__proto__")W[x]=H}H=W}return H},V4=function _(T,E,A,C){if(!T)return;var R=A.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,H=/(\[[^[\]]*])/,Z=/(\[[^[\]]*])/g,W=A.depth>0&&H.exec(R),X=W?R.slice(0,W.index):R,w=[];if(X){if(!A.plainObjects&&hA.call(Object.prototype,X)){if(!A.allowPrototypes)return}w.push(X)}var x=0;while(A.depth>0&&(W=Z.exec(R))!==null&&x<A.depth){if(x+=1,!A.plainObjects&&hA.call(Object.prototype,W[1].slice(1,-1))){if(!A.allowPrototypes)return}w.push(W[1])}if(W){if(A.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+A.depth+" and strictDepth is true");w.push("["+R.slice(W.index)+"]")}return G4(w,E,A,C)},N4=function _(T){if(!T)return i;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys!=="undefined"&&typeof T.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder!=="undefined"&&typeof T.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded!=="undefined"&&typeof T.throwOnLimitExceeded!=="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var E=typeof T.charset==="undefined"?i.charset:T.charset,A=typeof T.duplicates==="undefined"?i.duplicates:T.duplicates;if(A!=="combine"&&A!=="first"&&A!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var C=typeof T.allowDots==="undefined"?T.decodeDotInKeys===!0?!0:i.allowDots:!!T.allowDots;return{allowDots:C,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:i.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:i.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:i.arrayLimit,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:i.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:i.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:i.decoder,delimiter:typeof T.delimiter==="string"||iT.isRegExp(T.delimiter)?T.delimiter:i.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:i.depth,duplicates:A,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:i.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:i.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:i.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};tC.exports=function(_,T){var E=N4(T);if(_===""||_===null||typeof _==="undefined")return E.plainObjects?{__proto__:null}:{};var A=typeof _==="string"?z4(_,E):_,C=E.plainObjects?{__proto__:null}:{},R=Object.keys(A);for(var H=0;H<R.length;++H){var Z=R[H],W=V4(Z,A[Z],E,typeof _==="string");C=iT.merge(C,W,E)}if(E.allowSparse===!0)return C;return iT.compact(C)}});var T0=k(($H,aC)=>{var I4=iC(),$4=eC(),c4=i_();aC.exports={formats:c4,parse:$4,stringify:I4}});var UW=h_(O_(),1);var jA={};x0(jA,{zodSchemaKey:()=>P_,webSocketServerArgsKey:()=>GT,webSocketMessageArgsKey:()=>Z_,webSocketKey:()=>zT,webSocketEventKey:()=>jT,webSocketEventArgumentsKey:()=>ZT,webSocketConnectionArgsKey:()=>VT,webSocketCloseReasonArgsKey:()=>F_,webSocketCloseCodeArgsKey:()=>f_,routeModelArgsKey:()=>XT,responseStatusTextArgsKey:()=>AA,responseStatusArgsKey:()=>X_,responseHeadersArgsKey:()=>HT,responseBodyArgsKey:()=>U_,requestHeadersArgsKey:()=>NT,requestHeaderArgsKey:()=>QT,requestBodyArgsKey:()=>IT,requestArgsKey:()=>UT,queryArgsKey:()=>Q_,paramsArgsKey:()=>eT,paramArgsKey:()=>$T,moduleKey:()=>xT,middlewareKey:()=>BT,injectableKey:()=>MT,injectKey:()=>tT,httpServerArgsKey:()=>FT,guardKey:()=>PT,dispatcherKey:()=>yT,controllerKey:()=>DT,controllerHttpKey:()=>rT,contextArgsKey:()=>cT,containerKey:()=>fT,configKey:()=>m_,argumentsKey:()=>y});var y=Symbol("__bool:arguments__"),ZT=Symbol("__bool:webSocketEventArguments__"),m_=Symbol("__bool:config__"),DT=Symbol("__bool:controller__"),yT=Symbol("__bool:dispatcher__"),PT=Symbol("__bool:guard__"),rT=Symbol("__bool:controller.http__"),tT=Symbol("__bool:inject__"),MT=Symbol("__bool:injectable__"),BT=Symbol("__bool:middleware__"),xT=Symbol("__bool:module__"),fT=Symbol("__bool:container__"),P_=Symbol("__bool:zodSchema__"),zT=Symbol("__bool:webSocket__"),jT=Symbol("__bool:webSocket:event__"),GT=Symbol("__bool:webSocketArguments:server__"),VT=Symbol("__bool:webSocketArguments:connection__"),Z_=Symbol("__bool:webSocketArguments:message__"),f_=Symbol("__bool:webSocketArguments:closeCode__"),F_=Symbol("__bool:webSocketArguments:closeReason__"),FT=Symbol("__bool:httpArguments:server__"),NT=Symbol("__bool:httpArguments:requestHeaders__"),QT=Symbol("__bool:httpArguments:requestHeader__"),IT=Symbol("__bool:httpArguments:requestBody__"),eT=Symbol("__bool:httpArguments:params__"),$T=Symbol("__bool:httpArguments:param__"),Q_=Symbol("__bool:httpArguments:query__"),UT=Symbol("__bool:httpArguments:request__"),HT=Symbol("__bool:httpArguments:responseHeaders__"),cT=Symbol("__bool:httpArguments:context__"),XT=Symbol("__bool:httpArguments:routeModel__"),U_=Symbol("__bool:httpArguments:responseBody__"),X_=Symbol("__bool:httpArguments:responseStatus__"),AA=Symbol("__bool:httpArguments:responseStatusText__");var G0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:NT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},V0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:QT,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},N0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:IT,zodSchema:_,parser:T},Reflect.defineMetadata(y,R,E.constructor,A)},I0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:eT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},$0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:$T,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},c0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:Q_,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},K0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:UT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},h0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:HT},Reflect.defineMetadata(y,A,_.constructor,T)},O0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:cT,key:_},Reflect.defineMetadata(y,C,T.constructor,E)},m0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:XT},Reflect.defineMetadata(y,A,_.constructor,T)},P0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:FT},Reflect.defineMetadata(y,A,_.constructor,T)};var M0=(_)=>(T)=>{let{modules:E,middlewares:A,guards:C,dependencies:R}=_||{};if(Reflect.hasOwnMetadata(xT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(E){for(let H=0;H<E.length;H++)if(!Reflect.getOwnMetadataKeys(E[H]).includes(xT))throw Error(`${E[H].name} is not a module.`)}if(A){for(let H=0;H<A.length;H++)if(!Reflect.getOwnMetadataKeys(A[H]).includes(BT))throw Error(`${A[H].name} is not a middleware.`)}if(A){for(let H=0;H<A.length;H++)if(!Reflect.getOwnMetadataKeys(A[H]).includes(BT))throw Error(`${A[H].name} is not a middleware.`)}if(C){for(let H=0;H<C.length;H++)if(!Reflect.getOwnMetadataKeys(C[H]).includes(PT))throw Error(`${C[H].name} is not a guard.`)}if(R){for(let H=0;H<R.length;H++)if(!Reflect.getOwnMetadataKeys(R[H]).includes(MT))throw Error(`${R[H].name} is not an injectable.`)}Reflect.defineMetadata(fT,_,T)};var k0=(_)=>(T)=>{let E={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(rT,T)||[]]};Reflect.defineMetadata(DT,E,T)};var u0=()=>(_)=>{Reflect.defineMetadata(yT,void 0,_)};var b0=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;Reflect.defineMetadata(PT,T,_)};var aT=(_,T)=>(E,A,C)=>{if(!(C?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let R=Reflect.getOwnMetadata(y,E.constructor,A)||{},H=[...Reflect.getOwnMetadata(rT,E.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:A,descriptor:C,argumentsMetadata:R}];Reflect.defineMetadata(rT,H,E.constructor)},g0=(_="/")=>aT(_,"Get"),v0=(_="/")=>aT(_,"Post"),n0=(_="/")=>aT(_,"Put"),y0=(_="/")=>aT(_,"Patch"),j0=(_="/")=>aT(_,"Delete"),l0=(_="/")=>aT(_,"Options");var d0=(_)=>{return(T,E,A)=>{let C=Reflect.getMetadata(tT,T)||[];C[A]=_,Reflect.defineMetadata(tT,C,T)}};var p0=()=>(_)=>Reflect.defineMetadata(MT,void 0,_);var s0=()=>(_)=>{Reflect.defineMetadata(BT,void 0,_)};var i0=(_)=>(T)=>{if(Reflect.hasOwnMetadata(fT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:E,guards:A,dispatchers:C,controllers:R,dependencies:H,webSockets:Z}=_||{};if(E){for(let W=0;W<E.length;W++)if(!Reflect.getOwnMetadataKeys(E[W]).includes(BT))throw Error(`${E[W].name} is not a middleware.`)}if(A){for(let W=0;W<A.length;W++)if(!Reflect.getOwnMetadataKeys(A[W]).includes(PT))throw Error(`${A[W].name} is not a guard.`)}if(C){for(let W=0;W<C.length;W++)if(!Reflect.getOwnMetadataKeys(C[W]).includes(yT))throw Error(`${C[W].name} is not a dispatcher.`)}if(R){for(let W=0;W<R.length;W++)if(!Reflect.getOwnMetadataKeys(R[W]).includes(DT))throw Error(`${R[W].name} is not a controller.`)}if(H){for(let W=0;W<H.length;W++)if(!Reflect.getOwnMetadataKeys(H[W]).includes(MT))throw Error(`${H[W].name} is not an injectable.`)}if(Z){for(let W=0;W<Z.length;W++)if(!Reflect.getOwnMetadataKeys(Z[W]).includes(zT))throw Error(`${Z[W].name} is not a websocket gateway.`)}Reflect.defineMetadata(xT,_,T)};var M_=Symbol("__bool:webSocket.upgrade__"),o0=(_,T,E)=>{let A=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:A.pathname,query:E}})},r0=(_)=>(T)=>{let{prefix:E}=_||{};T.prototype[M_]=o0;let A=Object.getOwnPropertyDescriptor(T.prototype,M_),C=!A?[]:[{path:"/",httpMethod:"GET",methodName:M_,descriptor:A,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:M_,descriptor:A,argumentsMetadata:{}}],R={prefix:!E?.startsWith("/")?`/${E||""}`:E,events:Reflect.getOwnMetadata(jT,T)||{},http:C};Reflect.defineMetadata(zT,R,T)};var t0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:VT},Reflect.defineMetadata(ZT,A,_.constructor,T)},e0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:GT},Reflect.defineMetadata(ZT,A,_.constructor,T)},a0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:f_},Reflect.defineMetadata(ZT,A,_.constructor,T)},T1=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:F_},Reflect.defineMetadata(ZT,A,_.constructor,T)};var _1=(_)=>(T,E,A)=>{if(!(A.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let C=Reflect.getOwnMetadata(ZT,T.constructor,E),R=Object.freeze({methodName:E,descriptor:A,arguments:C}),H={...Reflect.getOwnMetadata(jT,T.constructor)||void 0,[_]:R};Reflect.defineMetadata(jT,R,T.constructor,E),Reflect.defineMetadata(jT,H,T.constructor)};var A1=(_)=>{return(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(P_,T.constructor,E)||{};C[`paramterIndexes.${A}`]={index:A,schema:_},Reflect.defineMetadata(P_,C,T.constructor,E)}};var E1=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class lT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?E1[_]:E.trim(),this.data=T}}var C1=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class w_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?C1[_]:E.trim(),this.data=T}}var lA=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof lT||_ instanceof w_)return new Response(JSON.stringify(_),{status:_.httpCode,statusText:_.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof _){case"object":return!(_ instanceof Error)?_:{message:_.message,code:_.name,cause:_.cause};case"string":return{message:_};case"number":return{code:_};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};var AW=h_(O_(),1),L0=h_(T0(),1);var wT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(wT||(wT={}));var _0=(_,T,E=wT.day)=>{let A=_ instanceof Date?_:new Date(_);switch(E){case wT.year:A.setFullYear(A.getFullYear()+T);break;case wT.month:A.setMonth(A.getMonth()+T);break;case wT.day:A.setDate(A.getDate()+T);break;case wT.hours:A.setHours(A.getHours()+T);break;case wT.minutes:A.setMinutes(A.getMinutes()+T);break;case wT.seconds:A.setSeconds(A.getSeconds()+T);break;case wT.miliseconds:A.setMilliseconds(A.getMilliseconds()+T);break}return A};class mT{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(_){this.alias=this._thinAlias(_)}test(_,T){try{let E=this._map.get(T),A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(!E)return;if(A.length!==C.length)return;let R=Object(),H=this.alias.replace(new RegExp(mT.rootPattern,"g"),mT.innerRootPattern);if(!new RegExp(H).test(this._thinAlias(_)))return;for(let Z=0;Z<A.length;Z++){let W=A[Z],X=C[Z];if(!new RegExp(mT.rootPattern,"g").test(W)){if(W!==X)return}else{let w=!1;if(W.replace(new RegExp(mT.rootPattern,"g"),(x,U,G)=>{if(G===0)X.replace(new RegExp(mT.innerRootPattern,"g"),(q,z,K)=>{if(K===0)Object.assign(R,{[U]:q});return q});return x}),w)return}continue}return Object.freeze({parameters:R,model:E})}catch(E){return console.error(E),!1}}isMatch(_,T){try{if(!this._map.get(T))return;let A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(A.length!==C.length)return!1;let R=Object();for(let H=0;H<A.length;H++){let Z=A[H],W=C[H];if(!new RegExp(mT.rootPattern,"g").test(Z)){if(Z!==W)return!1}else{let X=!1;if(Z.replace(new RegExp(mT.rootPattern,"g"),(w,x,U)=>{if(!new RegExp(U,"g").test(W))X=!0;else Object.assign(R,{[x]:W});return""}),X)return!1}continue}return!0}catch(E){console.error(E);return}}get(_){if(!this._map.get("GET"))this._map.set("GET",_);return this}post(_){if(!this._map.get("POST"))this._map.set("POST",_);return this}put(_){if(!this._map.get("PUT"))this._map.set("PUT",_);return this}delete(_){if(!this._map.get("DELETE"))this._map.set("DELETE",_);return this}connect(_){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",_);return this}options(_){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",_);return this}trace(_){if(!this._map.get("TRACE"))return this._map.set("TRACE",_);return this}patch(_){if(!this._map.get("PATCH"))return this._map.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,H)=>`${R}(.*?)`)}return E}).join("/")}get _filteredPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,H)=>"(.*?)")}return E.replace(C,(R,H,Z)=>Z)}).join("/")}}var A0=mT;class I_{alias;_routes=new Map;constructor(_){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),E=this._routes.get(T),A=!E?new A0(`${this.alias}/${_}`):E;if(!E)this._routes.set(T,A);return A}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class $_{_routers=new Map;add(..._){for(let T=0;T<_.length;T++){if(this._routers.has(_[T].alias))continue;this._routers.set(_[T].alias,_[T])}return this}find(_,T){for(let E of[...this._routers.values()])for(let A of E.routes.values()){let C=A.test(_,T);if(!C)continue;return C}return}}class r_{eventName;metadata;_context=void 0;constructor({eventName:_,metadata:T}){this.eventName=_,this.metadata=T}bind(_){return this._context=_,this}execute(){return Object.freeze({methodName:this.metadata.methodName,descriptor:!this._context||typeof this.metadata.descriptor.value!=="function"?this.metadata.descriptor:this.metadata.descriptor.value.bind(this._context),arguments:this.metadata.arguments})}}class c_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=c_.thinAlias(_)}addRoutes(..._){for(let T of _)if(!this.routes.includes(T))this.routes.push(T);return this}bind(_){for(let T of this.routes)T.bind(_);return this}execute(){let _=new Map;for(let T of this.routes)_.set(`${this.alias}:::${T.eventName}`,T.execute());return _}static thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class L_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=L_.thinPrefix(_)}addRouters(..._){for(let T=0;T<_.length;T++)if(!this.routers.includes(_[T]))this.routers.push(_[T]);for(let T of _)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let _=new Map;for(let T of this.routers){let E=T.execute();for(let[A,C]of E.entries())_.set(`/${L_.thinPrefix(`${this.prefix}/${A}`)}`,C)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}var lH=async function(){}.constructor;var E0=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),C0=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),uT=(_,T={})=>{let{color:E,backgroundColor:A,bold:C,underline:R}=T,H="";if(C)H+="\x1B[1m";if(R)H+="\x1B[4m";if(E&&E0[E])H+=`\x1B[${E0[E]}m`;if(A&&C0[A])H+=`\x1B[${C0[A]}m`;return`${H}${_}\x1B[0m`};var R0=(_)=>{let{headers:T,method:E}=_,A=T.get("upgrade")?.toLowerCase()||"",C=T.get("connection")?.toLowerCase()||"";return E==="GET"&&A?.toLowerCase()==="websocket"&&C?.toLowerCase().includes("upgrade")};class K_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,E){let A=E||this._options;if(!A?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!A.isPassthrough)throw Error(`${String(_)} already exists in context static collection.`);return this}setOptions(_){return this._options=_,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}var aH=h_(O_(),1);class H_{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([E,A])=>{this._mapper.set(E,A)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![MT,DT,BT,PT,yT,zT].some((R)=>T.includes(R)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let A=(Reflect.getOwnMetadata(tT,_)||[]).map((R)=>this.get(R)),C=new _(...A);return this._mapper.set(_,C),C}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}var K4=900,WT=(_)=>{return _.headers.set("X-Powered-By","Bool Typescript"),_},h4=({status:_,statusText:T,headers:E,data:A})=>{let C=E.get("Content-Type")||"text/plain";if(C.includes("application/json"))return WT(new Response(A instanceof ReadableStream?A:JSON.stringify(A),{status:_,statusText:T,headers:E}));if(C.includes("text/plain")||C.includes("text/html"))return WT(new Response(A instanceof ReadableStream?A:String(A),{status:_,statusText:T,headers:E}));if(C.includes("application/octet-stream")){if(A instanceof Uint8Array||A instanceof ArrayBuffer||A instanceof Blob||A instanceof ReadableStream)return WT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("Invalid data type for application/octet-stream")}if(C.includes("multipart/form-data")){if(A instanceof FormData)return WT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("multipart/form-data requires FormData object")}return WT(new Response(String(A),{status:_,statusText:T,headers:E}))},O4=({controllerConstructor:_,httpRouterGroup:T,injector:E,prefix:A})=>{if(!Reflect.getOwnMetadataKeys(_).includes(DT))throw Error(`${_.name} is not a controller.`);let C=E.get(_);if(!C)throw Error("Can not initialize controller.");let R=Reflect.getOwnMetadata(DT,_)||{prefix:"/",httpMetadata:[]},H=new I_(`/${A||""}/${R.prefix}`);return R.httpMetadata.forEach((Z)=>{if(typeof Z.descriptor.value!=="function")return;let W=H.route(Z.path),X=Z.descriptor.value.bind(C),w=Object.freeze({class:_,funcName:Z.methodName,func:X,argumentsMetadata:Z.argumentsMetadata});switch(Z.httpMethod){case"GET":return W.get(w);case"POST":return W.post(w);case"PUT":return W.put(w);case"PATCH":return W.patch(w);case"DELETE":return W.delete(w);case"OPTIONS":return W.options(w)}}),T.add(H)},m4=({injector:_,httpRouterGroup:T,prefix:E,webSocketRouterGroup:A,webSocketConstructor:C})=>{if(!Reflect.getOwnMetadataKeys(C).includes(zT))throw Error(`${C.name} is not a websocket route.`);let R=_.get(C);if(!R)throw Error("Can not initialize webSocket.");let H=Reflect.getOwnMetadata(zT,C)||{prefix:"/",events:[],http:[]},Z=`/${E||""}/${H.prefix}`,W=new I_(Z);for(let[w,x]of Object.entries(H.http)){if(typeof x.descriptor?.value!=="function")continue;let U=W.route(x.path),G=x.descriptor.value.bind(R),q=Object.freeze({class:C,funcName:x.methodName,func:G,argumentsMetadata:x.argumentsMetadata});switch(x.httpMethod){case"GET":U.get(q);break;case"POST":U.post(q);break}}T.add(W);let X=new c_(Z);for(let[w,x]of Object.entries(H.events)){let U=new r_({eventName:w,metadata:x});X.addRoutes(U)}return X.bind(R),A.addRouters(X),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:A})},n=async(_,T,E,A)=>{try{let C=await T.safeParseAsync(_);if(!C.success)throw new lT({httpCode:400,message:`Validation at the [${A.toString()}] method fails at positional argument [${E}].`,data:C.error.issues});return C.data}catch(C){if(C instanceof lT)throw C;throw new w_({httpCode:500,message:`Validation at the [${A.toString()}] method error at positional argument [${E}].`,data:!(C instanceof Error)?C:[{message:C.message,code:C.name,cause:C.cause}]})}},P4=async({containerClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(fT))throw Error(`${_.name} is not a container.`);let A=new H_(E),C=Reflect.getOwnMetadata(fT,_),{loaders:R,middlewares:H,guards:Z,dependencies:W,config:X}=C||{},{config:w}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof X!=="function"?typeof X!=="object"?void 0:("key"in X)&&("value"in X)&&typeof X.key==="symbol"?typeof X.value!=="function"?X.value:await X.value():X:await X()}});if(A.set(X&&"key"in X&&"value"in X&&typeof X.key==="symbol"?X.key:m_,w),R){let q=[];for(let[K,J]of Object.entries(R))q.push(async()=>{try{let h=await J({config:w});return console.info(`${uT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${K}] initialized successfully.`),h}catch(h){throw console.error(`${uT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${K}] initialization failed.`),T.debug&&console.error(h),h}});let z=await Promise.all(q.map((K)=>K()));for(let K=0;K<z.length;K++){let[J,h]=z[K];A.set(J,h)}}!W||W.map((q)=>A.get(q));let x=[],U=[];!H||H.forEach((q)=>{let z=A.get(q);if(z.start&&typeof z.start==="function"){let K=Reflect.getOwnMetadata(y,q,"start")||{};x.push(Object.freeze({class:q,funcName:"start",func:z.start.bind(z),argumentsMetadata:K}))}if(z.end&&typeof z.end==="function"){let K=Reflect.getOwnMetadata(y,q,"end")||{};U.push(Object.freeze({class:q,funcName:"end",func:z.end.bind(z),argumentsMetadata:K}))}});let G=!Z?[]:Z.map((q)=>{let z=A.get(q),K=Reflect.getOwnMetadata(y,q,"enforce")||{};return Object.freeze({class:q,funcName:"enforce",func:z.enforce.bind(z),argumentsMetadata:K})});return Object.freeze({injector:A,startMiddlewareGroup:x,endMiddlewareGroup:U,guardGroup:G})},M4=async({moduleClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(xT))throw Error(`${_.name} is not a module.`);let A=new H_(E),C=Reflect.getOwnMetadata(xT,_),{loaders:R,middlewares:H,guards:Z,dispatchers:W,controllers:X,dependencies:w,webSockets:x,prefix:U,config:G}=C||{},q=`${T.prefix||""}/${U||""}`,{config:z}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof G!=="function"?typeof G!=="object"?void 0:("key"in G)&&("value"in G)&&typeof G.key==="symbol"?typeof G.value!=="function"?G.value:await G.value():G:await G()}});if(A.set(G&&"key"in G&&"value"in G&&typeof G.key==="symbol"?G.key:m_,z),R){let O=[];for(let[$,j]of Object.entries(R))O.push(async()=>{try{let s=await j({config:z});return console.info(`${uT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${$}] initialized successfully.`),s}catch(s){throw console.error(`${uT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${$}] initialization failed.`),T.debug&&console.error(s),s}});let P=await Promise.all(O.map(($)=>$()));for(let $=0;$<P.length;$++){let[j,s]=P[$];A.set(j,s)}}!w||w.map((O)=>A.get(O));let K=[],J=[];!H||H.forEach((O)=>{let P=A.get(O);if(P.start&&typeof P.start==="function"){let $=Reflect.getOwnMetadata(y,O,"start")||{};K.push(Object.freeze({class:O,funcName:"start",func:P.start.bind(P),argumentsMetadata:$}))}if(P.end&&typeof P.end==="function"){let $=Reflect.getOwnMetadata(y,O,"end")||{};J.push(Object.freeze({class:O,funcName:"end",func:P.end.bind(P),argumentsMetadata:$}))}});let h=!Z?[]:Z.map((O)=>{let P=A.get(O),$=Reflect.getOwnMetadata(y,O,"enforce")||{};return Object.freeze({class:O,funcName:"enforce",func:P.enforce.bind(P),argumentsMetadata:$})}),f=[],S=[];!W||W.forEach((O)=>{let P=A.get(O);if(P.open&&typeof P.open==="function"){let $=Reflect.getOwnMetadata(y,O,"open")||{};f.push(Object.freeze({class:O,funcName:"open",func:P.open.bind(P),argumentsMetadata:$}))}if(P.close&&typeof P.close==="function"){let $=Reflect.getOwnMetadata(y,O,"close")||{};S.push(Object.freeze({class:O,funcName:"close",func:P.close.bind(P),argumentsMetadata:$}))}});let B=new $_;!X||X.forEach((O)=>O4({controllerConstructor:O,httpRouterGroup:B,injector:A,prefix:q}));let u=new $_,Q=new L_;return x&&x.forEach((O)=>m4({webSocketConstructor:O,httpRouterGroup:u,webSocketRouterGroup:Q,injector:A,prefix:q})),Object.freeze({prefix:U||"",injector:A,startMiddlewareGroup:K,endMiddlewareGroup:J,guardGroup:h,openDispatcherGroup:f,closeDispatcherGroup:S,controllerRouterGroup:B,webSocketHttpRouterGroup:u,webSocketRouterGroup:Q})},k4=async(_,T)=>{let{request:E,server:A}=_,{query:C,responseHeaders:R,route:{model:H}}=T,Z=await H.func(...[A,E,C]);if(typeof Z!=="boolean")return WT(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));if(!Z)return WT(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));return Z},OA=async({context:_,route:T,options:E,resolutedMap:A})=>{let C={isStatic:!0},R=(!_?new K_:new K_(_)).setOptions(C);if(T)R.set(eT,T.parameters).set(XT,T.model);let H=R.get(FT,C)||void 0,Z=R.get(UT,C)||void 0,W=R.get(QT,C)||void 0,X=R.get(HT,C)||void 0,w=R.get(eT,C)||void 0,x=R.get(XT,C)||void 0;if(A){let{startMiddlewareGroup:U,guardGroup:G}=A;if(U)for(let q=0;q<U.length;q++){let z=[],{func:K,funcName:J,argumentsMetadata:h}=U[q];for(let[f,S]of Object.entries(h))switch(S.type){case cT:z[S.index]=!S.key?R:R.get(S.key,C);break;case UT:z[S.index]=!S.zodSchema?Z:await n(Z,S.zodSchema,S.index,J);break;case IT:z[S.index]=!S.zodSchema?await Z?.[S.parser||"json"]():await n(await Z?.[S.parser||"json"](),S.zodSchema,S.index,J);break;case NT:z[S.index]=!S.zodSchema?W:await n(W?.toJSON(),S.zodSchema,S.index,J);break;case QT:z[S.index]=!S.zodSchema?W?.get(S.key)||void 0:await n(W?.get(S.key)||void 0,S.zodSchema,S.index,J);break;case $T:z[S.index]=!S.zodSchema?w?.[S.key]||void 0:await n(w?.[S.key]||void 0,S.zodSchema,S.index,J);break;case XT:z[S.index]=x;break;case HT:z[S.index]=X;break;case FT:z[S.index]=H;break;default:z[S.index]=!S.zodSchema?!R.has(S.type,C)?void 0:R.get(S.type,C):await n(!(S.type in R)?void 0:R.get(S.type,C),S.zodSchema,S.index,J);break}await K(...z)}if(G)for(let q=0;q<G.length;q++){let z=[],{func:K,funcName:J,argumentsMetadata:h}=G[q];for(let[S,B]of Object.entries(h))switch(B.type){case UT:z[B.index]=!B.zodSchema?Z:await n(Z,B.zodSchema,B.index,J);break;case IT:z[B.index]=!B.zodSchema?await Z?.[B.parser||"json"]():await n(await Z?.[B.parser||"json"](),B.zodSchema,B.index,J);break;case cT:z[B.index]=!B.key?R:R.get(B.key);break;case NT:z[B.index]=!B.zodSchema?W:await n(W?.toJSON(),B.zodSchema,B.index,J);break;case HT:z[B.index]=X;break;case QT:z[B.index]=!B.zodSchema?W?.get(B.key)||void 0:await n(W?.get(B.key)||void 0,B.zodSchema,B.index,J);break;case $T:z[B.index]=!B.zodSchema?w?.[B.key]||void 0:await n(w?.[B.key],B.zodSchema,B.index,J);break;case XT:z[B.index]=x;break;case FT:z[B.index]=H;break;default:z[B.index]=!B.zodSchema?!R.has(B.type)?void 0:R.get(B.type):await n(R.get(B.type),B.zodSchema,B.index,J);break}let f=await K(...z);if(typeof f!=="boolean"||!f)throw new lT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(x&&!E?.isContainer){if(A&&"openDispatcherGroup"in A&&A.openDispatcherGroup){let{openDispatcherGroup:K}=A;for(let J=0;J<K.length;J++){let h=[],{func:f,funcName:S,argumentsMetadata:B}=K[J];for(let[u,Q]of Object.entries(B))switch(Q.type){case UT:h[Q.index]=!Q.zodSchema?Z:await n(Z,Q.zodSchema,Q.index,S);break;case IT:h[Q.index]=!Q.zodSchema?await Z?.[Q.parser||"json"]():await n(await Z?.[Q.parser||"json"](),Q.zodSchema,Q.index,S);break;case cT:h[Q.index]=!Q.key?R:R.get(Q.key);break;case NT:h[Q.index]=!Q.zodSchema?W:await n(W?.toJSON(),Q.zodSchema,Q.index,S);break;case QT:h[Q.index]=!Q.zodSchema?W?.get(Q.key)||void 0:await n(W?.get(Q.key)||void 0,Q.zodSchema,Q.index,S);break;case HT:h[Q.index]=X;break;case $T:h[Q.index]=!Q.zodSchema?w?.[Q.key]||void 0:await n(w?.[Q.key]||void 0,Q.zodSchema,Q.index,S);break;case XT:h[Q.index]=x;break;case FT:h[Q.index]=H;break;default:h[Q.index]=!Q.zodSchema?!R.has(Q.type)?void 0:R.get(Q.type):await n(R.get(Q.type),Q.zodSchema,Q.index,S);break}await f(...h)}}let U=[],{func:G,funcName:q,argumentsMetadata:z}=x;for(let[K,J]of Object.entries(z))switch(J.type){case UT:U[J.index]=!J.zodSchema?Z:await n(Z,J.zodSchema,J.index,q);break;case IT:U[J.index]=!J.zodSchema?await Z?.[J.parser||"json"]():await n(await Z?.[J.parser||"json"](),J.zodSchema,J.index,q);break;case cT:U[J.index]=!J.key?R:R.get(J.key);break;case NT:U[J.index]=!J.zodSchema?W:await n(W?.toJSON(),J.zodSchema,J.index,q);break;case QT:U[J.index]=!J.zodSchema?W?.get(J.key)||void 0:await n(W?.get(J.key)||void 0,J.zodSchema,J.index,q);break;case HT:U[J.index]=X;break;case $T:U[J.index]=!J.zodSchema?w?.[J.key]||void 0:await n(w?.[J.key]||void 0,J.zodSchema,J.index,q);break;case XT:U[J.index]=x;break;case FT:U[J.index]=H;break;default:U[J.index]=!J.zodSchema?!R.has(J.type)?void 0:R.get(J.type):await n(R.get(J.type),J.zodSchema,J.index,q);break}if(R.set(U_,await G(...U),{isStatic:!1}),A&&"closeDispatcherGroup"in A&&A.closeDispatcherGroup){let{closeDispatcherGroup:K}=A;for(let J=0;J<K.length;J++){let h=[],{func:f,funcName:S,argumentsMetadata:B}=K[J];for(let[u,Q]of Object.entries(B))switch(Q.type){case UT:h[Q.index]=!Q.zodSchema?Z:await n(Z,Q.zodSchema,Q.index,S);break;case IT:h[Q.index]=!Q.zodSchema?await Z?.[Q.parser||"json"]():await n(await Z?.[Q.parser||"json"](),Q.zodSchema,Q.index,S);break;case cT:h[Q.index]=!Q.key?R:R.get(Q.key);break;case NT:h[Q.index]=!Q.zodSchema?W:await n(W?.toJSON(),Q.zodSchema,Q.index,S);break;case HT:h[Q.index]=R.get(Q.type);break;case QT:h[Q.index]=!Q.zodSchema?W?.get(Q.key)||void 0:await n(W?.get(Q.key)||void 0,Q.zodSchema,Q.index,S);break;case $T:h[Q.index]=!Q.zodSchema?w?.[Q.key]||void 0:await n(w?.[Q.key]||void 0,Q.zodSchema,Q.index,S);break;case XT:h[Q.index]=x;break;case FT:h[Q.index]=H;break;default:h[Q.index]=!Q.zodSchema?!R.has(Q.type)?void 0:R.get(Q.type):await n(R.get(Q.type),Q.zodSchema,Q.index,S);break}await f(...h)}}}if(A){let{endMiddlewareGroup:U}=A;if(U)for(let G=0;G<U.length;G++){let q=[],{func:z,funcName:K,argumentsMetadata:J}=U[G];for(let[h,f]of Object.entries(J))switch(f.type){case UT:q[f.index]=!f.zodSchema?Z:await n(Z,f.zodSchema,f.index,K);break;case IT:q[f.index]=!f.zodSchema?await Z?.[f.parser||"json"]():await n(await Z?.[f.parser||"json"](),f.zodSchema,f.index,K);break;case cT:q[f.index]=!f.key?R:R.get(f.key);break;case NT:q[f.index]=!f.zodSchema?W:await n(W?.toJSON(),f.zodSchema,f.index,K);break;case HT:q[f.index]=R.get(f.type);break;case QT:q[f.index]=!f.zodSchema?W?.get(f.key)||void 0:await n(W?.get(f.key)||void 0,f.zodSchema,f.index,K);break;case $T:q[f.index]=!f.zodSchema?w?.[f.key]||void 0:await n(w?.[f.key]||void 0,f.zodSchema,f.index,K);break;case XT:q[f.index]=x;break;case FT:q[f.index]=H;break;default:q[f.index]=!f.zodSchema?!R.has(f.type)?void 0:R.get(f.type):await n(!(f.type in R)?void 0:R.get(f.type),f.zodSchema,f.index,K);break}await z(...q)}}return Object.freeze({context:R})},u4=async(_,T)=>{try{let E=new Map,{allowLogsMethods:A,staticOption:C,allowOrigins:R,allowMethods:H,allowCredentials:Z,allowHeaders:W}=Object.freeze({allowLogsMethods:T?.log?.methods,staticOption:T.static,allowOrigins:!T.cors?.origins?["*"]:typeof T.cors.origins!=="string"?T.cors.origins.includes("*")||T.cors.origins.length<1?["*"]:T.cors.origins:[T.cors.origins!=="*"?T.cors.origins:"*"],allowMethods:T.cors?.methods||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!T.cors?.credentials?!1:!0,allowHeaders:!T.cors?.headers||T.cors.headers.includes("*")?["*"]:T.cors.headers}),X=Reflect.getOwnMetadataKeys(_);if(!X.includes(fT)&&!X.includes(xT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);let w=new H_,x=!X.includes(fT)?void 0:Reflect.getOwnMetadata(fT,_),U=!X.includes(fT)?[_]:x?.modules||[],G=!x?void 0:await P4({containerClass:_,options:T,extendInjector:w}),z=(await Promise.all(U.map((f)=>M4({moduleClass:f,options:T,extendInjector:!G?w:G.injector})))).filter((f)=>typeof f!=="undefined");if([...new Set(z.map((f)=>f.prefix))].length!==z.length)throw Error("Module prefix should be unique.");let J=new Map;for(let f of z){let S=f.webSocketRouterGroup.execute();for(let[B,u]of S.entries())J.set(B,u)}let h=Bun.serve({port:T.port,fetch:async(f,S)=>{let B=performance.now(),u=new URL(f.url),Q=L0.default.parse(u.searchParams.toString(),T.queryParser),O=f.headers.get("origin")||"*",P=f.method.toUpperCase(),$=new Headers,j=new K_().setOptions({isStatic:!0}).set(FT,S).set(UT,f).set(QT,f.headers).set(HT,$).set(Q_,Q);try{let s=R0(f),d;if(s){for(let TT of z){let YT=TT.webSocketHttpRouterGroup.find(u.pathname,f.method);if(YT){d=Object.freeze({route:YT,resolution:TT});break}}if(!d)return WT(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:$}));let t=await k4({request:f,server:S},{query:Q,responseHeaders:$,route:d.route,moduleResolution:d.resolution});return t instanceof Response?t:void 0}if([...!Z?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:R.includes("*")?"*":!R.includes(O)?R[0]:O},{key:"Access-Control-Allow-Methods",value:H.join(", ")},{key:"Access-Control-Allow-Headers",value:W.join(", ")}].forEach(({key:t,value:TT})=>$.set(t,TT)),!H.includes(P))return WT(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:$}));if(f.method.toUpperCase()==="OPTIONS")return WT(R.includes("*")||R.includes(O)?new Response(void 0,{status:204,statusText:"No Content.",headers:$}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:$}));if(C){let{path:t,headers:TT,cacheTimeInSeconds:YT}=C,bT=`${t}/${u.pathname}`,M=E.get(bT);if(!M){let LT=Bun.file(bT);if(await LT.exists()){if(TT)for(let[p,W_]of Object.entries(TT))$.set(p,W_);return $.set("Content-Type",LT.type),WT(new Response(await LT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}else{let LT=new Date>M.expiredAt;if(LT)E.delete(bT);let nT=!LT?M.file:Bun.file(bT);if(await nT.exists()){if(E.set(bT,Object.freeze({expiredAt:_0(new Date,typeof YT!=="number"?K4:YT,wT.seconds),file:nT})),TT)for(let[W_,t_]of Object.entries(TT))$.set(W_,t_);return $.set("Content-Type",nT.type),WT(new Response(await nT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}}if(G){let{context:t}=await OA({context:j,resolutedMap:{injector:G.injector,startMiddlewareGroup:G.startMiddlewareGroup,guardGroup:G.guardGroup},options:{isContainer:!0}});j=t}for(let t of z){let TT=t.controllerRouterGroup.find(u.pathname,P);if(TT){d=Object.freeze({route:TT,resolution:t});break}}if(!d)j.setOptions({isStatic:!1}).set(X_,404).set(AA,"Not found.").set(U_,JSON.stringify({httpCode:404,message:"Route not found",data:void 0}));else{let{context:t}=await OA({context:j,route:d.route,resolutedMap:d.resolution});j=t}if(G){let{context:t}=await OA({context:j,resolutedMap:{injector:G.injector,endMiddlewareGroup:G.endMiddlewareGroup},options:{isContainer:!0}});j=t}let CT=j.get(HT,{isStatic:!0})||new Headers,AT=j.get(U_,{isStatic:!1})||void 0,RT=j.get(X_,{isStatic:!1}),JT=j.get(X_,{isStatic:!1});return h4({status:typeof RT!=="number"?void 0:RT,statusText:typeof JT!=="string"?void 0:JT,headers:CT,data:AT})}catch(s){return T.debug&&console.error(s),WT(lA(s,$))}finally{if(A){let s=performance.now(),d=uT(u.pathname,{color:"blue"}),CT=`${Bun.color("yellow","ansi")}${process.pid}`,AT=uT(f.method,{color:"yellow",backgroundColor:"blue"}),RT=uT(`${f.headers.get("x-forwarded-for")||f.headers.get("x-real-ip")||S.requestIP(f)?.address||"<Unknown>"}`,{color:"yellow"}),JT=uT(`${Math.round((s-B+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});A.includes(f.method.toUpperCase())&&console.info(`PID: ${CT} - Method: ${AT} - IP: ${RT} - ${d} - Time: ${JT}`)}}},websocket:{open:(f)=>{let S=`${f.data.pathname}:::open`,B=J.get(S);if(!B)return;let u=B.arguments||{},Q=[];for(let[O,P]of Object.entries(u))switch(P.type){case VT:Q[P.index]=f;break;case GT:Q[P.index]=h;break}B.descriptor.value(...Q)},close:(f,S,B)=>{let u=`${f.data.pathname}:::close`,Q=J.get(u);if(!Q)return;let O=Q.arguments||{},P=[];for(let[$,j]of Object.entries(O))switch(j.type){case VT:P[j.index]=f;break;case GT:P[j.index]=h;break;case f_:P[j.index]=S;break;case F_:P[j.index]=B;break}Q.descriptor.value(...P)},message:(f,S)=>{let B=`${f.data.pathname}:::message`,u=J.get(B);if(!u)return;let Q=u.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case Z_:O[$.index]=S;break;case GT:O[$.index]=h;break}u.descriptor.value(...O)},drain:(f)=>{let S=`${f.data.pathname}:::drain`,B=J.get(S);if(!B)return;let u=B.arguments||{},Q=[];for(let[O,P]of Object.entries(u))switch(P.type){case VT:Q[P.index]=f;break;case GT:Q[P.index]=h;break}B.descriptor.value(...Q)},ping:(f,S)=>{let B=`${f.data.pathname}:::ping`,u=J.get(B);if(!u)return;let Q=u.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case GT:O[$.index]=h;break;case Z_:O[$.index]=S;break}u.descriptor.value(...O)},pong:(f,S)=>{let B=`${f.data.pathname}:::pong`,u=J.get(B);if(!u)return;let Q=u.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case GT:O[$.index]=h;break;case Z_:O[$.index]=S;break}u.descriptor.value(...O)}}})}catch(E){throw T.debug&&console.error(E),E}};export{lA as jsonErrorInfer,C1 as httpServerErrors,E1 as httpClientErrors,A1 as ZodSchema,e0 as WebSocketServer,_1 as WebSocketEvent,t0 as WebSocketConnection,T1 as WebSocketCloseReason,a0 as WebSocketCloseCode,r0 as WebSocket,m0 as RouteModel,h0 as ResponseHeaders,G0 as RequestHeaders,V0 as RequestHeader,N0 as RequestBody,K0 as Request,c0 as Query,n0 as Put,v0 as Post,y0 as Patch,I0 as Params,$0 as Param,l0 as Options,i0 as Module,s0 as Middleware,jA as Keys,H_ as Injector,p0 as Injectable,d0 as Inject,w_ as HttpServerError,P0 as HttpServer,lT as HttpClientError,b0 as Guard,g0 as Get,u0 as Dispatcher,j0 as Delete,k0 as Controller,O0 as Context,M0 as Container,u4 as BoolFactory};
|
|
17
|
+
`+T.prev}function k_(_,T){var E=ZA(_),A=[];if(E){A.length=_.length;for(var C=0;C<_.length;C++)A[C]=kT(_,C)?T(_[C],_):""}var R=typeof RA==="function"?RA(_):[],H;if(T_){H={};for(var Z=0;Z<R.length;Z++)H["$"+R[Z]]=R[Z]}for(var W in _){if(!kT(_,W))continue;if(E&&String(Number(W))===W&&W<_.length)continue;if(T_&&H["$"+W]instanceof Symbol)continue;else if(RE.call(/[^\w$]/,W))A.push(T(W,_)+": "+T(_[W],_));else A.push(W+": "+T(_[W],_))}if(typeof RA==="function"){for(var X=0;X<R.length;X++)if(LE.call(_,R[X]))A.push("["+T(R[X])+"]: "+T(_[R[X]],_))}return A}});var UE=k((vL,QE)=>{var m1=B_(),P1=dT(),g_=function(_,T,E){var A=_,C;for(;(C=A.next)!=null;A=C)if(C.key===T){if(A.next=C.next,!E)C.next=_.next,_.next=C;return C}},M1=function(_,T){if(!_)return;var E=g_(_,T);return E&&E.value},k1=function(_,T,E){var A=g_(_,T);if(A)A.value=E;else _.next={key:T,next:_.next,value:E}},b1=function(_,T){if(!_)return!1;return!!g_(_,T)},u1=function(_,T){if(_)return g_(_,T,!0)};QE.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new P1("Side channel does not contain "+m1(A))},delete:function(A){var C=T&&T.next,R=u1(T,A);if(R&&C&&C===R)T=void 0;return!!R},get:function(A){return M1(T,A)},has:function(A){return b1(T,A)},set:function(A,C){if(!T)T={next:void 0};k1(T,A,C)}};return E}});var XA=k((nL,XE)=>{XE.exports=Object});var JE=k((yL,wE)=>{wE.exports=Error});var qE=k((jL,SE)=>{SE.exports=EvalError});var DE=k((lL,BE)=>{BE.exports=RangeError});var zE=k((dL,xE)=>{xE.exports=ReferenceError});var VE=k((pL,GE)=>{GE.exports=SyntaxError});var IE=k((sL,NE)=>{NE.exports=URIError});var cE=k((iL,$E)=>{$E.exports=Math.abs});var hE=k((oL,KE)=>{KE.exports=Math.floor});var mE=k((rL,OE)=>{OE.exports=Math.max});var ME=k((tL,PE)=>{PE.exports=Math.min});var bE=k((eL,kE)=>{kE.exports=Math.pow});var gE=k((aL,uE)=>{uE.exports=Math.round});var nE=k((TH,vE)=>{vE.exports=Number.isNaN||function _(T){return T!==T}});var jE=k((_H,yE)=>{var g1=nE();yE.exports=function _(T){if(g1(T)||T===0)return T;return T<0?-1:1}});var dE=k((AH,lE)=>{lE.exports=Object.getOwnPropertyDescriptor});var wA=k((EH,pE)=>{var v_=dE();if(v_)try{v_([],"length")}catch(_){v_=null}pE.exports=v_});var iE=k((CH,sE)=>{var n_=Object.defineProperty||!1;if(n_)try{n_({},"a",{value:1})}catch(_){n_=!1}sE.exports=n_});var rE=k((RH,oE)=>{oE.exports=function _(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},E=Symbol("test"),A=Object(E);if(typeof E==="string")return!1;if(Object.prototype.toString.call(E)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;var C=42;T[E]=C;for(var R in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var H=Object.getOwnPropertySymbols(T);if(H.length!==1||H[0]!==E)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,E))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Z=Object.getOwnPropertyDescriptor(T,E);if(Z.value!==C||Z.enumerable!==!0)return!1}return!0}});var aE=k((LH,eE)=>{var tE=typeof Symbol!=="undefined"&&Symbol,v1=rE();eE.exports=function _(){if(typeof tE!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof tE("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return v1()}});var JA=k((HH,TC)=>{TC.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null});var SA=k((WH,_C)=>{var n1=XA();_C.exports=n1.getPrototypeOf||null});var CC=k((YH,EC)=>{var y1="Function.prototype.bind called on incompatible ",j1=Object.prototype.toString,l1=Math.max,d1="[object Function]",AC=function _(T,E){var A=[];for(var C=0;C<T.length;C+=1)A[C]=T[C];for(var R=0;R<E.length;R+=1)A[R+T.length]=E[R];return A},p1=function _(T,E){var A=[];for(var C=E||0,R=0;C<T.length;C+=1,R+=1)A[R]=T[C];return A},s1=function(_,T){var E="";for(var A=0;A<_.length;A+=1)if(E+=_[A],A+1<_.length)E+=T;return E};EC.exports=function _(T){var E=this;if(typeof E!=="function"||j1.apply(E)!==d1)throw new TypeError(y1+E);var A=p1(arguments,1),C,R=function(){if(this instanceof C){var w=E.apply(this,AC(A,arguments));if(Object(w)===w)return w;return this}return E.apply(T,AC(A,arguments))},H=l1(0,E.length-A.length),Z=[];for(var W=0;W<H;W++)Z[W]="$"+W;if(C=Function("binder","return function ("+s1(Z,",")+"){ return binder.apply(this,arguments); }")(R),E.prototype){var X=function w(){};X.prototype=E.prototype,C.prototype=new X,X.prototype=null}return C}});var D_=k((ZH,RC)=>{var i1=CC();RC.exports=Function.prototype.bind||i1});var y_=k((fH,LC)=>{LC.exports=Function.prototype.call});var qA=k((FH,HC)=>{HC.exports=Function.prototype.apply});var YC=k((QH,WC)=>{WC.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply});var fC=k((UH,ZC)=>{var o1=D_(),r1=qA(),t1=y_(),e1=YC();ZC.exports=e1||o1.call(t1,r1)});var BA=k((XH,FC)=>{var a1=D_(),TR=dT(),_R=y_(),AR=fC();FC.exports=function _(T){if(T.length<1||typeof T[0]!=="function")throw new TR("a function is required");return AR(a1,_R,T)}});var SC=k((wH,JC)=>{var ER=BA(),QC=wA(),XC;try{XC=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var DA=!!XC&&QC&&QC(Object.prototype,"__proto__"),wC=Object,UC=wC.getPrototypeOf;JC.exports=DA&&typeof DA.get==="function"?ER([DA.get]):typeof UC==="function"?function _(T){return UC(T==null?T:wC(T))}:!1});var zC=k((JH,xC)=>{var qC=JA(),BC=SA(),DC=SC();xC.exports=qC?function _(T){return qC(T)}:BC?function _(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw new TypeError("getProto: not an object");return BC(T)}:DC?function _(T){return DC(T)}:null});var VC=k((SH,GC)=>{var CR=Function.prototype.call,RR=Object.prototype.hasOwnProperty,LR=D_();GC.exports=LR.call(CR,RR)});var d_=k((qH,KC)=>{var v,HR=XA(),WR=JE(),YR=qE(),ZR=DE(),fR=zE(),C_=VE(),E_=dT(),FR=IE(),QR=cE(),UR=hE(),XR=mE(),wR=ME(),JR=bE(),SR=gE(),qR=jE(),$C=Function,xA=function(_){try{return $C('"use strict"; return ('+_+").constructor;")()}catch(T){}},x_=wA(),BR=iE(),zA=function(){throw new E_},DR=x_?function(){try{return arguments.callee,zA}catch(_){try{return x_(arguments,"callee").get}catch(T){return zA}}}():zA,__=aE()(),_T=zC(),xR=SA(),zR=JA(),cC=qA(),z_=y_(),A_={},GR=typeof Uint8Array==="undefined"||!_T?v:_T(Uint8Array),pT={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?v:ArrayBuffer,"%ArrayIteratorPrototype%":__&&_T?_T([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":A_,"%AsyncGenerator%":A_,"%AsyncGeneratorFunction%":A_,"%AsyncIteratorPrototype%":A_,"%Atomics%":typeof Atomics==="undefined"?v:Atomics,"%BigInt%":typeof BigInt==="undefined"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":WR,"%eval%":eval,"%EvalError%":YR,"%Float32Array%":typeof Float32Array==="undefined"?v:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?v:FinalizationRegistry,"%Function%":$C,"%GeneratorFunction%":A_,"%Int8Array%":typeof Int8Array==="undefined"?v:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?v:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":__&&_T?_T(_T([][Symbol.iterator]())):v,"%JSON%":typeof JSON==="object"?JSON:v,"%Map%":typeof Map==="undefined"?v:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!__||!_T?v:_T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":HR,"%Object.getOwnPropertyDescriptor%":x_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?v:Promise,"%Proxy%":typeof Proxy==="undefined"?v:Proxy,"%RangeError%":ZR,"%ReferenceError%":fR,"%Reflect%":typeof Reflect==="undefined"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?v:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!__||!_T?v:_T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":__&&_T?_T(""[Symbol.iterator]()):v,"%Symbol%":__?Symbol:v,"%SyntaxError%":C_,"%ThrowTypeError%":DR,"%TypedArray%":GR,"%TypeError%":E_,"%Uint8Array%":typeof Uint8Array==="undefined"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?v:Uint32Array,"%URIError%":FR,"%WeakMap%":typeof WeakMap==="undefined"?v:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?v:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?v:WeakSet,"%Function.prototype.call%":z_,"%Function.prototype.apply%":cC,"%Object.defineProperty%":BR,"%Object.getPrototypeOf%":xR,"%Math.abs%":QR,"%Math.floor%":UR,"%Math.max%":XR,"%Math.min%":wR,"%Math.pow%":JR,"%Math.round%":SR,"%Math.sign%":qR,"%Reflect.getPrototypeOf%":zR};if(_T)try{null.error}catch(_){GA=_T(_T(_)),pT["%Error.prototype%"]=GA}var GA,VR=function _(T){var E;if(T==="%AsyncFunction%")E=xA("async function () {}");else if(T==="%GeneratorFunction%")E=xA("function* () {}");else if(T==="%AsyncGeneratorFunction%")E=xA("async function* () {}");else if(T==="%AsyncGenerator%"){var A=_("%AsyncGeneratorFunction%");if(A)E=A.prototype}else if(T==="%AsyncIteratorPrototype%"){var C=_("%AsyncGenerator%");if(C&&_T)E=_T(C.prototype)}return pT[T]=E,E},NC={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G_=D_(),j_=VC(),NR=G_.call(z_,Array.prototype.concat),IR=G_.call(cC,Array.prototype.splice),IC=G_.call(z_,String.prototype.replace),l_=G_.call(z_,String.prototype.slice),$R=G_.call(z_,RegExp.prototype.exec),cR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,KR=/\\(\\)?/g,hR=function _(T){var E=l_(T,0,1),A=l_(T,-1);if(E==="%"&&A!=="%")throw new C_("invalid intrinsic syntax, expected closing `%`");else if(A==="%"&&E!=="%")throw new C_("invalid intrinsic syntax, expected opening `%`");var C=[];return IC(T,cR,function(R,H,Z,W){C[C.length]=Z?IC(W,KR,"$1"):H||R}),C},OR=function _(T,E){var A=T,C;if(j_(NC,A))C=NC[A],A="%"+C[0]+"%";if(j_(pT,A)){var R=pT[A];if(R===A_)R=VR(A);if(typeof R==="undefined"&&!E)throw new E_("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:C,name:A,value:R}}throw new C_("intrinsic "+T+" does not exist!")};KC.exports=function _(T,E){if(typeof T!=="string"||T.length===0)throw new E_("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!=="boolean")throw new E_('"allowMissing" argument must be a boolean');if($R(/^%?[^%]*%?$/,T)===null)throw new C_("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var A=hR(T),C=A.length>0?A[0]:"",R=OR("%"+C+"%",E),H=R.name,Z=R.value,W=!1,X=R.alias;if(X)C=X[0],IR(A,NR([0,1],X));for(var w=1,x=!0;w<A.length;w+=1){var U=A[w],G=l_(U,0,1),q=l_(U,-1);if((G==='"'||G==="'"||G==="`"||(q==='"'||q==="'"||q==="`"))&&G!==q)throw new C_("property names with quotes must have matching quotes");if(U==="constructor"||!x)W=!0;if(C+="."+U,H="%"+C+"%",j_(pT,H))Z=pT[H];else if(Z!=null){if(!(U in Z)){if(!E)throw new E_("base intrinsic for "+T+" exists, but the property is not available.");return}if(x_&&w+1>=A.length){var z=x_(Z,U);if(x=!!z,x&&"get"in z&&!("originalValue"in z.get))Z=z.get;else Z=Z[U]}else x=j_(Z,U),Z=Z[U];if(x&&!W)pT[H]=Z}}return Z}});var VA=k((BH,mC)=>{var hC=d_(),OC=BA(),mR=OC([hC("%String.prototype.indexOf%")]);mC.exports=function _(T,E){var A=hC(T,!!E);if(typeof A==="function"&&mR(T,".prototype.")>-1)return OC([A]);return A}});var NA=k((DH,MC)=>{var PR=d_(),V_=VA(),MR=B_(),kR=dT(),PC=PR("%Map%",!0),bR=V_("Map.prototype.get",!0),uR=V_("Map.prototype.set",!0),gR=V_("Map.prototype.has",!0),vR=V_("Map.prototype.delete",!0),nR=V_("Map.prototype.size",!0);MC.exports=!!PC&&function _(){var T,E={assert:function(A){if(!E.has(A))throw new kR("Side channel does not contain "+MR(A))},delete:function(A){if(T){var C=vR(T,A);if(nR(T)===0)T=void 0;return C}return!1},get:function(A){if(T)return bR(T,A)},has:function(A){if(T)return gR(T,A);return!1},set:function(A,C){if(!T)T=new PC;uR(T,A,C)}};return E}});var bC=k((xH,kC)=>{var yR=d_(),s_=VA(),jR=B_(),p_=NA(),lR=dT(),R_=yR("%WeakMap%",!0),dR=s_("WeakMap.prototype.get",!0),pR=s_("WeakMap.prototype.set",!0),sR=s_("WeakMap.prototype.has",!0),iR=s_("WeakMap.prototype.delete",!0);kC.exports=R_?function _(){var T,E,A={assert:function(C){if(!A.has(C))throw new lR("Side channel does not contain "+jR(C))},delete:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return iR(T,C)}else if(p_){if(E)return E.delete(C)}return!1},get:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return dR(T,C)}return E&&E.get(C)},has:function(C){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return sR(T,C)}return!!E&&E.has(C)},set:function(C,R){if(R_&&C&&(typeof C==="object"||typeof C==="function")){if(!T)T=new R_;pR(T,C,R)}else if(p_){if(!E)E=p_();E.set(C,R)}}};return A}:p_});var gC=k((zH,uC)=>{var oR=dT(),rR=B_(),tR=UE(),eR=NA(),aR=bC(),T4=aR||eR||tR;uC.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new oR("Side channel does not contain "+rR(A))},delete:function(A){return!!T&&T.delete(A)},get:function(A){return T&&T.get(A)},has:function(A){return!!T&&T.has(A)},set:function(A,C){if(!T)T=T4();T.set(A,C)}};return E}});var i_=k((GH,vC)=>{var _4=String.prototype.replace,A4=/%20/g,IA={RFC1738:"RFC1738",RFC3986:"RFC3986"};vC.exports={default:IA.RFC3986,formatters:{RFC1738:function(_){return _4.call(_,A4,"+")},RFC3986:function(_){return String(_)}},RFC1738:IA.RFC1738,RFC3986:IA.RFC3986}});var KA=k((VH,yC)=>{var E4=i_(),$A=Object.prototype.hasOwnProperty,sT=Array.isArray,hT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),C4=function _(T){while(T.length>1){var E=T.pop(),A=E.obj[E.prop];if(sT(A)){var C=[];for(var R=0;R<A.length;++R)if(typeof A[R]!=="undefined")C.push(A[R]);E.obj[E.prop]=C}}},nC=function _(T,E){var A=E&&E.plainObjects?{__proto__:null}:{};for(var C=0;C<T.length;++C)if(typeof T[C]!=="undefined")A[C]=T[C];return A},R4=function _(T,E,A){if(!E)return T;if(typeof E!=="object"&&typeof E!=="function"){if(sT(T))T.push(E);else if(T&&typeof T==="object"){if(A&&(A.plainObjects||A.allowPrototypes)||!$A.call(Object.prototype,E))T[E]=!0}else return[T,E];return T}if(!T||typeof T!=="object")return[T].concat(E);var C=T;if(sT(T)&&!sT(E))C=nC(T,A);if(sT(T)&&sT(E))return E.forEach(function(R,H){if($A.call(T,H)){var Z=T[H];if(Z&&typeof Z==="object"&&R&&typeof R==="object")T[H]=_(Z,R,A);else T.push(R)}else T[H]=R}),T;return Object.keys(E).reduce(function(R,H){var Z=E[H];if($A.call(R,H))R[H]=_(R[H],Z,A);else R[H]=Z;return R},C)},L4=function _(T,E){return Object.keys(E).reduce(function(A,C){return A[C]=E[C],A},T)},H4=function(_,T,E){var A=_.replace(/\+/g," ");if(E==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch(C){return A}},cA=1024,W4=function _(T,E,A,C,R){if(T.length===0)return T;var H=T;if(typeof T==="symbol")H=Symbol.prototype.toString.call(T);else if(typeof T!=="string")H=String(T);if(A==="iso-8859-1")return escape(H).replace(/%u[0-9a-f]{4}/gi,function(G){return"%26%23"+parseInt(G.slice(2),16)+"%3B"});var Z="";for(var W=0;W<H.length;W+=cA){var X=H.length>=cA?H.slice(W,W+cA):H,w=[];for(var x=0;x<X.length;++x){var U=X.charCodeAt(x);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||R===E4.RFC1738&&(U===40||U===41)){w[w.length]=X.charAt(x);continue}if(U<128){w[w.length]=hT[U];continue}if(U<2048){w[w.length]=hT[192|U>>6]+hT[128|U&63];continue}if(U<55296||U>=57344){w[w.length]=hT[224|U>>12]+hT[128|U>>6&63]+hT[128|U&63];continue}x+=1,U=65536+((U&1023)<<10|X.charCodeAt(x)&1023),w[w.length]=hT[240|U>>18]+hT[128|U>>12&63]+hT[128|U>>6&63]+hT[128|U&63]}Z+=w.join("")}return Z},Y4=function _(T){var E=[{obj:{o:T},prop:"o"}],A=[];for(var C=0;C<E.length;++C){var R=E[C],H=R.obj[R.prop],Z=Object.keys(H);for(var W=0;W<Z.length;++W){var X=Z[W],w=H[X];if(typeof w==="object"&&w!==null&&A.indexOf(w)===-1)E.push({obj:H,prop:X}),A.push(w)}}return C4(E),T},Z4=function _(T){return Object.prototype.toString.call(T)==="[object RegExp]"},f4=function _(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},F4=function _(T,E){return[].concat(T,E)},Q4=function _(T,E){if(sT(T)){var A=[];for(var C=0;C<T.length;C+=1)A.push(E(T[C]));return A}return E(T)};yC.exports={arrayToObject:nC,assign:L4,combine:F4,compact:Y4,decode:H4,encode:W4,isBuffer:f4,isRegExp:Z4,maybeMap:Q4,merge:R4}});var iC=k((NH,sC)=>{var lC=gC(),o_=KA(),N_=i_(),U4=Object.prototype.hasOwnProperty,dC={brackets:function _(T){return T+"[]"},comma:"comma",indices:function _(T,E){return T+"["+E+"]"},repeat:function _(T){return T}},OT=Array.isArray,X4=Array.prototype.push,pC=function(_,T){X4.apply(_,OT(T)?T:[T])},w4=Date.prototype.toISOString,jC=N_.default,a={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o_.encode,encodeValuesOnly:!1,filter:void 0,format:jC,formatter:N_.formatters[jC],indices:!1,serializeDate:function _(T){return w4.call(T)},skipNulls:!1,strictNullHandling:!1},J4=function _(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},hA={},S4=function _(T,E,A,C,R,H,Z,W,X,w,x,U,G,q,z,K,J,h){var f=T,S=h,D=0,b=!1;while((S=S.get(hA))!==void 0&&!b){var Q=S.get(T);if(D+=1,typeof Q!=="undefined")if(Q===D)throw new RangeError("Cyclic object value");else b=!0;if(typeof S.get(hA)==="undefined")D=0}if(typeof w==="function")f=w(E,f);else if(f instanceof Date)f=G(f);else if(A==="comma"&&OT(f))f=o_.maybeMap(f,function(YT){if(YT instanceof Date)return G(YT);return YT});if(f===null){if(H)return X&&!K?X(E,a.encoder,J,"key",q):E;f=""}if(J4(f)||o_.isBuffer(f)){if(X){var O=K?E:X(E,a.encoder,J,"key",q);return[z(O)+"="+z(X(f,a.encoder,J,"value",q))]}return[z(E)+"="+z(String(f))]}var P=[];if(typeof f==="undefined")return P;var $;if(A==="comma"&&OT(f)){if(K&&X)f=o_.maybeMap(f,X);$=[{value:f.length>0?f.join(",")||null:void 0}]}else if(OT(w))$=w;else{var j=Object.keys(f);$=x?j.sort(x):j}var s=W?String(E).replace(/\./g,"%2E"):String(E),d=C&&OT(f)&&f.length===1?s+"[]":s;if(R&&OT(f)&&f.length===0)return d+"[]";for(var CT=0;CT<$.length;++CT){var AT=$[CT],RT=typeof AT==="object"&&AT&&typeof AT.value!=="undefined"?AT.value:f[AT];if(Z&&RT===null)continue;var JT=U&&W?String(AT).replace(/\./g,"%2E"):String(AT),t=OT(f)?typeof A==="function"?A(d,JT):d:d+(U?"."+JT:"["+JT+"]");h.set(T,D);var TT=lC();TT.set(hA,h),pC(P,_(RT,t,A,C,R,H,Z,W,A==="comma"&&K&&OT(f)?null:X,w,x,U,G,q,z,K,J,TT))}return P},q4=function _(T){if(!T)return a;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys!=="undefined"&&typeof T.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder!=="undefined"&&typeof T.encoder!=="function")throw new TypeError("Encoder has to be a function.");var E=T.charset||a.charset;if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=N_.default;if(typeof T.format!=="undefined"){if(!U4.call(N_.formatters,T.format))throw new TypeError("Unknown format option provided.");A=T.format}var C=N_.formatters[A],R=a.filter;if(typeof T.filter==="function"||OT(T.filter))R=T.filter;var H;if(T.arrayFormat in dC)H=T.arrayFormat;else if("indices"in T)H=T.indices?"indices":"repeat";else H=a.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Z=typeof T.allowDots==="undefined"?T.encodeDotInKeys===!0?!0:a.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:a.addQueryPrefix,allowDots:Z,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:a.allowEmptyArrays,arrayFormat:H,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:a.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter==="undefined"?a.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:a.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:a.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:a.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:a.encodeValuesOnly,filter:R,format:A,formatter:C,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:a.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:a.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:a.strictNullHandling}};sC.exports=function(_,T){var E=_,A=q4(T),C,R;if(typeof A.filter==="function")R=A.filter,E=R("",E);else if(OT(A.filter))R=A.filter,C=R;var H=[];if(typeof E!=="object"||E===null)return"";var Z=dC[A.arrayFormat],W=Z==="comma"&&A.commaRoundTrip;if(!C)C=Object.keys(E);if(A.sort)C.sort(A.sort);var X=lC();for(var w=0;w<C.length;++w){var x=C[w],U=E[x];if(A.skipNulls&&U===null)continue;pC(H,S4(U,x,Z,W,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,X))}var G=H.join(A.delimiter),q=A.addQueryPrefix===!0?"?":"";if(A.charsetSentinel)if(A.charset==="iso-8859-1")q+="utf8=%26%2310003%3B&";else q+="utf8=%E2%9C%93&";return G.length>0?q+G:""}});var eC=k((IH,tC)=>{var iT=KA(),OA=Object.prototype.hasOwnProperty,oC=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:iT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},B4=function(_){return _.replace(/&#(\d+);/g,function(T,E){return String.fromCharCode(parseInt(E,10))})},rC=function(_,T,E){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&E>=T.arrayLimit)throw new RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},D4="utf8=%26%2310003%3B",x4="utf8=%E2%9C%93",z4=function _(T,E){var A={__proto__:null},C=E.ignoreQueryPrefix?T.replace(/^\?/,""):T;C=C.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var R=E.parameterLimit===1/0?void 0:E.parameterLimit,H=C.split(E.delimiter,E.throwOnLimitExceeded?R+1:R);if(E.throwOnLimitExceeded&&H.length>R)throw new RangeError("Parameter limit exceeded. Only "+R+" parameter"+(R===1?"":"s")+" allowed.");var Z=-1,W,X=E.charset;if(E.charsetSentinel){for(W=0;W<H.length;++W)if(H[W].indexOf("utf8=")===0){if(H[W]===x4)X="utf-8";else if(H[W]===D4)X="iso-8859-1";Z=W,W=H.length}}for(W=0;W<H.length;++W){if(W===Z)continue;var w=H[W],x=w.indexOf("]="),U=x===-1?w.indexOf("="):x+1,G,q;if(U===-1)G=E.decoder(w,i.decoder,X,"key"),q=E.strictNullHandling?null:"";else G=E.decoder(w.slice(0,U),i.decoder,X,"key"),q=iT.maybeMap(rC(w.slice(U+1),E,oC(A[G])?A[G].length:0),function(K){return E.decoder(K,i.decoder,X,"value")});if(q&&E.interpretNumericEntities&&X==="iso-8859-1")q=B4(String(q));if(w.indexOf("[]=")>-1)q=oC(q)?[q]:q;var z=OA.call(A,G);if(z&&E.duplicates==="combine")A[G]=iT.combine(A[G],q);else if(!z||E.duplicates==="last")A[G]=q}return A},G4=function(_,T,E,A){var C=0;if(_.length>0&&_[_.length-1]==="[]"){var R=_.slice(0,-1).join("");C=Array.isArray(T)&&T[R]?T[R].length:0}var H=A?T:rC(T,E,C);for(var Z=_.length-1;Z>=0;--Z){var W,X=_[Z];if(X==="[]"&&E.parseArrays)W=E.allowEmptyArrays&&(H===""||E.strictNullHandling&&H===null)?[]:iT.combine([],H);else{W=E.plainObjects?{__proto__:null}:{};var w=X.charAt(0)==="["&&X.charAt(X.length-1)==="]"?X.slice(1,-1):X,x=E.decodeDotInKeys?w.replace(/%2E/g,"."):w,U=parseInt(x,10);if(!E.parseArrays&&x==="")W={0:H};else if(!isNaN(U)&&X!==x&&String(U)===x&&U>=0&&(E.parseArrays&&U<=E.arrayLimit))W=[],W[U]=H;else if(x!=="__proto__")W[x]=H}H=W}return H},V4=function _(T,E,A,C){if(!T)return;var R=A.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,H=/(\[[^[\]]*])/,Z=/(\[[^[\]]*])/g,W=A.depth>0&&H.exec(R),X=W?R.slice(0,W.index):R,w=[];if(X){if(!A.plainObjects&&OA.call(Object.prototype,X)){if(!A.allowPrototypes)return}w.push(X)}var x=0;while(A.depth>0&&(W=Z.exec(R))!==null&&x<A.depth){if(x+=1,!A.plainObjects&&OA.call(Object.prototype,W[1].slice(1,-1))){if(!A.allowPrototypes)return}w.push(W[1])}if(W){if(A.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+A.depth+" and strictDepth is true");w.push("["+R.slice(W.index)+"]")}return G4(w,E,A,C)},N4=function _(T){if(!T)return i;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys!=="undefined"&&typeof T.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder!=="undefined"&&typeof T.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded!=="undefined"&&typeof T.throwOnLimitExceeded!=="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var E=typeof T.charset==="undefined"?i.charset:T.charset,A=typeof T.duplicates==="undefined"?i.duplicates:T.duplicates;if(A!=="combine"&&A!=="first"&&A!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var C=typeof T.allowDots==="undefined"?T.decodeDotInKeys===!0?!0:i.allowDots:!!T.allowDots;return{allowDots:C,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:i.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:i.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:i.arrayLimit,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:i.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:i.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:i.decoder,delimiter:typeof T.delimiter==="string"||iT.isRegExp(T.delimiter)?T.delimiter:i.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:i.depth,duplicates:A,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:i.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:i.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:i.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};tC.exports=function(_,T){var E=N4(T);if(_===""||_===null||typeof _==="undefined")return E.plainObjects?{__proto__:null}:{};var A=typeof _==="string"?z4(_,E):_,C=E.plainObjects?{__proto__:null}:{},R=Object.keys(A);for(var H=0;H<R.length;++H){var Z=R[H],W=V4(Z,A[Z],E,typeof _==="string");C=iT.merge(C,W,E)}if(E.allowSparse===!0)return C;return iT.compact(C)}});var T0=k(($H,aC)=>{var I4=iC(),$4=eC(),c4=i_();aC.exports={formats:c4,parse:$4,stringify:I4}});var UW=h_(O_(),1);var lA={};x0(lA,{zodSchemaKey:()=>P_,webSocketServerArgsKey:()=>GT,webSocketMessageArgsKey:()=>Z_,webSocketKey:()=>zT,webSocketEventKey:()=>jT,webSocketEventArgumentsKey:()=>ZT,webSocketConnectionArgsKey:()=>VT,webSocketCloseReasonArgsKey:()=>F_,webSocketCloseCodeArgsKey:()=>f_,routeModelArgsKey:()=>XT,responseStatusTextArgsKey:()=>AA,responseStatusArgsKey:()=>X_,responseHeadersArgsKey:()=>HT,responseBodyArgsKey:()=>U_,requestHeadersArgsKey:()=>NT,requestHeaderArgsKey:()=>QT,requestBodyArgsKey:()=>IT,requestArgsKey:()=>UT,queryArgsKey:()=>Q_,paramsArgsKey:()=>eT,paramArgsKey:()=>$T,moduleKey:()=>xT,middlewareKey:()=>DT,interceptorKey:()=>yT,injectableKey:()=>MT,injectKey:()=>tT,httpServerArgsKey:()=>FT,guardKey:()=>PT,controllerKey:()=>BT,controllerHttpKey:()=>rT,contextArgsKey:()=>cT,containerKey:()=>fT,configKey:()=>m_,argumentsKey:()=>y});var y=Symbol("__bool:arguments__"),ZT=Symbol("__bool:webSocketEventArguments__"),m_=Symbol("__bool:config__"),BT=Symbol("__bool:controller__"),yT=Symbol("__bool:interceptor__"),PT=Symbol("__bool:guard__"),rT=Symbol("__bool:controller.http__"),tT=Symbol("__bool:inject__"),MT=Symbol("__bool:injectable__"),DT=Symbol("__bool:middleware__"),xT=Symbol("__bool:module__"),fT=Symbol("__bool:container__"),P_=Symbol("__bool:zodSchema__"),zT=Symbol("__bool:webSocket__"),jT=Symbol("__bool:webSocket:event__"),GT=Symbol("__bool:webSocketArguments:server__"),VT=Symbol("__bool:webSocketArguments:connection__"),Z_=Symbol("__bool:webSocketArguments:message__"),f_=Symbol("__bool:webSocketArguments:closeCode__"),F_=Symbol("__bool:webSocketArguments:closeReason__"),FT=Symbol("__bool:httpArguments:server__"),NT=Symbol("__bool:httpArguments:requestHeaders__"),QT=Symbol("__bool:httpArguments:requestHeader__"),IT=Symbol("__bool:httpArguments:requestBody__"),eT=Symbol("__bool:httpArguments:params__"),$T=Symbol("__bool:httpArguments:param__"),Q_=Symbol("__bool:httpArguments:query__"),UT=Symbol("__bool:httpArguments:request__"),HT=Symbol("__bool:httpArguments:responseHeaders__"),cT=Symbol("__bool:httpArguments:context__"),XT=Symbol("__bool:httpArguments:routeModel__"),U_=Symbol("__bool:httpArguments:responseBody__"),X_=Symbol("__bool:httpArguments:responseStatus__"),AA=Symbol("__bool:httpArguments:responseStatusText__");var G0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:NT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},V0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:QT,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},N0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:IT,zodSchema:_,parser:T},Reflect.defineMetadata(y,R,E.constructor,A)},I0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:eT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},$0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:$T,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},c0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:Q_,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},K0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:UT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},h0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:HT},Reflect.defineMetadata(y,A,_.constructor,T)},O0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:cT,key:_},Reflect.defineMetadata(y,C,T.constructor,E)},m0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:XT},Reflect.defineMetadata(y,A,_.constructor,T)},P0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:FT},Reflect.defineMetadata(y,A,_.constructor,T)};var M0=(_)=>(T)=>{let{modules:E,middlewares:A,guards:C,dependencies:R}=_||{};if(Reflect.hasOwnMetadata(xT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(E){for(let H=0;H<E.length;H++)if(!Reflect.getOwnMetadataKeys(E[H]).includes(xT))throw Error(`${E[H].name} is not a module.`)}if(A){for(let H=0;H<A.length;H++)if(!Reflect.getOwnMetadataKeys(A[H]).includes(DT))throw Error(`${A[H].name} is not a middleware.`)}if(A){for(let H=0;H<A.length;H++)if(!Reflect.getOwnMetadataKeys(A[H]).includes(DT))throw Error(`${A[H].name} is not a middleware.`)}if(C){for(let H=0;H<C.length;H++)if(!Reflect.getOwnMetadataKeys(C[H]).includes(PT))throw Error(`${C[H].name} is not a guard.`)}if(R){for(let H=0;H<R.length;H++)if(!Reflect.getOwnMetadataKeys(R[H]).includes(MT))throw Error(`${R[H].name} is not an injectable.`)}Reflect.defineMetadata(fT,_,T)};var k0=(_)=>(T)=>{let E={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(rT,T)||[]]};Reflect.defineMetadata(BT,E,T)};var b0=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;Reflect.defineMetadata(PT,T,_)};var aT=(_,T)=>(E,A,C)=>{if(!(C?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let R=Reflect.getOwnMetadata(y,E.constructor,A)||{},H=[...Reflect.getOwnMetadata(rT,E.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:A,descriptor:C,argumentsMetadata:R}];Reflect.defineMetadata(rT,H,E.constructor)},u0=(_="/")=>aT(_,"Get"),g0=(_="/")=>aT(_,"Post"),v0=(_="/")=>aT(_,"Put"),n0=(_="/")=>aT(_,"Patch"),y0=(_="/")=>aT(_,"Delete"),j0=(_="/")=>aT(_,"Options");var l0=(_)=>{return(T,E,A)=>{let C=Reflect.getMetadata(tT,T)||[];C[A]=_,Reflect.defineMetadata(tT,C,T)}};var d0=()=>(_)=>Reflect.defineMetadata(MT,void 0,_);var p0=()=>(_)=>{Reflect.defineMetadata(yT,void 0,_)};var s0=()=>(_)=>{Reflect.defineMetadata(DT,void 0,_)};var i0=(_)=>(T)=>{if(Reflect.hasOwnMetadata(fT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:E,guards:A,interceptors:C,controllers:R,dependencies:H,webSockets:Z}=_||{};if(E){for(let W=0;W<E.length;W++)if(!Reflect.getOwnMetadataKeys(E[W]).includes(DT))throw Error(`${E[W].name} is not a middleware.`)}if(A){for(let W=0;W<A.length;W++)if(!Reflect.getOwnMetadataKeys(A[W]).includes(PT))throw Error(`${A[W].name} is not a guard.`)}if(C){for(let W=0;W<C.length;W++)if(!Reflect.getOwnMetadataKeys(C[W]).includes(yT))throw Error(`${C[W].name} is not a interceptor.`)}if(R){for(let W=0;W<R.length;W++)if(!Reflect.getOwnMetadataKeys(R[W]).includes(BT))throw Error(`${R[W].name} is not a controller.`)}if(H){for(let W=0;W<H.length;W++)if(!Reflect.getOwnMetadataKeys(H[W]).includes(MT))throw Error(`${H[W].name} is not an injectable.`)}if(Z){for(let W=0;W<Z.length;W++)if(!Reflect.getOwnMetadataKeys(Z[W]).includes(zT))throw Error(`${Z[W].name} is not a websocket gateway.`)}Reflect.defineMetadata(xT,_,T)};var M_=Symbol("__bool:webSocket.upgrade__"),o0=(_,T,E)=>{let A=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:A.pathname,query:E}})},r0=(_)=>(T)=>{let{prefix:E}=_||{};T.prototype[M_]=o0;let A=Object.getOwnPropertyDescriptor(T.prototype,M_),C=!A?[]:[{path:"/",httpMethod:"GET",methodName:M_,descriptor:A,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:M_,descriptor:A,argumentsMetadata:{}}],R={prefix:!E?.startsWith("/")?`/${E||""}`:E,events:Reflect.getOwnMetadata(jT,T)||{},http:C};Reflect.defineMetadata(zT,R,T)};var t0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:VT},Reflect.defineMetadata(ZT,A,_.constructor,T)},e0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:GT},Reflect.defineMetadata(ZT,A,_.constructor,T)},a0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:f_},Reflect.defineMetadata(ZT,A,_.constructor,T)},T1=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(ZT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:F_},Reflect.defineMetadata(ZT,A,_.constructor,T)};var _1=(_)=>(T,E,A)=>{if(!(A.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let C=Reflect.getOwnMetadata(ZT,T.constructor,E),R=Object.freeze({methodName:E,descriptor:A,arguments:C}),H={...Reflect.getOwnMetadata(jT,T.constructor)||void 0,[_]:R};Reflect.defineMetadata(jT,R,T.constructor,E),Reflect.defineMetadata(jT,H,T.constructor)};var A1=(_)=>{return(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(P_,T.constructor,E)||{};C[`paramterIndexes.${A}`]={index:A,schema:_},Reflect.defineMetadata(P_,C,T.constructor,E)}};var E1=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class lT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?E1[_]:E.trim(),this.data=T}}var C1=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class w_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?C1[_]:E.trim(),this.data=T}}var dA=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof lT||_ instanceof w_)return new Response(JSON.stringify(_),{status:_.httpCode,statusText:_.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof _){case"object":return!(_ instanceof Error)?_:{message:_.message,code:_.name,cause:_.cause};case"string":return{message:_};case"number":return{code:_};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};var AW=h_(O_(),1),L0=h_(T0(),1);var wT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(wT||(wT={}));var _0=(_,T,E=wT.day)=>{let A=_ instanceof Date?_:new Date(_);switch(E){case wT.year:A.setFullYear(A.getFullYear()+T);break;case wT.month:A.setMonth(A.getMonth()+T);break;case wT.day:A.setDate(A.getDate()+T);break;case wT.hours:A.setHours(A.getHours()+T);break;case wT.minutes:A.setMinutes(A.getMinutes()+T);break;case wT.seconds:A.setSeconds(A.getSeconds()+T);break;case wT.miliseconds:A.setMilliseconds(A.getMilliseconds()+T);break}return A};class mT{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(_){this.alias=this._thinAlias(_)}test(_,T){try{let E=this._map.get(T),A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(!E)return;if(A.length!==C.length)return;let R=Object(),H=this.alias.replace(new RegExp(mT.rootPattern,"g"),mT.innerRootPattern);if(!new RegExp(H).test(this._thinAlias(_)))return;for(let Z=0;Z<A.length;Z++){let W=A[Z],X=C[Z];if(!new RegExp(mT.rootPattern,"g").test(W)){if(W!==X)return}else{let w=!1;if(W.replace(new RegExp(mT.rootPattern,"g"),(x,U,G)=>{if(G===0)X.replace(new RegExp(mT.innerRootPattern,"g"),(q,z,K)=>{if(K===0)Object.assign(R,{[U]:q});return q});return x}),w)return}continue}return Object.freeze({parameters:R,model:E})}catch(E){return console.error(E),!1}}isMatch(_,T){try{if(!this._map.get(T))return;let A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(A.length!==C.length)return!1;let R=Object();for(let H=0;H<A.length;H++){let Z=A[H],W=C[H];if(!new RegExp(mT.rootPattern,"g").test(Z)){if(Z!==W)return!1}else{let X=!1;if(Z.replace(new RegExp(mT.rootPattern,"g"),(w,x,U)=>{if(!new RegExp(U,"g").test(W))X=!0;else Object.assign(R,{[x]:W});return""}),X)return!1}continue}return!0}catch(E){console.error(E);return}}get(_){if(!this._map.get("GET"))this._map.set("GET",_);return this}post(_){if(!this._map.get("POST"))this._map.set("POST",_);return this}put(_){if(!this._map.get("PUT"))this._map.set("PUT",_);return this}delete(_){if(!this._map.get("DELETE"))this._map.set("DELETE",_);return this}connect(_){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",_);return this}options(_){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",_);return this}trace(_){if(!this._map.get("TRACE"))return this._map.set("TRACE",_);return this}patch(_){if(!this._map.get("PATCH"))return this._map.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,H)=>`${R}(.*?)`)}return E}).join("/")}get _filteredPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,H)=>"(.*?)")}return E.replace(C,(R,H,Z)=>Z)}).join("/")}}var A0=mT;class I_{alias;_routes=new Map;constructor(_){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),E=this._routes.get(T),A=!E?new A0(`${this.alias}/${_}`):E;if(!E)this._routes.set(T,A);return A}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class $_{_routers=new Map;add(..._){for(let T=0;T<_.length;T++){if(this._routers.has(_[T].alias))continue;this._routers.set(_[T].alias,_[T])}return this}find(_,T){for(let E of[...this._routers.values()])for(let A of E.routes.values()){let C=A.test(_,T);if(!C)continue;return C}return}}class r_{eventName;metadata;_context=void 0;constructor({eventName:_,metadata:T}){this.eventName=_,this.metadata=T}bind(_){return this._context=_,this}execute(){return Object.freeze({methodName:this.metadata.methodName,descriptor:!this._context||typeof this.metadata.descriptor.value!=="function"?this.metadata.descriptor:this.metadata.descriptor.value.bind(this._context),arguments:this.metadata.arguments})}}class c_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=c_.thinAlias(_)}addRoutes(..._){for(let T of _)if(!this.routes.includes(T))this.routes.push(T);return this}bind(_){for(let T of this.routes)T.bind(_);return this}execute(){let _=new Map;for(let T of this.routes)_.set(`${this.alias}:::${T.eventName}`,T.execute());return _}static thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class L_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=L_.thinPrefix(_)}addRouters(..._){for(let T=0;T<_.length;T++)if(!this.routers.includes(_[T]))this.routers.push(_[T]);for(let T of _)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let _=new Map;for(let T of this.routers){let E=T.execute();for(let[A,C]of E.entries())_.set(`/${L_.thinPrefix(`${this.prefix}/${A}`)}`,C)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}var lH=async function(){}.constructor;var E0=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),C0=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),bT=(_,T={})=>{let{color:E,backgroundColor:A,bold:C,underline:R}=T,H="";if(C)H+="\x1B[1m";if(R)H+="\x1B[4m";if(E&&E0[E])H+=`\x1B[${E0[E]}m`;if(A&&C0[A])H+=`\x1B[${C0[A]}m`;return`${H}${_}\x1B[0m`};var R0=(_)=>{let{headers:T,method:E}=_,A=T.get("upgrade")?.toLowerCase()||"",C=T.get("connection")?.toLowerCase()||"";return E==="GET"&&A?.toLowerCase()==="websocket"&&C?.toLowerCase().includes("upgrade")};class K_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,E){let A=E||this._options;if(!A?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!A.isPassthrough)throw Error(`${String(_)} already exists in context static collection.`);return this}setOptions(_){return this._options=_,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}var aH=h_(O_(),1);class H_{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([E,A])=>{this._mapper.set(E,A)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![MT,BT,DT,PT,yT,zT].some((R)=>T.includes(R)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let A=(Reflect.getOwnMetadata(tT,_)||[]).map((R)=>this.get(R)),C=new _(...A);return this._mapper.set(_,C),C}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}var K4=900,WT=(_)=>{return _.headers.set("X-Powered-By","Bool Typescript"),_},h4=({status:_,statusText:T,headers:E,data:A})=>{let C=E.get("Content-Type")||"text/plain";if(C.includes("application/json"))return WT(new Response(A instanceof ReadableStream?A:JSON.stringify(A),{status:_,statusText:T,headers:E}));if(C.includes("text/plain")||C.includes("text/html"))return WT(new Response(A instanceof ReadableStream?A:String(A),{status:_,statusText:T,headers:E}));if(C.includes("application/octet-stream")){if(A instanceof Uint8Array||A instanceof ArrayBuffer||A instanceof Blob||A instanceof ReadableStream)return WT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("Invalid data type for application/octet-stream")}if(C.includes("multipart/form-data")){if(A instanceof FormData)return WT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("multipart/form-data requires FormData object")}return WT(new Response(String(A),{status:_,statusText:T,headers:E}))},O4=({controllerConstructor:_,httpRouterGroup:T,injector:E,prefix:A})=>{if(!Reflect.getOwnMetadataKeys(_).includes(BT))throw Error(`${_.name} is not a controller.`);let C=E.get(_);if(!C)throw Error("Can not initialize controller.");let R=Reflect.getOwnMetadata(BT,_)||{prefix:"/",httpMetadata:[]},H=new I_(`/${A||""}/${R.prefix}`);return R.httpMetadata.forEach((Z)=>{if(typeof Z.descriptor.value!=="function")return;let W=H.route(Z.path),X=Z.descriptor.value.bind(C),w=Object.freeze({class:_,funcName:Z.methodName,func:X,argumentsMetadata:Z.argumentsMetadata});switch(Z.httpMethod){case"GET":return W.get(w);case"POST":return W.post(w);case"PUT":return W.put(w);case"PATCH":return W.patch(w);case"DELETE":return W.delete(w);case"OPTIONS":return W.options(w)}}),T.add(H)},m4=({injector:_,httpRouterGroup:T,prefix:E,webSocketRouterGroup:A,webSocketConstructor:C})=>{if(!Reflect.getOwnMetadataKeys(C).includes(zT))throw Error(`${C.name} is not a websocket route.`);let R=_.get(C);if(!R)throw Error("Can not initialize webSocket.");let H=Reflect.getOwnMetadata(zT,C)||{prefix:"/",events:[],http:[]},Z=`/${E||""}/${H.prefix}`,W=new I_(Z);for(let[w,x]of Object.entries(H.http)){if(typeof x.descriptor?.value!=="function")continue;let U=W.route(x.path),G=x.descriptor.value.bind(R),q=Object.freeze({class:C,funcName:x.methodName,func:G,argumentsMetadata:x.argumentsMetadata});switch(x.httpMethod){case"GET":U.get(q);break;case"POST":U.post(q);break}}T.add(W);let X=new c_(Z);for(let[w,x]of Object.entries(H.events)){let U=new r_({eventName:w,metadata:x});X.addRoutes(U)}return X.bind(R),A.addRouters(X),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:A})},n=async(_,T,E,A)=>{try{let C=await T.safeParseAsync(_);if(!C.success)throw new lT({httpCode:400,message:`Validation at the [${A.toString()}] method fails at positional argument [${E}].`,data:C.error.issues});return C.data}catch(C){if(C instanceof lT)throw C;throw new w_({httpCode:500,message:`Validation at the [${A.toString()}] method error at positional argument [${E}].`,data:!(C instanceof Error)?C:[{message:C.message,code:C.name,cause:C.cause}]})}},P4=async({containerClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(fT))throw Error(`${_.name} is not a container.`);let A=new H_(E),C=Reflect.getOwnMetadata(fT,_),{loaders:R,middlewares:H,guards:Z,dependencies:W,config:X}=C||{},{config:w}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof X!=="function"?typeof X!=="object"?void 0:("key"in X)&&("value"in X)&&typeof X.key==="symbol"?typeof X.value!=="function"?X.value:await X.value():X:await X()}});if(A.set(X&&"key"in X&&"value"in X&&typeof X.key==="symbol"?X.key:m_,w),R){let q=[];for(let[K,J]of Object.entries(R))q.push(async()=>{try{let h=await J({config:w});return console.info(`${bT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${K}] initialized successfully.`),h}catch(h){throw console.error(`${bT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${K}] initialization failed.`),T.debug&&console.error(h),h}});let z=await Promise.all(q.map((K)=>K()));for(let K=0;K<z.length;K++){let[J,h]=z[K];A.set(J,h)}}!W||W.map((q)=>A.get(q));let x=[],U=[];!H||H.forEach((q)=>{let z=A.get(q);if(z.start&&typeof z.start==="function"){let K=Reflect.getOwnMetadata(y,q,"start")||{};x.push(Object.freeze({class:q,funcName:"start",func:z.start.bind(z),argumentsMetadata:K}))}if(z.end&&typeof z.end==="function"){let K=Reflect.getOwnMetadata(y,q,"end")||{};U.push(Object.freeze({class:q,funcName:"end",func:z.end.bind(z),argumentsMetadata:K}))}});let G=!Z?[]:Z.map((q)=>{let z=A.get(q),K=Reflect.getOwnMetadata(y,q,"enforce")||{};return Object.freeze({class:q,funcName:"enforce",func:z.enforce.bind(z),argumentsMetadata:K})});return Object.freeze({injector:A,startMiddlewareGroup:x,endMiddlewareGroup:U,guardGroup:G})},M4=async({moduleClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(xT))throw Error(`${_.name} is not a module.`);let A=new H_(E),C=Reflect.getOwnMetadata(xT,_),{loaders:R,middlewares:H,guards:Z,interceptors:W,controllers:X,dependencies:w,webSockets:x,prefix:U,config:G}=C||{},q=`${T.prefix||""}/${U||""}`,{config:z}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof G!=="function"?typeof G!=="object"?void 0:("key"in G)&&("value"in G)&&typeof G.key==="symbol"?typeof G.value!=="function"?G.value:await G.value():G:await G()}});if(A.set(G&&"key"in G&&"value"in G&&typeof G.key==="symbol"?G.key:m_,z),R){let O=[];for(let[$,j]of Object.entries(R))O.push(async()=>{try{let s=await j({config:z});return console.info(`${bT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${$}] initialized successfully.`),s}catch(s){throw console.error(`${bT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${$}] initialization failed.`),T.debug&&console.error(s),s}});let P=await Promise.all(O.map(($)=>$()));for(let $=0;$<P.length;$++){let[j,s]=P[$];A.set(j,s)}}!w||w.map((O)=>A.get(O));let K=[],J=[];!H||H.forEach((O)=>{let P=A.get(O);if(P.start&&typeof P.start==="function"){let $=Reflect.getOwnMetadata(y,O,"start")||{};K.push(Object.freeze({class:O,funcName:"start",func:P.start.bind(P),argumentsMetadata:$}))}if(P.end&&typeof P.end==="function"){let $=Reflect.getOwnMetadata(y,O,"end")||{};J.push(Object.freeze({class:O,funcName:"end",func:P.end.bind(P),argumentsMetadata:$}))}});let h=!Z?[]:Z.map((O)=>{let P=A.get(O),$=Reflect.getOwnMetadata(y,O,"enforce")||{};return Object.freeze({class:O,funcName:"enforce",func:P.enforce.bind(P),argumentsMetadata:$})}),f=[],S=[];!W||W.forEach((O)=>{let P=A.get(O);if(P.open&&typeof P.open==="function"){let $=Reflect.getOwnMetadata(y,O,"open")||{};f.push(Object.freeze({class:O,funcName:"open",func:P.open.bind(P),argumentsMetadata:$}))}if(P.close&&typeof P.close==="function"){let $=Reflect.getOwnMetadata(y,O,"close")||{};S.push(Object.freeze({class:O,funcName:"close",func:P.close.bind(P),argumentsMetadata:$}))}});let D=new $_;!X||X.forEach((O)=>O4({controllerConstructor:O,httpRouterGroup:D,injector:A,prefix:q}));let b=new $_,Q=new L_;return x&&x.forEach((O)=>m4({webSocketConstructor:O,httpRouterGroup:b,webSocketRouterGroup:Q,injector:A,prefix:q})),Object.freeze({prefix:U||"",injector:A,startMiddlewareGroup:K,endMiddlewareGroup:J,guardGroup:h,openInterceptorGroup:f,closeInterceptorGroup:S,controllerRouterGroup:D,webSocketHttpRouterGroup:b,webSocketRouterGroup:Q})},k4=async(_,T)=>{let{request:E,server:A}=_,{query:C,responseHeaders:R,route:{model:H}}=T,Z=await H.func(...[A,E,C]);if(typeof Z!=="boolean")return WT(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));if(!Z)return WT(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));return Z},mA=async({context:_,route:T,options:E,resolutedMap:A})=>{let C={isStatic:!0},R=(!_?new K_:new K_(_)).setOptions(C);if(T)R.set(eT,T.parameters).set(XT,T.model);let H=R.get(FT,C)||void 0,Z=R.get(UT,C)||void 0,W=R.get(QT,C)||void 0,X=R.get(HT,C)||void 0,w=R.get(eT,C)||void 0,x=R.get(XT,C)||void 0;if(A){let{startMiddlewareGroup:U,guardGroup:G}=A;if(U)for(let q=0;q<U.length;q++){let z=[],{func:K,funcName:J,argumentsMetadata:h}=U[q];for(let[f,S]of Object.entries(h))switch(S.type){case cT:z[S.index]=!S.key?R:R.get(S.key,C);break;case UT:z[S.index]=!S.zodSchema?Z:await n(Z,S.zodSchema,S.index,J);break;case IT:z[S.index]=!S.zodSchema?await Z?.[S.parser||"json"]():await n(await Z?.[S.parser||"json"](),S.zodSchema,S.index,J);break;case NT:z[S.index]=!S.zodSchema?W:await n(W?.toJSON(),S.zodSchema,S.index,J);break;case QT:z[S.index]=!S.zodSchema?W?.get(S.key)||void 0:await n(W?.get(S.key)||void 0,S.zodSchema,S.index,J);break;case $T:z[S.index]=!S.zodSchema?w?.[S.key]||void 0:await n(w?.[S.key]||void 0,S.zodSchema,S.index,J);break;case XT:z[S.index]=x;break;case HT:z[S.index]=X;break;case FT:z[S.index]=H;break;default:z[S.index]=!S.zodSchema?!R.has(S.type,C)?void 0:R.get(S.type,C):await n(!(S.type in R)?void 0:R.get(S.type,C),S.zodSchema,S.index,J);break}await K(...z)}if(G)for(let q=0;q<G.length;q++){let z=[],{func:K,funcName:J,argumentsMetadata:h}=G[q];for(let[S,D]of Object.entries(h))switch(D.type){case UT:z[D.index]=!D.zodSchema?Z:await n(Z,D.zodSchema,D.index,J);break;case IT:z[D.index]=!D.zodSchema?await Z?.[D.parser||"json"]():await n(await Z?.[D.parser||"json"](),D.zodSchema,D.index,J);break;case cT:z[D.index]=!D.key?R:R.get(D.key);break;case NT:z[D.index]=!D.zodSchema?W:await n(W?.toJSON(),D.zodSchema,D.index,J);break;case HT:z[D.index]=X;break;case QT:z[D.index]=!D.zodSchema?W?.get(D.key)||void 0:await n(W?.get(D.key)||void 0,D.zodSchema,D.index,J);break;case $T:z[D.index]=!D.zodSchema?w?.[D.key]||void 0:await n(w?.[D.key],D.zodSchema,D.index,J);break;case XT:z[D.index]=x;break;case FT:z[D.index]=H;break;default:z[D.index]=!D.zodSchema?!R.has(D.type)?void 0:R.get(D.type):await n(R.get(D.type),D.zodSchema,D.index,J);break}let f=await K(...z);if(typeof f!=="boolean"||!f)throw new lT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(x&&!E?.isContainer){if(A&&"openInterceptorGroup"in A&&A.openInterceptorGroup){let{openInterceptorGroup:K}=A;for(let J=0;J<K.length;J++){let h=[],{func:f,funcName:S,argumentsMetadata:D}=K[J];for(let[b,Q]of Object.entries(D))switch(Q.type){case UT:h[Q.index]=!Q.zodSchema?Z:await n(Z,Q.zodSchema,Q.index,S);break;case IT:h[Q.index]=!Q.zodSchema?await Z?.[Q.parser||"json"]():await n(await Z?.[Q.parser||"json"](),Q.zodSchema,Q.index,S);break;case cT:h[Q.index]=!Q.key?R:R.get(Q.key);break;case NT:h[Q.index]=!Q.zodSchema?W:await n(W?.toJSON(),Q.zodSchema,Q.index,S);break;case QT:h[Q.index]=!Q.zodSchema?W?.get(Q.key)||void 0:await n(W?.get(Q.key)||void 0,Q.zodSchema,Q.index,S);break;case HT:h[Q.index]=X;break;case $T:h[Q.index]=!Q.zodSchema?w?.[Q.key]||void 0:await n(w?.[Q.key]||void 0,Q.zodSchema,Q.index,S);break;case XT:h[Q.index]=x;break;case FT:h[Q.index]=H;break;default:h[Q.index]=!Q.zodSchema?!R.has(Q.type)?void 0:R.get(Q.type):await n(R.get(Q.type),Q.zodSchema,Q.index,S);break}await f(...h)}}let U=[],{func:G,funcName:q,argumentsMetadata:z}=x;for(let[K,J]of Object.entries(z))switch(J.type){case UT:U[J.index]=!J.zodSchema?Z:await n(Z,J.zodSchema,J.index,q);break;case IT:U[J.index]=!J.zodSchema?await Z?.[J.parser||"json"]():await n(await Z?.[J.parser||"json"](),J.zodSchema,J.index,q);break;case cT:U[J.index]=!J.key?R:R.get(J.key);break;case NT:U[J.index]=!J.zodSchema?W:await n(W?.toJSON(),J.zodSchema,J.index,q);break;case QT:U[J.index]=!J.zodSchema?W?.get(J.key)||void 0:await n(W?.get(J.key)||void 0,J.zodSchema,J.index,q);break;case HT:U[J.index]=X;break;case $T:U[J.index]=!J.zodSchema?w?.[J.key]||void 0:await n(w?.[J.key]||void 0,J.zodSchema,J.index,q);break;case XT:U[J.index]=x;break;case FT:U[J.index]=H;break;default:U[J.index]=!J.zodSchema?!R.has(J.type)?void 0:R.get(J.type):await n(R.get(J.type),J.zodSchema,J.index,q);break}if(R.set(U_,await G(...U),{isStatic:!1}),A&&"closeInterceptorGroup"in A&&A.closeInterceptorGroup){let{closeInterceptorGroup:K}=A;for(let J=0;J<K.length;J++){let h=[],{func:f,funcName:S,argumentsMetadata:D}=K[J];for(let[b,Q]of Object.entries(D))switch(Q.type){case UT:h[Q.index]=!Q.zodSchema?Z:await n(Z,Q.zodSchema,Q.index,S);break;case IT:h[Q.index]=!Q.zodSchema?await Z?.[Q.parser||"json"]():await n(await Z?.[Q.parser||"json"](),Q.zodSchema,Q.index,S);break;case cT:h[Q.index]=!Q.key?R:R.get(Q.key);break;case NT:h[Q.index]=!Q.zodSchema?W:await n(W?.toJSON(),Q.zodSchema,Q.index,S);break;case HT:h[Q.index]=R.get(Q.type);break;case QT:h[Q.index]=!Q.zodSchema?W?.get(Q.key)||void 0:await n(W?.get(Q.key)||void 0,Q.zodSchema,Q.index,S);break;case $T:h[Q.index]=!Q.zodSchema?w?.[Q.key]||void 0:await n(w?.[Q.key]||void 0,Q.zodSchema,Q.index,S);break;case XT:h[Q.index]=x;break;case FT:h[Q.index]=H;break;default:h[Q.index]=!Q.zodSchema?!R.has(Q.type)?void 0:R.get(Q.type):await n(R.get(Q.type),Q.zodSchema,Q.index,S);break}await f(...h)}}}if(A){let{endMiddlewareGroup:U}=A;if(U)for(let G=0;G<U.length;G++){let q=[],{func:z,funcName:K,argumentsMetadata:J}=U[G];for(let[h,f]of Object.entries(J))switch(f.type){case UT:q[f.index]=!f.zodSchema?Z:await n(Z,f.zodSchema,f.index,K);break;case IT:q[f.index]=!f.zodSchema?await Z?.[f.parser||"json"]():await n(await Z?.[f.parser||"json"](),f.zodSchema,f.index,K);break;case cT:q[f.index]=!f.key?R:R.get(f.key);break;case NT:q[f.index]=!f.zodSchema?W:await n(W?.toJSON(),f.zodSchema,f.index,K);break;case HT:q[f.index]=R.get(f.type);break;case QT:q[f.index]=!f.zodSchema?W?.get(f.key)||void 0:await n(W?.get(f.key)||void 0,f.zodSchema,f.index,K);break;case $T:q[f.index]=!f.zodSchema?w?.[f.key]||void 0:await n(w?.[f.key]||void 0,f.zodSchema,f.index,K);break;case XT:q[f.index]=x;break;case FT:q[f.index]=H;break;default:q[f.index]=!f.zodSchema?!R.has(f.type)?void 0:R.get(f.type):await n(!(f.type in R)?void 0:R.get(f.type),f.zodSchema,f.index,K);break}await z(...q)}}return Object.freeze({context:R})},b4=async(_,T)=>{try{let E=new Map,{allowLogsMethods:A,staticOption:C,allowOrigins:R,allowMethods:H,allowCredentials:Z,allowHeaders:W}=Object.freeze({allowLogsMethods:T?.log?.methods,staticOption:T.static,allowOrigins:!T.cors?.origins?["*"]:typeof T.cors.origins!=="string"?T.cors.origins.includes("*")||T.cors.origins.length<1?["*"]:T.cors.origins:[T.cors.origins!=="*"?T.cors.origins:"*"],allowMethods:T.cors?.methods||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!T.cors?.credentials?!1:!0,allowHeaders:!T.cors?.headers||T.cors.headers.includes("*")?["*"]:T.cors.headers}),X=Reflect.getOwnMetadataKeys(_);if(!X.includes(fT)&&!X.includes(xT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);let w=new H_,x=!X.includes(fT)?void 0:Reflect.getOwnMetadata(fT,_),U=!X.includes(fT)?[_]:x?.modules||[],G=!x?void 0:await P4({containerClass:_,options:T,extendInjector:w}),z=(await Promise.all(U.map((f)=>M4({moduleClass:f,options:T,extendInjector:!G?w:G.injector})))).filter((f)=>typeof f!=="undefined");if([...new Set(z.map((f)=>f.prefix))].length!==z.length)throw Error("Module prefix should be unique.");let J=new Map;for(let f of z){let S=f.webSocketRouterGroup.execute();for(let[D,b]of S.entries())J.set(D,b)}let h=Bun.serve({port:T.port,fetch:async(f,S)=>{let D=performance.now(),b=new URL(f.url),Q=L0.default.parse(b.searchParams.toString(),T.queryParser),O=f.headers.get("origin")||"*",P=f.method.toUpperCase(),$=new Headers,j=new K_().setOptions({isStatic:!0}).set(FT,S).set(UT,f).set(QT,f.headers).set(HT,$).set(Q_,Q);try{let s=R0(f),d;if(s){for(let TT of z){let YT=TT.webSocketHttpRouterGroup.find(b.pathname,f.method);if(YT){d=Object.freeze({route:YT,resolution:TT});break}}if(!d)return WT(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:$}));let t=await k4({request:f,server:S},{query:Q,responseHeaders:$,route:d.route,moduleResolution:d.resolution});return t instanceof Response?t:void 0}if([...!Z?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:R.includes("*")?"*":!R.includes(O)?R[0]:O},{key:"Access-Control-Allow-Methods",value:H.join(", ")},{key:"Access-Control-Allow-Headers",value:W.join(", ")}].forEach(({key:t,value:TT})=>$.set(t,TT)),!H.includes(P))return WT(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:$}));if(f.method.toUpperCase()==="OPTIONS")return WT(R.includes("*")||R.includes(O)?new Response(void 0,{status:204,statusText:"No Content.",headers:$}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:$}));if(C){let{path:t,headers:TT,cacheTimeInSeconds:YT}=C,uT=`${t}/${b.pathname}`,M=E.get(uT);if(!M){let LT=Bun.file(uT);if(await LT.exists()){if(TT)for(let[p,W_]of Object.entries(TT))$.set(p,W_);return $.set("Content-Type",LT.type),WT(new Response(await LT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}else{let LT=new Date>M.expiredAt;if(LT)E.delete(uT);let nT=!LT?M.file:Bun.file(uT);if(await nT.exists()){if(E.set(uT,Object.freeze({expiredAt:_0(new Date,typeof YT!=="number"?K4:YT,wT.seconds),file:nT})),TT)for(let[W_,t_]of Object.entries(TT))$.set(W_,t_);return $.set("Content-Type",nT.type),WT(new Response(await nT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}}if(G){let{context:t}=await mA({context:j,resolutedMap:{injector:G.injector,startMiddlewareGroup:G.startMiddlewareGroup,guardGroup:G.guardGroup},options:{isContainer:!0}});j=t}for(let t of z){let TT=t.controllerRouterGroup.find(b.pathname,P);if(TT){d=Object.freeze({route:TT,resolution:t});break}}if(!d)j.setOptions({isStatic:!1}).set(X_,404).set(AA,"Not found.").set(U_,JSON.stringify({httpCode:404,message:"Route not found",data:void 0}));else{let{context:t}=await mA({context:j,route:d.route,resolutedMap:d.resolution});j=t}if(G){let{context:t}=await mA({context:j,resolutedMap:{injector:G.injector,endMiddlewareGroup:G.endMiddlewareGroup},options:{isContainer:!0}});j=t}let CT=j.get(HT,{isStatic:!0})||new Headers,AT=j.get(U_,{isStatic:!1})||void 0,RT=j.get(X_,{isStatic:!1}),JT=j.get(X_,{isStatic:!1});return h4({status:typeof RT!=="number"?void 0:RT,statusText:typeof JT!=="string"?void 0:JT,headers:CT,data:AT})}catch(s){return T.debug&&console.error(s),WT(dA(s,$))}finally{if(A){let s=performance.now(),d=bT(b.pathname,{color:"blue"}),CT=`${Bun.color("yellow","ansi")}${process.pid}`,AT=bT(f.method,{color:"yellow",backgroundColor:"blue"}),RT=bT(`${f.headers.get("x-forwarded-for")||f.headers.get("x-real-ip")||S.requestIP(f)?.address||"<Unknown>"}`,{color:"yellow"}),JT=bT(`${Math.round((s-D+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});A.includes(f.method.toUpperCase())&&console.info(`PID: ${CT} - Method: ${AT} - IP: ${RT} - ${d} - Time: ${JT}`)}}},websocket:{open:(f)=>{let S=`${f.data.pathname}:::open`,D=J.get(S);if(!D)return;let b=D.arguments||{},Q=[];for(let[O,P]of Object.entries(b))switch(P.type){case VT:Q[P.index]=f;break;case GT:Q[P.index]=h;break}D.descriptor.value(...Q)},close:(f,S,D)=>{let b=`${f.data.pathname}:::close`,Q=J.get(b);if(!Q)return;let O=Q.arguments||{},P=[];for(let[$,j]of Object.entries(O))switch(j.type){case VT:P[j.index]=f;break;case GT:P[j.index]=h;break;case f_:P[j.index]=S;break;case F_:P[j.index]=D;break}Q.descriptor.value(...P)},message:(f,S)=>{let D=`${f.data.pathname}:::message`,b=J.get(D);if(!b)return;let Q=b.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case Z_:O[$.index]=S;break;case GT:O[$.index]=h;break}b.descriptor.value(...O)},drain:(f)=>{let S=`${f.data.pathname}:::drain`,D=J.get(S);if(!D)return;let b=D.arguments||{},Q=[];for(let[O,P]of Object.entries(b))switch(P.type){case VT:Q[P.index]=f;break;case GT:Q[P.index]=h;break}D.descriptor.value(...Q)},ping:(f,S)=>{let D=`${f.data.pathname}:::ping`,b=J.get(D);if(!b)return;let Q=b.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case GT:O[$.index]=h;break;case Z_:O[$.index]=S;break}b.descriptor.value(...O)},pong:(f,S)=>{let D=`${f.data.pathname}:::pong`,b=J.get(D);if(!b)return;let Q=b.arguments||{},O=[];for(let[P,$]of Object.entries(Q))switch($.type){case VT:O[$.index]=f;break;case GT:O[$.index]=h;break;case Z_:O[$.index]=S;break}b.descriptor.value(...O)}}})}catch(E){throw T.debug&&console.error(E),E}};export{dA as jsonErrorInfer,C1 as httpServerErrors,E1 as httpClientErrors,A1 as ZodSchema,e0 as WebSocketServer,_1 as WebSocketEvent,t0 as WebSocketConnection,T1 as WebSocketCloseReason,a0 as WebSocketCloseCode,r0 as WebSocket,m0 as RouteModel,h0 as ResponseHeaders,G0 as RequestHeaders,V0 as RequestHeader,N0 as RequestBody,K0 as Request,c0 as Query,v0 as Put,g0 as Post,n0 as Patch,I0 as Params,$0 as Param,j0 as Options,i0 as Module,s0 as Middleware,lA as Keys,p0 as Interceptor,H_ as Injector,d0 as Injectable,l0 as Inject,w_ as HttpServerError,P0 as HttpServer,lT as HttpClientError,b0 as Guard,u0 as Get,y0 as Delete,k0 as Controller,O0 as Context,M0 as Container,b4 as BoolFactory};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { IContext, TContextOptions } from "./context";
|
|
2
2
|
export type { IController } from "./controller";
|
|
3
|
-
export type { IDispatcher } from "./dispatcher";
|
|
4
3
|
export type { IGuard } from "./guard";
|
|
4
|
+
export type { IInterceptor } from "./interceptor";
|
|
5
5
|
export type { IMiddleware } from "./middleware";
|
|
6
6
|
export type { IModule } from "./module";
|
|
7
7
|
export type { IWebSocket } from "./webSocket";
|
package/dist/keys/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare const argumentsKey: unique symbol;
|
|
|
2
2
|
export declare const webSocketEventArgumentsKey: unique symbol;
|
|
3
3
|
export declare const configKey: unique symbol;
|
|
4
4
|
export declare const controllerKey: unique symbol;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const interceptorKey: unique symbol;
|
|
6
6
|
export declare const guardKey: unique symbol;
|
|
7
7
|
export declare const controllerHttpKey: unique symbol;
|
|
8
8
|
export declare const injectKey: unique symbol;
|
package/package.json
CHANGED
package/src/decorators/index.ts
CHANGED
|
@@ -13,11 +13,11 @@ export {
|
|
|
13
13
|
} from "./arguments";
|
|
14
14
|
export { Container } from "./container";
|
|
15
15
|
export { Controller } from "./controller";
|
|
16
|
-
export { Dispatcher } from "./dispatcher";
|
|
17
16
|
export { Guard } from "./guard";
|
|
18
17
|
export { Delete, Get, Options, Patch, Post, Put } from "./http";
|
|
19
18
|
export { Inject } from "./inject";
|
|
20
19
|
export { Injectable } from "./injectable";
|
|
20
|
+
export { Interceptor } from "./interceptor";
|
|
21
21
|
export { Middleware } from "./middleware";
|
|
22
22
|
export { Module } from "./module";
|
|
23
23
|
export { WebSocket } from "./webSocket";
|
|
@@ -33,10 +33,15 @@ export { ZodSchema } from "./zodSchema";
|
|
|
33
33
|
export type { TArgumentsMetadata } from "./arguments";
|
|
34
34
|
export type { TContainerConfig, TContainerMetadata, TContainerOptions } from "./container";
|
|
35
35
|
export type { TControllerMetadata } from "./controller";
|
|
36
|
-
export type { TDispatcherMetadata } from "./dispatcher";
|
|
37
36
|
export type { TGuardMetadata } from "./guard";
|
|
38
37
|
export type { THttpMetadata } from "./http";
|
|
38
|
+
export type { TInterceptorMetadata } from "./interceptor";
|
|
39
39
|
export type { TMiddlewareMetadata } from "./middleware";
|
|
40
40
|
export type { TModuleConfig, TModuleMetadata, TModuleOptions } from "./module";
|
|
41
|
-
export type {
|
|
41
|
+
export type {
|
|
42
|
+
TWebSocketHttpMetadata,
|
|
43
|
+
TWebSocketHttpRouteMetadata,
|
|
44
|
+
TWebSocketMetadata,
|
|
45
|
+
TWebSocketUpgradeData
|
|
46
|
+
} from "./webSocket";
|
|
42
47
|
export type { TWebSocketEventHandlerMetadata, TWebSocketEventMetadata } from "./webSocketEvent";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IInterceptor } from "../interfaces";
|
|
2
|
+
|
|
3
|
+
import { interceptorKey } from "../keys";
|
|
4
|
+
|
|
5
|
+
export type TInterceptorMetadata = undefined;
|
|
6
|
+
|
|
7
|
+
export const Interceptor =
|
|
8
|
+
() =>
|
|
9
|
+
<T extends { new (...args: any[]): IInterceptor }>(target: T) => {
|
|
10
|
+
const metadata: TInterceptorMetadata = undefined;
|
|
11
|
+
|
|
12
|
+
Reflect.defineMetadata(interceptorKey, metadata, target);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Interceptor;
|
package/src/decorators/module.ts
CHANGED
|
@@ -3,9 +3,9 @@ import type { IModule } from "../interfaces";
|
|
|
3
3
|
import {
|
|
4
4
|
containerKey,
|
|
5
5
|
controllerKey,
|
|
6
|
-
dispatcherKey,
|
|
7
6
|
guardKey,
|
|
8
7
|
injectableKey,
|
|
8
|
+
interceptorKey,
|
|
9
9
|
middlewareKey,
|
|
10
10
|
moduleKey,
|
|
11
11
|
webSocketKey
|
|
@@ -33,7 +33,7 @@ export type TModuleOptions<TConfig extends {} = {}> =
|
|
|
33
33
|
middlewares: TInstances;
|
|
34
34
|
guards: TInstances;
|
|
35
35
|
controllers: TInstances;
|
|
36
|
-
|
|
36
|
+
interceptors: TInstances;
|
|
37
37
|
webSockets: TInstances;
|
|
38
38
|
}>
|
|
39
39
|
| undefined;
|
|
@@ -47,7 +47,7 @@ export type TModuleMetadata<TConfig extends {} = {}> =
|
|
|
47
47
|
middlewares: TInstances;
|
|
48
48
|
guards: TInstances;
|
|
49
49
|
controllers: TInstances;
|
|
50
|
-
|
|
50
|
+
interceptors: TInstances;
|
|
51
51
|
webSockets: TInstances;
|
|
52
52
|
}>
|
|
53
53
|
| undefined;
|
|
@@ -61,7 +61,7 @@ export const Module =
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
const { middlewares, guards,
|
|
64
|
+
const { middlewares, guards, interceptors, controllers, dependencies, webSockets } =
|
|
65
65
|
args || {};
|
|
66
66
|
|
|
67
67
|
if (middlewares) {
|
|
@@ -80,10 +80,10 @@ export const Module =
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
if (
|
|
84
|
-
for (let i = 0; i <
|
|
85
|
-
if (!Reflect.getOwnMetadataKeys(
|
|
86
|
-
throw Error(`${
|
|
83
|
+
if (interceptors) {
|
|
84
|
+
for (let i = 0; i < interceptors.length; i++) {
|
|
85
|
+
if (!Reflect.getOwnMetadataKeys(interceptors[i]).includes(interceptorKey)) {
|
|
86
|
+
throw Error(`${interceptors[i].name} is not a interceptor.`);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { IContext, TContextOptions } from "./context";
|
|
2
2
|
export type { IController } from "./controller";
|
|
3
|
-
export type { IDispatcher } from "./dispatcher";
|
|
4
3
|
export type { IGuard } from "./guard";
|
|
4
|
+
export type { IInterceptor } from "./interceptor";
|
|
5
5
|
export type { IMiddleware } from "./middleware";
|
|
6
6
|
export type { IModule } from "./module";
|
|
7
7
|
export type { IWebSocket } from "./webSocket";
|
package/src/keys/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ export const argumentsKey = Symbol("__bool:arguments__");
|
|
|
2
2
|
export const webSocketEventArgumentsKey = Symbol("__bool:webSocketEventArguments__");
|
|
3
3
|
export const configKey = Symbol("__bool:config__");
|
|
4
4
|
export const controllerKey = Symbol("__bool:controller__");
|
|
5
|
-
export const
|
|
5
|
+
export const interceptorKey = Symbol("__bool:interceptor__");
|
|
6
6
|
export const guardKey = Symbol("__bool:guard__");
|
|
7
7
|
export const controllerHttpKey = Symbol("__bool:controller.http__");
|
|
8
8
|
export const injectKey = Symbol("__bool:inject__");
|
package/src/producers/factory.ts
CHANGED
|
@@ -8,8 +8,7 @@ import type {
|
|
|
8
8
|
} from "../decorators";
|
|
9
9
|
import type { TArgumentsMetadataCollection } from "../decorators/arguments";
|
|
10
10
|
import type { TWebSocketUpgradeData } from "../decorators/webSocket";
|
|
11
|
-
import type { IGuard, IMiddleware } from "../interfaces";
|
|
12
|
-
import type { IDispatcher } from "../interfaces/dispatcher";
|
|
11
|
+
import type { IGuard, IInterceptor, IMiddleware } from "../interfaces";
|
|
13
12
|
|
|
14
13
|
import "reflect-metadata";
|
|
15
14
|
|
|
@@ -549,7 +548,7 @@ const moduleResolution = async ({
|
|
|
549
548
|
loaders,
|
|
550
549
|
middlewares,
|
|
551
550
|
guards,
|
|
552
|
-
|
|
551
|
+
interceptors,
|
|
553
552
|
controllers,
|
|
554
553
|
dependencies,
|
|
555
554
|
webSockets,
|
|
@@ -695,25 +694,25 @@ const moduleResolution = async ({
|
|
|
695
694
|
});
|
|
696
695
|
//#endregion
|
|
697
696
|
|
|
698
|
-
//#region [Before
|
|
699
|
-
const
|
|
700
|
-
TGroupElementModel<"open",
|
|
697
|
+
//#region [Before interceptor(s)]
|
|
698
|
+
const openInterceptorGroup: Array<
|
|
699
|
+
TGroupElementModel<"open", IInterceptor, NonNullable<IInterceptor["open"]>>
|
|
701
700
|
> = [];
|
|
702
|
-
const
|
|
703
|
-
TGroupElementModel<"close",
|
|
701
|
+
const closeInterceptorGroup: Array<
|
|
702
|
+
TGroupElementModel<"close", IInterceptor, NonNullable<IInterceptor["close"]>>
|
|
704
703
|
> = [];
|
|
705
704
|
|
|
706
|
-
!
|
|
707
|
-
|
|
708
|
-
const instance = injector.get<
|
|
705
|
+
!interceptors ||
|
|
706
|
+
interceptors.forEach((interceptor) => {
|
|
707
|
+
const instance = injector.get<IInterceptor>(interceptor);
|
|
709
708
|
|
|
710
709
|
if (instance.open && typeof instance.open === "function") {
|
|
711
710
|
const argumentsMetadata: TArgumentsMetadataCollection =
|
|
712
|
-
Reflect.getOwnMetadata(argumentsKey,
|
|
711
|
+
Reflect.getOwnMetadata(argumentsKey, interceptor, "open") || {};
|
|
713
712
|
|
|
714
|
-
|
|
713
|
+
openInterceptorGroup.push(
|
|
715
714
|
Object.freeze({
|
|
716
|
-
class:
|
|
715
|
+
class: interceptor as IInterceptor,
|
|
717
716
|
funcName: "open",
|
|
718
717
|
func: instance.open.bind(instance),
|
|
719
718
|
argumentsMetadata: argumentsMetadata
|
|
@@ -723,11 +722,11 @@ const moduleResolution = async ({
|
|
|
723
722
|
|
|
724
723
|
if (instance.close && typeof instance.close === "function") {
|
|
725
724
|
const argumentsMetadata: TArgumentsMetadataCollection =
|
|
726
|
-
Reflect.getOwnMetadata(argumentsKey,
|
|
725
|
+
Reflect.getOwnMetadata(argumentsKey, interceptor, "close") || {};
|
|
727
726
|
|
|
728
|
-
|
|
727
|
+
closeInterceptorGroup.push(
|
|
729
728
|
Object.freeze({
|
|
730
|
-
class:
|
|
729
|
+
class: interceptor as IInterceptor,
|
|
731
730
|
funcName: "close",
|
|
732
731
|
func: instance.close.bind(instance),
|
|
733
732
|
argumentsMetadata: argumentsMetadata
|
|
@@ -773,8 +772,8 @@ const moduleResolution = async ({
|
|
|
773
772
|
startMiddlewareGroup: startMiddlewareGroup,
|
|
774
773
|
endMiddlewareGroup: endMiddlewareGroup,
|
|
775
774
|
guardGroup: guardGroup,
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
openInterceptorGroup: openInterceptorGroup,
|
|
776
|
+
closeInterceptorGroup: closeInterceptorGroup,
|
|
778
777
|
controllerRouterGroup: controllerRouterGroup,
|
|
779
778
|
webSocketHttpRouterGroup: webSocketHttpRouterGroup,
|
|
780
779
|
webSocketRouterGroup: webSocketRouterGroup
|
|
@@ -1084,19 +1083,19 @@ const httpFetcher = async ({
|
|
|
1084
1083
|
if (routeModel && !options?.isContainer) {
|
|
1085
1084
|
if (
|
|
1086
1085
|
resolutedMap &&
|
|
1087
|
-
"
|
|
1088
|
-
resolutedMap.
|
|
1086
|
+
"openInterceptorGroup" in resolutedMap &&
|
|
1087
|
+
resolutedMap.openInterceptorGroup
|
|
1089
1088
|
) {
|
|
1090
|
-
const {
|
|
1089
|
+
const { openInterceptorGroup } = resolutedMap;
|
|
1091
1090
|
|
|
1092
|
-
// Execute open
|
|
1093
|
-
for (let i = 0; i <
|
|
1091
|
+
// Execute open interceptor(s)
|
|
1092
|
+
for (let i = 0; i < openInterceptorGroup.length; i++) {
|
|
1094
1093
|
const args = [];
|
|
1095
1094
|
const {
|
|
1096
1095
|
func: handler,
|
|
1097
1096
|
funcName: functionName,
|
|
1098
1097
|
argumentsMetadata
|
|
1099
|
-
} =
|
|
1098
|
+
} = openInterceptorGroup[i];
|
|
1100
1099
|
|
|
1101
1100
|
for (const [_key, argMetadata] of Object.entries(argumentsMetadata)) {
|
|
1102
1101
|
switch (argMetadata.type) {
|
|
@@ -1278,19 +1277,19 @@ const httpFetcher = async ({
|
|
|
1278
1277
|
|
|
1279
1278
|
if (
|
|
1280
1279
|
resolutedMap &&
|
|
1281
|
-
"
|
|
1282
|
-
resolutedMap.
|
|
1280
|
+
"closeInterceptorGroup" in resolutedMap &&
|
|
1281
|
+
resolutedMap.closeInterceptorGroup
|
|
1283
1282
|
) {
|
|
1284
|
-
const {
|
|
1283
|
+
const { closeInterceptorGroup } = resolutedMap;
|
|
1285
1284
|
|
|
1286
|
-
// Execute close
|
|
1287
|
-
for (let i = 0; i <
|
|
1285
|
+
// Execute close interceptor(s)
|
|
1286
|
+
for (let i = 0; i < closeInterceptorGroup.length; i++) {
|
|
1288
1287
|
const args = [];
|
|
1289
1288
|
const {
|
|
1290
1289
|
func: handler,
|
|
1291
1290
|
funcName: functionName,
|
|
1292
1291
|
argumentsMetadata
|
|
1293
|
-
} =
|
|
1292
|
+
} = closeInterceptorGroup[i];
|
|
1294
1293
|
|
|
1295
1294
|
for (const [_key, argMetadata] of Object.entries(argumentsMetadata)) {
|
|
1296
1295
|
switch (argMetadata.type) {
|
|
@@ -1950,7 +1949,7 @@ export const BoolFactory = async (
|
|
|
1950
1949
|
|
|
1951
1950
|
handlerMetadata.descriptor.value(...args);
|
|
1952
1951
|
},
|
|
1953
|
-
close: (connection, code
|
|
1952
|
+
close: (connection, code, reason) => {
|
|
1954
1953
|
const pathnameKey = `${connection.data.pathname}:::close`;
|
|
1955
1954
|
const handlerMetadata = webSocketsMap.get(pathnameKey);
|
|
1956
1955
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import {
|
|
3
3
|
controllerKey,
|
|
4
|
-
dispatcherKey,
|
|
5
4
|
guardKey,
|
|
6
5
|
injectableKey,
|
|
7
6
|
injectKey,
|
|
7
|
+
interceptorKey,
|
|
8
8
|
middlewareKey,
|
|
9
9
|
webSocketKey
|
|
10
10
|
} from "../keys";
|
|
@@ -52,7 +52,7 @@ export class Injector implements IInjector {
|
|
|
52
52
|
controllerKey,
|
|
53
53
|
middlewareKey,
|
|
54
54
|
guardKey,
|
|
55
|
-
|
|
55
|
+
interceptorKey,
|
|
56
56
|
webSocketKey
|
|
57
57
|
].some((value) => ownMetadataKeys.includes(value))
|
|
58
58
|
) {
|
package/__test/dispatcher.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { IDispatcher } from "@dist";
|
|
2
|
-
|
|
3
|
-
import { Dispatcher } from "@dist";
|
|
4
|
-
|
|
5
|
-
@Dispatcher()
|
|
6
|
-
export class CustomDispatcher implements IDispatcher {
|
|
7
|
-
open() {
|
|
8
|
-
console.log("Dispatch -- Open");
|
|
9
|
-
console.log("===========================");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
close() {
|
|
13
|
-
console.log("Dispatch -- Close");
|
|
14
|
-
console.log("===========================");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IDispatcher } from "../interfaces";
|
|
2
|
-
|
|
3
|
-
import { dispatcherKey } from "../keys";
|
|
4
|
-
|
|
5
|
-
export type TDispatcherMetadata = undefined;
|
|
6
|
-
|
|
7
|
-
export const Dispatcher =
|
|
8
|
-
() =>
|
|
9
|
-
<T extends { new (...args: any[]): IDispatcher }>(target: T) => {
|
|
10
|
-
const metadata: TDispatcherMetadata = undefined;
|
|
11
|
-
|
|
12
|
-
Reflect.defineMetadata(dispatcherKey, metadata, target);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default Dispatcher;
|