@bool-ts/core 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/__test/controller.ts +1 -1
  2. package/__test/dispatcher.ts +2 -2
  3. package/__test/firstGuard.ts +3 -1
  4. package/__test/firstMiddleware.ts +3 -2
  5. package/__test/index.ts +1 -1
  6. package/__test/module.ts +1 -1
  7. package/__test/repository.ts +2 -3
  8. package/__test/secondGuard.ts +1 -1
  9. package/__test/secondMiddleware.ts +2 -2
  10. package/__test/service.ts +4 -7
  11. package/__test/tsconfig.json +6 -2
  12. package/__test/webSocket.ts +1 -1
  13. package/dist/index.js +17 -6
  14. package/package.json +5 -5
  15. package/dist/decorators/arguments.js +0 -123
  16. package/dist/decorators/controller.js +0 -9
  17. package/dist/decorators/dispatcher.js +0 -6
  18. package/dist/decorators/guard.js +0 -9
  19. package/dist/decorators/http.js +0 -60
  20. package/dist/decorators/index.js +0 -13
  21. package/dist/decorators/inject.js +0 -9
  22. package/dist/decorators/injectable.js +0 -3
  23. package/dist/decorators/middleware.js +0 -6
  24. package/dist/decorators/module.js +0 -48
  25. package/dist/decorators/webSocket.js +0 -40
  26. package/dist/decorators/webSocketArguments.js +0 -49
  27. package/dist/decorators/webSocketEvent.js +0 -24
  28. package/dist/decorators/zodSchema.js +0 -15
  29. package/dist/entities/httpRoute.js +0 -268
  30. package/dist/entities/httpRouter.js +0 -27
  31. package/dist/entities/httpRouterGroup.js +0 -24
  32. package/dist/entities/index.js +0 -6
  33. package/dist/entities/webSocketRoute.js +0 -22
  34. package/dist/entities/webSocketRouter.js +0 -54
  35. package/dist/entities/webSocketRouterGroup.js +0 -51
  36. package/dist/hooks/factory.js +0 -1072
  37. package/dist/hooks/index.js +0 -2
  38. package/dist/hooks/injector.js +0 -36
  39. package/dist/http/clientError.js +0 -42
  40. package/dist/http/index.js +0 -40
  41. package/dist/http/serverError.js +0 -24
  42. package/dist/interfaces/context.js +0 -1
  43. package/dist/interfaces/controller.js +0 -1
  44. package/dist/interfaces/dispatcher.js +0 -1
  45. package/dist/interfaces/guard.js +0 -1
  46. package/dist/interfaces/index.js +0 -1
  47. package/dist/interfaces/middleware.js +0 -1
  48. package/dist/interfaces/module.js +0 -1
  49. package/dist/interfaces/webSocket.js +0 -1
  50. package/dist/keys/index.js +0 -31
  51. package/dist/ultils/asyncFunction.js +0 -1
  52. package/dist/ultils/colors.js +0 -41
  53. package/dist/ultils/index.js +0 -3
  54. package/dist/ultils/socket.js +0 -7
@@ -16,7 +16,7 @@ import {
16
16
  Query,
17
17
  RequestBody,
18
18
  RequestHeaders
19
- } from "@src";
19
+ } from "@dist";
20
20
  import { TestService } from "./service";
21
21
 
22
22
  const postParamsSchema = Zod.object({
@@ -1,6 +1,6 @@
1
- import type { IDispatcher } from "../src";
1
+ import type { IDispatcher } from "@dist";
2
2
 
3
- import { Dispatcher } from "../src";
3
+ import { Dispatcher } from "@dist";
4
4
 
5
5
  @Dispatcher()
6
6
  export class CustomDispatcher implements IDispatcher {
@@ -1,4 +1,6 @@
1
- import { Guard, IGuard } from "../src";
1
+ import type { IGuard } from "@dist";
2
+
3
+ import { Guard } from "@dist";
2
4
 
3
5
  @Guard()
4
6
  export class FirstGuard implements IGuard {
@@ -1,5 +1,6 @@
1
- import type { IMiddleware } from "../src";
2
- import { Middleware } from "../src";
1
+ import type { IMiddleware } from "@dist";
2
+
3
+ import { Middleware } from "@dist";
3
4
 
4
5
  @Middleware()
5
6
  export class FirstMiddleware implements IMiddleware {
package/__test/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
 
3
- import { BoolFactory } from "../src";
3
+ import { BoolFactory } from "@dist";
4
4
  import { TestModule } from "./module";
5
5
 
6
6
  BoolFactory(TestModule, {
package/__test/module.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Module } from "../src";
1
+ import { Module } from "@dist";
2
2
  import { TestController } from "./controller";
3
3
  import { CustomDispatcher } from "./dispatcher";
4
4
  import { FirstGuard } from "./firstGuard";
@@ -1,12 +1,11 @@
1
1
  import type { IRepository } from "./interfaces";
2
2
 
3
- import { Injectable } from "../src";
4
-
3
+ import { Injectable } from "@dist";
5
4
 
6
5
  @Injectable()
7
6
  export class TestRepository implements IRepository {
8
7
  /**
9
- *
8
+ *
10
9
  */
11
10
  exec() {
12
11
  console.log("This is test repository.");
@@ -1,4 +1,4 @@
1
- import { Guard, IGuard } from "../src";
1
+ import { Guard, IGuard } from "@dist";
2
2
 
3
3
  @Guard()
4
4
  export class SecondGuard implements IGuard {
@@ -1,5 +1,5 @@
1
- import type { IMiddleware } from "../src";
2
- import { Middleware } from "../src";
1
+ import type { IMiddleware } from "@dist";
2
+ import { Middleware } from "@dist";
3
3
 
4
4
  @Middleware()
5
5
  export class SecondMiddleware implements IMiddleware {
package/__test/service.ts CHANGED
@@ -1,17 +1,14 @@
1
- import type { IService, IRepository } from "./interfaces";
1
+ import type { IRepository, IService } from "./interfaces";
2
2
 
3
- import { Inject, Injectable } from "../src";
3
+ import { Inject, Injectable } from "@dist";
4
4
  import { TestRepository } from "./repository";
5
5
 
6
-
7
6
  @Injectable()
8
7
  export class TestService implements IService {
9
- constructor(
10
- @Inject(TestRepository) private readonly testRepository: IRepository
11
- ) { }
8
+ constructor(@Inject(TestRepository) private readonly testRepository: IRepository) {}
12
9
 
13
10
  /**
14
- *
11
+ *
15
12
  */
16
13
  exec() {
17
14
  console.log("This is test service.", this.testRepository);
@@ -30,9 +30,13 @@
30
30
  "moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
31
31
  "baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,
32
32
  "paths": {
33
- "@src": ["../src"]
33
+ "@src": ["../src"],
34
+ "@dist": ["../dist"]
34
35
  } /* Specify a set of entries that re-map imports to additional lookup locations. */,
35
- "rootDirs": ["./", "../src"] /* Allow multiple folders to be treated as one when resolving modules. */,
36
+ "rootDirs": [
37
+ "./",
38
+ "@dist"
39
+ ] /* Allow multiple folders to be treated as one when resolving modules. */,
36
40
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
37
41
  // "types": [
38
42
  // "reflect-metadata"
@@ -7,7 +7,7 @@ import {
7
7
  WebSocketConnection,
8
8
  WebSocketEvent,
9
9
  WebSocketServer
10
- } from "../src";
10
+ } from "@dist";
11
11
 
12
12
  @WebSocket()
13
13
  export class TestWebSocket {
package/dist/index.js CHANGED
@@ -1,6 +1,17 @@
1
- import "reflect-metadata";
2
- export * from "./decorators";
3
- export * from "./hooks";
4
- export * from "./http";
5
- export * from "./interfaces";
6
- export * as Keys from "./keys";
1
+ var U4=Object.create;var{getPrototypeOf:J4,defineProperty:pT,getOwnPropertyNames:C4}=Object;var H4=Object.prototype.hasOwnProperty;var ST=(T,_,E)=>{E=T!=null?U4(J4(T)):{};let A=_||!T||!T.__esModule?pT(E,"default",{value:T,enumerable:!0}):E;for(let L of C4(T))if(!H4.call(A,L))pT(A,L,{get:()=>T[L],enumerable:!0});return A};var k=(T,_)=>()=>(_||T((_={exports:{}}).exports,_),_.exports);var B4=(T,_)=>{for(var E in _)pT(T,E,{get:_[E],enumerable:!0,configurable:!0,set:(A)=>_[E]=()=>A})};var D4=((T)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(T,{get:(_,E)=>(typeof require!=="undefined"?require:_)[E]}):T)(function(T){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+T+'" is not supported')});var wT=k(()=>{/*! *****************************************************************************
2
+ Copyright (C) Microsoft. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */var vE;(function(T){(function(_){var E=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:C(),A=L(T);if(typeof E.Reflect!=="undefined")A=L(E.Reflect,A);if(_(A,E),typeof E.Reflect==="undefined")E.Reflect=T;function L(F,D){return function(N,q){if(Object.defineProperty(F,N,{configurable:!0,writable:!0,value:q}),D)D(N,q)}}function Y(){try{return Function("return this;")()}catch(F){}}function X(){try{return(0,eval)("(function() { return this; })()")}catch(F){}}function C(){return Y()||X()}})(function(_,E){var A=Object.prototype.hasOwnProperty,L=typeof Symbol==="function",Y=L&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive",X=L&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator",C=typeof Object.create==="function",F={__proto__:[]}instanceof Array,D=!C&&!F,N={create:C?function(){return nT(Object.create(null))}:F?function(){return nT({__proto__:null})}:function(){return nT({})},has:D?function(Z,Q){return A.call(Z,Q)}:function(Z,Q){return Q in Z},get:D?function(Z,Q){return A.call(Z,Q)?Z[Q]:void 0}:function(Z,Q){return Z[Q]}},q=Object.getPrototypeOf(Function),H=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:Z4(),J=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:R4(),I=typeof WeakMap==="function"?WeakMap:Q4(),G=L?Symbol.for("@reflect-metadata:registry"):void 0,h=L4(),b=W4(h);function w(Z,Q,U,z){if(!v(U)){if(!fE(Z))throw new TypeError;if(!p(Q))throw new TypeError;if(!p(z)&&!v(z)&&!n_(z))throw new TypeError;if(n_(z))z=void 0;return U=C_(U),__(Z,Q,U,z)}else{if(!fE(Z))throw new TypeError;if(!$E(Q))throw new TypeError;return A_(Z,Q)}}_("decorate",w);function R(Z,Q){function U(z,K){if(!p(z))throw new TypeError;if(!v(K)&&!E4(K))throw new TypeError;l_(Z,Q,z,K)}return U}_("metadata",R);function B(Z,Q,U,z){if(!p(U))throw new TypeError;if(!v(z))z=C_(z);return l_(Z,Q,U,z)}_("defineMetadata",B);function P(Z,Q,U){if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);return e(Z,Q,U)}_("hasMetadata",P);function O(Z,Q,U){if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);return o(Z,Q,U)}_("hasOwnMetadata",O);function W(Z,Q,U){if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);return F_(Z,Q,U)}_("getMetadata",W);function V(Z,Q,U){if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);return J_(Z,Q,U)}_("getOwnMetadata",V);function u(Z,Q){if(!p(Z))throw new TypeError;if(!v(Q))Q=C_(Q);return AT(Z,Q)}_("getMetadataKeys",u);function y(Z,Q){if(!p(Z))throw new TypeError;if(!v(Q))Q=C_(Q);return d_(Z,Q)}_("getOwnMetadataKeys",y);function n(Z,Q,U){if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);if(!p(Q))throw new TypeError;if(!v(U))U=C_(U);var z=LT(Q,U,!1);if(v(z))return!1;return z.OrdinaryDeleteMetadata(Z,Q,U)}_("deleteMetadata",n);function A_(Z,Q){for(var U=Z.length-1;U>=0;--U){var z=Z[U],K=z(Q);if(!v(K)&&!n_(K)){if(!$E(K))throw new TypeError;Q=K}}return Q}function __(Z,Q,U,z){for(var K=Z.length-1;K>=0;--K){var i=Z[K],r=i(Q,U,z);if(!v(r)&&!n_(r)){if(!p(r))throw new TypeError;z=r}}return z}function e(Z,Q,U){var z=o(Z,Q,U);if(z)return!0;var K=dT(Q);if(!n_(K))return e(Z,K,U);return!1}function o(Z,Q,U){var z=LT(Q,U,!1);if(v(z))return!1;return wE(z.OrdinaryHasOwnMetadata(Z,Q,U))}function F_(Z,Q,U){var z=o(Z,Q,U);if(z)return J_(Z,Q,U);var K=dT(Q);if(!n_(K))return F_(Z,K,U);return}function J_(Z,Q,U){var z=LT(Q,U,!1);if(v(z))return;return z.OrdinaryGetOwnMetadata(Z,Q,U)}function l_(Z,Q,U,z){var K=LT(U,z,!0);K.OrdinaryDefineOwnMetadata(Z,Q,U,z)}function AT(Z,Q){var U=d_(Z,Q),z=dT(Z);if(z===null)return U;var K=AT(z,Q);if(K.length<=0)return U;if(U.length<=0)return K;var i=new J,r=[];for(var m=0,S=U;m<S.length;m++){var f=S[m],$=i.has(f);if(!$)i.add(f),r.push(f)}for(var x=0,M=K;x<M.length;x++){var f=M[x],$=i.has(f);if(!$)i.add(f),r.push(f)}return r}function d_(Z,Q){var U=LT(Z,Q,!1);if(!U)return[];return U.OrdinaryOwnMetadataKeys(Z,Q)}function SE(Z){if(Z===null)return 1;switch(typeof Z){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return Z===null?1:6;default:return 6}}function v(Z){return Z===void 0}function n_(Z){return Z===null}function e1(Z){return typeof Z==="symbol"}function p(Z){return typeof Z==="object"?Z!==null:typeof Z==="function"}function a1(Z,Q){switch(SE(Z)){case 0:return Z;case 1:return Z;case 2:return Z;case 3:return Z;case 4:return Z;case 5:return Z}var U=Q===3?"string":Q===5?"number":"default",z=IE(Z,Y);if(z!==void 0){var K=z.call(Z,U);if(p(K))throw new TypeError;return K}return _4(Z,U==="default"?"number":U)}function _4(Z,Q){if(Q==="string"){var U=Z.toString;if(p_(U)){var z=U.call(Z);if(!p(z))return z}var K=Z.valueOf;if(p_(K)){var z=K.call(Z);if(!p(z))return z}}else{var K=Z.valueOf;if(p_(K)){var z=K.call(Z);if(!p(z))return z}var i=Z.toString;if(p_(i)){var z=i.call(Z);if(!p(z))return z}}throw new TypeError}function wE(Z){return!!Z}function T4(Z){return""+Z}function C_(Z){var Q=a1(Z,3);if(e1(Q))return Q;return T4(Q)}function fE(Z){return Array.isArray?Array.isArray(Z):Z instanceof Object?Z instanceof Array:Object.prototype.toString.call(Z)==="[object Array]"}function p_(Z){return typeof Z==="function"}function $E(Z){return typeof Z==="function"}function E4(Z){switch(SE(Z)){case 3:return!0;case 4:return!0;default:return!1}}function lT(Z,Q){return Z===Q||Z!==Z&&Q!==Q}function IE(Z,Q){var U=Z[Q];if(U===void 0||U===null)return;if(!p_(U))throw new TypeError;return U}function xE(Z){var Q=IE(Z,X);if(!p_(Q))throw new TypeError;var U=Q.call(Z);if(!p(U))throw new TypeError;return U}function KE(Z){return Z.value}function OE(Z){var Q=Z.next();return Q.done?!1:Q}function hE(Z){var Q=Z.return;if(Q)Q.call(Z)}function dT(Z){var Q=Object.getPrototypeOf(Z);if(typeof Z!=="function"||Z===q)return Q;if(Q!==q)return Q;var U=Z.prototype,z=U&&Object.getPrototypeOf(U);if(z==null||z===Object.prototype)return Q;var K=z.constructor;if(typeof K!=="function")return Q;if(K===Z)return Q;return K}function A4(){var Z;if(!v(G)&&typeof E.Reflect!=="undefined"&&!(G in E.Reflect)&&typeof E.Reflect.defineMetadata==="function")Z=Y4(E.Reflect);var Q,U,z,K=new I,i={registerProvider:r,getProvider:S,setProvider:$};return i;function r(x){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case Z===x:break;case v(Q):Q=x;break;case Q===x:break;case v(U):U=x;break;case U===x:break;default:if(z===void 0)z=new J;z.add(x);break}}function m(x,M){if(!v(Q)){if(Q.isProviderFor(x,M))return Q;if(!v(U)){if(U.isProviderFor(x,M))return Q;if(!v(z)){var l=xE(z);while(!0){var s=OE(l);if(!s)return;var X_=KE(s);if(X_.isProviderFor(x,M))return hE(l),X_}}}}if(!v(Z)&&Z.isProviderFor(x,M))return Z;return}function S(x,M){var l=K.get(x),s;if(!v(l))s=l.get(M);if(!v(s))return s;if(s=m(x,M),!v(s)){if(v(l))l=new H,K.set(x,l);l.set(M,s)}return s}function f(x){if(v(x))throw new TypeError;return Q===x||U===x||!v(z)&&z.has(x)}function $(x,M,l){if(!f(l))throw new Error("Metadata provider not registered.");var s=S(x,M);if(s!==l){if(!v(s))return!1;var X_=K.get(x);if(v(X_))X_=new H,K.set(x,X_);X_.set(M,l)}return!0}}function L4(){var Z;if(!v(G)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))Z=E.Reflect[G];if(v(Z))Z=A4();if(!v(G)&&p(E.Reflect)&&Object.isExtensible(E.Reflect))Object.defineProperty(E.Reflect,G,{enumerable:!1,configurable:!1,writable:!1,value:Z});return Z}function W4(Z){var Q=new I,U={isProviderFor:function(f,$){var x=Q.get(f);if(v(x))return!1;return x.has($)},OrdinaryDefineOwnMetadata:r,OrdinaryHasOwnMetadata:K,OrdinaryGetOwnMetadata:i,OrdinaryOwnMetadataKeys:m,OrdinaryDeleteMetadata:S};return h.registerProvider(U),U;function z(f,$,x){var M=Q.get(f),l=!1;if(v(M)){if(!x)return;M=new H,Q.set(f,M),l=!0}var s=M.get($);if(v(s)){if(!x)return;if(s=new H,M.set($,s),!Z.setProvider(f,$,U)){if(M.delete($),l)Q.delete(f);throw new Error("Wrong provider for target.")}}return s}function K(f,$,x){var M=z($,x,!1);if(v(M))return!1;return wE(M.has(f))}function i(f,$,x){var M=z($,x,!1);if(v(M))return;return M.get(f)}function r(f,$,x,M){var l=z(x,M,!0);l.set(f,$)}function m(f,$){var x=[],M=z(f,$,!1);if(v(M))return x;var l=M.keys(),s=xE(l),X_=0;while(!0){var PE=OE(s);if(!PE)return x.length=X_,x;var F4=KE(PE);try{x[X_]=F4}catch(X4){try{hE(s)}finally{throw X4}}X_++}}function S(f,$,x){var M=z($,x,!1);if(v(M))return!1;if(!M.delete(f))return!1;if(M.size===0){var l=Q.get($);if(!v(l)){if(l.delete(x),l.size===0)Q.delete(l)}}return!0}}function Y4(Z){var{defineMetadata:Q,hasOwnMetadata:U,getOwnMetadata:z,getOwnMetadataKeys:K,deleteMetadata:i}=Z,r=new I,m={isProviderFor:function(S,f){var $=r.get(S);if(!v($)&&$.has(f))return!0;if(K(S,f).length){if(v($))$=new J,r.set(S,$);return $.add(f),!0}return!1},OrdinaryDefineOwnMetadata:Q,OrdinaryHasOwnMetadata:U,OrdinaryGetOwnMetadata:z,OrdinaryOwnMetadataKeys:K,OrdinaryDeleteMetadata:i};return m}function LT(Z,Q,U){var z=h.getProvider(Z,Q);if(!v(z))return z;if(U){if(h.setProvider(Z,Q,b))return b;throw new Error("Illegal state.")}return}function Z4(){var Z={},Q=[],U=function(){function m(S,f,$){this._index=0,this._keys=S,this._values=f,this._selector=$}return m.prototype["@@iterator"]=function(){return this},m.prototype[X]=function(){return this},m.prototype.next=function(){var S=this._index;if(S>=0&&S<this._keys.length){var f=this._selector(this._keys[S],this._values[S]);if(S+1>=this._keys.length)this._index=-1,this._keys=Q,this._values=Q;else this._index++;return{value:f,done:!1}}return{value:void 0,done:!0}},m.prototype.throw=function(S){if(this._index>=0)this._index=-1,this._keys=Q,this._values=Q;throw S},m.prototype.return=function(S){if(this._index>=0)this._index=-1,this._keys=Q,this._values=Q;return{value:S,done:!0}},m}(),z=function(){function m(){this._keys=[],this._values=[],this._cacheKey=Z,this._cacheIndex=-2}return Object.defineProperty(m.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),m.prototype.has=function(S){return this._find(S,!1)>=0},m.prototype.get=function(S){var f=this._find(S,!1);return f>=0?this._values[f]:void 0},m.prototype.set=function(S,f){var $=this._find(S,!0);return this._values[$]=f,this},m.prototype.delete=function(S){var f=this._find(S,!1);if(f>=0){var $=this._keys.length;for(var x=f+1;x<$;x++)this._keys[x-1]=this._keys[x],this._values[x-1]=this._values[x];if(this._keys.length--,this._values.length--,lT(S,this._cacheKey))this._cacheKey=Z,this._cacheIndex=-2;return!0}return!1},m.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=Z,this._cacheIndex=-2},m.prototype.keys=function(){return new U(this._keys,this._values,K)},m.prototype.values=function(){return new U(this._keys,this._values,i)},m.prototype.entries=function(){return new U(this._keys,this._values,r)},m.prototype["@@iterator"]=function(){return this.entries()},m.prototype[X]=function(){return this.entries()},m.prototype._find=function(S,f){if(!lT(this._cacheKey,S)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(lT(this._keys[$],S)){this._cacheIndex=$;break}}if(this._cacheIndex<0&&f)this._cacheIndex=this._keys.length,this._keys.push(S),this._values.push(void 0);return this._cacheIndex},m}();return z;function K(m,S){return m}function i(m,S){return S}function r(m,S){return[m,S]}}function R4(){var Z=function(){function Q(){this._map=new H}return Object.defineProperty(Q.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Q.prototype.has=function(U){return this._map.has(U)},Q.prototype.add=function(U){return this._map.set(U,U),this},Q.prototype.delete=function(U){return this._map.delete(U)},Q.prototype.clear=function(){this._map.clear()},Q.prototype.keys=function(){return this._map.keys()},Q.prototype.values=function(){return this._map.keys()},Q.prototype.entries=function(){return this._map.entries()},Q.prototype["@@iterator"]=function(){return this.keys()},Q.prototype[X]=function(){return this.keys()},Q}();return Z}function Q4(){var Z=16,Q=N.create(),U=z();return function(){function S(){this._key=z()}return S.prototype.has=function(f){var $=K(f,!1);return $!==void 0?N.has($,this._key):!1},S.prototype.get=function(f){var $=K(f,!1);return $!==void 0?N.get($,this._key):void 0},S.prototype.set=function(f,$){var x=K(f,!0);return x[this._key]=$,this},S.prototype.delete=function(f){var $=K(f,!1);return $!==void 0?delete $[this._key]:!1},S.prototype.clear=function(){this._key=z()},S}();function z(){var S;do S="@@WeakMap@@"+m();while(N.has(Q,S));return Q[S]=!0,S}function K(S,f){if(!A.call(S,U)){if(!f)return;Object.defineProperty(S,U,{value:N.create()})}return S[U]}function i(S,f){for(var $=0;$<f;++$)S[$]=Math.random()*255|0;return S}function r(S){if(typeof Uint8Array==="function"){var f=new Uint8Array(S);if(typeof crypto!=="undefined")crypto.getRandomValues(f);else if(typeof msCrypto!=="undefined")msCrypto.getRandomValues(f);else i(f,S);return f}return i(new Array(S),S)}function m(){var S=r(Z);S[6]=S[6]&79|64,S[8]=S[8]&191|128;var f="";for(var $=0;$<Z;++$){var x=S[$];if($===4||$===6||$===8)f+="-";if(x<16)f+="0";f+=x.toString(16).toLowerCase()}return f}}function nT(Z){return Z.__=void 0,delete Z.__,Z}})})(vE||(vE={}))});var M_=k((N3,mE)=>{mE.exports=TypeError});var UT=k((G3,T0)=>{var AE=typeof Map==="function"&&Map.prototype,sT=Object.getOwnPropertyDescriptor&&AE?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xT=AE&&sT&&typeof sT.get==="function"?sT.get:null,bE=AE&&Map.prototype.forEach,LE=typeof Set==="function"&&Set.prototype,oT=Object.getOwnPropertyDescriptor&&LE?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,KT=LE&&oT&&typeof oT.get==="function"?oT.get:null,ME=LE&&Set.prototype.forEach,r4=typeof WeakMap==="function"&&WeakMap.prototype,FT=r4?WeakMap.prototype.has:null,t4=typeof WeakSet==="function"&&WeakSet.prototype,XT=t4?WeakSet.prototype.has:null,e4=typeof WeakRef==="function"&&WeakRef.prototype,jE=e4?WeakRef.prototype.deref:null,a4=Boolean.prototype.valueOf,_A=Object.prototype.toString,TA=Function.prototype.toString,EA=String.prototype.match,WE=String.prototype.slice,O_=String.prototype.replace,AA=String.prototype.toUpperCase,cE=String.prototype.toLowerCase,sE=RegExp.prototype.test,gE=Array.prototype.concat,w_=Array.prototype.join,LA=Array.prototype.slice,uE=Math.floor,eT=typeof BigInt==="function"?BigInt.prototype.valueOf:null,rT=Object.getOwnPropertySymbols,aT=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,r_=typeof Symbol==="function"&&typeof Symbol.iterator==="object",L_=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===r_?"object":"symbol")?Symbol.toStringTag:null,oE=Object.prototype.propertyIsEnumerable,yE=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(T){return T.__proto__}:null);function lE(T,_){if(T===1/0||T===-1/0||T!==T||T&&T>-1000&&T<1000||sE.call(/e/,_))return _;var E=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof T==="number"){var A=T<0?-uE(-T):uE(T);if(A!==T){var L=String(A),Y=WE.call(_,L.length+1);return O_.call(L,E,"$&_")+"."+O_.call(O_.call(Y,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O_.call(_,E,"$&_")}var _E=(()=>({})),dE=_E.custom,nE=eE(dE)?dE:null,rE={__proto__:null,double:'"',single:"'"},WA={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};T0.exports=function T(_,E,A,L){var Y=E||{};if(x_(Y,"quoteStyle")&&!x_(rE,Y.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(x_(Y,"maxStringLength")&&(typeof Y.maxStringLength==="number"?Y.maxStringLength<0&&Y.maxStringLength!==1/0:Y.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var X=x_(Y,"customInspect")?Y.customInspect:!0;if(typeof X!=="boolean"&&X!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(x_(Y,"indent")&&Y.indent!==null&&Y.indent!=="\t"&&!(parseInt(Y.indent,10)===Y.indent&&Y.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(x_(Y,"numericSeparator")&&typeof Y.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var C=Y.numericSeparator;if(typeof _==="undefined")return"undefined";if(_===null)return"null";if(typeof _==="boolean")return _?"true":"false";if(typeof _==="string")return _0(_,Y);if(typeof _==="number"){if(_===0)return 1/0/_>0?"0":"-0";var F=String(_);return C?lE(_,F):F}if(typeof _==="bigint"){var D=String(_)+"n";return C?lE(_,D):D}var N=typeof Y.depth==="undefined"?5:Y.depth;if(typeof A==="undefined")A=0;if(A>=N&&N>0&&typeof _==="object")return TE(_)?"[Array]":"[Object]";var q=SA(Y,A);if(typeof L==="undefined")L=[];else if(aE(L,_)>=0)return"[Circular]";function H(__,e,o){if(e)L=LA.call(L),L.push(e);if(o){var F_={depth:Y.depth};if(x_(Y,"quoteStyle"))F_.quoteStyle=Y.quoteStyle;return T(__,F_,A+1,L)}return T(__,Y,A+1,L)}if(typeof _==="function"&&!pE(_)){var J=CA(_),I=IT(_,H);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(I.length>0?" { "+w_.call(I,", ")+" }":"")}if(eE(_)){var G=r_?O_.call(String(_),/^(Symbol\(.*\))_[^)]*$/,"$1"):aT.call(_);return typeof _==="object"&&!r_?QT(G):G}if(NA(_)){var h="<"+cE.call(String(_.nodeName)),b=_.attributes||[];for(var w=0;w<b.length;w++)h+=" "+b[w].name+"="+tE(YA(b[w].value),"double",Y);if(h+=">",_.childNodes&&_.childNodes.length)h+="...";return h+="</"+cE.call(String(_.nodeName))+">",h}if(TE(_)){if(_.length===0)return"[]";var R=IT(_,H);if(q&&!qA(R))return"["+EE(R,q)+"]";return"[ "+w_.call(R,", ")+" ]"}if(RA(_)){var B=IT(_,H);if(!("cause"in Error.prototype)&&"cause"in _&&!oE.call(_,"cause"))return"{ ["+String(_)+"] "+w_.call(gE.call("[cause]: "+H(_.cause),B),", ")+" }";if(B.length===0)return"["+String(_)+"]";return"{ ["+String(_)+"] "+w_.call(B,", ")+" }"}if(typeof _==="object"&&X){if(nE&&typeof _[nE]==="function"&&_E)return _E(_,{depth:N-A});else if(X!=="symbol"&&typeof _.inspect==="function")return _.inspect()}if(HA(_)){var P=[];if(bE)bE.call(_,function(__,e){P.push(H(e,_,!0)+" => "+H(__,_))});return iE("Map",xT.call(_),P,q)}if(zA(_)){var O=[];if(ME)ME.call(_,function(__){O.push(H(__,_))});return iE("Set",KT.call(_),O,q)}if(BA(_))return tT("WeakMap");if(VA(_))return tT("WeakSet");if(DA(_))return tT("WeakRef");if(FA(_))return QT(H(Number(_)));if(UA(_))return QT(H(eT.call(_)));if(XA(_))return QT(a4.call(_));if(QA(_))return QT(H(String(_)));if(typeof window!=="undefined"&&_===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&_===globalThis||typeof global!=="undefined"&&_===global)return"{ [object globalThis] }";if(!ZA(_)&&!pE(_)){var W=IT(_,H),V=yE?yE(_)===Object.prototype:_ instanceof Object||_.constructor===Object,u=_ instanceof Object?"":"null prototype",y=!V&&L_&&Object(_)===_&&L_ in _?WE.call(h_(_),8,-1):u?"Object":"",n=V||typeof _.constructor!=="function"?"":_.constructor.name?_.constructor.name+" ":"",A_=n+(y||u?"["+w_.call(gE.call([],y||[],u||[]),": ")+"] ":"");if(W.length===0)return A_+"{}";if(q)return A_+"{"+EE(W,q)+"}";return A_+"{ "+w_.call(W,", ")+" }"}return String(_)};function tE(T,_,E){var A=E.quoteStyle||_,L=rE[A];return L+T+L}function YA(T){return O_.call(String(T),/"/g,"&quot;")}function TE(T){return h_(T)==="[object Array]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function ZA(T){return h_(T)==="[object Date]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function pE(T){return h_(T)==="[object RegExp]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function RA(T){return h_(T)==="[object Error]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function QA(T){return h_(T)==="[object String]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function FA(T){return h_(T)==="[object Number]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function XA(T){return h_(T)==="[object Boolean]"&&(!L_||!(typeof T==="object"&&(L_ in T)))}function eE(T){if(r_)return T&&typeof T==="object"&&T instanceof Symbol;if(typeof T==="symbol")return!0;if(!T||typeof T!=="object"||!aT)return!1;try{return aT.call(T),!0}catch(_){}return!1}function UA(T){if(!T||typeof T!=="object"||!eT)return!1;try{return eT.call(T),!0}catch(_){}return!1}var JA=Object.prototype.hasOwnProperty||function(T){return T in this};function x_(T,_){return JA.call(T,_)}function h_(T){return _A.call(T)}function CA(T){if(T.name)return T.name;var _=EA.call(TA.call(T),/^function\s*([\w$]+)/);if(_)return _[1];return null}function aE(T,_){if(T.indexOf)return T.indexOf(_);for(var E=0,A=T.length;E<A;E++)if(T[E]===_)return E;return-1}function HA(T){if(!xT||!T||typeof T!=="object")return!1;try{xT.call(T);try{KT.call(T)}catch(_){return!0}return T instanceof Map}catch(_){}return!1}function BA(T){if(!FT||!T||typeof T!=="object")return!1;try{FT.call(T,FT);try{XT.call(T,XT)}catch(_){return!0}return T instanceof WeakMap}catch(_){}return!1}function DA(T){if(!jE||!T||typeof T!=="object")return!1;try{return jE.call(T),!0}catch(_){}return!1}function zA(T){if(!KT||!T||typeof T!=="object")return!1;try{KT.call(T);try{xT.call(T)}catch(_){return!0}return T instanceof Set}catch(_){}return!1}function VA(T){if(!XT||!T||typeof T!=="object")return!1;try{XT.call(T,XT);try{FT.call(T,FT)}catch(_){return!0}return T instanceof WeakSet}catch(_){}return!1}function NA(T){if(!T||typeof T!=="object")return!1;if(typeof HTMLElement!=="undefined"&&T instanceof HTMLElement)return!0;return typeof T.nodeName==="string"&&typeof T.getAttribute==="function"}function _0(T,_){if(T.length>_.maxStringLength){var E=T.length-_.maxStringLength,A="... "+E+" more character"+(E>1?"s":"");return _0(WE.call(T,0,_.maxStringLength),_)+A}var L=WA[_.quoteStyle||"single"];L.lastIndex=0;var Y=O_.call(O_.call(T,L,"\\$1"),/[\x00-\x1f]/g,GA);return tE(Y,"single",_)}function GA(T){var _=T.charCodeAt(0),E={8:"b",9:"t",10:"n",12:"f",13:"r"}[_];if(E)return"\\"+E;return"\\x"+(_<16?"0":"")+AA.call(_.toString(16))}function QT(T){return"Object("+T+")"}function tT(T){return T+" { ? }"}function iE(T,_,E,A){var L=A?EE(E,A):w_.call(E,", ");return T+" ("+_+") {"+L+"}"}function qA(T){for(var _=0;_<T.length;_++)if(aE(T[_],`
15
+ `)>=0)return!1;return!0}function SA(T,_){var E;if(T.indent==="\t")E="\t";else if(typeof T.indent==="number"&&T.indent>0)E=w_.call(Array(T.indent+1)," ");else return null;return{base:E,prev:w_.call(Array(_+1),E)}}function EE(T,_){if(T.length===0)return"";var E=`
16
+ `+_.prev+_.base;return E+w_.call(T,","+E)+`
17
+ `+_.prev}function IT(T,_){var E=TE(T),A=[];if(E){A.length=T.length;for(var L=0;L<T.length;L++)A[L]=x_(T,L)?_(T[L],T):""}var Y=typeof rT==="function"?rT(T):[],X;if(r_){X={};for(var C=0;C<Y.length;C++)X["$"+Y[C]]=Y[C]}for(var F in T){if(!x_(T,F))continue;if(E&&String(Number(F))===F&&F<T.length)continue;if(r_&&X["$"+F]instanceof Symbol)continue;else if(sE.call(/[^\w$]/,F))A.push(_(F,T)+": "+_(T[F],T));else A.push(F+": "+_(T[F],T))}if(typeof rT==="function"){for(var D=0;D<Y.length;D++)if(oE.call(T,Y[D]))A.push("["+_(Y[D])+"]: "+_(T[Y[D]],T))}return A}});var A0=k((q3,E0)=>{var wA=UT(),fA=M_(),OT=function(T,_,E){var A=T,L;for(;(L=A.next)!=null;A=L)if(L.key===_){if(A.next=L.next,!E)L.next=T.next,T.next=L;return L}},$A=function(T,_){if(!T)return;var E=OT(T,_);return E&&E.value},IA=function(T,_,E){var A=OT(T,_);if(A)A.value=E;else T.next={key:_,next:T.next,value:E}},xA=function(T,_){if(!T)return!1;return!!OT(T,_)},KA=function(T,_){if(T)return OT(T,_,!0)};E0.exports=function T(){var _,E={assert:function(A){if(!E.has(A))throw new fA("Side channel does not contain "+wA(A))},delete:function(A){var L=_&&_.next,Y=KA(_,A);if(Y&&L&&L===Y)_=void 0;return!!Y},get:function(A){return $A(_,A)},has:function(A){return xA(_,A)},set:function(A,L){if(!_)_={next:void 0};IA(_,A,L)}};return E}});var YE=k((S3,L0)=>{L0.exports=Object});var Y0=k((w3,W0)=>{W0.exports=Error});var R0=k((f3,Z0)=>{Z0.exports=EvalError});var F0=k(($3,Q0)=>{Q0.exports=RangeError});var U0=k((I3,X0)=>{X0.exports=ReferenceError});var C0=k((x3,J0)=>{J0.exports=SyntaxError});var B0=k((K3,H0)=>{H0.exports=URIError});var z0=k((O3,D0)=>{D0.exports=Math.abs});var N0=k((h3,V0)=>{V0.exports=Math.floor});var q0=k((P3,G0)=>{G0.exports=Math.max});var w0=k((v3,S0)=>{S0.exports=Math.min});var $0=k((k3,f0)=>{f0.exports=Math.pow});var x0=k((m3,I0)=>{I0.exports=Math.round});var O0=k((b3,K0)=>{K0.exports=Number.isNaN||function T(_){return _!==_}});var P0=k((M3,h0)=>{var OA=O0();h0.exports=function T(_){if(OA(_)||_===0)return _;return _<0?-1:1}});var k0=k((j3,v0)=>{v0.exports=Object.getOwnPropertyDescriptor});var ZE=k((c3,m0)=>{var hT=k0();if(hT)try{hT([],"length")}catch(T){hT=null}m0.exports=hT});var M0=k((g3,b0)=>{var PT=Object.defineProperty||!1;if(PT)try{PT({},"a",{value:1})}catch(T){PT=!1}b0.exports=PT});var c0=k((u3,j0)=>{j0.exports=function T(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var _={},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 L=42;_[E]=L;for(var Y in _)return!1;if(typeof Object.keys==="function"&&Object.keys(_).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var X=Object.getOwnPropertySymbols(_);if(X.length!==1||X[0]!==E)return!1;if(!Object.prototype.propertyIsEnumerable.call(_,E))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var C=Object.getOwnPropertyDescriptor(_,E);if(C.value!==L||C.enumerable!==!0)return!1}return!0}});var y0=k((y3,u0)=>{var g0=typeof Symbol!=="undefined"&&Symbol,hA=c0();u0.exports=function T(){if(typeof g0!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof g0("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return hA()}});var RE=k((l3,l0)=>{l0.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null});var QE=k((d3,d0)=>{var PA=YE();d0.exports=PA.getPrototypeOf||null});var i0=k((n3,p0)=>{var vA="Function.prototype.bind called on incompatible ",kA=Object.prototype.toString,mA=Math.max,bA="[object Function]",n0=function T(_,E){var A=[];for(var L=0;L<_.length;L+=1)A[L]=_[L];for(var Y=0;Y<E.length;Y+=1)A[Y+_.length]=E[Y];return A},MA=function T(_,E){var A=[];for(var L=E||0,Y=0;L<_.length;L+=1,Y+=1)A[Y]=_[L];return A},jA=function(T,_){var E="";for(var A=0;A<T.length;A+=1)if(E+=T[A],A+1<T.length)E+=_;return E};p0.exports=function T(_){var E=this;if(typeof E!=="function"||kA.apply(E)!==bA)throw new TypeError(vA+E);var A=MA(arguments,1),L,Y=function(){if(this instanceof L){var N=E.apply(this,n0(A,arguments));if(Object(N)===N)return N;return this}return E.apply(_,n0(A,arguments))},X=mA(0,E.length-A.length),C=[];for(var F=0;F<X;F++)C[F]="$"+F;if(L=Function("binder","return function ("+jA(C,",")+"){ return binder.apply(this,arguments); }")(Y),E.prototype){var D=function N(){};D.prototype=E.prototype,L.prototype=new D,D.prototype=null}return L}});var JT=k((p3,s0)=>{var cA=i0();s0.exports=Function.prototype.bind||cA});var vT=k((i3,o0)=>{o0.exports=Function.prototype.call});var FE=k((s3,r0)=>{r0.exports=Function.prototype.apply});var e0=k((o3,t0)=>{t0.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply});var _1=k((r3,a0)=>{var gA=JT(),uA=FE(),yA=vT(),lA=e0();a0.exports=lA||gA.call(yA,uA)});var XE=k((t3,T1)=>{var dA=JT(),nA=M_(),pA=vT(),iA=_1();T1.exports=function T(_){if(_.length<1||typeof _[0]!=="function")throw new nA("a function is required");return iA(dA,pA,_)}});var Z1=k((e3,Y1)=>{var sA=XE(),E1=ZE(),L1;try{L1=[].__proto__===Array.prototype}catch(T){if(!T||typeof T!=="object"||!("code"in T)||T.code!=="ERR_PROTO_ACCESS")throw T}var UE=!!L1&&E1&&E1(Object.prototype,"__proto__"),W1=Object,A1=W1.getPrototypeOf;Y1.exports=UE&&typeof UE.get==="function"?sA([UE.get]):typeof A1==="function"?function T(_){return A1(_==null?_:W1(_))}:!1});var U1=k((a3,X1)=>{var R1=RE(),Q1=QE(),F1=Z1();X1.exports=R1?function T(_){return R1(_)}:Q1?function T(_){if(!_||typeof _!=="object"&&typeof _!=="function")throw new TypeError("getProto: not an object");return Q1(_)}:F1?function T(_){return F1(_)}:null});var C1=k((_W,J1)=>{var oA=Function.prototype.call,rA=Object.prototype.hasOwnProperty,tA=JT();J1.exports=tA.call(oA,rA)});var bT=k((TW,N1)=>{var j,eA=YE(),aA=Y0(),_L=R0(),TL=F0(),EL=U0(),_T=C0(),a_=M_(),AL=B0(),LL=z0(),WL=N0(),YL=q0(),ZL=w0(),RL=$0(),QL=x0(),FL=P0(),z1=Function,JE=function(T){try{return z1('"use strict"; return ('+T+").constructor;")()}catch(_){}},CT=ZE(),XL=M0(),CE=function(){throw new a_},UL=CT?function(){try{return arguments.callee,CE}catch(T){try{return CT(arguments,"callee").get}catch(_){return CE}}}():CE,t_=y0()(),a=U1(),JL=QE(),CL=RE(),V1=FE(),HT=vT(),e_={},HL=typeof Uint8Array==="undefined"||!a?j:a(Uint8Array),j_={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?j:ArrayBuffer,"%ArrayIteratorPrototype%":t_&&a?a([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":e_,"%AsyncGenerator%":e_,"%AsyncGeneratorFunction%":e_,"%AsyncIteratorPrototype%":e_,"%Atomics%":typeof Atomics==="undefined"?j:Atomics,"%BigInt%":typeof BigInt==="undefined"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":aA,"%eval%":eval,"%EvalError%":_L,"%Float32Array%":typeof Float32Array==="undefined"?j:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?j:FinalizationRegistry,"%Function%":z1,"%GeneratorFunction%":e_,"%Int8Array%":typeof Int8Array==="undefined"?j:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?j:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":t_&&a?a(a([][Symbol.iterator]())):j,"%JSON%":typeof JSON==="object"?JSON:j,"%Map%":typeof Map==="undefined"?j:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!t_||!a?j:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":eA,"%Object.getOwnPropertyDescriptor%":CT,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?j:Promise,"%Proxy%":typeof Proxy==="undefined"?j:Proxy,"%RangeError%":TL,"%ReferenceError%":EL,"%Reflect%":typeof Reflect==="undefined"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?j:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!t_||!a?j:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":t_&&a?a(""[Symbol.iterator]()):j,"%Symbol%":t_?Symbol:j,"%SyntaxError%":_T,"%ThrowTypeError%":UL,"%TypedArray%":HL,"%TypeError%":a_,"%Uint8Array%":typeof Uint8Array==="undefined"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?j:Uint32Array,"%URIError%":AL,"%WeakMap%":typeof WeakMap==="undefined"?j:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?j:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?j:WeakSet,"%Function.prototype.call%":HT,"%Function.prototype.apply%":V1,"%Object.defineProperty%":XL,"%Object.getPrototypeOf%":JL,"%Math.abs%":LL,"%Math.floor%":WL,"%Math.max%":YL,"%Math.min%":ZL,"%Math.pow%":RL,"%Math.round%":QL,"%Math.sign%":FL,"%Reflect.getPrototypeOf%":CL};if(a)try{null.error}catch(T){H1=a(a(T)),j_["%Error.prototype%"]=H1}var H1,BL=function T(_){var E;if(_==="%AsyncFunction%")E=JE("async function () {}");else if(_==="%GeneratorFunction%")E=JE("function* () {}");else if(_==="%AsyncGeneratorFunction%")E=JE("async function* () {}");else if(_==="%AsyncGenerator%"){var A=T("%AsyncGeneratorFunction%");if(A)E=A.prototype}else if(_==="%AsyncIteratorPrototype%"){var L=T("%AsyncGenerator%");if(L&&a)E=a(L.prototype)}return j_[_]=E,E},B1={__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"]},BT=JT(),kT=C1(),DL=BT.call(HT,Array.prototype.concat),zL=BT.call(V1,Array.prototype.splice),D1=BT.call(HT,String.prototype.replace),mT=BT.call(HT,String.prototype.slice),VL=BT.call(HT,RegExp.prototype.exec),NL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,GL=/\\(\\)?/g,qL=function T(_){var E=mT(_,0,1),A=mT(_,-1);if(E==="%"&&A!=="%")throw new _T("invalid intrinsic syntax, expected closing `%`");else if(A==="%"&&E!=="%")throw new _T("invalid intrinsic syntax, expected opening `%`");var L=[];return D1(_,NL,function(Y,X,C,F){L[L.length]=C?D1(F,GL,"$1"):X||Y}),L},SL=function T(_,E){var A=_,L;if(kT(B1,A))L=B1[A],A="%"+L[0]+"%";if(kT(j_,A)){var Y=j_[A];if(Y===e_)Y=BL(A);if(typeof Y==="undefined"&&!E)throw new a_("intrinsic "+_+" exists, but is not available. Please file an issue!");return{alias:L,name:A,value:Y}}throw new _T("intrinsic "+_+" does not exist!")};N1.exports=function T(_,E){if(typeof _!=="string"||_.length===0)throw new a_("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!=="boolean")throw new a_('"allowMissing" argument must be a boolean');if(VL(/^%?[^%]*%?$/,_)===null)throw new _T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var A=qL(_),L=A.length>0?A[0]:"",Y=SL("%"+L+"%",E),X=Y.name,C=Y.value,F=!1,D=Y.alias;if(D)L=D[0],zL(A,DL([0,1],D));for(var N=1,q=!0;N<A.length;N+=1){var H=A[N],J=mT(H,0,1),I=mT(H,-1);if((J==='"'||J==="'"||J==="`"||(I==='"'||I==="'"||I==="`"))&&J!==I)throw new _T("property names with quotes must have matching quotes");if(H==="constructor"||!q)F=!0;if(L+="."+H,X="%"+L+"%",kT(j_,X))C=j_[X];else if(C!=null){if(!(H in C)){if(!E)throw new a_("base intrinsic for "+_+" exists, but the property is not available.");return}if(CT&&N+1>=A.length){var G=CT(C,H);if(q=!!G,q&&"get"in G&&!("originalValue"in G.get))C=G.get;else C=C[H]}else q=kT(C,H),C=C[H];if(q&&!F)j_[X]=C}}return C}});var HE=k((EW,S1)=>{var G1=bT(),q1=XE(),wL=q1([G1("%String.prototype.indexOf%")]);S1.exports=function T(_,E){var A=G1(_,!!E);if(typeof A==="function"&&wL(_,".prototype.")>-1)return q1([A]);return A}});var BE=k((AW,f1)=>{var fL=bT(),DT=HE(),$L=UT(),IL=M_(),w1=fL("%Map%",!0),xL=DT("Map.prototype.get",!0),KL=DT("Map.prototype.set",!0),OL=DT("Map.prototype.has",!0),hL=DT("Map.prototype.delete",!0),PL=DT("Map.prototype.size",!0);f1.exports=!!w1&&function T(){var _,E={assert:function(A){if(!E.has(A))throw new IL("Side channel does not contain "+$L(A))},delete:function(A){if(_){var L=hL(_,A);if(PL(_)===0)_=void 0;return L}return!1},get:function(A){if(_)return xL(_,A)},has:function(A){if(_)return OL(_,A);return!1},set:function(A,L){if(!_)_=new w1;KL(_,A,L)}};return E}});var I1=k((LW,$1)=>{var vL=bT(),jT=HE(),kL=UT(),MT=BE(),mL=M_(),TT=vL("%WeakMap%",!0),bL=jT("WeakMap.prototype.get",!0),ML=jT("WeakMap.prototype.set",!0),jL=jT("WeakMap.prototype.has",!0),cL=jT("WeakMap.prototype.delete",!0);$1.exports=TT?function T(){var _,E,A={assert:function(L){if(!A.has(L))throw new mL("Side channel does not contain "+kL(L))},delete:function(L){if(TT&&L&&(typeof L==="object"||typeof L==="function")){if(_)return cL(_,L)}else if(MT){if(E)return E.delete(L)}return!1},get:function(L){if(TT&&L&&(typeof L==="object"||typeof L==="function")){if(_)return bL(_,L)}return E&&E.get(L)},has:function(L){if(TT&&L&&(typeof L==="object"||typeof L==="function")){if(_)return jL(_,L)}return!!E&&E.has(L)},set:function(L,Y){if(TT&&L&&(typeof L==="object"||typeof L==="function")){if(!_)_=new TT;ML(_,L,Y)}else if(MT){if(!E)E=MT();E.set(L,Y)}}};return A}:MT});var K1=k((WW,x1)=>{var gL=M_(),uL=UT(),yL=A0(),lL=BE(),dL=I1(),nL=dL||lL||yL;x1.exports=function T(){var _,E={assert:function(A){if(!E.has(A))throw new gL("Side channel does not contain "+uL(A))},delete:function(A){return!!_&&_.delete(A)},get:function(A){return _&&_.get(A)},has:function(A){return!!_&&_.has(A)},set:function(A,L){if(!_)_=nL();_.set(A,L)}};return E}});var cT=k((YW,O1)=>{var pL=String.prototype.replace,iL=/%20/g,DE={RFC1738:"RFC1738",RFC3986:"RFC3986"};O1.exports={default:DE.RFC3986,formatters:{RFC1738:function(T){return pL.call(T,iL,"+")},RFC3986:function(T){return String(T)}},RFC1738:DE.RFC1738,RFC3986:DE.RFC3986}});var NE=k((ZW,P1)=>{var sL=cT(),zE=Object.prototype.hasOwnProperty,c_=Array.isArray,f_=function(){var T=[];for(var _=0;_<256;++_)T.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return T}(),oL=function T(_){while(_.length>1){var E=_.pop(),A=E.obj[E.prop];if(c_(A)){var L=[];for(var Y=0;Y<A.length;++Y)if(typeof A[Y]!=="undefined")L.push(A[Y]);E.obj[E.prop]=L}}},h1=function T(_,E){var A=E&&E.plainObjects?{__proto__:null}:{};for(var L=0;L<_.length;++L)if(typeof _[L]!=="undefined")A[L]=_[L];return A},rL=function T(_,E,A){if(!E)return _;if(typeof E!=="object"&&typeof E!=="function"){if(c_(_))_.push(E);else if(_&&typeof _==="object"){if(A&&(A.plainObjects||A.allowPrototypes)||!zE.call(Object.prototype,E))_[E]=!0}else return[_,E];return _}if(!_||typeof _!=="object")return[_].concat(E);var L=_;if(c_(_)&&!c_(E))L=h1(_,A);if(c_(_)&&c_(E))return E.forEach(function(Y,X){if(zE.call(_,X)){var C=_[X];if(C&&typeof C==="object"&&Y&&typeof Y==="object")_[X]=T(C,Y,A);else _.push(Y)}else _[X]=Y}),_;return Object.keys(E).reduce(function(Y,X){var C=E[X];if(zE.call(Y,X))Y[X]=T(Y[X],C,A);else Y[X]=C;return Y},L)},tL=function T(_,E){return Object.keys(E).reduce(function(A,L){return A[L]=E[L],A},_)},eL=function(T,_,E){var A=T.replace(/\+/g," ");if(E==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch(L){return A}},VE=1024,aL=function T(_,E,A,L,Y){if(_.length===0)return _;var X=_;if(typeof _==="symbol")X=Symbol.prototype.toString.call(_);else if(typeof _!=="string")X=String(_);if(A==="iso-8859-1")return escape(X).replace(/%u[0-9a-f]{4}/gi,function(J){return"%26%23"+parseInt(J.slice(2),16)+"%3B"});var C="";for(var F=0;F<X.length;F+=VE){var D=X.length>=VE?X.slice(F,F+VE):X,N=[];for(var q=0;q<D.length;++q){var H=D.charCodeAt(q);if(H===45||H===46||H===95||H===126||H>=48&&H<=57||H>=65&&H<=90||H>=97&&H<=122||Y===sL.RFC1738&&(H===40||H===41)){N[N.length]=D.charAt(q);continue}if(H<128){N[N.length]=f_[H];continue}if(H<2048){N[N.length]=f_[192|H>>6]+f_[128|H&63];continue}if(H<55296||H>=57344){N[N.length]=f_[224|H>>12]+f_[128|H>>6&63]+f_[128|H&63];continue}q+=1,H=65536+((H&1023)<<10|D.charCodeAt(q)&1023),N[N.length]=f_[240|H>>18]+f_[128|H>>12&63]+f_[128|H>>6&63]+f_[128|H&63]}C+=N.join("")}return C},_5=function T(_){var E=[{obj:{o:_},prop:"o"}],A=[];for(var L=0;L<E.length;++L){var Y=E[L],X=Y.obj[Y.prop],C=Object.keys(X);for(var F=0;F<C.length;++F){var D=C[F],N=X[D];if(typeof N==="object"&&N!==null&&A.indexOf(N)===-1)E.push({obj:X,prop:D}),A.push(N)}}return oL(E),_},T5=function T(_){return Object.prototype.toString.call(_)==="[object RegExp]"},E5=function T(_){if(!_||typeof _!=="object")return!1;return!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},A5=function T(_,E){return[].concat(_,E)},L5=function T(_,E){if(c_(_)){var A=[];for(var L=0;L<_.length;L+=1)A.push(E(_[L]));return A}return E(_)};P1.exports={arrayToObject:h1,assign:tL,combine:A5,compact:_5,decode:eL,encode:aL,isBuffer:E5,isRegExp:T5,maybeMap:L5,merge:rL}});var j1=k((RW,M1)=>{var k1=K1(),gT=NE(),zT=cT(),W5=Object.prototype.hasOwnProperty,m1={brackets:function T(_){return _+"[]"},comma:"comma",indices:function T(_,E){return _+"["+E+"]"},repeat:function T(_){return _}},$_=Array.isArray,Y5=Array.prototype.push,b1=function(T,_){Y5.apply(T,$_(_)?_:[_])},Z5=Date.prototype.toISOString,v1=zT.default,t={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:gT.encode,encodeValuesOnly:!1,filter:void 0,format:v1,formatter:zT.formatters[v1],indices:!1,serializeDate:function T(_){return Z5.call(_)},skipNulls:!1,strictNullHandling:!1},R5=function T(_){return typeof _==="string"||typeof _==="number"||typeof _==="boolean"||typeof _==="symbol"||typeof _==="bigint"},GE={},Q5=function T(_,E,A,L,Y,X,C,F,D,N,q,H,J,I,G,h,b,w){var R=_,B=w,P=0,O=!1;while((B=B.get(GE))!==void 0&&!O){var W=B.get(_);if(P+=1,typeof W!=="undefined")if(W===P)throw new RangeError("Cyclic object value");else O=!0;if(typeof B.get(GE)==="undefined")P=0}if(typeof N==="function")R=N(E,R);else if(R instanceof Date)R=J(R);else if(A==="comma"&&$_(R))R=gT.maybeMap(R,function(d_){if(d_ instanceof Date)return J(d_);return d_});if(R===null){if(X)return D&&!h?D(E,t.encoder,b,"key",I):E;R=""}if(R5(R)||gT.isBuffer(R)){if(D){var V=h?E:D(E,t.encoder,b,"key",I);return[G(V)+"="+G(D(R,t.encoder,b,"value",I))]}return[G(E)+"="+G(String(R))]}var u=[];if(typeof R==="undefined")return u;var y;if(A==="comma"&&$_(R)){if(h&&D)R=gT.maybeMap(R,D);y=[{value:R.length>0?R.join(",")||null:void 0}]}else if($_(N))y=N;else{var n=Object.keys(R);y=q?n.sort(q):n}var A_=F?String(E).replace(/\./g,"%2E"):String(E),__=L&&$_(R)&&R.length===1?A_+"[]":A_;if(Y&&$_(R)&&R.length===0)return __+"[]";for(var e=0;e<y.length;++e){var o=y[e],F_=typeof o==="object"&&o&&typeof o.value!=="undefined"?o.value:R[o];if(C&&F_===null)continue;var J_=H&&F?String(o).replace(/\./g,"%2E"):String(o),l_=$_(R)?typeof A==="function"?A(__,J_):__:__+(H?"."+J_:"["+J_+"]");w.set(_,P);var AT=k1();AT.set(GE,w),b1(u,T(F_,l_,A,L,Y,X,C,F,A==="comma"&&h&&$_(R)?null:D,N,q,H,J,I,G,h,b,AT))}return u},F5=function T(_){if(!_)return t;if(typeof _.allowEmptyArrays!=="undefined"&&typeof _.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.encodeDotInKeys!=="undefined"&&typeof _.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(_.encoder!==null&&typeof _.encoder!=="undefined"&&typeof _.encoder!=="function")throw new TypeError("Encoder has to be a function.");var E=_.charset||t.charset;if(typeof _.charset!=="undefined"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=zT.default;if(typeof _.format!=="undefined"){if(!W5.call(zT.formatters,_.format))throw new TypeError("Unknown format option provided.");A=_.format}var L=zT.formatters[A],Y=t.filter;if(typeof _.filter==="function"||$_(_.filter))Y=_.filter;var X;if(_.arrayFormat in m1)X=_.arrayFormat;else if("indices"in _)X=_.indices?"indices":"repeat";else X=t.arrayFormat;if("commaRoundTrip"in _&&typeof _.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var C=typeof _.allowDots==="undefined"?_.encodeDotInKeys===!0?!0:t.allowDots:!!_.allowDots;return{addQueryPrefix:typeof _.addQueryPrefix==="boolean"?_.addQueryPrefix:t.addQueryPrefix,allowDots:C,allowEmptyArrays:typeof _.allowEmptyArrays==="boolean"?!!_.allowEmptyArrays:t.allowEmptyArrays,arrayFormat:X,charset:E,charsetSentinel:typeof _.charsetSentinel==="boolean"?_.charsetSentinel:t.charsetSentinel,commaRoundTrip:!!_.commaRoundTrip,delimiter:typeof _.delimiter==="undefined"?t.delimiter:_.delimiter,encode:typeof _.encode==="boolean"?_.encode:t.encode,encodeDotInKeys:typeof _.encodeDotInKeys==="boolean"?_.encodeDotInKeys:t.encodeDotInKeys,encoder:typeof _.encoder==="function"?_.encoder:t.encoder,encodeValuesOnly:typeof _.encodeValuesOnly==="boolean"?_.encodeValuesOnly:t.encodeValuesOnly,filter:Y,format:A,formatter:L,serializeDate:typeof _.serializeDate==="function"?_.serializeDate:t.serializeDate,skipNulls:typeof _.skipNulls==="boolean"?_.skipNulls:t.skipNulls,sort:typeof _.sort==="function"?_.sort:null,strictNullHandling:typeof _.strictNullHandling==="boolean"?_.strictNullHandling:t.strictNullHandling}};M1.exports=function(T,_){var E=T,A=F5(_),L,Y;if(typeof A.filter==="function")Y=A.filter,E=Y("",E);else if($_(A.filter))Y=A.filter,L=Y;var X=[];if(typeof E!=="object"||E===null)return"";var C=m1[A.arrayFormat],F=C==="comma"&&A.commaRoundTrip;if(!L)L=Object.keys(E);if(A.sort)L.sort(A.sort);var D=k1();for(var N=0;N<L.length;++N){var q=L[N],H=E[q];if(A.skipNulls&&H===null)continue;b1(X,Q5(H,q,C,F,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,D))}var J=X.join(A.delimiter),I=A.addQueryPrefix===!0?"?":"";if(A.charsetSentinel)if(A.charset==="iso-8859-1")I+="utf8=%26%2310003%3B&";else I+="utf8=%E2%9C%93&";return J.length>0?I+J:""}});var y1=k((QW,u1)=>{var g_=NE(),qE=Object.prototype.hasOwnProperty,c1=Array.isArray,d={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:g_.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},X5=function(T){return T.replace(/&#(\d+);/g,function(_,E){return String.fromCharCode(parseInt(E,10))})},g1=function(T,_,E){if(T&&typeof T==="string"&&_.comma&&T.indexOf(",")>-1)return T.split(",");if(_.throwOnLimitExceeded&&E>=_.arrayLimit)throw new RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");return T},U5="utf8=%26%2310003%3B",J5="utf8=%E2%9C%93",C5=function T(_,E){var A={__proto__:null},L=E.ignoreQueryPrefix?_.replace(/^\?/,""):_;L=L.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var Y=E.parameterLimit===1/0?void 0:E.parameterLimit,X=L.split(E.delimiter,E.throwOnLimitExceeded?Y+1:Y);if(E.throwOnLimitExceeded&&X.length>Y)throw new RangeError("Parameter limit exceeded. Only "+Y+" parameter"+(Y===1?"":"s")+" allowed.");var C=-1,F,D=E.charset;if(E.charsetSentinel){for(F=0;F<X.length;++F)if(X[F].indexOf("utf8=")===0){if(X[F]===J5)D="utf-8";else if(X[F]===U5)D="iso-8859-1";C=F,F=X.length}}for(F=0;F<X.length;++F){if(F===C)continue;var N=X[F],q=N.indexOf("]="),H=q===-1?N.indexOf("="):q+1,J,I;if(H===-1)J=E.decoder(N,d.decoder,D,"key"),I=E.strictNullHandling?null:"";else J=E.decoder(N.slice(0,H),d.decoder,D,"key"),I=g_.maybeMap(g1(N.slice(H+1),E,c1(A[J])?A[J].length:0),function(h){return E.decoder(h,d.decoder,D,"value")});if(I&&E.interpretNumericEntities&&D==="iso-8859-1")I=X5(String(I));if(N.indexOf("[]=")>-1)I=c1(I)?[I]:I;var G=qE.call(A,J);if(G&&E.duplicates==="combine")A[J]=g_.combine(A[J],I);else if(!G||E.duplicates==="last")A[J]=I}return A},H5=function(T,_,E,A){var L=0;if(T.length>0&&T[T.length-1]==="[]"){var Y=T.slice(0,-1).join("");L=Array.isArray(_)&&_[Y]?_[Y].length:0}var X=A?_:g1(_,E,L);for(var C=T.length-1;C>=0;--C){var F,D=T[C];if(D==="[]"&&E.parseArrays)F=E.allowEmptyArrays&&(X===""||E.strictNullHandling&&X===null)?[]:g_.combine([],X);else{F=E.plainObjects?{__proto__:null}:{};var N=D.charAt(0)==="["&&D.charAt(D.length-1)==="]"?D.slice(1,-1):D,q=E.decodeDotInKeys?N.replace(/%2E/g,"."):N,H=parseInt(q,10);if(!E.parseArrays&&q==="")F={0:X};else if(!isNaN(H)&&D!==q&&String(H)===q&&H>=0&&(E.parseArrays&&H<=E.arrayLimit))F=[],F[H]=X;else if(q!=="__proto__")F[q]=X}X=F}return X},B5=function T(_,E,A,L){if(!_)return;var Y=A.allowDots?_.replace(/\.([^.[]+)/g,"[$1]"):_,X=/(\[[^[\]]*])/,C=/(\[[^[\]]*])/g,F=A.depth>0&&X.exec(Y),D=F?Y.slice(0,F.index):Y,N=[];if(D){if(!A.plainObjects&&qE.call(Object.prototype,D)){if(!A.allowPrototypes)return}N.push(D)}var q=0;while(A.depth>0&&(F=C.exec(Y))!==null&&q<A.depth){if(q+=1,!A.plainObjects&&qE.call(Object.prototype,F[1].slice(1,-1))){if(!A.allowPrototypes)return}N.push(F[1])}if(F){if(A.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+A.depth+" and strictDepth is true");N.push("["+Y.slice(F.index)+"]")}return H5(N,E,A,L)},D5=function T(_){if(!_)return d;if(typeof _.allowEmptyArrays!=="undefined"&&typeof _.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.decodeDotInKeys!=="undefined"&&typeof _.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(_.decoder!==null&&typeof _.decoder!=="undefined"&&typeof _.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof _.charset!=="undefined"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof _.throwOnLimitExceeded!=="undefined"&&typeof _.throwOnLimitExceeded!=="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var E=typeof _.charset==="undefined"?d.charset:_.charset,A=typeof _.duplicates==="undefined"?d.duplicates:_.duplicates;if(A!=="combine"&&A!=="first"&&A!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var L=typeof _.allowDots==="undefined"?_.decodeDotInKeys===!0?!0:d.allowDots:!!_.allowDots;return{allowDots:L,allowEmptyArrays:typeof _.allowEmptyArrays==="boolean"?!!_.allowEmptyArrays:d.allowEmptyArrays,allowPrototypes:typeof _.allowPrototypes==="boolean"?_.allowPrototypes:d.allowPrototypes,allowSparse:typeof _.allowSparse==="boolean"?_.allowSparse:d.allowSparse,arrayLimit:typeof _.arrayLimit==="number"?_.arrayLimit:d.arrayLimit,charset:E,charsetSentinel:typeof _.charsetSentinel==="boolean"?_.charsetSentinel:d.charsetSentinel,comma:typeof _.comma==="boolean"?_.comma:d.comma,decodeDotInKeys:typeof _.decodeDotInKeys==="boolean"?_.decodeDotInKeys:d.decodeDotInKeys,decoder:typeof _.decoder==="function"?_.decoder:d.decoder,delimiter:typeof _.delimiter==="string"||g_.isRegExp(_.delimiter)?_.delimiter:d.delimiter,depth:typeof _.depth==="number"||_.depth===!1?+_.depth:d.depth,duplicates:A,ignoreQueryPrefix:_.ignoreQueryPrefix===!0,interpretNumericEntities:typeof _.interpretNumericEntities==="boolean"?_.interpretNumericEntities:d.interpretNumericEntities,parameterLimit:typeof _.parameterLimit==="number"?_.parameterLimit:d.parameterLimit,parseArrays:_.parseArrays!==!1,plainObjects:typeof _.plainObjects==="boolean"?_.plainObjects:d.plainObjects,strictDepth:typeof _.strictDepth==="boolean"?!!_.strictDepth:d.strictDepth,strictNullHandling:typeof _.strictNullHandling==="boolean"?_.strictNullHandling:d.strictNullHandling,throwOnLimitExceeded:typeof _.throwOnLimitExceeded==="boolean"?_.throwOnLimitExceeded:!1}};u1.exports=function(T,_){var E=D5(_);if(T===""||T===null||typeof T==="undefined")return E.plainObjects?{__proto__:null}:{};var A=typeof T==="string"?C5(T,E):T,L=E.plainObjects?{__proto__:null}:{},Y=Object.keys(A);for(var X=0;X<Y.length;++X){var C=Y[X],F=B5(C,A[C],E,typeof T==="string");L=g_.merge(L,F,E)}if(E.allowSparse===!0)return L;return g_.compact(L)}});var d1=k((FW,l1)=>{var z5=j1(),V5=y1(),N5=cT();l1.exports={formats:N5,parse:V5,stringify:z5}});var TY=ST(wT(),1);var kE={};B4(kE,{zodSchemaKey:()=>fT,webSocketServerArgsKey:()=>D_,webSocketMessageArgsKey:()=>WT,webSocketKey:()=>B_,webSocketEventKey:()=>b_,webSocketEventArgumentsKey:()=>Z_,webSocketConnectionArgsKey:()=>z_,webSocketCloseReasonArgsKey:()=>ZT,webSocketCloseCodeArgsKey:()=>YT,routeModelArgsKey:()=>E_,responseHeadersArgsKey:()=>R_,responseBodyArgsKey:()=>W_,requestHeadersArgsKey:()=>U_,requestHeaderArgsKey:()=>V_,requestBodyArgsKey:()=>N_,requestArgsKey:()=>q_,queryArgsKey:()=>RT,paramsArgsKey:()=>T_,paramArgsKey:()=>G_,moduleKey:()=>s_,middlewareKey:()=>m_,injectableKey:()=>k_,injectKey:()=>i_,httpServerArgsKey:()=>z4,guardKey:()=>v_,dispatcherKey:()=>P_,controllerKey:()=>H_,controllerHttpKey:()=>K_,contextArgsKey:()=>S_,configKey:()=>iT,argumentsKey:()=>g});var g=Symbol("__bool:arguments__"),Z_=Symbol("__bool:webSocketEventArguments__"),iT=Symbol("__bool:config__"),H_=Symbol("__bool:controller__"),P_=Symbol("__bool:dispatcher__"),v_=Symbol("__bool:guard__"),K_=Symbol("__bool:controller.http__"),i_=Symbol("__bool:inject__"),k_=Symbol("__bool:injectable__"),m_=Symbol("__bool:middleware__"),s_=Symbol("__bool:module__"),fT=Symbol("__bool:zodSchema__"),B_=Symbol("__bool:webSocket__"),b_=Symbol("__bool:webSocket:event__"),D_=Symbol("__bool:webSocketArguments:server__"),z_=Symbol("__bool:webSocketArguments:connection__"),WT=Symbol("__bool:webSocketArguments:message__"),YT=Symbol("__bool:webSocketArguments:closeCode__"),ZT=Symbol("__bool:webSocketArguments:closeReason__"),z4=Symbol("__bool:httpArguments:server__"),U_=Symbol("__bool:httpArguments:requestHeaders__"),V_=Symbol("__bool:httpArguments:requestHeader__"),N_=Symbol("__bool:httpArguments:requestBody__"),T_=Symbol("__bool:httpArguments:params__"),G_=Symbol("__bool:httpArguments:param__"),RT=Symbol("__bool:httpArguments:query__"),q_=Symbol("__bool:httpArguments:request__"),R_=Symbol("__bool:httpArguments:responseHeaders__"),S_=Symbol("__bool:httpArguments:context__"),E_=Symbol("__bool:httpArguments:routeModel__"),W_=Symbol("__bool:httpArguments:responseBody__");var V4=(T)=>(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(g,_.constructor,E)||{};L[`argumentIndexes.${A}`]={index:A,type:U_,zodSchema:T},Reflect.defineMetadata(g,L,_.constructor,E)},N4=(T,_)=>(E,A,L)=>{if(!A)return;let Y=Reflect.getOwnMetadata(g,E.constructor,A)||{};Y[`argumentIndexes.${L}`]={index:L,type:V_,key:T,zodSchema:_},Reflect.defineMetadata(g,Y,E.constructor,A)},G4=(T,_)=>(E,A,L)=>{if(!A)return;let Y=Reflect.getOwnMetadata(g,E.constructor,A)||{};Y[`argumentIndexes.${L}`]={index:L,type:N_,zodSchema:T,parser:_},Reflect.defineMetadata(g,Y,E.constructor,A)},q4=(T)=>(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(g,_.constructor,E)||{};L[`argumentIndexes.${A}`]={index:A,type:T_,zodSchema:T},Reflect.defineMetadata(g,L,_.constructor,E)},S4=(T,_)=>(E,A,L)=>{if(!A)return;let Y=Reflect.getOwnMetadata(g,E.constructor,A)||{};Y[`argumentIndexes.${L}`]={index:L,type:G_,key:T,zodSchema:_},Reflect.defineMetadata(g,Y,E.constructor,A)},w4=(T)=>(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(g,_.constructor,E)||{};L[`argumentIndexes.${A}`]={index:A,type:RT,zodSchema:T},Reflect.defineMetadata(g,L,_.constructor,E)},f4=(T)=>(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(g,_.constructor,E)||{};L[`argumentIndexes.${A}`]={index:A,type:q_,zodSchema:T},Reflect.defineMetadata(g,L,_.constructor,E)},$4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(g,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:R_},Reflect.defineMetadata(g,A,T.constructor,_)},I4=(T)=>(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(g,_.constructor,E)||{};L[`argumentIndexes.${A}`]={index:A,type:S_,key:T},Reflect.defineMetadata(g,L,_.constructor,E)},x4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(g,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:E_},Reflect.defineMetadata(g,A,T.constructor,_)};var K4=(T)=>(_)=>{let E={prefix:!T?.startsWith("/")?`/${T||""}`:T,httpMetadata:[...Reflect.getOwnMetadata(K_,_.constructor)||[]]};Reflect.defineMetadata(H_,E,_)};var O4=()=>(T)=>{Reflect.defineMetadata(P_,void 0,T)};var h4=()=>(T)=>{if(!("enforce"in T.prototype)||typeof T.prototype.enforce!=="function")return;let _=void 0;Reflect.defineMetadata(v_,_,T)};var o_=(T,_)=>(E,A,L)=>{if(!(L?.value instanceof Function))throw Error(`${_} decorator only use for class method.`);let Y=[...Reflect.getOwnMetadata(K_,E.constructor)||[],{path:!T.startsWith("/")?`/${T}`:T,httpMethod:_.toUpperCase(),methodName:A,descriptor:L}];Reflect.defineMetadata(K_,Y,E.constructor)},P4=(T="/")=>o_(T,"Get"),v4=(T="/")=>o_(T,"Post"),k4=(T="/")=>o_(T,"Put"),m4=(T="/")=>o_(T,"Patch"),b4=(T="/")=>o_(T,"Delete"),M4=(T="/")=>o_(T,"Options");var j4=(T)=>{return(_,E,A)=>{let L=Reflect.getMetadata(i_,_)||[];L[A]=T,Reflect.defineMetadata(i_,L,_)}};var c4=()=>(T)=>Reflect.defineMetadata(k_,void 0,T);var g4=()=>(T)=>{Reflect.defineMetadata(m_,void 0,T)};var u4=(T)=>(_)=>{let{middlewares:E,guards:A,dispatchers:L,controllers:Y,dependencies:X,webSockets:C}=T||{};if(E){for(let F=0;F<E.length;F++)if(!Reflect.getOwnMetadataKeys(E[F]).includes(m_))throw Error(`${E[F].name} is not a middleware.`)}if(A){for(let F=0;F<A.length;F++)if(!Reflect.getOwnMetadataKeys(A[F]).includes(v_))throw Error(`${A[F].name} is not a guard.`)}if(L){for(let F=0;F<L.length;F++)if(!Reflect.getOwnMetadataKeys(L[F]).includes(P_))throw Error(`${L[F].name} is not a dispatcher.`)}if(Y){for(let F=0;F<Y.length;F++)if(!Reflect.getOwnMetadataKeys(Y[F]).includes(H_))throw Error(`${Y[F].name} is not a controller.`)}if(X){for(let F=0;F<X.length;F++)if(!Reflect.getOwnMetadataKeys(X[F]).includes(k_))throw Error(`${X[F].name} is not an injectable.`)}if(C){for(let F=0;F<C.length;F++)if(!Reflect.getOwnMetadataKeys(C[F]).includes(B_))throw Error(`${C[F].name} is not a websocket gateway.`)}Reflect.defineMetadata(s_,T,_)};var $T=Symbol("__bool:webSocket.upgrade__"),y4=(T,_,E)=>{let A=new URL(_.url);return T.upgrade(_,{data:{method:_.method.toUpperCase(),pathname:A.pathname,query:E}})},l4=(T)=>(_)=>{let{prefix:E}=T||{};_.prototype[$T]=y4;let A=Object.getOwnPropertyDescriptor(_.prototype,$T),L=!A?[]:[{path:"/",httpMethod:"GET",methodName:$T,descriptor:A},{path:"/",httpMethod:"POST",methodName:$T,descriptor:A}],Y={prefix:!E?.startsWith("/")?`/${E||""}`:E,events:Reflect.getOwnMetadata(b_,_)||{},http:L};Reflect.defineMetadata(B_,Y,_)};var d4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(Z_,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:z_},Reflect.defineMetadata(Z_,A,T.constructor,_)},n4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(Z_,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:D_},Reflect.defineMetadata(Z_,A,T.constructor,_)},p4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(Z_,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:YT},Reflect.defineMetadata(Z_,A,T.constructor,_)},i4=()=>(T,_,E)=>{if(!_)return;let A=Reflect.getOwnMetadata(Z_,T.constructor,_)||{};A[`argumentIndexes.${E}`]={index:E,type:ZT},Reflect.defineMetadata(Z_,A,T.constructor,_)};var s4=(T)=>(_,E,A)=>{if(!(A.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let L=Reflect.getOwnMetadata(Z_,_.constructor,E),Y=Object.freeze({methodName:E,descriptor:A,arguments:L}),X={...Reflect.getOwnMetadata(b_,_.constructor)||void 0,[T]:Y};Reflect.defineMetadata(b_,Y,_.constructor,E),Reflect.defineMetadata(b_,X,_.constructor)};var o4=(T)=>{return(_,E,A)=>{if(!E)return;let L=Reflect.getOwnMetadata(fT,_.constructor,E)||{};L[`paramterIndexes.${A}`]={index:A,schema:T},Reflect.defineMetadata(fT,L,_.constructor,E)}};var dW=ST(wT(),1),t1=ST(d1(),1);var Q_;(function(T){T.year="year",T.month="month",T.day="day",T.hours="hours",T.minutes="minutes",T.seconds="seconds",T.miliseconds="miliseconds"})(Q_||(Q_={}));var n1=(T,_,E=Q_.day)=>{let A=T instanceof Date?T:new Date(T);switch(E){case Q_.year:A.setFullYear(A.getFullYear()+_);break;case Q_.month:A.setMonth(A.getMonth()+_);break;case Q_.day:A.setDate(A.getDate()+_);break;case Q_.hours:A.setHours(A.getHours()+_);break;case Q_.minutes:A.setMinutes(A.getMinutes()+_);break;case Q_.seconds:A.setSeconds(A.getSeconds()+_);break;case Q_.miliseconds:A.setMilliseconds(A.getMilliseconds()+_);break}return A};class I_{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(T){this.alias=this._thinAlias(T)}test(T,_){try{let E=this._map.get(_),A=this.alias.split("/"),L=this._thinAlias(T).split("/");if(!E)return;if(A.length!==L.length)return;let Y=Object(),X=this.alias.replace(new RegExp(I_.rootPattern,"g"),I_.innerRootPattern);if(!new RegExp(X).test(this._thinAlias(T)))return;for(let C=0;C<A.length;C++){let F=A[C],D=L[C];if(!new RegExp(I_.rootPattern,"g").test(F)){if(F!==D)return}else{let N=!1;if(F.replace(new RegExp(I_.rootPattern,"g"),(q,H,J)=>{if(J===0)D.replace(new RegExp(I_.innerRootPattern,"g"),(I,G,h)=>{if(h===0)Object.assign(Y,{[H]:I});return I});return q}),N)return}continue}return Object.freeze({parameters:Y,model:E})}catch(E){return console.error(E),!1}}isMatch(T,_){try{if(!this._map.get(_))return;let A=this.alias.split("/"),L=this._thinAlias(T).split("/");if(A.length!==L.length)return!1;let Y=Object();for(let X=0;X<A.length;X++){let C=A[X],F=L[X];if(!new RegExp(I_.rootPattern,"g").test(C)){if(C!==F)return!1}else{let D=!1;if(C.replace(new RegExp(I_.rootPattern,"g"),(N,q,H)=>{if(!new RegExp(H,"g").test(F))D=!0;else Object.assign(Y,{[q]:F});return""}),D)return!1}continue}return!0}catch(E){console.error(E);return}}get(T){if(!this._map.get("GET"))this._map.set("GET",T);return this}post(T){if(!this._map.get("POST"))this._map.set("POST",T);return this}put(T){if(!this._map.get("PUT"))this._map.set("PUT",T);return this}delete(T){if(!this._map.get("DELETE"))this._map.set("DELETE",T);return this}connect(T){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",T);return this}options(T){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",T);return this}trace(T){if(!this._map.get("TRACE"))return this._map.set("TRACE",T);return this}patch(T){if(!this._map.get("PATCH"))return this._map.set("PATCH",T);return this}_thinAlias(T){return T.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((E,A)=>{let L=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!L.test(E)){if(L=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!L.test(E))return E;return E.replace(L,(Y,X)=>`${Y}(.*?)`)}return E}).join("/")}get _filteredPath(){return this.alias.split("/").map((E,A)=>{let L=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!L.test(E)){if(L=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!L.test(E))return E;return E.replace(L,(Y,X)=>"(.*?)")}return E.replace(L,(Y,X,C)=>C)}).join("/")}}var p1=I_;class VT{alias;_routes=new Map;constructor(T){this.alias=this._thinAlias(T)}route(T){let _=this._thinAlias(`${this.alias}/${T}`),E=this._routes.get(_),A=!E?new p1(`${this.alias}/${T}`):E;if(!E)this._routes.set(_,A);return A}_thinAlias(T){return T.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class NT{_routers=new Map;add(...T){for(let _=0;_<T.length;_++){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 L=A.test(T,_);if(!L)continue;return L}return}}class uT{eventName;metadata;_context=void 0;constructor({eventName:T,metadata:_}){this.eventName=T,this.metadata=_}bind(T){return this._context=T,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 GT{rawAlias;alias;routes=[];constructor(T="/"){this.rawAlias=T;this.alias=GT.thinAlias(T)}addRoutes(...T){for(let _ of T)if(!this.routes.includes(_))this.routes.push(_);return this}bind(T){for(let _ of this.routes)_.bind(T);return this}execute(){let T=new Map;for(let _ of this.routes)T.set(`${this.alias}:::${_.eventName}`,_.execute());return T}static thinAlias(T){return T.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class ET{rawPrefix;prefix;routers=[];constructor(T="/"){this.rawPrefix=T;this.prefix=ET.thinPrefix(T)}addRouters(...T){for(let _=0;_<T.length;_++)if(!this.routers.includes(T[_]))this.routers.push(T[_]);for(let _ of T)if(!this.routers.includes(_))this.routers.push(_);return this}execute(){let T=new Map;for(let _ of this.routers){let E=_.execute();for(let[A,L]of E.entries())T.set(`/${ET.thinPrefix(`${this.prefix}/${A}`)}`,L)}return T}static thinPrefix(T){return T.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}var G5=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 u_ extends Error{httpCode;message;data;constructor({httpCode:T,data:_,message:E}){super();this.httpCode=T,this.message=!E?.trim()?G5[T]:E.trim(),this.data=_}}var q5=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 qT extends Error{httpCode;message;data;constructor({httpCode:T,data:_,message:E}){super();this.httpCode=T,this.message=!E?.trim()?q5[T]:E.trim(),this.data=_}}var i1=(T,_=new Headers)=>{if(_.set("Content-Type","application/json"),T instanceof u_||T instanceof qT)return new Response(JSON.stringify(T),{status:T.httpCode,statusText:T.message,headers:_});return new Response(JSON.stringify((()=>{switch(typeof T){case"object":return!(T instanceof Error)?T:{message:T.message,code:T.name,cause:T.cause};case"string":return{message:T};case"number":return{code:T};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:_})};var vW=async function(){}.constructor;var s1=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),o1=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),y_=(T,_={})=>{let{color:E,backgroundColor:A,bold:L,underline:Y}=_,X="";if(L)X+="\x1B[1m";if(Y)X+="\x1B[4m";if(E&&s1[E])X+=`\x1B[${s1[E]}m`;if(A&&o1[A])X+=`\x1B[${o1[A]}m`;return`${X}${T}\x1B[0m`};var r1=(T)=>{let{headers:_,method:E}=T,A=_.get("upgrade")?.toLowerCase()||"",L=_.get("connection")?.toLowerCase()||"";return E==="GET"&&A?.toLowerCase()==="websocket"&&L?.toLowerCase().includes("upgrade")};var uW=ST(wT(),1);class yT{_mapper=new Map;get(T){if(this._mapper.has(T))return this._mapper.get(T);if(typeof T!=="function")return;let _=Reflect.getMetadataKeys(T);if(![k_,H_,m_,v_,P_,B_].some((Y)=>_.includes(Y)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let A=(Reflect.getOwnMetadata(i_,T)||[]).map((Y)=>this.get(Y)),L=new T(...A);return this._mapper.set(T,L),L}set(T,_){this._mapper.set(T,_)}}var S5=900,Y_=(T)=>{return T.headers.set("X-Powered-By","Bool Typescript"),T},w5=({controllerConstructor:T,httpRouterGroup:_,injector:E,prefix:A})=>{if(!Reflect.getOwnMetadataKeys(T).includes(H_))throw Error(`${T.name} is not a controller.`);let L=E.get(T);if(!L)throw Error("Can not initialize controller.");let Y=Reflect.getOwnMetadata(H_,T)||{prefix:"/",httpMetadata:[]},X=Reflect.getOwnMetadata(K_,T)||[],C=new VT(`/${A||""}/${Y.prefix}`);return X.forEach((F)=>{if(typeof F.descriptor.value!=="function")return;let D=C.route(F.path),N=F.descriptor.value.bind(L),q=Object.freeze({class:T,funcName:F.methodName,func:N});switch(F.httpMethod){case"GET":return D.get(q);case"POST":return D.post(q);case"PUT":return D.put(q);case"PATCH":return D.patch(q);case"DELETE":return D.delete(q);case"OPTIONS":return D.options(q)}}),_.add(C)},f5=({injector:T,httpRouterGroup:_,prefix:E,webSocketRouterGroup:A,webSocketConstructor:L})=>{if(!Reflect.getOwnMetadataKeys(L).includes(B_))throw Error(`${L.name} is not a controller.`);let Y=T.get(L);if(!Y)throw Error("Can not initialize webSocket.");let X=Reflect.getOwnMetadata(B_,L)||{prefix:"/",events:[],http:[]},C=`/${E||""}/${X.prefix}`,F=new VT(C);for(let[N,q]of Object.entries(X.http)){if(typeof q.descriptor?.value!=="function")continue;let H=F.route(q.path),J=q.descriptor.value.bind(Y),I=Object.freeze({class:L,funcName:q.methodName,func:J});switch(q.httpMethod){case"GET":H.get(I);break;case"POST":H.post(I);break}}_.add(F);let D=new GT(C);for(let[N,q]of Object.entries(X.events)){let H=new uT({eventName:N,metadata:q});D.addRoutes(H)}return D.bind(Y),A.addRouters(D),Object.freeze({httpRouterGroup:_,webSocketRouterGroup:A})},c=async(T,_,E,A)=>{try{let L=await _.safeParseAsync(T);if(!L.success)throw new u_({httpCode:400,message:`Validation at the [${A.toString()}] method fails at positional argument [${E}].`,data:L.error.issues});return L.data}catch(L){if(L instanceof u_)throw L;throw new qT({httpCode:500,message:`Validation at the [${A.toString()}] method error at positional argument [${E}].`,data:!(L instanceof Error)?L:[{message:L.message,code:L.name,cause:L.cause}]})}},$5=async(T,_)=>{if(!Reflect.getOwnMetadataKeys(T).includes(s_))throw Error(`${T.name} is not a module.`);let E=new yT,A=Reflect.getOwnMetadata(s_,T);if(!A)return;let{loaders:L,middlewares:Y,guards:X,dispatchers:C,controllers:F,dependencies:D,webSockets:N,prefix:q,config:H}=A,J=`${_.prefix||""}/${q||""}`,{config:I}=Object.freeze({config:{...typeof _.config!=="function"?_.config:await _.config(),...typeof H!=="function"?typeof H!=="object"?void 0:H:await H()}});if(E.set(iT,I),L){let W=[];for(let[u,y]of Object.entries(L))W.push(async()=>{try{let n=await y({config:I});return console.info(`${y_(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${u}] initialized successfully.`),n}catch(n){throw console.error(`${y_(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${u}] initialization failed.`),_.debug&&console.error(n),n}});let V=await Promise.all(W.map((u)=>u()));for(let u=0;u<V.length;u++){let[y,n]=V[u];E.set(y,n)}}!D||D.map((W)=>E.get(W));let G=[],h=[];Y&&Y.forEach((W)=>{let V=E.get(W);if(V.start&&typeof V.start==="function")G.push(Object.freeze({class:W,funcName:"start",func:V.start.bind(V)}));if(V.end&&typeof V.end==="function")h.push(Object.freeze({class:W,funcName:"end",func:V.end.bind(V)}))});let b=!X?[]:X.map((W)=>{let V=E.get(W);return Object.freeze({class:W,funcName:"enforce",func:V.enforce.bind(V)})}),w=[],R=[];C&&C.forEach((W)=>{let V=E.get(W);if(V.open&&typeof V.open==="function")w.push(Object.freeze({class:W,funcName:"open",func:V.open.bind(V)}));if(V.close&&typeof V.close==="function")R.push(Object.freeze({class:W,funcName:"close",func:V.close.bind(V)}))});let B=new NT;F&&F.forEach((W)=>w5({controllerConstructor:W,httpRouterGroup:B,injector:E,prefix:J}));let P=new NT,O=new ET;return N&&N.forEach((W)=>f5({webSocketConstructor:W,httpRouterGroup:P,webSocketRouterGroup:O,injector:E,prefix:J})),Object.freeze({prefix:A.prefix,injector:E,startMiddlewareGroup:G,endMiddlewareGroup:h,guardGroup:b,openDispatcherGroup:w,closeDispatcherGroup:R,controllerRouterGroup:B,webSocketHttpRouterGroup:P,webSocketRouterGroup:O})},I5=async(T,_)=>{let{request:E,server:A}=T,{query:L,responseHeaders:Y,route:{model:X}}=_,C=await X.func(...[A,E,L]);if(typeof C!=="boolean")return Y_(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:Y}));if(!C)return Y_(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:Y}));return C},x5=async(T,_)=>{let{request:E,server:A}=T,{query:L,responseHeaders:Y,route:{parameters:X,model:C},moduleResolution:{startMiddlewareGroup:F,endMiddlewareGroup:D,guardGroup:N,openDispatcherGroup:q,closeDispatcherGroup:H}}=_,J={[U_]:E.headers,[R_]:Y,[RT]:L,[T_]:X,[E_]:C},I={get(w){return J[w]},set(w,R){if(w in J)throw Error(`${String(w)} already exists in context.`);J[w]=R}};for(let w=0;w<F.length;w++){let R=[],B=F[w],P=Reflect.getOwnMetadata(g,B.class,B.funcName)||{};if(P)for(let[O,W]of Object.entries(P))switch(W.type){case q_:R[W.index]=!W.zodSchema?E:await c(E,W.zodSchema,W.index,B.funcName);break;case N_:R[W.index]=!W.zodSchema?await E[W.parser||"json"]():await c(await E[W.parser||"json"](),W.zodSchema,W.index,B.funcName);break;case S_:R[W.index]=!W.key?I:I.get(W.key);break;case U_:R[W.index]=!W.zodSchema?E.headers:await c(E.headers.toJSON(),W.zodSchema,W.index,B.funcName);break;case R_:R[W.index]=J[W.type];break;case V_:R[W.index]=!W.zodSchema?E.headers.get(W.key)||void 0:await c(E.headers.get(W.key)||void 0,W.zodSchema,W.index,B.funcName);break;case G_:R[W.index]=!W.zodSchema?J[T_][W.key]||void 0:await c(J[T_][W.key],W.zodSchema,W.index,B.funcName);break;case E_:R[W.index]=J[E_];break;default:R[W.index]=!W.zodSchema?!(W.type in J)?void 0:J[W.type]:await c(!(W.type in J)?void 0:J[W.type],W.zodSchema,W.index,B.funcName);break}if(J[W_]=await B.func(...R),J[W_]instanceof Response)return Y_(J[W_])}for(let w=0;w<N.length;w++){let R=[],B=N[w],P=Reflect.getOwnMetadata(g,B.class,B.funcName)||{};if(P)for(let[W,V]of Object.entries(P))switch(V.type){case q_:R[V.index]=!V.zodSchema?E:await c(E,V.zodSchema,V.index,B.funcName);break;case N_:R[V.index]=!V.zodSchema?await E[V.parser||"json"]():await c(await E[V.parser||"json"](),V.zodSchema,V.index,B.funcName);break;case S_:R[V.index]=!V.key?I:I.get(V.key);break;case U_:R[V.index]=!V.zodSchema?E.headers:await c(E.headers.toJSON(),V.zodSchema,V.index,B.funcName);break;case R_:R[V.index]=J[V.type];break;case V_:R[V.index]=!V.zodSchema?E.headers.get(V.key)||void 0:await c(E.headers.get(V.key)||void 0,V.zodSchema,V.index,B.funcName);break;case G_:R[V.index]=!V.zodSchema?J[T_][V.key]||void 0:await c(J[T_][V.key],V.zodSchema,V.index,B.funcName);break;case E_:R[V.index]=J[E_];break;default:R[V.index]=!V.zodSchema?J[V.type]:await c(J[V.type],V.zodSchema,V.index,B.funcName);break}let O=await B.func(...R);if(typeof O!=="boolean"||!O)throw new u_({httpCode:401,message:"Unauthorization.",data:void 0})}for(let w=0;w<q.length;w++){let R=[],B=q[w],P=Reflect.getOwnMetadata(g,B.class,B.funcName)||{};if(P)for(let[O,W]of Object.entries(P))switch(W.type){case q_:R[W.index]=!W.zodSchema?E:await c(E,W.zodSchema,W.index,B.funcName);break;case N_:R[W.index]=!W.zodSchema?await E[W.parser||"json"]():await c(await E[W.parser||"json"](),W.zodSchema,W.index,B.funcName);break;case S_:R[W.index]=!W.key?I:I.get(W.key);break;case U_:R[W.index]=!W.zodSchema?E.headers:await c(E.headers.toJSON(),W.zodSchema,W.index,B.funcName);break;case R_:R[W.index]=J[W.type];break;case V_:R[W.index]=!W.zodSchema?E.headers.get(W.key)||void 0:await c(E.headers.get(W.key)||void 0,W.zodSchema,W.index,B.funcName);break;case G_:R[W.index]=!W.zodSchema?J[T_][W.key]||void 0:await c(J[T_][W.key],W.zodSchema,W.index,B.funcName);break;case E_:R[W.index]=J[E_];break;default:R[W.index]=!W.zodSchema?J[W.type]:await c(J[W.type],W.zodSchema,W.index,B.funcName);break}J[W_]=await B.func(...R)}let G=[],h=C,b=Reflect.getOwnMetadata(g,h.class,h.funcName)||{};if(b)for(let[w,R]of Object.entries(b))switch(R.type){case q_:G[R.index]=!R.zodSchema?E:await c(E,R.zodSchema,R.index,h.funcName);break;case N_:G[R.index]=!R.zodSchema?await E[R.parser||"json"]():await c(await E[R.parser||"json"](),R.zodSchema,R.index,h.funcName);break;case S_:G[R.index]=!R.key?I:I.get(R.key);break;case U_:G[R.index]=!R.zodSchema?E.headers:await c(E.headers.toJSON(),R.zodSchema,R.index,h.funcName);break;case R_:G[R.index]=J[R.type];break;case V_:G[R.index]=!R.zodSchema?E.headers.get(R.key)||void 0:await c(E.headers.get(R.key)||void 0,R.zodSchema,R.index,h.funcName);break;case G_:G[R.index]=!R.zodSchema?J[T_][R.key]||void 0:await c(J[T_][R.key],R.zodSchema,R.index,h.funcName);break;case E_:G[R.index]=J[E_];break;default:G[R.index]=!R.zodSchema?J[R.type]:await c(J[R.type],R.zodSchema,R.index,h.funcName);break}J[W_]=await h.func(...G);for(let w=0;w<H.length;w++){let R=[],B=H[w],P=Reflect.getOwnMetadata(g,B.class,B.funcName)||{};if(P)for(let[O,W]of Object.entries(P))switch(W.type){case q_:R[W.index]=!W.zodSchema?E:await c(E,W.zodSchema,W.index,B.funcName);break;case N_:R[W.index]=!W.zodSchema?await E[W.parser||"json"]():await c(await E[W.parser||"json"](),W.zodSchema,W.index,B.funcName);break;case S_:R[W.index]=!W.key?I:I.get(W.key);break;case U_:R[W.index]=!W.zodSchema?E.headers:await c(E.headers.toJSON(),W.zodSchema,W.index,B.funcName);break;case R_:R[W.index]=J[W.type];break;case V_:R[W.index]=!W.zodSchema?E.headers.get(W.key)||void 0:await c(E.headers.get(W.key)||void 0,W.zodSchema,W.index,B.funcName);break;case G_:R[W.index]=!W.zodSchema?J[T_][W.key]||void 0:await c(J[T_][W.key],W.zodSchema,W.index,B.funcName);break;case E_:R[W.index]=J[E_];break;default:R[W.index]=!W.zodSchema?J[W.type]:await c(J[W.type],W.zodSchema,W.index,B.funcName);break}await B.func(...R)}if(J[W_]instanceof Response)return Y_(J[W_]);for(let w=0;w<D.length;w++){let R=[],B=D[w],P=Reflect.getOwnMetadata(g,B.class,B.funcName)||{};if(P)for(let[O,W]of Object.entries(P))switch(W.type){case q_:R[W.index]=!W.zodSchema?E:await c(E,W.zodSchema,W.index,B.funcName);break;case N_:R[W.index]=!W.zodSchema?await E[W.parser||"json"]():await c(await E[W.parser||"json"](),W.zodSchema,W.index,B.funcName);break;case S_:R[W.index]=!W.key?I:I.get(W.key);break;case U_:R[W.index]=!W.zodSchema?E.headers:await c(E.headers.toJSON(),W.zodSchema,W.index,B.funcName);break;case R_:R[W.index]=J[W.type];break;case V_:R[W.index]=!W.zodSchema?E.headers.get(W.key)||void 0:await c(E.headers.get(W.key)||void 0,W.zodSchema,W.index,B.funcName);break;case G_:R[W.index]=!W.zodSchema?J[T_][W.key]||void 0:await c(J[T_][W.key],W.zodSchema,W.index,B.funcName);break;case E_:R[W.index]=J[E_];break;default:R[W.index]=!W.zodSchema?!(W.type in J)?void 0:J[W.type]:await c(!(W.type in J)?void 0:J[W.type],W.zodSchema,W.index,B.funcName);break}if(J[W_]=await B.func(...R),J[W_]instanceof Response)return Y_(J[W_])}return Y_(new Response(!J[W_]?void 0:JSON.stringify({httpCode:200,message:"SUCCESS",data:J[W_]}),{status:!J[W_]?204:200,statusText:"SUCCESS",headers:J[R_]}))},K5=async(T,_)=>{try{let E=new Map,A=!Array.isArray(T)?[T]:T,{allowLogsMethods:L,staticOption:Y,allowOrigins:X,allowMethods:C,allowCredentials:F,allowHeaders:D}=Object.freeze({allowLogsMethods:_?.log?.methods,staticOption:_.static,allowOrigins:!_.cors?.origins?["*"]:typeof _.cors.origins!=="string"?_.cors.origins.includes("*")||_.cors.origins.length<1?["*"]:_.cors.origins:[_.cors.origins!=="*"?_.cors.origins:"*"],allowMethods:_.cors?.methods||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!_.cors?.credentials?!1:!0,allowHeaders:!_.cors?.headers||_.cors.headers.includes("*")?["*"]:_.cors.headers}),q=(await Promise.all(A.map((G)=>$5(G,_)))).filter((G)=>typeof G!=="undefined");if([...new Set(q.map((G)=>G.prefix))].length!==q.length)throw Error("Module prefix should be unique.");let J=new Map;for(let G of q){let h=G.webSocketRouterGroup.execute();for(let[b,w]of h.entries())J.set(b,w)}let I=Bun.serve({port:_.port,fetch:async(G,h)=>{let b=performance.now(),w=new URL(G.url),R=t1.default.parse(w.searchParams.toString(),_.queryParser),B=G.headers.get("origin")||"*",P=G.method.toUpperCase(),O=new Headers;try{let W=r1(G),V;if(W){for(let y of q){let n=y.webSocketHttpRouterGroup.find(w.pathname,G.method);if(n){V=Object.freeze({route:n,resolution:y});break}}if(!V)return Y_(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:O}));let u=await I5({request:G,server:h},{query:R,responseHeaders:O,route:V.route,moduleResolution:V.resolution});return u instanceof Response?u:void 0}if(F&&O.set("Access-Control-Allow-Credentials","true"),O.set("Access-Control-Allow-Methods",C.join(", ")),O.set("Access-Control-Allow-Headers",D.join(", ")),O.set("Access-Control-Allow-Origin",X.includes("*")?"*":!X.includes(B)?X[0]:B),!C.includes(P))return Y_(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:O}));if(G.method.toUpperCase()==="OPTIONS")return Y_(X.includes("*")||X.includes(B)?new Response(void 0,{status:204,statusText:"No Content.",headers:O}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:O}));if(Y){let{path:u,headers:y,cacheTimeInSeconds:n}=Y,A_=`${u}/${w.pathname}`,__=E.get(A_);if(!__){let e=Bun.file(A_);if(await e.exists()){if(y)for(let[F_,J_]of Object.entries(y))O.set(F_,J_);return O.set("Content-Type",e.type),Y_(new Response(await e.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:O}))}}else{let e=new Date>__.expiredAt;if(e)E.delete(A_);let o=!e?__.file:Bun.file(A_);if(await o.exists()){if(E.set(A_,Object.freeze({expiredAt:n1(new Date,typeof n!=="number"?S5:n,Q_.seconds),file:o})),y)for(let[J_,l_]of Object.entries(y))O.set(J_,l_);return O.set("Content-Type",o.type),Y_(new Response(await o.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:O}))}}}for(let u of q){let y=u.controllerRouterGroup.find(w.pathname,G.method);if(y){V=Object.freeze({route:y,resolution:u});break}}if(!V)return Y_(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:O}));return await x5({request:G,server:h},{query:R,responseHeaders:O,route:V.route,moduleResolution:V.resolution})}catch(W){return _.debug&&console.error(W),Y_(i1(W,O))}finally{if(L){let W=performance.now(),V=y_(w.pathname,{color:"blue"}),u=`${Bun.color("yellow","ansi")}${process.pid}`,y=y_(G.method,{color:"yellow",backgroundColor:"blue"}),n=y_(`${G.headers.get("x-forwarded-for")||G.headers.get("x-real-ip")||h.requestIP(G)?.address||"<Unknown>"}`,{color:"yellow"}),A_=y_(`${Math.round((W-b+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});L.includes(G.method.toUpperCase())&&console.info(`PID: ${u} - Method: ${y} - IP: ${n} - ${V} - Time: ${A_}`)}}},websocket:{open:(G)=>{let h=`${G.data.pathname}:::open`,b=J.get(h);if(!b)return;let w=b.arguments||{},R=[];for(let[B,P]of Object.entries(w))switch(P.type){case z_:R[P.index]=G;break;case D_:R[P.index]=I;break}b.descriptor.value(...R)},close:(G,h,b)=>{let w=`${G.data.pathname}:::close`,R=J.get(w);if(!R)return;let B=R.arguments||{},P=[];for(let[O,W]of Object.entries(B))switch(W.type){case z_:P[W.index]=G;break;case D_:P[W.index]=I;break;case YT:P[W.index]=h;break;case ZT:P[W.index]=b;break}R.descriptor.value(...P)},message:(G,h)=>{let b=`${G.data.pathname}:::message`,w=J.get(b);if(!w)return;let R=w.arguments||{},B=[];for(let[P,O]of Object.entries(R))switch(O.type){case z_:B[O.index]=G;break;case WT:B[O.index]=h;break;case D_:B[O.index]=I;break}w.descriptor.value(...B)},drain:(G)=>{let h=`${G.data.pathname}:::drain`,b=J.get(h);if(!b)return;let w=b.arguments||{},R=[];for(let[B,P]of Object.entries(w))switch(P.type){case z_:R[P.index]=G;break;case D_:R[P.index]=I;break}b.descriptor.value(...R)},ping:(G,h)=>{let b=`${G.data.pathname}:::ping`,w=J.get(b);if(!w)return;let R=w.arguments||{},B=[];for(let[P,O]of Object.entries(R))switch(O.type){case z_:B[O.index]=G;break;case D_:B[O.index]=I;break;case WT:B[O.index]=h;break}w.descriptor.value(...B)},pong:(G,h)=>{let b=`${G.data.pathname}:::pong`,w=J.get(b);if(!w)return;let R=w.arguments||{},B=[];for(let[P,O]of Object.entries(R))switch(O.type){case z_:B[O.index]=G;break;case D_:B[O.index]=I;break;case WT:B[O.index]=h;break}w.descriptor.value(...B)}}})}catch(E){throw _.debug&&console.error(E),E}};export{i1 as jsonErrorInfer,q5 as httpServerErrors,G5 as httpClientErrors,o4 as ZodSchema,n4 as WebSocketServer,s4 as WebSocketEvent,d4 as WebSocketConnection,i4 as WebSocketCloseReason,p4 as WebSocketCloseCode,l4 as WebSocket,x4 as RouteModel,$4 as ResponseHeaders,V4 as RequestHeaders,N4 as RequestHeader,G4 as RequestBody,f4 as Request,w4 as Query,k4 as Put,v4 as Post,m4 as Patch,q4 as Params,S4 as Param,M4 as Options,u4 as Module,g4 as Middleware,kE as Keys,yT as Injector,c4 as Injectable,j4 as Inject,qT as HttpServerError,u_ as HttpClientError,h4 as Guard,P4 as Get,O4 as Dispatcher,b4 as Delete,K4 as Controller,I4 as Context,K5 as BoolFactory};
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@bool-ts/core",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "test": "bun --hot run __test/index.ts",
8
- "build": "tsc"
8
+ "build": "tsc --emitDeclarationOnly && bun build ./src/index.ts --outdir ./dist --minify"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -19,14 +19,14 @@
19
19
  "homepage": "https://github.com/BoolTS/core#readme",
20
20
  "dependencies": {
21
21
  "@bool-ts/date-time": "^1.0.0",
22
- "qs": "^6.13.1",
22
+ "qs": "^6.14.0",
23
23
  "reflect-metadata": "^0.2.2",
24
24
  "zod": "^3.24.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "latest",
28
- "@types/qs": "^6.9.17",
29
- "typescript": "^5.7.2"
28
+ "@types/qs": "^6.9.18",
29
+ "typescript": "^5.7.3"
30
30
  },
31
31
  "private": "false"
32
32
  }
@@ -1,123 +0,0 @@
1
- import * as Zod from "zod";
2
- import { argumentsKey, contextArgsKey, paramArgsKey, paramsArgsKey, queryArgsKey, requestArgsKey, requestBodyArgsKey, requestHeaderArgsKey, requestHeadersArgsKey, responseHeadersArgsKey, routeModelArgsKey } from "../keys";
3
- export const RequestHeaders = (schema) => (target, methodName, parameterIndex) => {
4
- if (!methodName) {
5
- return;
6
- }
7
- const requestHeadersMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
8
- requestHeadersMetadata[`argumentIndexes.${parameterIndex}`] = {
9
- index: parameterIndex,
10
- type: requestHeadersArgsKey,
11
- zodSchema: schema
12
- };
13
- Reflect.defineMetadata(argumentsKey, requestHeadersMetadata, target.constructor, methodName);
14
- };
15
- export const RequestHeader = (key, schema) => (target, methodName, parameterIndex) => {
16
- if (!methodName) {
17
- return;
18
- }
19
- const requestHeaderMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
20
- requestHeaderMetadata[`argumentIndexes.${parameterIndex}`] = {
21
- index: parameterIndex,
22
- type: requestHeaderArgsKey,
23
- key: key,
24
- zodSchema: schema
25
- };
26
- Reflect.defineMetadata(argumentsKey, requestHeaderMetadata, target.constructor, methodName);
27
- };
28
- export const RequestBody = (schema, parser) => (target, methodName, parameterIndex) => {
29
- if (!methodName) {
30
- return;
31
- }
32
- const bodyMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
33
- bodyMetadata[`argumentIndexes.${parameterIndex}`] = {
34
- index: parameterIndex,
35
- type: requestBodyArgsKey,
36
- zodSchema: schema,
37
- parser: parser
38
- };
39
- Reflect.defineMetadata(argumentsKey, bodyMetadata, target.constructor, methodName);
40
- };
41
- export const Params = (schema) => (target, methodName, parameterIndex) => {
42
- if (!methodName) {
43
- return;
44
- }
45
- const paramsMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
46
- paramsMetadata[`argumentIndexes.${parameterIndex}`] = {
47
- index: parameterIndex,
48
- type: paramsArgsKey,
49
- zodSchema: schema
50
- };
51
- Reflect.defineMetadata(argumentsKey, paramsMetadata, target.constructor, methodName);
52
- };
53
- export const Param = (key, schema) => (target, methodName, parameterIndex) => {
54
- if (!methodName) {
55
- return;
56
- }
57
- const paramMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
58
- paramMetadata[`argumentIndexes.${parameterIndex}`] = {
59
- index: parameterIndex,
60
- type: paramArgsKey,
61
- key: key,
62
- zodSchema: schema
63
- };
64
- Reflect.defineMetadata(argumentsKey, paramMetadata, target.constructor, methodName);
65
- };
66
- export const Query = (schema) => (target, methodName, parameterIndex) => {
67
- if (!methodName) {
68
- return;
69
- }
70
- const queryMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
71
- queryMetadata[`argumentIndexes.${parameterIndex}`] = {
72
- index: parameterIndex,
73
- type: queryArgsKey,
74
- zodSchema: schema
75
- };
76
- Reflect.defineMetadata(argumentsKey, queryMetadata, target.constructor, methodName);
77
- };
78
- export const Request = (schema) => (target, methodName, parameterIndex) => {
79
- if (!methodName) {
80
- return;
81
- }
82
- const requestMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
83
- requestMetadata[`argumentIndexes.${parameterIndex}`] = {
84
- index: parameterIndex,
85
- type: requestArgsKey,
86
- zodSchema: schema
87
- };
88
- Reflect.defineMetadata(argumentsKey, requestMetadata, target.constructor, methodName);
89
- };
90
- export const ResponseHeaders = () => (target, methodName, parameterIndex) => {
91
- if (!methodName) {
92
- return;
93
- }
94
- const responseHeadersMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
95
- responseHeadersMetadata[`argumentIndexes.${parameterIndex}`] = {
96
- index: parameterIndex,
97
- type: responseHeadersArgsKey
98
- };
99
- Reflect.defineMetadata(argumentsKey, responseHeadersMetadata, target.constructor, methodName);
100
- };
101
- export const Context = (key) => (target, methodName, parameterIndex) => {
102
- if (!methodName) {
103
- return;
104
- }
105
- const responseHeadersMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
106
- responseHeadersMetadata[`argumentIndexes.${parameterIndex}`] = {
107
- index: parameterIndex,
108
- type: contextArgsKey,
109
- key: key
110
- };
111
- Reflect.defineMetadata(argumentsKey, responseHeadersMetadata, target.constructor, methodName);
112
- };
113
- export const RouteModel = () => (target, methodName, parameterIndex) => {
114
- if (!methodName) {
115
- return;
116
- }
117
- const responseHeadersMetadata = Reflect.getOwnMetadata(argumentsKey, target.constructor, methodName) || {};
118
- responseHeadersMetadata[`argumentIndexes.${parameterIndex}`] = {
119
- index: parameterIndex,
120
- type: routeModelArgsKey
121
- };
122
- Reflect.defineMetadata(argumentsKey, responseHeadersMetadata, target.constructor, methodName);
123
- };
@@ -1,9 +0,0 @@
1
- import { controllerHttpKey, controllerKey } from "../keys";
2
- export const Controller = (prefix) => (target) => {
3
- const metadata = {
4
- prefix: !prefix?.startsWith("/") ? `/${prefix || ""}` : prefix,
5
- httpMetadata: [...(Reflect.getOwnMetadata(controllerHttpKey, target.constructor) || [])]
6
- };
7
- Reflect.defineMetadata(controllerKey, metadata, target);
8
- };
9
- export default Controller;
@@ -1,6 +0,0 @@
1
- import { dispatcherKey } from "../keys";
2
- export const Dispatcher = () => (target) => {
3
- const metadata = undefined;
4
- Reflect.defineMetadata(dispatcherKey, metadata, target);
5
- };
6
- export default Dispatcher;
@@ -1,9 +0,0 @@
1
- import { guardKey } from "../keys";
2
- export const Guard = () => (target) => {
3
- if (!("enforce" in target.prototype) || typeof target.prototype.enforce !== "function") {
4
- return;
5
- }
6
- const metadata = undefined;
7
- Reflect.defineMetadata(guardKey, metadata, target);
8
- };
9
- export default Guard;