@tsed/di 7.31.0-rc.1 → 7.31.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.di=t():e.di=t()}(self,(()=>(()=>{var e={122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{camelCase:()=>m,camelCaseTransform:()=>f,camelCaseTransformMerge:()=>d,capitalCase:()=>O,capitalCaseTransform:()=>g,constantCase:()=>S,dotCase:()=>T,headerCase:()=>A,noCase:()=>c,paramCase:()=>P,pascalCase:()=>l,pascalCaseTransform:()=>p,pascalCaseTransformMerge:()=>h,pathCase:()=>_,sentenceCase:()=>M,sentenceCaseTransform:()=>x,snakeCase:()=>k});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},n.apply(this,arguments)};Object.create,Object.create;var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},s.apply(this,arguments)};function o(e){return e.toLowerCase()}Object.create,Object.create;var i=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],a=/[^A-Z0-9]+/gi;function c(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,n=void 0===r?i:r,s=t.stripRegexp,c=void 0===s?a:s,p=t.transform,h=void 0===p?o:p,l=t.delimiter,f=void 0===l?" ":l,d=u(u(e,n,"$1\0$2"),c,"\0"),m=0,y=d.length;"\0"===d.charAt(m);)m++;for(;"\0"===d.charAt(y-1);)y--;return d.slice(m,y).split("\0").map(h).join(f)}function u(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}function p(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function h(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function l(e,t){return void 0===t&&(t={}),c(e,s({delimiter:"",transform:p},t))}function f(e,t){return 0===t?e.toLowerCase():p(e,t)}function d(e,t){return 0===t?e.toLowerCase():h(e)}function m(e,t){return void 0===t&&(t={}),l(e,n({transform:f},t))}var y=function(){return y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},y.apply(this,arguments)};function g(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function O(e,t){return void 0===t&&(t={}),c(e,y({delimiter:" ",transform:g},t))}Object.create,Object.create;var b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},b.apply(this,arguments)};function v(e){return e.toUpperCase()}function S(e,t){return void 0===t&&(t={}),c(e,b({delimiter:"_",transform:v},t))}Object.create,Object.create;var E=function(){return E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},E.apply(this,arguments)};function T(e,t){return void 0===t&&(t={}),c(e,E({delimiter:"."},t))}Object.create,Object.create;var R=function(){return R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},R.apply(this,arguments)};function A(e,t){return void 0===t&&(t={}),O(e,R({delimiter:"-"},t))}Object.create,Object.create;var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},w.apply(this,arguments)};function P(e,t){return void 0===t&&(t={}),T(e,w({delimiter:"-"},t))}Object.create,Object.create;var C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},C.apply(this,arguments)};function _(e,t){return void 0===t&&(t={}),T(e,C({delimiter:"/"},t))}function x(e,t){var r=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(r):r}function M(e,t){return void 0===t&&(t={}),c(e,n({delimiter:" ",transform:x},t))}function k(e,t){return void 0===t&&(t={}),T(e,n({delimiter:"_"},t))}Object.create,Object.create},886:e=>{var t;self,t=()=>(()=>{var e={738:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=o(e);function o(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===n.Reflect?n.Reflect=e:s=o(n.Reflect,s),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,i={__proto__:[]}instanceof Array,a=!o&&!i,c={create:o?function(){return D(Object.create(null))}:i?function(){return D({__proto__:null})}:function(){return D({})},has:a?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:a?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),p="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=p||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[s]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,s=r+1;s<n;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[s]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}():Map,l=p||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[s]=function(){return this.keys()},e}():Set,f=new(p||"function"!=typeof WeakMap?function(){var e=c.create(),r=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=s(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=s(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return s(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=s(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(c.has(e,t));return e[t]=!0,t}function s(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:c.create()})}return e[r]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):o(new Uint8Array(e),e):o(new Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<16;++n){var s=t[n];4!==n&&6!==n&&8!==n||(r+="-"),s<16&&(r+="0"),r+=s.toString(16).toLowerCase()}return r}}():WeakMap);function d(e,t,r){var n=f.get(e);if(T(n)){if(!r)return;n=new h,f.set(e,n)}var s=n.get(t);if(T(s)){if(!r)return;s=new h,n.set(t,s)}return s}function m(e,t,r){if(y(e,t,r))return!0;var n=N(t);return!R(n)&&m(e,n,r)}function y(e,t,r){var n=d(t,r,!1);return!T(n)&&!!n.has(e)}function g(e,t,r){if(y(e,t,r))return O(e,t,r);var n=N(t);return R(n)?void 0:g(e,n,r)}function O(e,t,r){var n=d(t,r,!1);if(!T(n))return n.get(e)}function b(e,t,r,n){d(r,n,!0).set(e,t)}function v(e,t){var r=S(e,t),n=N(e);if(null===n)return r;var s=v(n,t);if(s.length<=0)return r;if(r.length<=0)return s;for(var o=new l,i=[],a=0,c=r;a<c.length;a++){var u=c[a];o.has(u)||(o.add(u),i.push(u))}for(var p=0,h=s;p<h.length;p++)u=h[p],o.has(u)||(o.add(u),i.push(u));return i}function S(e,t){var r=[],n=d(e,t,!1);if(T(n))return r;for(var o=function(e){var t=x(e,s);if(!C(t))throw new TypeError;var r=t.call(e);if(!A(r))throw new TypeError;return r}(n.keys()),i=0;;){var a=M(o);if(!a)return r.length=i,r;var c=a.value;try{r[i]=c}catch(e){try{k(o)}finally{throw e}}i++}}function E(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function T(e){return void 0===e}function R(e){return null===e}function A(e){return"object"==typeof e?null!==e:"function"==typeof e}function w(e){var t=function(e,t){switch(E(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",s=x(e,n);if(void 0!==s){var o=s.call(e,r);if(A(o))throw new TypeError;return o}return function(e,t){var r,n,s=e.toString;if(C(s)&&!A(n=s.call(e)))return n;if(C(r=e.valueOf)&&!A(n=r.call(e)))return n;throw new TypeError}(e)}(e);return"symbol"==typeof t?t:function(e){return""+e}(t)}function P(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function C(e){return"function"==typeof e}function _(e){return"function"==typeof e}function x(e,t){var r=e[t];if(null!=r){if(!C(r))throw new TypeError;return r}}function M(e){var t=e.next();return!t.done&&t}function k(e){var t=e.return;t&&t.call(e)}function N(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var s=n.constructor;return"function"!=typeof s||s===e?t:s}function D(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(T(r)){if(!P(e))throw new TypeError;if(!_(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!T(n)&&!R(n)){if(!_(n))throw new TypeError;t=n}}return t}(e,t)}if(!P(e))throw new TypeError;if(!A(t))throw new TypeError;if(!A(n)&&!T(n)&&!R(n))throw new TypeError;return R(n)&&(n=void 0),function(e,t,r,n){for(var s=e.length-1;s>=0;--s){var o=(0,e[s])(t,r,n);if(!T(o)&&!R(o)){if(!A(o))throw new TypeError;n=o}}return n}(e,t,r=w(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!A(r))throw new TypeError;if(!T(n)&&!function(e){switch(E(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;b(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!A(r))throw new TypeError;return T(n)||(n=w(n)),b(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),m(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),y(e,t,r)})),e("getMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),g(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),O(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!A(e))throw new TypeError;return T(t)||(t=w(t)),v(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!A(e))throw new TypeError;return T(t)||(t=w(t)),S(e,t)})),e("deleteMetadata",(function(e,t,r){if(!A(t))throw new TypeError;T(r)||(r=w(r));var n=d(t,r,!1);if(T(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var s=f.get(t);return s.delete(r),s.size>0||f.delete(t),!0}))}(s)}()}(n||(n={}))},330:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},82:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},335:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}r=1;for(var s=arguments,o=s.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(s[r++]);case"%d":return Number(s[r++]);case"%j":try{return JSON.stringify(s[r++])}catch(e){return"[Circular]"}default:return e}})),c=s[r];r<o;c=s[++r])d(c)||!b(c)?a+=" "+c:a+=" "+i(c);return a},t.deprecate=function(e,n){if(g(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var s=!1;return function(){if(!s){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),s=!0}return e.apply(this,arguments)}};var s,o={};function i(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(n,e);return y(s)||(s=u(e,s,n)),s}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var i=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),S(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(r);if(0===i.length){if(E(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var b,T="",R=!1,A=["{","}"];return l(r)&&(R=!0,A=["[","]"]),E(r)&&(T=" [Function"+(r.name?": "+r.name:"")+"]"),O(r)&&(T=" "+RegExp.prototype.toString.call(r)),v(r)&&(T=" "+Date.prototype.toUTCString.call(r)),S(r)&&(T=" "+p(r)),0!==i.length||R&&0!=r.length?n<0?O(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),b=R?function(e,t,r,n,s){for(var o=[],i=0,a=t.length;i<a;++i)P(t,String(i))?o.push(h(e,t,r,n,String(i),!0)):o.push("");return s.forEach((function(s){s.match(/^\d+$/)||o.push(h(e,t,r,n,s,!0))})),o}(e,r,n,a,i):i.map((function(t){return h(e,r,n,a,t,R)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(b,T,A)):A[0]+T+A[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,s,o){var i,a,c;if((c=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),P(n,s)||(i="["+s+"]"),a||(e.seen.indexOf(c.value)<0?(a=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),g(i)){if(o&&s.match(/^\d+$/))return a;(i=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+a}function l(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function O(e){return b(e)&&"[object RegExp]"===T(e)}function b(e){return"object"==typeof e&&null!==e}function v(e){return b(e)&&"[object Date]"===T(e)}function S(e){return b(e)&&("[object Error]"===T(e)||e instanceof Error)}function E(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function R(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(s)&&(s=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=l,t.isBoolean=f,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=O,t.isObject=b,t.isDate=v,t.isError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(82);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var e=new Date,t=[R(e.getHours()),R(e.getMinutes()),R(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=r(330),t._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},340:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=340,e.exports=t}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e,t){return Object.getOwnPropertyDescriptor(e&&e.prototype||e,t)}function t(t,r){return e(t,r)?.value}function s(t=!0){return(r,n)=>{const s=e(r,n)||{writable:!0,enumerable:!0};return s.configurable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}r.r(n),r.d(n,{AnyToPromise:()=>fe,AnyToPromiseResponseTypes:()=>he,AnyToPromiseStatus:()=>pe,CLASS_STORE:()=>W,Configurable:()=>s,DecoratorTypes:()=>o,Deprecated:()=>a,Enumerable:()=>c,Env:()=>le,EnvTypes:()=>de,Hooks:()=>me,METHOD_STORE:()=>X,Metadata:()=>z,NotConfigurable:()=>u,NotEnumerable:()=>p,PARAM_STORE:()=>Y,PROPERTY_STORE:()=>Q,Readonly:()=>l,Store:()=>te,StoreFn:()=>re,StoreMerge:()=>ne,StoreSet:()=>se,Type:()=>ye,UnsupportedDecoratorType:()=>ge,Writable:()=>h,ancestorOf:()=>Ee,ancestorsOf:()=>Re,catchAsyncError:()=>be,catchError:()=>Oe,classOf:()=>d,cleanObject:()=>je,constructorOf:()=>Ie,createInstance:()=>j,decorateMethodsOf:()=>Pe,decoratorArgs:()=>Ce,decoratorTypeOf:()=>m,deepClone:()=>D,deepMerge:()=>G,descriptorOf:()=>e,getClass:()=>f,getClassOrSymbol:()=>qe,getConstructor:()=>$e,getConstructorArgNames:()=>Be,getEnumerableKeys:()=>Je,getHostInfoFromPort:()=>Ne,getInheritedClass:()=>Te,getValue:()=>Ve,importPackage:()=>De,inheritedDescriptorOf:()=>_e,isArray:()=>y,isArrayOrArrayClass:()=>g,isArrowFn:()=>Le,isBoolean:()=>S,isBooleanOrBooleanClass:()=>E,isBuffer:()=>k,isClass:()=>Ue,isClassObject:()=>He,isCollection:()=>ze,isDate:()=>O,isEmpty:()=>We,isEnumerable:()=>Ke,isFunction:()=>b,isInheritedFrom:()=>Xe,isMethodDescriptor:()=>t,isNil:()=>v,isNumber:()=>T,isNumberOrNumberClass:()=>R,isObject:()=>oe,isObservable:()=>ie,isPlainObject:()=>Ge,isPrimitive:()=>C,isPrimitiveClass:()=>_,isPrimitiveOrPrimitiveClass:()=>P,isPromise:()=>ae,isProtectedKey:()=>$,isRegExp:()=>N,isSerializable:()=>Qe,isStream:()=>ce,isString:()=>A,isStringOrStringClass:()=>w,isSymbol:()=>x,isSymbolOrSymbolClass:()=>M,mergeReducerBuilder:()=>L,methodsOf:()=>we,nameOf:()=>F,nameOfClass:()=>U,nameOfSymbol:()=>q,objectKeys:()=>I,primitiveOf:()=>Ye,prototypeOf:()=>Ae,setValue:()=>Ze,toMap:()=>tt,toStringConstructor:()=>Fe,uniq:()=>ve,uniqBy:()=>Se,useDecorators:()=>xe,useMethodDecorator:()=>Me,useMethodDecorators:()=>ke});var o,i=r(335);function a(e){return(t,r,n)=>{const s=n.value;return n.value=(0,i.deprecate)(s,e),n}}function c(t=!0){return(r,n)=>{const s=e(r,n)||{writable:!0,configurable:!0};return s.enumerable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}function u(){return s(!1)}function p(){return c(!1)}function h(t=!0){return(r,n)=>{const s=e(r,n)||{configurable:!0,enumerable:!0};return s.writable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}function l(){return h(!1)}function f(e){return e.prototype?e:e.constructor}function d(e){return f(e)}function m(e){const[t,r,n]=e,s=e=>t!==d(t)?e:`${e}.static`;return"number"==typeof n?r?s("parameter"):"parameter.constructor":n&&n.value?s("method"):r&&void 0===n||n?s("property"):o.CLASS}function y(e){return Array.isArray(e)}function g(e){return e===Array||y(e)}function O(e){return e===Date||e instanceof Date&&!isNaN(+e)}function b(e){return"function"==typeof e}function v(e){return null==e}function S(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}function E(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}function T(e){return"number"==typeof e}function R(e){return"number"==typeof e||e instanceof Number||e===Number}function A(e){return"string"==typeof e}function w(e){return"string"==typeof e||e instanceof String||e===String}function P(e){return w(e)||R(e)||E(e)}function C(e){return A(e)||T(e)||S(e)}function _(e){return[String,Number,Boolean].includes(e)}function x(e){return"symbol"==typeof e}function M(e){return"symbol"==typeof e||e instanceof Symbol||e===Symbol}function k(e){return"undefined"!=typeof Buffer&&(e===Buffer||e instanceof Buffer)}function N(e){return e instanceof RegExp}function D(e,t=new WeakMap){let r;if((e=>v(e)||C(e)||x(e)||b(e))(e))return e;if(k(e)){const t=Buffer.alloc(e.length);return e.copy(t),t}if(O(e))return new Date(e);if(N(e))return new RegExp(e);const n=t.get(e);if(n)return n;y(e)?r=[]:(r={},t.set(e,r));for(const n in e){const s=Object.getOwnPropertyDescriptor(e,n);s&&(b(s.value)?Object.defineProperty(r,n,s):r[n]=D(s.value,t))}if(!y(e)){const t=Reflect.getPrototypeOf(e);Reflect.setPrototypeOf(r,t)}return r}function j(e){return e&&d(e)!==Object?Object.create(e):{}}function $(e){return["__proto__","constructor","prototype"].includes(e)}function I(e){return Object.keys(e).filter((e=>!$(e)))}function L(e){return(t,r,n)=>{const s=t.findIndex((t=>e(t,r)));return-1===s?[...t,r]:(t[s]=G(t[s],r,n),t)}}!function(e){e.PARAM="parameter",e.PARAM_CTOR="parameter.constructor",e.PARAM_STC="parameter.static",e.PROP="property",e.PROP_STC="property.static",e.METHOD="method",e.METHOD_STC="method.static",e.CLASS="class"}(o||(o={}));const H=L(((e,t)=>e===t));function G(e,t,r={}){if(function(e,t){return null==e||""===e&&""!==t}(t,e))return e;if(function(e,t){return C(e)||x(e)||b(e)||void 0===t}(t,e))return t;if(Array.isArray(e)){const n=function({reducers:e,parentKey:t}){return e?t&&e[t]?e[t]:e.default||H:H}(r);return[].concat(t).reduce(((e,t)=>n(e,t,r)),[...e])}return[...I(e),...I(t)].reduce(((n,s)=>{const o=G(e&&e[s],t&&t[s],{...r,parentKey:s});return r.cleanUndefinedProps&&void 0===o?n:{...n,[s]:o}}),j(e))}function U(e){return"function"==typeof e?e.name:e.constructor.name}const q=e=>e.toString().replace("Symbol(","").replace(")","");function F(e){switch(typeof e){default:return""+e;case"symbol":return q(e);case"function":return U(e)}}r(738);const B="design:paramtypes",K="design:type",J="design:returntype",V=new Map;class z{static get(e,t,r){return Reflect.getMetadata(e,d(t),r)}static getOwn(e,t,r){return Reflect.getOwnMetadata(e,d(t),r)}static getType(e,t){return Reflect.getMetadata(K,e,t)}static getOwnType(e,t){return Reflect.getMetadata(K,e,t)}static getReturnType(e,t){return Reflect.getMetadata(J,e,t)}static getOwnReturnType(e,t){return Reflect.getOwnMetadata(J,e,t)}static has(e,t,r){try{return Reflect.hasMetadata(e,d(t),r)}catch(e){}return!1}static hasOwn(e,t,r){return Reflect.hasOwnMetadata(e,d(t),r)}static delete(e,t,r){return Reflect.deleteMetadata(e,d(t),r)}static setParamTypes(e,t,r){return this.set(B,r,e.prototype,t)}static getTargetsFromPropertyKey=e=>V.has(e)&&V.get(e)||[];static set(e,t,r,n){const s=V.has(e)&&V.get(e)||[],o=d(r);-1===s.indexOf(o)&&(s.push(o),V.set(e,s)),Reflect.defineMetadata(e,t,d(r),n)}static getParamTypes(e,t){return Reflect.getMetadata(B,e,t)||[]}static getOwnParamTypes(e,t){return Reflect.getOwnMetadata(B,e,t)||[]}}const W="tsed:class:store",X="tsed:method:store",Q="tsed:property:store",Y="tsed:param:store",Z=new Map;function ee(e,...t){if(x(t[0]))return Z.has(t[0])||Z.set(t[0],new te),Z.get(t[0]);{const r=z;return r.hasOwn(e,...t)||r.set(e,new te,...t),r.getOwn(e,...t)}}class te{_entries=new Map;static from(...e){return function(e){const[t,r,n]=e;switch(m(e)){case o.PARAM_CTOR:case o.PARAM_STC:case o.PARAM:const e=ee(Y,t,r);return e.has(""+n)||e.set(""+n,new te),e.get(""+n);case o.PROP:case o.PROP_STC:return ee(Q,t,r);case o.METHOD:case o.METHOD_STC:return ee(X,t,r);case o.CLASS:return ee(W,t)}}(e)}static fromMethod(t,r){return te.from(t,r,e(t,r))}static mergeStoreFrom(e,t,...r){const n=te.from(e,...r);return te.from(t,...r)._entries.forEach(((e,t)=>{n.merge(t,e)})),n}static mergeStoreMethodFrom(t,r,n){return this.mergeStoreFrom(t,r,n,e(t,n))}get(e,t){return this._entries.get(F(e))||t}has(e){return this._entries.has(F(e))}set(e,t){return this._entries.set(F(e),t),this}delete(e){return this._entries.delete(F(e))}merge(e,t,r=!1){let n=this.get(e);return n&&(t=D(t),n=D(n),t=r?G(t,n):G(n,t)),this.set(e,t),this}toJson(){return[...this._entries.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}}function re(e){return(...t)=>{const r=te.from(...t),n=e(r,t);return"function"==typeof n&&n(...t),t[2]}}function ne(e,t){return re((r=>{r.merge(e,t)}))}function se(e,t){return re((r=>{r.set(e,t)}))}function oe(e){return"object"==typeof e}function ie(e){return!!e&&"function"==typeof e.lift&&"function"==typeof e.subscribe}function ae(e){return e===Promise||e instanceof Promise||!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}function ce(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function ue(e){return oe(e)&&"data"in e&&"headers"in e&&"status"in e&&"statusText"in e}var pe,he,le;!function(e){e.PENDING="PENDING",e.CANCELED="CANCELED",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(pe||(pe={})),function(e){e.STREAM="STREAM",e.BUFFER="BUFFER",e.DATA="DATA"}(he||(he={}));class fe{status=pe.PENDING;args;#e;#t;#r=!1;#n;constructor({hasNextFunction:e=!1}={}){this.#r=e,this.#n=new Promise(((e,t)=>{this.#e=e,this.#t=t}))}isDone(){return this.status!==pe.PENDING}get next(){return this.#r=!0,e=>{if(!this.isDone())return e?this.reject(e):this.resolve({type:he.DATA})}}call(e){if(this.isDone())return Promise.resolve(this);try{this.handle(e())}catch(e){this.reject(e)}return this.#n}reject(e){this.isDone()||(this.done(pe.REJECTED),this.#t(e))}resolve(e={}){this.isDone()||(this.done(pe.RESOLVED),this.#e({...e,state:pe.RESOLVED}))}destroy(){}cancel(){if(!this.isDone())return this.done(pe.CANCELED),this.#e({state:pe.CANCELED})}done(e){this.destroy(),this.status=e}handle(e,t={}){if(!this.isDone()){if(e){if(this.isCanceledResponse(e))return this.cancel();if(ie(e)&&(e=e.toPromise()),ue(e))return this.handle(e.data,{...t,status:e.status,headers:e.headers});if(ce(e))return this.resolve({...t,type:he.STREAM,data:e});if(ce(e)||Buffer.isBuffer(e))return this.resolve({...t,type:he.BUFFER,data:e});if(ae(e))return e.then((e=>this.handle(e,t))).catch((e=>e.response&&ue(e.response)?this.handle(e.response):this.reject(e)))}return this.#r?void 0:this.resolve({...t,data:e,type:he.DATA})}}isCanceledResponse(e){return e===pe.CANCELED}}!function(e){e.PROD="production",e.DEV="development",e.TEST="test"}(le||(le={}));const de=le;class me{#s={};on(e,t){return this.#s[e]||(this.#s[e]=[]),this.#s[e].push(t),this}off(e,t){return this.#s[e]&&(this.#s[e]=this.#s[e].filter((e=>e===t))),this}emit(e,t=[],r=null){const n=this.#s[e];if(n?.length)for(const e of n)e.call(r,...t)}alter(e,t,r=[],n=null){const s=this.#s[e];if(s?.length)for(const e of s)t=e.call(n,t,...r);return t}async asyncEmit(e,t=[],r=null){const n=this.#s[e];if(n?.length){const e=n.map((e=>e.call(r,...t)));await Promise.all(e)}}async asyncAlter(e,t,r=[],n=null){const s=this.#s[e];if(s?.length)for(const e of s)t=await e.call(n,t,...r);return t}destroy(){this.#s={}}}const ye=Function;r.g.Type=ye;class ge extends Error{name;constructor(e,t){super(ge.buildMessage(e,t))}static buildMessage(e,t){const[r,n,s]=t,o=m(t),i=o.split("/")[0],a="parameter"===i?".["+s+"]":"",c=n?"."+n:"parameter"===i?".constructor":"",u=F(d(r))+c+a;return`${e.name} cannot be used as ${o} decorator on ${u}`}}function Oe(e){try{e()}catch(e){return e}}async function be(e){try{await e()}catch(e){return e}}function ve(e){return Array.from(new Set(e).values())}function Se(e,t="id"){const r=new Map;return e.forEach((e=>{r.set(e[t],e)})),Array.from(r.values())}function Ee(e){return e&&Object.getPrototypeOf(e)}function Te(e){return Ee(e)}function Re(e){const t=[];let r=d(e);for(;r&&""!==F(r);)t.unshift(r),r=Te(r);return t}function Ae(e){return d(e)===e?e.prototype:e}function we(e){const t=new Map;return Re(e=d(e)).forEach((e=>{Reflect.ownKeys(Ae(e)).forEach((r=>{"constructor"!==r&&t.set(r,{target:e,propertyKey:r})}))})),Array.from(t.values())}function Pe(t,r){we(t).forEach((({target:n,propertyKey:s})=>{const o=Ae(t);n!==d(t)&&(Object.defineProperty(o,s,{writable:!0,configurable:!0,value(...e){return Ae(n)[s].apply(this,e)}}),te.mergeStoreMethodFrom(t,n,s));const i=r(o,s,e(t,s));i&&Object.defineProperty(o,s,i)}))}function Ce(t,r){return[t,r,e(t,r)]}function _e(e,t){for(const r of Re(e)){const e=Object.getOwnPropertyDescriptor(r&&r.prototype||r,t);if(e)return e}}function xe(...e){return(...t)=>{e.filter((e=>!!e)).forEach((e=>{e(...t)}))}}function Me(t){return(r,n)=>t(r,n,e(r,n))}function ke(...t){return(r,n)=>{t.filter(Boolean).forEach((t=>t(r,n,e(r,n))))}}function Ne(e,t){let r="0.0.0.0",n=t;return"string"==typeof t&&t.indexOf(":")>-1&&([r,n]=t.split(":"),n=+n),{protocol:e,address:r,port:n,toString(){return[`${this.protocol}://${this.address}`,"number"==typeof this.port&&this.port].filter(Boolean).join(":")}}}async function De(e,t=(()=>r(340)(e)),n=!1){try{return await t()}catch(e){if(!n)throw e;return{}}}function je(e,t=[]){return Object.entries(e).reduce(((e,[r,n])=>$(r)||t.includes(r)||void 0===n?e:{...e,[r]:n}),{})}function $e(e){return"function"==typeof e?e:e.constructor}function Ie(e){return $e(e)}function Le(e){return e&&b(e)&&!e.prototype}function He(e){return e===Object}function Ge(e){return He(d(e))&&e!==Object}function Ue(e){return!!e&&!Le(e)&&!(x(e)||P(e)||He(e)||O(e)||ae(e)||g(e)||k(e))}function qe(e){return Ue(e)?d(e):e}function Fe(e){return`${(Ie(e).toString().split("\n").find((e=>e.indexOf("constructor(")>-1))||"constructor()").replace("{","").trim()}`}function Be(e){return Fe(e).split("constructor(")[1].split(")")[0].split(", ").filter(Boolean).map((e=>e.trim()))}function Ke(e,t){const r=d(e);if(r){const e=_e(r,t);if(e)return e.enumerable}return Object.prototype.propertyIsEnumerable.call(e,t)}function Je(e){const t=[];for(const r in e)!$(r)&&Ke(e,r)&&t.push(r);return t}function Ve(...e){const t=(e=>{const[t,r,n,s="."]=e;return oe(r)||A(t)?{expression:t,scope:r,defaultValue:n,separator:s}:{expression:r,scope:t,defaultValue:n,separator:s}})(e);let r=t.scope;const{expression:n,defaultValue:s,separator:o}=t;if(!n)return r;if(!r)return s;const i=n.split(o),a=e=>{if(r){if(void 0!==r[e]||oe(r)&&e in r)return r[e];if(b(r.get))return r.get(e)}};for(;(r=a(i.shift()))&&i.length;);return void 0===r?s:r}function ze(e){return g(e)||e===Map||e instanceof Map||e===Set||e instanceof Set||e===WeakMap||e instanceof WeakMap||e===WeakSet||e instanceof WeakSet}function We(e){return""===e||v(e)}function Xe(e,t,r=5){if(!e||!t)return!1;for(e=d(e),t=d(t);""!==F(e);){if(!r)return!1;if(e===t)return!0;e=Ee(e),r--}return!1}function Qe(e){return!(Buffer.isBuffer(e)||ce(e)||S(e)||T(e)||A(e)||v(e))}function Ye(e){return w(e)?"string":R(e)?"number":E(e)?"boolean":"any"}function Ze(e,t,r,n="."){const s=t.split(n);for(;o=s.shift(),i=!s.length,!$(o)&&(i?("function"==typeof e.set?e.set(o,r):e[o]=r,0):("function"==typeof e.set?(e.has(o)||e.set(o,{}),e=e.get(o)):e=e[o]=e[o]||{},1)););var o,i}function et(e){return e?A(e)?t=>t[e]:e:(e,t)=>String(t)}function tt(e,t){if(y(e)){const r=et(t||"id");return e.reduce(((e,t,n)=>([].concat(r(t,n)).forEach((r=>{const n=e.get(r);t=n?.merge?.(t)||t,e.set(r,t)})),e)),new Map)}const r=et(t);return Object.entries(e).reduce(((e,[t,n])=>e.set(r(n,t),n)),new Map)}})(),n})(),e.exports=t()},917:(e,t,r)=>{var n;self,n=(e,t)=>(()=>{"use strict";var r={379:e=>{const t="\\\\/",r=`[^${t}]`,n="\\.",s="\\/",o="[^/]",i=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${n}{1,2}${i}`,u={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:c,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${o}*?`,START_ANCHOR:a,SEP:"/"},p={...u,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?p:u}},390:(e,t,r)=>{const n=r(379),s=r(290),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:u}=n,p=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>s.escapeRegex(e))).join("..")}return r},h=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=u[e]||e;const r={...t},l="number"==typeof r.maxLength?Math.min(o,r.maxLength):o;let f=e.length;if(f>l)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${l}`);const d={type:"bos",value:"",output:r.prepend||""},m=[d],y=r.capture?"":"?:",g=n.globChars(r.windows),O=n.extglobChars(g),{DOT_LITERAL:b,PLUS_LITERAL:v,SLASH_LITERAL:S,ONE_CHAR:E,DOTS_SLASH:T,NO_DOT:R,NO_DOT_SLASH:A,NO_DOTS_SLASH:w,QMARK:P,QMARK_NO_DOT:C,STAR:_,START_ANCHOR:x}=g,M=e=>`(${y}(?:(?!${x}${e.dot?T:b}).)*?)`,k=r.dot?"":R,N=r.dot?P:C;let D=!0===r.bash?M(r):_;r.capture&&(D=`(${D})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const j={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};e=s.removePrefix(e,j),f=e.length;const $=[],I=[],L=[];let H,G=d;const U=()=>j.index===f-1,q=j.peek=(t=1)=>e[j.index+t],F=j.advance=()=>e[++j.index],B=()=>e.slice(j.index+1),K=(e="",t=0)=>{j.consumed+=e,j.index+=t},J=e=>{j.output+=null!=e.output?e.output:e.value,K(e.value)},V=()=>{let e=1;for(;"!"===q()&&("("!==q(2)||"?"===q(3));)F(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},z=e=>{j[e]++,L.push(e)},W=e=>{j[e]--,L.pop()},X=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||$.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,j.output+=G.output)}if($.length&&"paren"!==e.type&&!O[e.value]&&($[$.length-1].inner+=e.value),(e.value||e.output)&&J(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,m.push(e),G=e},Q=(e,t)=>{const n={...O[t],conditions:1,inner:""};n.prev=G,n.parens=j.parens,n.output=j.output;const s=(r.capture?"(":"")+n.open;z("parens"),X({type:e,value:t,output:j.output?"":E}),X({type:"paren",extglob:!0,value:F(),output:s}),$.push(n)},Y=e=>{let t=e.close+(r.capture?")":"");if("negate"===e.type){let n=D;e.inner&&e.inner.length>1&&e.inner.includes("/")&&(n=M(r)),(n!==D||U()||/^\)+$/.test(B()))&&(t=e.close=`)$))${n}`),"bos"===e.prev.type&&U()&&(j.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:H,output:t}),W("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,o=e.replace(c,((e,t,r,s,o,i)=>"\\"===s?(n=!0,e):"?"===s?t?t+s+(o?P.repeat(o.length):""):0===i?N+(o?P.repeat(o.length):""):P.repeat(r.length):"."===s?b.repeat(r.length):"*"===s?t?t+s+(o?D:""):D:t?e:`\\${e}`));return!0===n&&(o=!0===r.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===r.contains?(j.output=e,j):(j.output=s.wrapOutput(o,j,t),j)}for(;!U();){if(H=F(),"\0"===H)continue;if("\\"===H){const e=q();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",X({type:"text",value:H});continue}const t=/^\\+/.exec(B());let n=0;if(t&&t[0].length>2&&(n=t[0].length,j.index+=n,n%2!=0&&(H+="\\")),!0===r.unescape?H=F()||"":H+=F()||"",0===j.brackets){X({type:"text",value:H});continue}}if(j.brackets>0&&("]"!==H||"["===G.value||"[^"===G.value)){if(!1!==r.posix&&":"===H){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),n=i[r];if(n){G.value=t+n,j.backtrack=!0,F(),d.output||1!==m.indexOf(G)||(d.output=E);continue}}}("["===H&&":"!==q()||"-"===H&&"]"===q())&&(H=`\\${H}`),"]"!==H||"["!==G.value&&"[^"!==G.value||(H=`\\${H}`),!0===r.posix&&"!"===H&&"["===G.value&&(H="^"),G.value+=H,J({value:H});continue}if(1===j.quotes&&'"'!==H){H=s.escapeRegex(H),G.value+=H,J({value:H});continue}if('"'===H){j.quotes=1===j.quotes?0:1,!0===r.keepQuotes&&X({type:"text",value:H});continue}if("("===H){z("parens"),X({type:"paren",value:H});continue}if(")"===H){if(0===j.parens&&!0===r.strictBrackets)throw new SyntaxError(h("opening","("));const e=$[$.length-1];if(e&&j.parens===e.parens+1){Y($.pop());continue}X({type:"paren",value:H,output:j.parens?")":"\\)"}),W("parens");continue}if("["===H){if(!0!==r.nobracket&&B().includes("]"))z("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));H=`\\${H}`}X({type:"bracket",value:H});continue}if("]"===H){if(!0===r.nobracket||G&&"bracket"===G.type&&1===G.value.length){X({type:"text",value:H,output:`\\${H}`});continue}if(0===j.brackets){if(!0===r.strictBrackets)throw new SyntaxError(h("opening","["));X({type:"text",value:H,output:`\\${H}`});continue}W("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),G.value+=H,J({value:H}),!1===r.literalBrackets||s.hasRegexChars(e))continue;const t=s.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===r.literalBrackets){j.output+=t,G.value=t;continue}G.value=`(${y}${t}|${G.value})`,j.output+=G.value;continue}if("{"===H&&!0!==r.nobrace){z("braces");const e={type:"brace",value:H,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};I.push(e),X(e);continue}if("}"===H){const e=I[I.length-1];if(!0===r.nobrace||!e){X({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=m.slice(),n=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=p(n,r),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=j.output.slice(0,e.outputIndex),n=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",j.output=r;for(const e of n)j.output+=e.output||e.value}X({type:"brace",value:H,output:t}),W("braces"),I.pop();continue}if("|"===H){$.length>0&&$[$.length-1].conditions++,X({type:"text",value:H});continue}if(","===H){let e=H;const t=I[I.length-1];t&&"braces"===L[L.length-1]&&(t.comma=!0,e="|"),X({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",m.pop(),G=d;continue}X({type:"slash",value:H,output:S});continue}if("."===H){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const e=I[I.length-1];G.type="dots",G.output+=H,G.value+=H,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){X({type:"text",value:H,output:b});continue}X({type:"dot",value:H,output:b});continue}if("?"===H){if((!G||"("!==G.value)&&!0!==r.noextglob&&"("===q()&&"?"!==q(2)){Q("qmark",H);continue}if(G&&"paren"===G.type){const e=q();let t=H;if("<"===e&&!s.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(B()))&&(t=`\\${H}`),X({type:"text",value:H,output:t});continue}if(!0!==r.dot&&("slash"===G.type||"bos"===G.type)){X({type:"qmark",value:H,output:C});continue}X({type:"qmark",value:H,output:P});continue}if("!"===H){if(!0!==r.noextglob&&"("===q()&&("?"!==q(2)||!/[!=<:]/.test(q(3)))){Q("negate",H);continue}if(!0!==r.nonegate&&0===j.index){V();continue}}if("+"===H){if(!0!==r.noextglob&&"("===q()&&"?"!==q(2)){Q("plus",H);continue}if(G&&"("===G.value||!1===r.regex){X({type:"plus",value:H,output:v});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){X({type:"plus",value:H});continue}X({type:"plus",value:v});continue}if("@"===H){if(!0!==r.noextglob&&"("===q()&&"?"!==q(2)){X({type:"at",extglob:!0,value:H,output:""});continue}X({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=a.exec(B());e&&(H+=e[0],j.index+=e[0].length),X({type:"text",value:H});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=H,G.output=D,j.backtrack=!0,j.globstar=!0,K(H);continue}let t=B();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Q("star",H);continue}if("star"===G.type){if(!0===r.noglobstar){K(H);continue}const n=G.prev,s=n.prev,o="slash"===n.type||"bos"===n.type,i=s&&("star"===s.type||"globstar"===s.type);if(!0===r.bash&&(!o||t[0]&&"/"!==t[0])){X({type:"star",value:H,output:""});continue}const a=j.braces>0&&("comma"===n.type||"brace"===n.type),c=$.length&&("pipe"===n.type||"paren"===n.type);if(!o&&"paren"!==n.type&&!a&&!c){X({type:"star",value:H,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[j.index+4];if(r&&"/"!==r)break;t=t.slice(3),K("/**",3)}if("bos"===n.type&&U()){G.type="globstar",G.value+=H,G.output=M(r),j.output=G.output,j.globstar=!0,K(H);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!i&&U()){j.output=j.output.slice(0,-(n.output+G.output).length),n.output=`(?:${n.output}`,G.type="globstar",G.output=M(r)+(r.strictSlashes?")":"|$)"),G.value+=H,j.globstar=!0,j.output+=n.output+G.output,K(H);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";j.output=j.output.slice(0,-(n.output+G.output).length),n.output=`(?:${n.output}`,G.type="globstar",G.output=`${M(r)}${S}|${S}${e})`,G.value+=H,j.output+=n.output+G.output,j.globstar=!0,K(H+F()),X({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){G.type="globstar",G.value+=H,G.output=`(?:^|${S}|${M(r)}${S})`,j.output=G.output,j.globstar=!0,K(H+F()),X({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=M(r),G.value+=H,j.output+=G.output,j.globstar=!0,K(H);continue}const n={type:"star",value:H,output:D};!0!==r.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==r.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=A,G.output+=A):!0===r.dot?(j.output+=w,G.output+=w):(j.output+=k,G.output+=k),"*"!==q()&&(j.output+=E,G.output+=E)),X(n)):(n.output=H,X(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=k+n.output),X(n))}for(;j.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));j.output=s.escapeLast(j.output,"["),W("brackets")}for(;j.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing",")"));j.output=s.escapeLast(j.output,"("),W("parens")}for(;j.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","}"));j.output=s.escapeLast(j.output,"{"),W("braces")}if(!0===r.strictSlashes||"star"!==G.type&&"bracket"!==G.type||X({type:"maybe_slash",value:"",output:`${S}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};l.fastpaths=(e,t)=>{const r={...t},i="number"==typeof r.maxLength?Math.min(o,r.maxLength):o,a=e.length;if(a>i)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${i}`);e=u[e]||e;const{DOT_LITERAL:c,SLASH_LITERAL:p,ONE_CHAR:h,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:d,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:g}=n.globChars(r.windows),O=r.dot?d:f,b=r.dot?m:f,v=r.capture?"":"?:";let S=!0===r.bash?".*?":y;r.capture&&(S=`(${S})`);const E=e=>!0===e.noglobstar?S:`(${v}(?:(?!${g}${e.dot?l:c}).)*?)`,T=e=>{switch(e){case"*":return`${O}${h}${S}`;case".*":return`${c}${h}${S}`;case"*.*":return`${O}${S}${c}${h}${S}`;case"*/*":return`${O}${S}${p}${h}${b}${S}`;case"**":return O+E(r);case"**/*":return`(?:${O}${E(r)}${p})?${b}${h}${S}`;case"**/*.*":return`(?:${O}${E(r)}${p})?${b}${S}${c}${h}${S}`;case"**/.*":return`(?:${O}${E(r)}${p})?${c}${h}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=T(t[1]);if(!r)return;return r+c+t[2]}}},R=s.removePrefix(e,{negated:!1,prefix:""});let A=T(R);return A&&!0!==r.strictSlashes&&(A+=`${p}?`),A},e.exports=l},555:(e,t,r)=>{const n=r(270),s=r(390),o=r(290),i=r(379),a=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map((e=>a(e,t,r))),s=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return s}const n=(s=e)&&"object"==typeof s&&!Array.isArray(s)&&e.tokens&&e.input;var s;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},i=o.windows,c=n?a.compileRe(e,t):a.makeRe(e,t,!1,!0),u=c.state;delete c.state;let p=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=a(o.ignore,e,r)}const h=(r,n=!1)=>{const{isMatch:s,match:h,output:l}=a.test(r,c,t,{glob:e,posix:i}),f={glob:e,state:u,regex:c,posix:i,input:r,output:l,match:h,isMatch:s};return"function"==typeof o.onResult&&o.onResult(f),!1===s?(f.isMatch=!1,!!n&&f):p(r)?("function"==typeof o.onIgnore&&o.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof o.onMatch&&o.onMatch(f),!n||f)};return r&&(h.state=u),h};a.test=(e,t,r,{glob:n,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=r||{},c=i.format||(s?o.toPosixSlashes:null);let u=e===n,p=u&&c?c(e):e;return!1===u&&(p=c?c(e):e,u=p===n),!1!==u&&!0!==i.capture||(u=!0===i.matchBase||!0===i.basename?a.matchBase(e,t,r,s):t.exec(p)),{isMatch:Boolean(u),match:u,output:p}},a.matchBase=(e,t,r)=>(t instanceof RegExp?t:a.makeRe(t,r)).test(o.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map((e=>a.parse(e,t))):s(e,{...t,fastpaths:!1}),a.scan=(e,t)=>n(e,t),a.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const s=t||{},o=s.contains?"":"^",i=s.contains?"":"$";let c=`${o}(?:${e.output})${i}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=a.toRegex(c,t);return!0===n&&(u.state=e),u},a.makeRe=(e,t,r=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");const o=t||{};let i,c={negated:!1,fastpaths:!0},u="";return e.startsWith("./")&&(e=e.slice(2),u=c.prefix="./"),!1===o.fastpaths||"."!==e[0]&&"*"!==e[0]||(i=s.fastpaths(e,t)),void 0===i?(c=s(e,t),c.prefix=u+(c.prefix||"")):c.output=i,a.compileRe(c,t,r,n)},a.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=i,e.exports=a},270:(e,t,r)=>{const n=r(290),{CHAR_ASTERISK:s,CHAR_AT:o,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:O}=r(379),b=e=>e===p||e===i,v=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},S=e.length-1,E=!0===r.parts||!0===r.scanToEnd,T=[],R=[],A=[];let w,P,C=e,_=-1,x=0,M=0,k=!1,N=!1,D=!1,j=!1,$=!1,I=!1,L=!1,H=!1,G=!1,U=0,q={value:"",depth:0,isGlob:!1};const F=()=>_>=S,B=()=>(w=P,C.charCodeAt(++_));for(;_<S;){let e;if(P=B(),P!==i){if(!0===I||P===h){for(U++;!0!==F()&&(P=B());)if(P!==i)if(P!==h){if(!0!==I&&P===c&&(P=B())===c){if(k=q.isBrace=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}if(!0!==I&&P===a){if(k=q.isBrace=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===y&&(U--,0===U)){I=!1,k=q.isBrace=!0,G=!0;break}}else U++;else L=q.backslashes=!0,B();if(!0===E)continue;break}if(P!==p){if(!0!==r.noext&&1==(P===d||P===o||P===s||P===m||P===u)&&C.charCodeAt(_+1)===l){if(D=q.isGlob=!0,j=q.isExtglob=!0,G=!0,!0===E){for(;!0!==F()&&(P=B());)if(P!==i){if(P===g){D=q.isGlob=!0,G=!0;break}}else L=q.backslashes=!0,P=B();continue}break}if(P===s){if(w===s&&($=q.isGlobstar=!0),D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===m){if(D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===f)for(;!0!==F()&&(e=B());)if(e!==i){if(e===O){if(N=q.isBracket=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}}else L=q.backslashes=!0,B();if(!0===r.nonegate||P!==u||_!==x){if(!0!==r.noparen&&P===l){if(D=q.isGlob=!0,!0===E){for(;!0!==F()&&(P=B());)if(P!==l){if(P===g){G=!0;break}}else L=q.backslashes=!0,P=B();continue}break}if(!0===D){if(G=!0,!0===E)continue;break}}else H=q.negated=!0,x++}else{if(T.push(_),R.push(q),q={value:"",depth:0,isGlob:!1},!0===G)continue;if(w===c&&_===x+1){x+=2;continue}M=_+1}}else L=q.backslashes=!0,P=B(),P===h&&(I=!0)}!0===r.noext&&(j=!1,D=!1);let K=C,J="",V="";x>0&&(J=C.slice(0,x),C=C.slice(x),M-=x),K&&!0===D&&M>0?(K=C.slice(0,M),V=C.slice(M)):!0===D?(K="",V=C):K=C,K&&""!==K&&"/"!==K&&K!==C&&b(K.charCodeAt(K.length-1))&&(K=K.slice(0,-1)),!0===r.unescape&&(V&&(V=n.removeBackslashes(V)),K&&!0===L&&(K=n.removeBackslashes(K)));const z={prefix:J,input:e,start:x,base:K,glob:V,isBrace:k,isBracket:N,isGlob:D,isExtglob:j,isGlobstar:$,negated:H};if(!0===r.tokens&&(z.maxDepth=0,b(P)||R.push(q),z.tokens=R),!0===r.parts||!0===r.tokens){let t;for(let n=0;n<T.length;n++){const s=t?t+1:x,o=T[n],i=e.slice(s,o);r.tokens&&(0===n&&0!==x?(R[n].isPrefix=!0,R[n].value=J):R[n].value=i,v(R[n]),z.maxDepth+=R[n].depth),0===n&&""===i||A.push(i),t=o}if(t&&t+1<e.length){const n=e.slice(t+1);A.push(n),r.tokens&&(R[R.length-1].value=n,v(R[R.length-1]),z.maxDepth+=R[R.length-1].depth)}z.slashes=T,z.parts=A}return z}},290:(e,t,r)=>{const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:i}=r(379);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>o.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(i,"\\$1"),t.toPosixSlashes=e=>e.replace(n,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.escapeLast=(e,r,n)=>{const s=e.lastIndexOf(r,n);return-1===s?e:"\\"===e[s-1]?t.escapeLast(e,r,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n},t.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")},870:(e,t,r)=>{e.exports=r(555)},203:(e,t,r)=>{var n=r(739);function s(e){if(!Object.prototype.hasOwnProperty.call(o.message,e))throw new Error("invalid status code: "+e);return o.message[e]}function o(e){if("number"==typeof e)return s(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(o.code,t))throw new Error('invalid status message: "'+e+'"');return o.code[t]}(e):s(t)}e.exports=o,o.message=n,o.code=function(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r],s=Number(r);t[n.toLowerCase()]=s})),t}(n),o.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(n),o.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},o.empty={204:!0,205:!0,304:!0},o.retry={502:!0,503:!0,504:!0}},803:t=>{t.exports=e},598:e=>{e.exports=t},739:e=>{e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication 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":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","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","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{s.r(o),s.d(o,{AcceptMime:()=>mr,AdditionalProperties:()=>qe,All:()=>Lr,AllOf:()=>Fe,Allow:()=>Ke,Any:()=>Je,AnyOf:()=>Ve,ArrayOf:()=>ke,Children:()=>_e,CollectionContains:()=>De,CollectionOf:()=>Me,Const:()=>ze,Consumes:()=>yr,ContentType:()=>Rr,Converter:()=>Mn,CustomKey:()=>We,CustomKeys:()=>Xe,DateFormat:()=>dt,DateTime:()=>ft,DecoratorContext:()=>gr,Default:()=>Qe,DefaultMsg:()=>Ye,Delete:()=>qr,Deprecated:()=>Ar,Description:()=>Ze,Discriminator:()=>b,DiscriminatorKey:()=>et,DiscriminatorValue:()=>xe,Email:()=>lt,EndpointMetadata:()=>re,Enum:()=>tt,ErrorMsg:()=>je,Example:()=>rt,Examples:()=>nt,ExclusiveMaximum:()=>it,ExclusiveMinimum:()=>ut,For:()=>Lt,Format:()=>ht,ForwardGroups:()=>Ot,GenericOf:()=>lr,Generics:()=>fr,Get:()=>Hr,Groups:()=>Tt,HTTP_METHODS:()=>we,HTTP_STATUS_MESSAGES:()=>B,Head:()=>Fr,Header:()=>wr,Hidden:()=>Rt,Ignore:()=>wt,In:()=>Pr,InFile:()=>Cr,Integer:()=>Pt,JSON_TYPES:()=>d,JsonClassStore:()=>R,JsonEntitiesContainer:()=>c,JsonEntityComponent:()=>T,JsonEntityFn:()=>Ce,JsonEntityStore:()=>u,JsonFormatTypes:()=>pt,JsonLazyRef:()=>se,JsonMap:()=>$,JsonMedia:()=>Y,JsonMethodStore:()=>te,JsonOperation:()=>ee,JsonOperationPathsMap:()=>Qr,JsonOperationRoute:()=>Zr,JsonParameter:()=>H,JsonParameterStore:()=>G,JsonParameterTypes:()=>M,JsonPropertyStore:()=>A,JsonRequestBody:()=>X,JsonResponse:()=>Z,JsonSchema:()=>E,Location:()=>_r,MapOf:()=>Ne,Max:()=>ot,MaxItems:()=>Ie,MaxLength:()=>Ct,MaxProperties:()=>Le,Maximum:()=>st,Min:()=>ct,MinItems:()=>He,MinLength:()=>_t,MinProperties:()=>Ge,Minimum:()=>at,MultipleOf:()=>xt,Name:()=>Mt,Nullable:()=>kt,OneOf:()=>Nt,OperationId:()=>xr,OperationMethods:()=>Pe,OperationPath:()=>Mr,Optional:()=>Dt,Options:()=>Kr,ParamMetadata:()=>U,Partial:()=>kr,Patch:()=>Br,Path:()=>Nr,Pattern:()=>jt,Post:()=>Gr,Produces:()=>dr,Property:()=>Be,PropertyMetadata:()=>w,Put:()=>Ur,ReadOnly:()=>$t,RecordOf:()=>Ht,Redirect:()=>Dr,Required:()=>Gt,RequiredGroups:()=>Ut,Returns:()=>Tr,Route:()=>Ir,Schema:()=>It,Security:()=>Jr,SpecTypes:()=>x,Status:()=>Vr,Summary:()=>zr,Tags:()=>Wr,TimeFormat:()=>mt,Title:()=>qt,TypeError:()=>Ft,UniqueItems:()=>Ue,Uri:()=>yt,Url:()=>gt,View:()=>Xr,WriteOnly:()=>Bt,allOf:()=>ur,alterIgnore:()=>fe,alterOneOf:()=>Se,alterRequiredGroups:()=>be,any:()=>ir,anyMapper:()=>oe,anyOf:()=>ar,array:()=>rr,boolean:()=>Wt,buildPath:()=>en,classMapper:()=>ie,concatParameters:()=>tn,concatPath:()=>Yr,createRef:()=>D,createRefName:()=>N,date:()=>Xt,datetime:()=>Qt,defineStatusModel:()=>br,email:()=>Zt,enums:()=>hr,enumsRegistry:()=>l,execMapper:()=>i,formatParameterType:()=>I,from:()=>Kt,generateSpec:()=>Nn,genericsMapper:()=>ae,getComputedType:()=>f,getGenericsMap:()=>P,getInheritedStores:()=>ce,getJsonEntityStore:()=>ne,getJsonPathParameters:()=>nn,getJsonSchema:()=>jn,getJsonSchemaMapper:()=>n,getJsonType:()=>m,getOperationsRoutes:()=>$n,getOperationsStores:()=>rn,getProperties:()=>Ln,getPropertiesStores:()=>In,getRequiredProperties:()=>ve,getSpec:()=>dn,getSpecType:()=>mn,getSpecTypeFromSpec:()=>yn,getStatusConstant:()=>K,getStatusMessage:()=>J,getStatusModel:()=>vr,hasMapper:()=>a,inheritedClassMapper:()=>ue,inlineEnums:()=>Ee,integer:()=>Vt,isParameterType:()=>L,isRedirectionStatus:()=>z,isSuccessStatus:()=>V,itemMapper:()=>pe,lazyRef:()=>pr,lazyRefMapper:()=>he,map:()=>nr,mapAliasedProperties:()=>Oe,mapGenericsOptions:()=>C,mapHeaders:()=>Q,mapMapper:()=>le,mapNullableType:()=>de,mapOpenSpec:()=>vn,mapOpenSpec2:()=>On,mapOpenSpec3:()=>bn,mapOpenSpecInfo:()=>gn,mapRouteOptions:()=>jr,matchGroups:()=>Et,mergeOperation:()=>sn,mergeSpec:()=>ln,number:()=>Jt,object:()=>or,objectMapper:()=>me,ofMapper:()=>ye,oneOf:()=>cr,operationIdFormatter:()=>on,parameters:()=>cn,popGenerics:()=>_,propertiesMapper:()=>ge,registerJsonSchemaMapper:()=>r,schemaMapper:()=>Ae,schemesReducer:()=>an,security:()=>un,serializeEnum:()=>y,serializeEnumValues:()=>g,set:()=>sr,string:()=>zt,tagsReducer:()=>pn,time:()=>Yt,toJsonMapCollection:()=>W,toJsonRegex:()=>O,toRef:()=>j,transformInformation:()=>xn,transformSecurity:()=>_n,transformToOS2:()=>kn,uri:()=>er,url:()=>tr,withErrorMsg:()=>$e});var e=s(803);const t=new Map;function r(e,r){return t.set(e,r)}function n(e){if(!t.has(e))throw new Error(`JsonSchema ${e} mapper doesn't exists`);return t.get(e)}function i(e,t,r,s){return n(e)(t,r,s)}function a(e){return t.has(e)}const c=new Map;class u{propertyKey;propertyName;index;descriptor;decoratorType;collectionType;token;store;isStore=!0;parent;target;_type;_schema;constructor(e){const{target:t,propertyKey:r,descriptor:n,index:s,decoratorType:o}=e;this.target=t,this.propertyKey=r,this.propertyName=String(r),this.descriptor=n,this.index=s,this.decoratorType=o,this.token=t,this.store=e.store,this.parent=this}get targetName(){return(0,e.nameOf)(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return(0,e.isArrayOrArrayClass)(this.collectionType)}get discriminatorAncestor(){const t=(0,e.ancestorsOf)(this.target).find((e=>u.from(e).schema.isDiscriminator));return t&&u.from(t)}get isPrimitive(){return(0,e.isPrimitiveOrPrimitiveClass)(this._type)}get isDate(){return(0,e.isDate)(this.computedType)}get isObject(){return(0,e.isObject)(this.computedType)}get isClass(){return(0,e.isClass)(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){return this.schema.isDiscriminator&&this.discriminatorAncestor?.schema.discriminator().base!==this.target}static from(...t){if(t[0].isStore)return t[0];const r=t[0];t.length>1&&(t[0]=(0,e.prototypeOf)(t[0]));const n=e.Store.from(...t);if(!n.has("JsonEntityStore")){const s=(0,e.decoratorTypeOf)(t),o=c.get(s);if(!o)throw Error("Unsupported json entity type");const i=new o({store:n,decoratorType:s,target:(0,e.classOf)(r),propertyKey:t[1],index:"number"==typeof t[2]?t[2]:void 0,descriptor:"object"==typeof t[2]?t[2]:void 0});i.build(),n.set("JsonEntityStore",i)}return n.get("JsonEntityStore")}static fromMethod(t,r){return this.from(t,r,(0,e.descriptorOf)(t,r))}static get(t,r,n){return u.from((0,e.prototypeOf)(t),r,n)}isGetterOnly(){return(0,e.isObject)(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t)}toString(){return[this.targetName,this.propertyName,this.index].filter((e=>void 0!==e)).join(":")}buildType(t){(0,e.isCollection)(t)?this.collectionType=t:(this._type=t,this._type&&(0,e.isPlainObject)(this._type)&&(this._type=String))}getBestType(){return this.itemSchema.isDiscriminator?this.itemSchema.discriminator():(0,e.isClassObject)(this.type)?this.itemSchema.getTarget():this.type}}function p(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create,Object.create;const l=new Map;function f(t){return(0,e.isPromise)(t)||t===Function?Object:(0,e.isClass)(t)||(0,e.isSymbol)(t)||(0,e.isPrimitiveOrPrimitiveClass)(t)||(0,e.isClassObject)(t)||(0,e.isDate)(t)||(0,e.isCollection)(t)?(0,e.classOf)(t):(0,e.isArrowFn)(t)?t():t}const d=["string","number","integer","boolean","object","array","null","any"];function m(t){return null===t?"null":(0,e.isPrimitiveOrPrimitiveClass)(t)?d.indexOf(t)>-1?t:"string"==typeof t?"file"===t?"file":"generic":(0,e.primitiveOf)(t):t===Array?"array":(0,e.isArray)(t)?t.map(m):t===Set?"array":(0,e.isDate)(t)||(0,e.isBuffer)(t)?"string":"object"}const y=t=>(0,e.isObject)(t)&&null!==t?Object.entries(t).reduce(((e,[t,r])=>isNaN(+t)?e.concat(r):e),[]):t;function g(t){const r=t.reduce(((e,t)=>e.concat(y(t))),[]),n=r.reduce(((e,t)=>e.add((e=>null===e?"null":typeof e)(t))),new Set);return{values:(0,e.uniq)(r),types:n}}function O(e){return String(e).replace(/^(\/)(.*)(\/)$/,"$2")}class b{propertyName;base;values=new Map;types=new Map;constructor({base:t,propertyName:r,types:n,values:s}={}){Object.assign(this,(0,e.cleanObject)({base:t,propertyName:r,types:n?new Map(n):void 0,values:s?new Map(s):void 0}))}add(e,t){return t.forEach((t=>{this.values.set(t,e)})),this.types.set(e,t),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const t=this.types.get(e);return t?t[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function v(e){return e instanceof E?e:Object.entries(e).reduce(((e,[t,r])=>(e[O(t)]=S(r),e)),{})}function S(t){return(0,e.isArray)(t)?t.map(S):t.isStore||t.isJsonSchema||t.isLazyRef?t:(0,e.classOf)(t)!==Object&&(0,e.isClass)(t)?u.from(t).schema:(0,e.isObject)(t)?E.from(t):(0,e.isPrimitiveClass)(t)?E.from({type:t}):t}class E extends Map{isJsonSchema=!0;$hooks=new e.Hooks;$required=new Set;$allow=[];$selfRequired;$forwardGroups=!1;isDiscriminatorKey=!1;isDiscriminator=!1;#t=!1;#e=null;#r;#o=[];#n=new Map;#i;#s;#a=!1;#c=!1;#u=!1;constructor(e={}){super(),e&&this.assign(e)}get alias(){return this.#n}get nestedGenerics(){return this.#o}set nestedGenerics(e){this.#o=e}get genericLabels(){return this.#r}set genericLabels(e){this.#r=e}get isClass(){return(0,e.isClass)(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(this.#s)}get isCollection(){return this.#c}get isGeneric(){return this.#a}get discriminatorAncestor(){const t=(0,e.ancestorsOf)(this.#s).find((e=>u.from(e).schema.isDiscriminator));return t&&u.from(t).schema}get hasGenerics(){return!(!this.nestedGenerics||!this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return this.#u}get isNullable(){return this.#t||this.$allow.includes(null)}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}get hasDiscriminator(){return!!this.#e}static from(e={}){return new E(e)}nullable(e){this.#t=e}itemSchema(e={}){return this.#i=this.#i||S(e),this.#i.assign(e),this.#i}getAliasOf(e){return this.#n.get(e)}addAlias(e,t){return this.#n.set(e,t),this.#n.set(t,e),this}removeAlias(e){const t=this.#n.get(e);return t&&this.#n.delete(t),this.#n.delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return this.#u=!0,super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){if("boolean"==typeof e){const t=e;e=()=>t}return this.$hooks.on("ignore",e),this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,this.#e=this.#e||new b({base:this.#s})}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const t=this.discriminatorAncestor.discriminator();t.add(this.#s,e),this.isDiscriminator=!0;const r=this.get("properties"),n=r[t.propertyName]||new E({type:"string"});return 1===e.length?(n.const(e[0]),n.examples([e[0]])):(n.enum(...e),n.examples(e)),r[t.propertyName]=n,this.set("properties",r),this}additionalItems(e){return super.set("additionalItems",S(e)),this}contains(e){return super.set("contains",S(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",this.#i=S(e)),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return this.$allow.push(...e),this}required(t=!0){if(!(0,e.isArray)(t)){const e=this.clone();return e.$selfRequired=t,e}return this.$required.clear(),t.forEach((e=>this.$required.add(e))),this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",v(e)),this}addProperty(e,t){const r=this.get("properties")||{};return r[e]=t,super.set("properties",v(r)),this}patternProperties(e){return super.set("patternProperties",v(e)),this}additionalProperties(e){return super.set("additionalProperties",S(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",v(e)),this}propertyNames(e){return super.set("propertyNames",S(e)),this}enum(e,...t){if(l.has(e))return this.enum(l.get(e));if(e instanceof E)e.getName()?super.set("enum",e):super.set("enum",e.get("enum")).any(...e.getJsonType());else{const{values:r,types:n}=g([e,t].flat());super.set("enum",r).any(...n)}return this}definitions(e){return super.set("definitions",v(e)),this}allOf(e){return super.set("allOf",e.map(S)),this}anyOf(e){return super.set("anyOf",e.map(S)),this}oneOf(e){let t=e.map(S);if(1===t.length&&!(e[0]instanceof E)){if(!t[0].hasDiscriminator)return this.type(e[0]);const r=t[0].discriminator().children();if(!r.length)return this.type(e[0]);t=r.map(S)}super.set("oneOf",t);const r=t[0];if(r.isDiscriminator){const e=r.discriminatorAncestor.discriminator(),{propertyName:t}=e;super.set("discriminator",{propertyName:t}),this.isDiscriminator=!0,this.#e=e}return this}not(e){return super.set("not",S(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",O(e)),this}format(e){return super.set("format",e),this}type(t){switch(t){case Map:super.set("type",m(t)),this.#s=t,this.#c=!0,this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case Array:super.set("type",m(t)),this.#s=t,this.#c=!0,this.has("items")||super.set("items",this.itemSchema({}));break;case Set:super.set("type",m(t)),this.#s=t,this.#c=!0,this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":super.set("type",m(t)),this.integer();break;case Object:case Date:case Boolean:case Number:case String:super.set("type",m(t)),this.#s=t,this.has("properties")||super.set("properties",{});break;default:if((0,e.isClass)(t)||(0,e.isFunction)(t))super.set("type",void 0),this.#s=t,this.has("properties")||super.set("properties",{});else{const e=m(t);"generic"===e?(this.#a=!0,super.set("$ref",t)):super.set("type",e)}}return this}any(...t){return t.filter((t=>(0,e.isClass)(t))).length>=2?this.oneOf(t.filter((e=>null!==e&&(this.nullable(!0),!0)))):(t.length?(t=(0,e.uniq)(t).map(m)).includes("null")&&(this.nullable(!0),t=t.filter((e=>"null"!==e))):(t=["integer","number","string","boolean","array","object"],this.nullable(!0)),this.type(1===t.length?t[0]:t)),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,t){return super.set(`#${e}`,t),this}toObject(e){return this.toJSON(e)}toJSON(e){let t=!1;e||(t=!0,e={schemas:{},inlineEnums:!0});const r=i("schema",this,e);return t&&e.schemas&&Object.keys(e.schemas).length&&(r.definitions=e.schemas),r}assign(e={}){return(e instanceof E?[...e.entries()]:Object.entries(e)).forEach((([e,t])=>{this.set(e,t)})),e instanceof E&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach((e=>{this.$required.add(e)})),this.#e=this.#e?new b(this.#e):null,this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,this.#u=e.#u,this.#n=new Map(this.#n.entries()),e.#r&&(this.#r=[...e.#r]),this.#o=e.#o.map((e=>[...e])),this.#s=e.#s,this.#a=e.#a,this.#c=e.#c,this.#u=e.#u,super.set("type",e.get("type"))),this}set(t,r){return t in this?(0,e.isFunction)(this[t])&&this[t](r):super.set(t,r),this}getComputedType(){return f(this.#s)}getComputedItemType(){return this.#i?this.#i.getComputedType():this.getComputedType()}getJsonType(){return this.get("type")||m(this.getComputedType())}getTarget(){return this.#s}getName(){return this.get("name")||((0,e.isClass)(this.#s)?(0,e.nameOf)((0,e.classOf)(this.getComputedType())):"")}clone(){return new E(this)}}function T(e){return t=>{c.set(e,t)}}let R=class extends u{children=new Map;get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=E.from({type:this.type})}};R=p([T(e.DecoratorTypes.CLASS)],R);let A=class extends u{parent=u.from(this.target);get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(e){e?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}build(){this._type||this.buildType(e.Metadata.getType((0,e.prototypeOf)(this.target),this.propertyKey)),this._type=this._type||Object;let t=this.parent.schema.get("properties")[this.propertyName];t||(this.parent.children.set(this.propertyName,this),t=E.from({type:this.collectionType||this.type}),this.collectionType&&t.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,t),this._schema=t}static get(t,r){return u.from((0,e.prototypeOf)(t),r)}};A=p([T(e.DecoratorTypes.PROP)],A);const w=A;function P(e,t){return e.reduce(((e,r,n)=>e.set(r,t[n])),new Map)}function C(e){if(e.genericLabels&&e.genericTypes){const{genericLabels:t,genericTypes:r,...n}=e;return{...n,generics:P(t,r)}}return e}function _(e){const[t,...r]=e.nestedGenerics;return{genericTypes:t,nestedGenerics:r}}var x,M,k=s(598);function N(e,t){return t.groups&&t.groups.length?(0,k.pascalCase)(`${e} ${t.groupsName||t.groups.join(" ")}`):e}function D(t,r,n){const s=function(e){const{host:t="#/"+("openapi3"===e.specType?"components/schemas":"definitions")}=e;return t}(n),o={$ref:`${s}/${t}`},i=r.isNullable,a=r.isReadOnly,c=r.isWriteOnly;if(i||a||c)switch(n.specType){case x.OPENAPI:return(0,e.cleanObject)({nullable:!!i||void 0,readOnly:!!a||void 0,writeOnly:!!c||void 0,oneOf:[o]});case x.JSON:return(0,e.cleanObject)({readOnly:a,writeOnly:c,oneOf:[o]})}return o}function j(e,t,r){const n=N(e.getName(),r);return r.schemas[n]=t,D(n,e,r)}!function(e){e.JSON="jsonschema",e.SWAGGER="swagger2",e.OPENAPI="openapi3"}(x||(x={}));class $ extends Map{constructor(e={}){super(),this.assign(e)}assign(t={}){return Object.entries(t).forEach((([t,r])=>{(0,e.isFunction)(this[t])?this[t](r):this.set(t,r)})),this}toJSON(e={}){return i("map",this,e)}}function I(e){return String(e).toLowerCase().replace("raw_","").replace("cookies","cookie")}function L(e){return Object.values(M).includes(I(e))}!function(e){e.BODY="body",e.PATH="path",e.QUERY="query",e.HEADER="header",e.COOKIES="cookie",e.FILES="files"}(M||(M={}));class H extends ${nestedGenerics=[];groups;groupsName;$schema;expression;getName(){const e=this.get("name");return"files"===this.get("in")?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,t=""){return this.set("in",I(e)),this.expression=t,this}required(e){return this.set("required",e),this}schema(e){return this.$schema=e,this}toJSON(t={}){if(!L(this.get("in")))return null;const r=(0,e.toMap)(t.schemas||{});return this.build({...t,groups:this.groups,groupsName:this.groupsName},r)}build(e,t){const{type:r,schema:n,...s}=super.toJSON(e),o=i("item",this.$schema,{...e,..._(this)});switch(s.required=s.required||this.get("in")===M.PATH,this.get("in")){case M.FILES:return this.getFileSchema(o,s);case M.QUERY:if(o.$ref){if(!s.name)return this.refToParameters(s,e,t);s.style="deepObject"}}return s.schema=o,s}getFileSchema(t,r){const n={type:"string",format:"binary",oneOf:void 0};return"array"===t.type?(t.items=(0,e.cleanObject)({...t.items,...n}),r.schema=t):r.schema=(0,e.cleanObject)({...t,...n}),r}refToParameters(t,r,n){const s=N(this.$schema.getName(),r),o=r.schemas[s];return r.schemas[s]&&!n.has(s)&&delete r.schemas[this.$schema.getName()],Object.entries(o.properties||{}).reduce(((r,[n,{description:s,...i}])=>[...r,(0,e.cleanObject)({...t,name:n,required:(o.required||[]).includes(n),description:s,schema:i,style:i.$ref?"deepObject":void 0})]),[])}}let G=class extends u{paramType;expression;dataPath;pipes;parameter=new H;parent=u.fromMethod(this.target,this.propertyKey);constructor(e){super(e),this.pipes=e.pipes||[],this.paramType=e.paramType||this.paramType,this.expression=e.expression||this.expression,this.dataPath=e.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(e){this.parameter.nestedGenerics=e}get required(){return!!this.parameter.get("required")}set required(e){this.parameter.required(e)}get allowedRequiredValues(){return this.schema.$allow}static getParams(t,r){const n=[],s=(0,e.ancestorsOf)(t).reverse().find((t=>(0,e.isMethodDescriptor)(t,r)&&u.fromMethod(t,r).children.size));return s?(u.fromMethod(s,r).children.forEach(((e,t)=>{n[+t]=e})),n):[]}static get(t,r,n){return u.from((0,e.prototypeOf)(t),r,n)}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}getSchema(t){return(0,e.isCollection)(t)||!(0,e.isClass)(t)?E.from({type:t}):u.from(t).schema}build(){if(!this._type){const t=e.Metadata.getParamTypes((0,e.prototypeOf)(this.target),this.propertyKey)[this.index];this.buildType(t)}this._type=this._type||Object,this._schema||(this.parent.children.set(this.index,this),this._schema=this.getSchema(this.collectionType||this.type),this.parameter.schema(this._schema),this.collectionType&&this._schema.itemSchema(this.getSchema(this.type)),this.parent.operation.addParameter(this.index,this.parameter))}};G=p([T(e.DecoratorTypes.PARAM),h("design:paramtypes",[Object])],G);const U=G;var q=s(203),F=s.n(q);const B=F().codes.reduce(((e,t)=>{const r=String(F()(t));return{...e,[String(t)]:{label:r,code:(0,k.constantCase)(r)}}}),{});function K(e){return B[e]?.code}function J(e){return B[e]?.label}B[200].label="Success",B[200].code="SUCCESS";const V=e=>Number(e)&&200<=Number(e)&&Number(e)<300,z=e=>Number(e)&&300<=Number(e)&&Number(e)<400;function W(e,t=$){return Object.entries(e).reduce(((e,[r,n])=>(e.set(r,new t(n)),e)),new $)}class X extends ${constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",W(e)),this}addContent(e,t,r){const n=this.get("content"),s=new $;return s.set("schema",t),r&&s.set("examples",r),n.set(e,s),this}required(e){return this.set("required",e),this}}function Q(t){return Object.keys(t).reduce(((r,n)=>{const s=t[n];let o=typeof s,i={example:s};return"object"===o&&(i=s,i.example=void 0===i.value?i.example:i.value,delete i.value,o=typeof i.example),i.type=i.type||o,r[n]=(0,e.cleanObject)(i),r}),{})}class Y extends ${groups=[];groupsName;allowedGroups;schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}toJSON(e={}){let t=[...this.groups||[]];return super.toJSON({...e,groups:t,groupsName:this.groupsName})}}class Z extends ${status;constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",Q(e)),this}content(e){return this.set("content",W(e,Y)),this}getContent(){return this.get("content")}getMedia(e,t=!0){return t&&this.addMedia(e),this.getContent()?.get(e)}addMedia(e){const t=this.get("content");return t.has(e)||t.set(e,new Y),this}toJSON(e={}){const t=super.toJSON(e);return 204===this.status&&delete t.content,t.headers&&Object.entries(t.headers).forEach((([e,{type:r,...n}])=>{t.headers[e]={...n,schema:{type:r}}})),t}}class ee extends ${operationPaths=new Map;#p;#h=!1;constructor(e={}){super({parameters:[],responses:new $,...e})}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return this.#p}tags(e){return super.set("tags",e),this}addTags(t){return t=(0,e.uniqBy)([...this.get("tags")||[],...t],"name"),this.tags(t)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return this.#p=e,this}getStatus(){return this.#p||200}setRedirection(e=302){return this.#h=!0,this.#p=e,this}isRedirection(e){return this.#h&&e?z(e):this.#h}addResponse(t,r){if((V(t)||z(t))&&!this.#p){const e=this.getResponseOf(200);this.getResponses().set(t.toString(),e).delete("200"),this.defaultStatus(Number(t))}const n="default"===t?this.getStatus().toString():t.toString(),s=this.getResponses().get(n);return s?(r.forEach(((t,r)=>{["content"].includes(r)||s.set(r,(0,e.deepMerge)(s.get(r),t))})),s.status=Number(n)):(r.status=Number(n),this.getResponses().set(n,r)),this}getResponses(){return this.get("responses")}getResponseOf(e){return("default"===e?this.response:this.getResponses().get(String(e)))||new Z}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(t,r){const n=this.get("security")||{};return n[t]=(0,e.uniq)([...n[t]||[],...r]),this.security(n)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,t){-1===e&&(e=this.get("parameters").length),this.get("parameters")[e]=t}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(t){const r=(0,e.uniq)([].concat(this.get("produces"),t)).filter(Boolean);this.set("produces",r)}addOperationPath(e,t,r={}){return this.operationPaths.set(String(e)+String(t),{...r,method:e,path:t}),this}toJSON(e={}){const t=super.toJSON({...e,ignore:["parameters"]}),r=[],n=[];if(t.security&&(t.security=[].concat(t.security)),this.get("parameters").forEach((t=>{L(this.get("in"))||t.get("in")&&([M.BODY,M.FILES].includes(t.get("in"))?r.push(t):n.push(...[].concat(t.toJSON(e))))})),t.parameters=n.filter(Boolean),0===this.get("responses").size&&(t.responses={200:{description:J(200)}}),r.length){const n=function(e,t){let r=new E;const n={},s=[];let o=0;return e.forEach((e=>{const i=e.getName();Array.from(e.entries()).filter((([e])=>!["in","name"].includes(e))).forEach((([e,t])=>{void 0===n[e]&&(n[e]=t)}));const a=e.toJSON(t);i?(r.addProperty(i,a.schema||{type:a.type}),e.get("required")&&r.addRequired(i),o++):s.push(a)})),o||1!==s.length?(r.type("object"),{schema:r.toJSON(t),required:!1,...n}):s[0]}(r,e);t.requestBody=function(e,{schema:t,examples:r,in:n,...s}){const o=new X(s);return(e.get("consumes")?.length?e.get("consumes"):["application/json"]).forEach((e=>{o.addContent(e,t,r)})),o}(this,n).toJSON(e)}return delete t.consumes,delete t.produces,t}}let te=class extends u{parent=u.from(this.target);middlewares=[];beforeMiddlewares=[];afterMiddlewares=[];operation=new ee;children=new Map;constructor(t){super({store:e.Store.fromMethod(t.target,t.propertyKey),descriptor:(0,e.descriptorOf)(t.target,t.propertyKey),...t});const{beforeMiddlewares:r=[],middlewares:n=[],afterMiddlewares:s=[]}=t;this.after(s),this.before(r),this.use(n)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(e){this.store.set("view",e)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(e){this.store.set("acceptMimes",e)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(t,r,n){return n=n||(0,e.descriptorOf)((0,e.prototypeOf)(t),r),u.from((0,e.prototypeOf)(t),r,n)}getResponseOptions(e,{contentType:t="application/json",includes:r}={}){const n=this.operation.getResponseOf(e).getMedia(t,!1);if(n&&n.has("schema")){const e=n.get("schema");let t=n.groups;return r&&n.allowedGroups?.size&&(t=[...t||[],...r.filter((e=>n.allowedGroups.has(e)))]),{type:e.getComputedItemType(),groups:t}}return{type:this.type}}before(t){return this.beforeMiddlewares=this.beforeMiddlewares.concat(t).filter(e.isFunction),this}after(t){return this.afterMiddlewares=this.afterMiddlewares.concat(t).filter(e.isFunction),this}use(t){return this.middlewares=this.middlewares.concat(t).filter(e.isFunction),this}get(t){const r=e.Store.from(this.target).get(t);return(0,e.deepMerge)(r,this.store.get(t))}getParamTypes(){return[...this.children.values()].reduce(((e,t)=>({...e,[t.paramType]:!0})),{})}build(){if(!this._type){let t=e.Metadata.getReturnType(this.target,this.propertyKey);t=(0,e.isPromise)(t)?void 0:t,this.buildType(t)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),(0,e.isCollection)(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=E.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}};te=p([T(e.DecoratorTypes.METHOD),h("design:paramtypes",[Object])],te);const re=te;function ne(...e){return u.from(...e)}c.set(e.DecoratorTypes.CLASS,R),c.set(e.DecoratorTypes.PROP,A),c.set(e.DecoratorTypes.PARAM,G),c.set(e.DecoratorTypes.METHOD,te);class se{getType;isLazyRef=!0;constructor(e){this.getType=e}get target(){return this.getType()}get schema(){return ne(this.getType()).schema}get name(){return(0,e.nameOf)(this.getType())}toJSON(e){return this.getType()&&i("schema",this.schema,e)}}function oe(e,t={}){if("object"!=typeof e||null===e)return e;if(e instanceof se)return i("lazyRef",e,t);if(e instanceof E&&e.get("enum")instanceof E){const r=e.get("enum");return j(r,r.toJSON(t),t)}if("toJSON"in e){const r=e.toJSON(C(t));return e.canRef?j(e,r,t):r}return i("object",e,t)}function ie(e,t){const r=u.from(e.class),n=N(r.schema.getName()||e.getName(),t);if(e.hasGenerics){const{type:n,properties:s,additionalProperties:o,items:a,...c}=e.toJSON(t),u={...i("any",r.schema,{...t,..._(e),root:!1}),...c};if(u.title){const r=N(u.title,t);return t.schemas[r]=u,delete u.title,D(r,e,t)}return u}return t.schemas&&!t.schemas[n]&&(t.schemas[n]={},t.schemas[n]=i("any",r.schema,C({...t,root:!1}))),D(n,e,t)}function ae(t,r){const{generics:n}=r;if(n&&t.$ref&&n.has(t.$ref)){let s=n.get(t.$ref);if((0,e.isPrimitiveClass)(s))return{type:m(s)};if(s===Date)return{type:"string",format:"date-time"};if(s.toJSON)return s.toJSON({...r,generics:void 0});if(s===Object)return{type:"object"};if((0,e.isClass)(s)){const e={class:s};return 0===r.nestedGenerics.length?i("class",e,{...r,generics:void 0}):i("schema",u.from(e.class).schema,{...r,..._(r),root:!1})}}return t}function ce(t){const r=t.isStore?t:ne(t);return r.$inherited||(r.$inherited=(0,e.ancestorsOf)(r.target).reverse().reduce(((e,t)=>e.set(t,ne(t))),new Map)),r.$inherited}function ue(t,{target:r,...n}){const s=Array.from(ce(r).entries()).filter((([t])=>(0,e.classOf)(t)!==(0,e.classOf)(r)));if(s.length){const r=s.reduce(((t,[,r])=>(0,e.deepMerge)(t,i("schema",r.schema,n))),{});t=(0,e.deepMerge)(r,t)}return t}function pe(e,t){return e&&e.isClass?i("class",e,t):i("any",e,t)}function he(e,t){const r=e.name;if(t.$refs?.find((t=>t===e.target)))return D(r,e.schema,t);t.$refs=[...t.$refs||[],e.target];const n=e.toJSON(C(t));return j(e.schema,n,t)}function le(e,{ignore:t=[],...r}){return r=C(r),Array.from(e.entries()).reduce(((e,[n,s])=>(t.includes(n)||(e[n]=i("item",s,r)),e)),{})}function fe(e,t){let r=e?.$hooks?.alter("ignore",!1,[t]);return r||(!1!==t.groups?e?.$hooks?.alter("groups",!1,[t.groups]):r)}function de(t,r,n){if(!r?.isNullable)return t;let s=[].concat(t.type).filter(Boolean);switch(n.specType){default:case x.JSON:t.discriminator||(t.oneOf?function(e){return e.oneOf.find((e=>"null"===e.type))}(t)||t.oneOf.unshift({type:"null"}):t.type=(0,e.uniq)(["null",...s]));break;case x.OPENAPI:t.nullable=!0,t.oneOf||(s.length>1?(t.oneOf=s.map((e=>({type:e}))),delete t.type):t.type=s[0])}return t}function me(t,r){const{specType:n,operationIdFormatter:s,root:o,schemas:a,genericTypes:c,nestedGenerics:u,useAlias:p,genericLabels:h,...l}=r;return Object.entries(t).reduce(((e,[n,s])=>{if(!1!==r.withIgnoredProps&&!fe(s,l)){const o={...r,groups:t?.$forwardGroups||s?.$forwardGroups?r.groups:void 0};e[n]=i("item",s,o),e[n]=de(e[n],s,o)}return e}),(0,e.isArray)(t)?[]:{})}function ye(e,t,r){return e.map((e=>i("item",e,{...t,genericLabels:r.genericLabels})))}function ge(e,t,r){return e.isClass?i("class",e,t):i("any",e,{...t,genericLabels:r.genericLabels})}function Oe(e,t){return Object.entries(e).reduce(((e,[r,n])=>(e[r=t.get(r)||r]=n,e)),{})}function be(e,t,r){return!1!==r.groups?t?.$hooks?.alter("requiredGroups",e,[r.groups]):e}function ve(t,r,n){if(n.groups&&n.groups.includes("partial"))return t.discriminator?{...t,required:[t.discriminator.propertyName]}:t;let s=function(t,r,n){let s=t.required||[];return s=[...s,...r.$required],r.get("properties")&&(s=Object.entries(r.get("properties")).reduce(((e,[t,r])=>r&&void 0!==r.$selfRequired?r.$selfRequired?e.concat(t):e.filter((e=>e===t)):e),s)),be((0,e.uniq)(s),r,n)}(t,r,n);return s=(0,e.uniq)(s).reduce(function(e,t,r={}){const{useAlias:n}=r,s=Object.keys(e.properties||{});return(r,o)=>{const i=n&&t.alias.get(o)||o;if(s.includes(i)){const n=t.get("properties")[o],s=e.properties[i];return e.properties[i]=function(e,t){if(!t?.$allow.includes("")&&[].concat(t?.get("type")).includes("string")){const t=e?.minLength;if(void 0===t)return{...e,minLength:1}}return e}(s,n),r.concat(i)}return r}}(t,r,n),[]),t.discriminator&&s.push(t.discriminator.propertyName),s.length?{...t,required:s}:t}function Se(e,t,r){return e.oneOf&&!1!==r.groups&&(e={...e,oneOf:t.$hooks.alter("oneOf",e.oneOf,[r.groups])}),!(e.oneOf||e.allOf||e.anyOf)||e.items||e.properties||delete e.type,e}function Ee(e,t,r){return r.inlineEnums&&e.enum?.isJsonSchema&&(e.enum=e.enum.toJSON().enum),e.enum&&(e.type="object"===e.type||void 0===e.type?"string":e.type),e}r("any",oe),r("class",ie),r("generics",ae),r("inheritedClass",ue),r("item",pe),r("lazyRef",he),r("map",le),r("object",me),r("anyOf",ye),r("allOf",ye),r("oneOf",ye),r("properties",ge),r("items",ge),r("additionalProperties",ge),r("propertyNames",ge),r("contains",ge),r("dependencies",ge),r("patternProperties",ge),r("additionalItems",ge),r("not",ge),r("definitions",ge);const Te=["name","$required","$hooks","_nestedGenerics",x.OPENAPI,x.SWAGGER,x.JSON],Re=["const"];function Ae(t,r){const{useAlias:n=!0,schemas:s={}}=r;r={...r,useAlias:n,schemas:s};let o=[...t.keys()].filter((e=>!function(e,{specType:t=x.JSON,customKeys:r=!1}){return Te.includes(e)||e.startsWith("#")&&(!1===r||t!==x.JSON)||t!==x.JSON&&Re.includes(e)}(e,r))).reduce(((s,o)=>{let c=t.get(o);if("type"===(o=o.replace(/^#/,"")))return{...s,[o]:t.getJsonType()};if(function(t,r,n){return"examples"===t&&(0,e.isObject)(r)&&x.OPENAPI===n.specType}(o,c,r)&&(o="example",c=Object.values(c)[0]),c&&"object"==typeof c&&a(o)){if(c=i(o,c,r,t),function(e,t){return"object"==typeof t&&["items","properties","additionalProperties"].includes(e)&&0===Object.keys(t).length}(o,c))return s;(function(e,t,r){return"object"==typeof t&&r&&["properties","additionalProperties"].includes(e)})(o,c,n)&&(c=Oe(c,t.alias))}return{...s,[o]:c}}),{});return t.isClass&&(o=i("inheritedClass",o,{...r,root:!1,schemas:s,target:t.getComputedType()})),o=i("generics",o,{...r,root:!1,schemas:s}),t.has(r.specType)&&(o={...o,...t.get(r.specType).toJSON(r)}),o=ve(o,t,{...r,useAlias:n}),o=de(o,t,r),o=Se(o,t,r),o=Ee(o,0,r),o}r("schema",Ae);const we=["all","checkout","connect","copy","delete","get","head","lock","merge","mkactivity","mkcol","move","m-search","notify","options","param","patch","post","propfind","propatch","purge","put","report","search","subscribe","trace","unlock","unsuscribe"];var Pe;function Ce(e){return(...t)=>{const r=e(ne(...t),t);"function"==typeof r&&r(...t)}}function _e(...t){return Ce((r=>{r.store.set("childrenControllers",t),t.forEach((t=>{e.Store.from(t).set("parentController",r.token)}))}))}function xe(e,...t){return Ce((r=>{e=e||(0,k.snakeCase)(r.targetName),r.discriminatorAncestor&&r.schema.discriminatorValue(e,...t)}))}function Me(e,t){if(!e)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let n=!1;const s=(...s)=>{const o=u.from(...s);t&&(o.collectionType=t,o.schema.type(t)),o.type=e,o.itemSchema.type(e),o.schema.assign(r),o.isArray&&n&&(o.schema.set("contains",o.schema.get("items")),o.schema.delete("items"))};return s.MinItems=e=>(r.minItems=e,s),s.MaxItems=e=>(r.maxItems=e,s),s.MinProperties=e=>(r.minProperties=e,s),s.MaxProperties=e=>(r.maxProperties=e,s),s.Contains=()=>(n=!0,s),s.UniqueItems=(e=!0)=>(r.uniqueItems=e,s),s}function ke(e){return Me(e,Array)}function Ne(e){return Me(e,Map)}function De(e){return Me(e).Contains()}function je(e){return Ce((t=>{const r=t.parentSchema.get("#errorMessage")||{};t.parentSchema.customKey("errorMessage",{...r,...e})}))}function $e(t,r){const n={};return(...s)=>{const o=(0,e.useDecorators)(r(...s));return o.Error=r=>(n.message=r,(0,e.useDecorators)(o,n.message&&je({[t]:r}))),o}}!function(e){e.ALL="ALL",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.HEAD="HEAD",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.CUSTOM="CUSTOM"}(Pe||(Pe={}));const Ie=$e("maxItems",(e=>{if(e<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return Ce((t=>{t.schema.maxItems(e)}))})),Le=$e("maxProperties",(e=>{if(e<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return Ce((t=>{t.isCollection?t.schema.maxProperties(e):t.itemSchema.maxProperties(e)}))})),He=$e("minItems",(e=>{if(e<0)throw new Error("The value of minItems MUST be a non-negative integer.");return Ce((t=>{t.schema.minItems(e)}))})),Ge=$e("minProperties",(e=>{if(e<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return Ce((t=>{t.isCollection?t.schema.minProperties(e):t.itemSchema.minProperties(e)}))})),Ue=$e("uniqueItems",((e=!0)=>Ce((t=>{t.schema.uniqueItems(e)}))));function qe(e){return Ce(((t,r)=>{t.itemSchema.additionalProperties(e)}))}function Fe(...e){return Ce((t=>{t.itemSchema.allOf(e)}))}function Be(t){return Ce((r=>{t&&((0,e.isClass)(t)&&(r.type=t),r.itemSchema.type(t))}))}function Ke(...t){const r=t.find((t=>(0,e.isClass)(t)));return(0,e.useDecorators)(r&&Be(r),Ce(((r,n)=>{r.schema.allow(...t),r.decoratorType===e.DecoratorTypes.PARAM&&(r.required=!0),r.decoratorType===e.DecoratorTypes.PROP&&r.parentSchema.addRequired(r.propertyName)})))}function Je(...e){return Ce((t=>{t.itemSchema.any(...e)}))}function Ve(...e){return Ce((t=>{t.itemSchema.anyOf(e)}))}function ze(e){return Ce((t=>{t.itemSchema.const(e)}))}function We(e,t){return Ce((r=>{r.itemSchema.customKey(e,t)}))}function Xe(e){return Ce((t=>{Object.entries(e).forEach((([e,r])=>{t.itemSchema.customKey(e,r)}))}))}function Qe(e){return Ce((t=>{t.itemSchema.default(e)}))}function Ye(t){return(0,e.useDecorators)(je({_:t}))}function Ze(t){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.PROP:case e.DecoratorTypes.CLASS:r.schema.description(t);break;case e.DecoratorTypes.PARAM:r.parameter.description(t);break;case e.DecoratorTypes.METHOD:r.operation?.description(t)}}))}function et(){return(0,e.useDecorators)(Be(),Ce((e=>{e.discriminatorKey()})))}const tt=$e("enum",(function(e,...t){return Ce((r=>{r.itemSchema.enum(e,...t)}))}));function rt(...e){return Ce((t=>{t.schema.examples(e)}))}function nt(e){return Ce((t=>{t.parameter.examples(e)}))}const st=$e("maximum",((e,t=!1)=>Ce((r=>{t?r.itemSchema.exclusiveMaximum(e):r.itemSchema.maximum(e)})))),ot=st,it=$e("exclusiveMaximum",((e,t=!0)=>st(e,t))),at=$e("minimum",((e,t=!1)=>Ce((r=>{t?r.itemSchema.exclusiveMinimum(e):r.itemSchema.minimum(e)})))),ct=at,ut=$e("exclusiveMinimum",((e,t=!0)=>at(e,t)));var pt;!function(e){e.DATE_TIME="date-time",e.DATE="date",e.TIME="time",e.EMAIL="email",e.HOSTNAME="hostname",e.IPV4="ipv4",e.IPV6="ipv6",e.URI="uri",e.URL="url",e.URI_REF="uri-reference",e.URI_TEMPLATE="uri-template",e.JSON_POINTER="json-pointer",e.RELATIVE_JSON_POINTER="relative-json-pointer",e.UUID="uuid",e.REGEX="regex"}(pt||(pt={}));const ht=$e("format",(e=>Ce((t=>{t.itemSchema.format(e)})))),lt=$e("format",(()=>ht(pt.EMAIL))),ft=$e("format",(()=>ht(pt.DATE_TIME))),dt=$e("format",(()=>ht(pt.DATE))),mt=$e("format",(()=>ht(pt.TIME))),yt=$e("format",(()=>ht(pt.URI))),gt=$e("format",(()=>ht(pt.URL)));function Ot(e=!0){return Ce((t=>{t.schema.$forwardGroups=e}))}var bt=s(870),vt=s.n(bt);function St(e,t){t=[].concat(t),e=[].concat(e);let r=new Set,n=new Set,s=new Set,o=0,i=e=>{s.add(e.output)};for(let s=0;s<t.length;s++){let a=vt()(String(t[s]),{onResult:i},!0),c=a.state.negated||a.state.negatedExtglob;c&&o++;for(let t of e){let e=a(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),n.add(e.output)))}}return!!(o===t.length?[...s]:[...n]).filter((e=>!r.has(e))).length}function Et(e,t=[]){const r=e.filter((e=>e.startsWith("!"))).map((e=>e.replace("!",""))),n=e.filter((e=>!e.startsWith("!")));return!!(r.length&&t.length&&St(r,t))||!!n.length&&!St(e.filter((e=>!e.startsWith("!"))),t)}function Tt(...t){return Ce((r=>{switch(r.decoratorType){case e.DecoratorTypes.CLASS:!function(e,t){const r=Object.entries(e[0]);t.children.forEach((e=>{Tt(...r.filter((([,t])=>t.includes(e.propertyName))).map((([e])=>e)))(e.target,e.propertyKey)}))}(t,r);break;case e.DecoratorTypes.PROP:r.schema.$hooks.on("groups",((e,r)=>!(e||!Et(t,r))||e));break;case e.DecoratorTypes.PARAM:let n="";2==t.length&&(0,e.isArray)(t[1])&&(n=t[0],t=t[1]),r.parameter.groups=t,r.parameter.groupsName=n}}))}function Rt(){return(0,e.StoreSet)("hidden",!0)}const At=(e,t)=>!0!==t.mongoose;function wt(e=At){return Ce((t=>{t.schema.ignore(e)}))}function Pt(){return Ce((e=>{e.itemSchema.type("integer")}))}const Ct=$e("maxLength",(e=>{if(e<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return Ce((t=>{t.itemSchema.maxLength(e)}))})),_t=$e("minLength",(e=>{if(e<0)throw new Error("The value of minLength MUST be a non-negative integer.");return Ce((t=>{t.itemSchema.minLength(e)}))})),xt=$e("multipleOf",(e=>{if(e<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return Ce((t=>{t.itemSchema.multipleOf(e)}))}));function Mt(t){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.CLASS:r.schema.name(t);break;case e.DecoratorTypes.PARAM:r.parameter.name(t);break;default:r.parent.schema.addAlias(n[1],t)}}))}function kt(t,...r){return r=[t,...r],(0,e.useDecorators)(1===r.length&&Be(r[0]),Je(null,...r))}function Nt(...e){return Ce((t=>{t.itemSchema.oneOf(e),t.type=Object}))}function Dt(){return Ce((t=>{switch(t.decoratorType){case e.DecoratorTypes.PARAM:t.required=!1;break;case e.DecoratorTypes.PROP:t.parentSchema.removeRequired(t.propertyName)}}))}const jt=$e("pattern",(e=>Ce((t=>{t.itemSchema.pattern(e)}))));function $t(e=!0){return Ce((t=>{t.itemSchema.readOnly(e)}))}function It(e){return Ce((t=>{Object.entries(e).forEach((([e,r])=>{t.schema.set(e,r)}))}))}function Lt(e,t){return Ce((r=>{r.schema.set(e,t)}))}function Ht(e,...t){return It({properties:{...t.reduce(((t,r)=>({...t,[r]:e})),{})}})}const Gt=$e("required",((e=!0,...t)=>e?Ke(...t):Dt()));function Ut(...e){return Ce((t=>{t.parent.schema.$hooks.on("requiredGroups",((r,n)=>Et(e,n)?r.filter((e=>e!==t.propertyKey)):r))}))}function qt(e){return Ce((t=>{t.schema.title(e)}))}function Ft(t){return Ce((()=>(0,e.useDecorators)(je({type:t}))))}function Bt(e=!0){return Ce((t=>{t.itemSchema.writeOnly(e)}))}function Kt(t=Object){if((0,e.isClass)(t)){const{schema:e}=ne(t);return e.properties=function(e){return Object.entries(e).forEach((([e,r])=>{ne(t.prototype,e).schema.assign(r)})),this},e}return E.from({type:t})}function Jt(){return Kt(Number)}function Vt(){return Kt(Number).integer()}function zt(){return Kt(String)}function Wt(){return Kt(Boolean)}function Xt(){return Kt(Date).format(pt.DATE)}function Qt(){return Kt(Date).format(pt.DATE_TIME)}function Yt(){return Kt(Date).format(pt.TIME)}function Zt(){return Kt(String).format(pt.EMAIL)}function er(){return Kt(String).format(pt.URI)}function tr(){return Kt(String).format(pt.URL)}function rr(){return Kt(Array)}function nr(){return Kt(Map).unknown(!0)}function sr(){return Kt(Array).uniqueItems(!0)}function or(e={}){return Kt(Object).properties(e)}function ir(...e){return Kt().any(...e)}function ar(...e){return Kt().anyOf(e)}function cr(...e){return Kt().oneOf(e)}function ur(...e){return Kt().allOf(e)}function pr(e){try{if(e())return u.from(e()).schema}catch(e){}return new se(e)}function hr(e){const t=zt().enum(e);return l.set(e,t),t}function lr(...t){const r=[t.map((t=>function(t){return(0,e.isObject)(t)&&!("toJSON"in t)}(t)?zt().enum(Object.values(t)):t))],n=(...e)=>{u.from(...e).nestedGenerics=r};return n.Nested=(...e)=>(r.push(e),n),n}function fr(...e){return t=>{u.from(t).schema.genericLabels=e}}function dr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.produces(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],dr(...t));break;default:throw new e.UnsupportedDecoratorType(dr,n)}}))}function mr(...t){return(0,e.useDecorators)(dr(...t),(0,e.StoreSet)("acceptMimes",t))}function yr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.consumes(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],yr(...t));break;default:throw new e.UnsupportedDecoratorType(yr,n)}}))}class gr extends Map{methods;decoratorType;entity;actions=[];constructor(e={}){super(),Object.entries(e).forEach((([e,t])=>{this.set(e,t)}))}addAction(e){return this.actions.push(e),this}build(){const e=(...t)=>this.bind(t,e),t=t=>{return r=(...e)=>{t in this?this[t](...e):this.set(t,e[0])},(...t)=>(r(...t),e);var r};return this.methods.forEach((r=>{e[(0,k.pascalCase)(r)]=t(r)})),e}toObject(){return[...this.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}getMergedKey(t,r){let n=this.get(t)||r;if(n)return this.decoratorType===e.DecoratorTypes.CLASS&&(n={...n,...r||{}}),{...r||{},...n}}bind(e,t){this.entity=u.from(...e),this.beforeInit(),this.onInit(e,t),this.afterInit()}onInit(e,t){this.forEach(((e,t)=>{this.onMapKey(t,e)}))}onMapKey(e,t){this.entity.set(e,t)}runActions(){return this.actions.forEach((e=>{e(this)})),this}beforeInit(){}afterInit(){}}const Or=new Map;function br(e,t){Or.set(e,t)}function vr(e){return Or.get(e)}function Sr(t){return t.map((t=>function(t){return(0,e.isObject)(t)&&!("toJSON"in t)}(t)?zt().enum(Object.values(t)):t))}class Er extends gr{methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location"];constructor({status:e,model:t}){super(),this.model(t),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&J(e)&&!this.get("description")&&(this.set("description",J(e)),this.get("model")||this.model(vr(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...Q(e)}),this}header(e,t){return this.headers({[e]:t})}location(e,t={}){return this.headers({Location:{...t,value:e}}),this}groups(...t){return 2===t.length&&(0,e.isArray)(t[1])?(this.set("groupsName",t[0]),this.set("groups",t[1])):this.set("groups",t),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const t=this.get("model");return this.checkPrimitive(t),this.checkCollection(t),this.addAction((t=>{this.get("schema").nestedGenerics.push(Sr(e))})),this}of(...t){const r=this.get("model");return this.checkPrimitive(r),this.addAction((()=>{const n=this.get("schema");(0,e.isCollection)(r)?n?.itemSchema({type:t[0]}):n?.nestedGenerics.push(Sr(t))})),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction((()=>{this.get("schema").assign(e)})),this}examples(t){return this.set("examples",(0,e.isString)(t)?[t]:t),this}title(e){return this.schema({title:e})}checkPrimitive(t){if((0,e.isPrimitiveOrPrimitiveClass)(t))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(t){if((0,e.isCollection)(t))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const t=this.get("model");let r=this.get("contentType");return!t||(0,e.isPlainObject)(t)||(0,e.isPrimitiveOrPrimitiveClass)(t)||(r=r||"application/json"),r}getStatus(){return this.get("status")||"default"}onInit(t,r){switch((0,e.decoratorTypeOf)(t)){case e.DecoratorTypes.METHOD:this.entity=u.from(...t),this.entity.operation&&this.map();break;case e.DecoratorTypes.CLASS:this.decoratorType=e.DecoratorTypes.CLASS,(0,e.decorateMethodsOf)(t[0],r)}}map(){const t=this.get("model"),{entity:r,decoratorType:n}=this,s=this.entity.operation,o=this.getStatus(),i=s.ensureResponseOf(o),a=this.getContentType();let{description:c=i.get("description")}=this.toObject();c&&(c=n===e.DecoratorTypes.CLASS&&i.get("description")||c,i.description(c));const u=this.getMergedKey("headers",i.get("headers"));return u&&i.headers(u),this.mapMedia(i),(V(this.get("status"))||"default"===o)&&t&&(r.type=t),a&&s.addProduce(a),this.runActions()}mapMedia(t){const r=this.getContentType(),n=this.get("model"),s=t.getMedia(r||"*/*"),o=s.get("schema")||new E({type:n}),i=this.get("groups"),a=this.get("groupsName"),c=this.get("allowedGroups"),u=this.entity.operation;if(n&&((0,e.isArray)(n)?o.oneOf(n.map((e=>({type:e})))):o.type(n)),this.set("schema",o),s.schema(o),s.groups=i,s.groupsName=a,c){s.allowedGroups=c;const e=new H;e.in("query").name("includes"),e.schema(E.from({type:"array",items:{type:"string",enum:[...c]}})),u.addParameter(-1,e)}const p=this.get("examples");return p&&s.examples(p),s}manyOf(t,r){const n=this.get("model");return this.addAction((()=>{const s=this.get("schema");(0,e.isCollection)(n)?(s.type(n||Object),s.itemSchema().set(t,r)):s.set(t,r)})),this}}function Tr(e,t){return new Er({status:e,model:t}).build()}function Rr(e){return Tr().ContentType(e)}function Ar(t=!0){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.METHOD:r.operation.deprecated(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],Ar(t));break;case e.DecoratorTypes.PARAM:r.parameter.set("deprecated",t);break;case e.DecoratorTypes.PROP:r.schema.set("deprecated",t);break;default:throw new e.UnsupportedDecoratorType(Ar,n)}}))}function wr(e,t){return void 0!==t&&(e={[e]:t}),Tr().Headers(e)}function Pr(t){const r=new H,n={},s=(o,i,a)=>{const c=u.from(o,i,a);switch(c.decoratorType){case e.DecoratorTypes.PARAM:c.parameter.in(t);break;case e.DecoratorTypes.METHOD:r.in(t),c.operation.addParameter(-1,r),r.schema(E.from(n));break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(o,s);break;default:throw new e.UnsupportedDecoratorType(Pr,[o,i,a])}};return s.Type=e=>(n.type=e,s),s.Name=e=>(r.name(e),s),s.Description=e=>(r.description(e),s),s.Required=(e=!0)=>(r.required(e),s),s.Pattern=e=>s.Schema({pattern:e.toString()}),s.Schema=e=>(Object.assign(n,e),s),s}function Cr(t){return(...r)=>{const[n,s,o]=r,i=e.Metadata.getParamTypes(n,s)[o]===Array,a=[t="object"==typeof t?void 0:t,!i&&"0"].filter(Boolean).join(".");(0,e.useDecorators)(Pr(M.FILES),Mt(a),(0,e.useMethodDecorators)(Tr(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),yr("multipart/form-data")))(...r)}}function _r(e,t){return Tr().Location(e,t)}function xr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(xr,n);r.operation.operationId(t)}))}function Mr(t,r="/"){return Ce(((n,s)=>{if(n.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(Mr,s);n.operation.addOperationPath(t.toUpperCase(),r)}))}function kr(){return Tt("partial")}function Nr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.CLASS)throw new e.UnsupportedDecoratorType(Nr,n);r.path=t}))}function Dr(...t){const{status:r,url:n,meta:s}=t.reduce(((t,r)=>(0,e.isNumber)(r)?(t.status=r,t):(0,e.isString)(r)?(t.url=r,t):(t.meta=r,t)),{status:302,url:"",meta:{}});return(0,e.useDecorators)(Tr(r).Location(n,s),Ce((e=>{e.operation?.setRedirection(r)})))}function jr(e){let t,r;const n=e.filter((e=>"string"==typeof e&&we.includes(e.toLowerCase())?(t=e.toLocaleUpperCase(),!1):"string"==typeof e||e instanceof RegExp?(r=e||"/",!1):!!e));return{path:r,method:t,use:n}}class $r extends gr{methods=["name","description","summary","method","id","use","useAfter","useBefore"];beforeInit(){const e=this.get("path"),t=Pe[this.get("method")]||Pe.CUSTOM;e&&this.entity.operation.addOperationPath(t,e)}onMapKey(e,t){switch(e){case"name":case"id":return void this.entity.operation.operationId(t);case"summary":return void this.entity.operation.summary(t);case"description":return void this.entity.operation.description(t);case"use":return void this.entity.use(t);case"useAfter":return void this.entity.after(t);case"useBefore":return void this.entity.before(t)}return super.onMapKey(e,t)}}function Ir(...e){const t=jr(e);return new $r(t).build()}function Lr(e="/",...t){return Ir(...[Pe.ALL,e].concat(t))}function Hr(e="/",...t){return Ir(...[Pe.GET,e].concat(t))}function Gr(e="/",...t){return Ir(...[Pe.POST,e].concat(t))}function Ur(e="/",...t){return Ir(...[Pe.PUT,e].concat(t))}function qr(e="/",...t){return Ir(...[Pe.DELETE,e].concat(t))}function Fr(e="/",...t){return Ir(...[Pe.HEAD,e].concat(t))}function Br(e="/",...t){return Ir(...[Pe.PATCH,e].concat(t))}function Kr(e="/",...t){return Ir(...[Pe.OPTIONS,e].concat(t))}function Jr(t,...r){return Ce(((n,s)=>{switch(n.decoratorType){case e.DecoratorTypes.METHOD:n.operation.addSecurityScopes(t,r);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(s[0],Jr(t,...r));break;default:throw new e.UnsupportedDecoratorType(Jr,s)}}))}function Vr(e,t){return Tr(e,t)}function zr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(zr,n);r.operation.summary(t)}))}function Wr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.addTags(function(e){return e.map((e=>"string"==typeof e?{name:e}:e))}(t));break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],Wr(...t));break;default:throw new e.UnsupportedDecoratorType(Wr,n)}}))}function Xr(t,r){return(0,e.StoreSet)("view",{path:t,options:r})}class Qr extends Map{setOperationPath(e){if(e.method!==Pe.CUSTOM){const t=this.getKey(e.method,e.path);this.set(t,e)}}getKey=(e,t)=>`${e}-${t}`}function Yr(e,t){if(e instanceof RegExp||t instanceof RegExp){if(!e)return t;if(!t)return e;const r=e instanceof RegExp?e:new RegExp(e,"gi"),n=t instanceof RegExp?t:new RegExp(t,"gi");return new RegExp(r.source+n.source,(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":""))}e&&t&&e.endsWith("/")&&t.startsWith("/")&&(t=t.slice(1));const r=(e||"")+(t||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class Zr{token;endpoint;operationPath;basePath;paramsTypes;constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){return this.operationPath?.path}get fullPath(){return Yr(this.basePath,this.path)}get method(){return this.operationPath?.method||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}function en(e){return e.split("/").filter(Boolean).join("/")}function tn(e,t){return e.map((e=>t.parameters.find((t=>t.in===e.in&&t.name===e.name))||e)).concat(...t.parameters.filter((e=>"path"!==e.in)))}function rn(e){const t=e.isStore?e:ne(e);if(!t.$operations){const e=new Qr;t.$operations=new Map,ce(t).forEach((e=>{e.children.forEach((e=>{e instanceof te&&!t.$operations.has(e.propertyKey)&&t.$operations.set(e.propertyKey,e)}))})),t.$operations.forEach((t=>{t.operation.operationPaths.forEach((t=>{e.setOperationPath(t)}))})),e.clear()}return t.$operations}function nn(e,t=""){t instanceof RegExp&&(t=t.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],n=[];let s=!1,o="";return function(e){let t=0;return e.split("").filter((e=>{"("===e&&t++;const r=0===t;return")"===e&&t--,r})).join("").split("/").filter((e=>!!e))}(`${e}${t}`).map((e=>{const t=e.replace(":","").replace("?","");if(e.includes(":")){const i=e.includes("?");i&&!s&&(s=!0,n.push({path:o,parameters:[].concat(r)}));const{prefix:a,name:c,postfix:u}=function(e){const[t,r]=e.split("="),n=(r||t).split(".");return{prefix:r&&t?`${t}=`:"",name:n.splice(0,1)[0],postfix:n.length?`.${n.join(".")}`:""}}(t);o+=`/${a}{${c}}${u}`,r.push({in:"path",name:c,type:"string",required:!0}),i&&s&&n.push({path:o,parameters:[].concat(r)})}else o+=`/${e}`})),n.length?n:[{path:o,parameters:[].concat(r)}]}function sn(e,t,{rootPath:r,specType:n,operationId:s,defaultTags:o,tags:i,path:a,method:c}){const u=nn(r,a).map((({path:e,parameters:t})=>(e=e||"/",n===x.OPENAPI&&(t=t.map((({type:e,...t})=>({...t,schema:{type:e}})))),{path:e,parameters:t})));return u.reduce(((e,{path:r,parameters:n})=>{n=tn(n,t),r=r||"/";const a=t.tags?.length?t.tags:[o];return e.paths[r]={...e.paths[r],[c.toLowerCase()]:{operationId:t.operationId||s(r),...t,tags:a.map((({name:e})=>e)),parameters:n}},i.push(...a),e}),e)}function on(e=""){const t=new Map;return(r,n,s="")=>{const o=((t,r)=>{const n=(e||"%c.%m").replace(/%c/,t).replace(/%m/,r);return""===e?(0,k.camelCase)(n):n})(r,n),i=r+n;if(!t.has(i))return t.set(i,0),o;const a=s.match(/{(\w+)}/gi);if(a){const e=r+n+a[0];if(!t.has(e))return t.set(e,0),(0,k.camelCase)(`${o} By ${a}`)}const c=t.get(i)+1;return t.set(i,c),`${o}_${c}`}}const an=(0,e.mergeReducerBuilder)(((e,t)=>e.type&&e.type===t.type||e.$ref&&e.$ref===t.$ref)),cn=(0,e.mergeReducerBuilder)(((e,t)=>e.in===t.in&&e.name===t.name)),un=(0,e.mergeReducerBuilder)(((e,t)=>!!Object.keys(t).find((t=>!!e[t])))),pn=(0,e.mergeReducerBuilder)(((e,t)=>e.name===t.name)),hn={security:un,parameters:cn,oneOf:an,anyOf:an,allOf:an,tags:pn};function ln(t,r){return(0,e.deepMerge)(t,r,{reducers:hn,cleanUndefinedProps:!0})}const fn=new Map;function dn(t,r={}){if(r={...r,operationIdFormatter:r.operationIdFormatter||on(r.operationIdPattern),root:!1},(0,e.isArray)(t)){let e={};return r={...r,specType:x.OPENAPI,paths:{},tags:[],schemas:{},append(t){e=ln(e,t)}},t.forEach((({token:e,...t})=>{const n=dn(e,{...r,...t});r.append(n)})),e}return function(e,t,r){fn.has(e)||fn.set(e,new Map);const n=fn.get(e),s=JSON.stringify(t);return n.has(s)||n.set(s,r()),n.get(s)}(t,r,(()=>function(t,r){const n=ne(t),{schemas:s={},paths:o={},rootPath:i="/",tags:a=[]}=r,c=x.OPENAPI,u=n.path,p=(0,e.cleanObject)({name:n.schema.getName(),description:n.schema.get("description")}),h={paths:o};return rn(t).forEach((e=>{if(e.store.get("hidden"))return;const t=e.operation.toJSON({...r,specType:c,schemas:s});e.operation.operationPaths.forEach((({path:n,method:s})=>{s&&sn(h,t,{rootPath:en(i+u),path:n,method:s,defaultTags:p,tags:a,specType:c,operationId:t=>r.operationIdFormatter(e.parent.schema.get("name")||e.parent.targetName,e.propertyName,t)})}))})),h.tags=(0,e.uniqBy)(a,"name"),Object.keys(s).length&&(h.components={schemas:s}),h}(t,r)))}function mn(e){return e.startsWith("3.")?x.OPENAPI:x.SWAGGER}function yn(e){return"openapi"in e?x.OPENAPI:x.SWAGGER}function gn(t){const{title:r,description:n,version:s,termsOfService:o,contact:i,license:a}=t;return(0,e.cleanObject)({version:s,title:r,description:n,termsOfService:o,contact:i,license:a})}function On(t,{version:r,specVersion:n,acceptMimes:s=["application/json"]}){const{paths:o,security:i,tags:a,host:c,basePath:u,schemes:p,consumes:h=[],produces:l=["application/json"],definitions:f,parameters:d,responses:m,securityDefinitions:y,externalDocs:g}=t;return{swagger:n,consumes:(0,e.uniq)([...s,...h]),produces:(0,e.uniq)([...l]),info:gn((0,e.getValue)(t,"info",{})),paths:o,host:c,basePath:u,schemes:p,definitions:f,parameters:d,responses:m,security:i,securityDefinitions:y,tags:a,externalDocs:g}}function bn(t,{specVersion:r}){const{servers:n,paths:s,components:o,security:i,tags:a,externalDocs:c}=t;return{openapi:r,info:gn((0,e.getValue)(t,"info",{})),servers:n,paths:s,components:o,security:i,tags:a,externalDocs:c}}function vn(t,{fileSpec:r,acceptMimes:n,specVersion:s,version:o}){const i={specVersion:s=s||(0,e.getValue)(t,"openapi",(0,e.getValue)(t,"swagger","2.0")),acceptMimes:n};switch(mn(s)){case x.OPENAPI:t=bn(t,i),r=r?bn(r,i):r;break;default:case x.SWAGGER:t=On(t,i),r=r?On(r,i):r}return t=ln(t,r),(0,e.setValue)(t,"info.title",(0,e.getValue)(t,"info.title","Api documentation")),(0,e.setValue)(t,"info.version",(0,e.getValue)(t,"info.version",o)),t}const Sn=["get","put","post","delete","options","head","patch","trace"],En=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],Tn=["type","items"],Rn=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,An={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function wn(e){if(Array.isArray(e))e.forEach(wn);else if("object"==typeof e)for(let t in e)"$ref"===t?e.$ref=e.$ref.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/"):wn(e[t])}function Pn(e){return new RegExp(Rn,"i").test(e)}function Cn(e){const t=Object.keys(An).map((e=>An[e]));return Object.keys(e).filter((e=>t.indexOf(e)>-1||Pn(e)))}function _n(e){function t(e){const{scheme:t,type:r,name:n,bearerFormat:s,flows:o,...i}=e;switch(r){case"http":if("basic"===t)return{...i,type:t};if("bearer"===t)return{...i,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const e=Object.keys(o)[0],n=o[e];let s=e;return"clientCredentials"===s?s="application":"authorizationCode"===s&&(s="accessCode"),{type:r,flow:s,authorizationUrl:n.authorizationUrl,tokenUrl:n.tokenUrl,scopes:n.scopes}}}return Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:t(n)})),{})}function xn(e){let t=e.url;const r=e.variables||{};for(const e in r){const n=r[e]||{};if(n.default){const r=RegExp(`{${e}}`,"g");t=t.replace(r,n.default)}}const n=new URL(t);return{host:n.host?n.host:void 0,basePath:n.pathname,schemes:null!==n.protocol?[n.protocol.substring(0,n.protocol.length-1)]:void 0}}class Mn{spec;constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?xn(e):{}}resolveReference(e,t,r){if(!t||!t.$ref)return t;const n=t.$ref;if(n.startsWith("#")){const t=n.split("/").map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~")));t.shift();let s=e;return t.forEach((e=>{s=s[e]})),r?JSON.parse(JSON.stringify(s)):s}}convert(){const t={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,wn(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],(0,e.cleanObject)({...t,...this.spec})}convertOperations(e,t){return Object.entries(e).reduce(((e,[r,n])=>{const s=e[r]=this.resolveReference({...t,paths:e},n,!0);return this.convertParameters(s),Object.keys(s).forEach((r=>{if(Sn.indexOf(r)>=0){const n=s[r]=this.resolveReference({...t,paths:e},s[r],!0);this.convertOperationParameters(n),this.convertResponses(n)}})),e}),e)}convertOperationParameters(e){let t,r,n,s;if(e.parameters=e.parameters||[],e.requestBody){let o=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const t=Cn(e.requestBody.content)[0],r={content:{}},n=e.requestBody.content[t];n&&n.schema&&n.schema.$ref&&!n.schema.$ref.startsWith("#")&&(o=this.resolveReference(this.spec,n.schema,!0),r.content[`${t}`]={schema:o},o=r)}if(o.name="body",t=o.content,t&&Object.keys(t).length){if(n=Object.keys(t).filter((e=>e.indexOf("/")>0)),s=n.filter((e=>e.indexOf("*")<0)),r=Cn(t)[0],delete o.content,[An.APPLICATION_X_WWW_URLENCODED,An.MULTIPART_FORM_DATA].includes(r))if(e.consumes=s,o.in="formData",o.schema=t[r].schema,o.schema=this.resolveReference(this.spec,o.schema,!0),"object"===o.schema.type&&o.schema.properties){const t=o.schema.required||[];Object.keys(o.schema.properties).forEach((r=>{const n=o.schema.properties[r];if(!n.readOnly){const s={name:r,in:"formData",schema:n};t.indexOf(r)>=0&&(s.required=!0),e.parameters?.push(s)}}))}else e.parameters.push(o);else r?(e.consumes=s,o.in="body",o.schema=t[r].schema,e.parameters.push(o)):n&&(e.consumes=s||["application/octet-stream"],o.in="body",o.name=o.name||"file",delete o.type,o.schema=t[n[0]].schema||{type:"string",format:"binary"},e.parameters.push(o));o.schema&&this.convertSchema(o.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){void 0!==e.parameters&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach(((t,r)=>{if("body"!==(t=e.parameters[r]=this.resolveReference(this.spec,t,!1)).in){if(this.copySchemaProperties(t,En),this.copySchemaProperties(t,Tn),this.copySchemaXProperties(t),!t.description){const e=this.resolveReference(this.spec,t.schema,!1);e&&e.description&&(t.description=e.description)}void 0!==t.example&&(t["x-example"]=t.example),delete t.schema,delete t.allowReserved,delete t.example}if("array"===t.type)switch(t.style||("query"===t.in||"cookie"===t.in?"form":"simple")){case"matrix":t.collectionFormat=t.explode?void 0:"csv";break;case"label":t.collectionFormat=void 0;break;case"simple":t.collectionFormat="csv";break;case"spaceDelimited":t.collectionFormat="ssv";break;case"pipeDelimited":t.collectionFormat="pipes";break;case"deepOpbject":t.collectionFormat="multi";break;case"form":t.collectionFormat=!1===t.explode?"csv":"multi"}delete t.style,delete t.explode})))}copySchemaProperties(e,t){let r=this.resolveReference(this.spec,e.schema,!0);r&&t.forEach((t=>{const n=r[t];"additionalProperties"===t&&"boolean"==typeof n||void 0!==n&&(e[t]=n)}))}copySchemaXProperties(e){let t=this.resolveReference(this.spec,e.schema,!0);t&&Object.keys(t).forEach((r=>{Reflect.hasOwnProperty.call(t,r)&&!Reflect.hasOwnProperty.call(e,r)&&r.startsWith("x-")&&(e[r]=t[r])}))}convertResponses(e){Object.keys(e.responses||{}).forEach((t=>{const r=e.responses[t]=this.resolveReference(this.spec,e.responses[t],!0);if(r.content){let t=null,n=null;if(Object.keys(r.content).forEach((s=>{const o=s.indexOf("*")<0?s:"application/octet-stream";e.produces?e.produces.indexOf(o)<0&&e.produces.push(o):e.produces=[o];const i=r.content[s];t=t||i.schema,!n&&Pn(o)&&(n=i.schema),i.example&&(r.examples=r.examples||{},r.examples[o]=i.example)})),t){r.schema=n||t;const e=this.resolveReference(this.spec,r.schema,!0);e&&r.schema.$ref&&!r.schema.$ref.startsWith("#")&&(r.schema=e),this.convertSchema(r.schema,"response")}}Object.keys(r.headers||{}).forEach((e=>{const t=this.resolveReference(this.spec,r.headers[e],!0);t.schema&&(t.type=t.schema.type,t.format=t.schema.format,delete t.schema),r.headers[e]=t})),delete r.content}))}convertSchema(e,t){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const r in e.allOf)this.convertSchema(e.allOf[r],t);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach((r=>{!0===e.properties[r].writeOnly&&"response"===t?delete e.properties[r]:(this.convertSchema(e.properties[r],t),delete e.properties[r].writeOnly)}));break;case"array":e.items&&this.convertSchema(e.items,t)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),void 0!==e.deprecated&&(void 0===e["x-deprecated"]&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach((e=>{this.convertSchema(this.spec.definitions[e])})),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach((t=>{const r=e[t];if("string"!=typeof r)return void console.warn(`Ignoring ${r} for ${t} in discriminator.mapping.`);let n;if(/^[a-zA-Z0-9._-]+$/.test(r))try{n=this.resolveReference(this.spec,{$ref:`#/components/schemas/${r}`},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} as schema name in discriminator.mapping: ${e}`)}if(!n)try{n=this.resolveReference(this.spec,{$ref:r},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} in discriminator.mapping: ${e}`)}n?(n["x-discriminator-value"]=t,n["x-ms-discriminator-value"]=t):console.warn(`Unable to resolve ${r} for ${t} in discriminator.mapping.`)}))}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=_n(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function kn(e){return new Mn(e).convert()}async function Nn({tokens:t,...r}){const{version:n="1.0.0",acceptMimes:s,specPath:o,specVersion:i}=r,a=vn((0,e.getValue)(r,"spec",{}),{fileSpec:{},version:n,specVersion:i,acceptMimes:s}),c=yn(a),u=ln(a,dn(t,r));return c===x.SWAGGER?kn(u):u}const Dn="$cache:schemes";function jn(e,t={}){const r=ne(e),n=t.specType||x.JSON;return t={endpoint:!0,groups:[],inlineEnums:n===x.JSON,...t,specType:n,schemas:{}},"parameter"===r.decoratorType&&(t={...t,genericTypes:r.nestedGenerics[0],nestedGenerics:r.nestedGenerics,groups:r.parameter?.groups}),function(e,t){const r=e.store.get(Dn)||new Map,n=function(e){return JSON.stringify(e)}(t);if(!r.has(n)){const s=i("schema",e.schema,t);Object.keys(t.schemas).length&&(s.definitions=t.schemas),r.set(n,s)}return e.store.set(Dn,r),r.get(n)}(r,t)}function $n(e,t={}){const r=e.isStore?e:ne(e),n=Yr(t.basePath,r.path);let s=[];return t.withChildren&&(s=r.get("childrenControllers",[]).reduce(((e,r)=>e.concat($n(r,{...t,basePath:n}))),s)),[...rn(e).values()].reduce(((t,r)=>{const{operation:s}=r;return s&&s.operationPaths.forEach((s=>{t.push(new Zr({basePath:n,token:e,endpoint:r,operationPath:s}))})),t}),s)}function In(e){const t=e.isStore?e:ne(e);if(!t.$properties){const e=ce(t);t.$properties=new Map,e.forEach((e=>{e.children.forEach((e=>{t.$properties.has(e.propertyKey)||t.$properties.set(e.propertyKey,e)}))}))}return t.$properties}function Ln(e,t={}){const r=In(e),n=new Map;return r.forEach(((e,r)=>{!t.withIgnoredProps&&fe(e.itemSchema,t)||n.set(r,e)})),n}})(),o})(),e.exports=n(r(886),r(122))}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Configuration:()=>p,Constant:()=>h,Container:()=>D,Controller:()=>S,ControllerProvider:()=>j,DIConfiguration:()=>U,DI_PARAMS:()=>t,DI_PARAM_OPTIONS:()=>s,GlobalProviderRegistry:()=>y,GlobalProviders:()=>g,INJECTABLE_PROP:()=>e,Inject:()=>u,Injectable:()=>E,InjectablePropertyType:()=>o,InjectionError:()=>H,InjectorService:()=>z,Intercept:()=>T,Interceptor:()=>R,InvalidPropertyTokenError:()=>a,LazyInject:()=>A,LocalsContainer:()=>$,Module:()=>P,OptionalLazyInject:()=>w,Opts:()=>_,OverrideProvider:()=>x,Provider:()=>m,ProviderScope:()=>l,ProviderType:()=>f,Scope:()=>C,Service:()=>M,UndefinedTokenError:()=>G,UseOpts:()=>k,Value:()=>N,colors:()=>L,createContainer:()=>q,getConfiguration:()=>X,getTokens:()=>B,injectProperty:()=>c,mergeMount:()=>W,registerController:()=>v,registerProvider:()=>O,registerValue:()=>b,resolveControllers:()=>J});const e="DI:INJECTABLE_PROP",t="DI:PARAMS",s="DI:PARAM:OPTIONS";var o,i=r(886);class a extends Error{name="INVALID_TOKEN_ERROR";constructor(e,t){super(`Object isn't a valid token. Please check the token set on ${(0,i.nameOf)((0,i.classOf)(e))}.${t}.\n- Check that it is not a circular reference.\n- Check that the token (class or symbol) exists`)}}function c(t,r,n){i.Store.from(t).merge(e,{[r]:{bindingType:i.DecoratorTypes.PROP,propertyKey:r,...n}})}function u(e,t=(e=>e)){return(r,n,o)=>{switch((0,i.decoratorTypeOf)([r,n,o])){case i.DecoratorTypes.PARAM_CTOR:if(e){const t=i.Metadata.getParamTypes(r,n),s=t[o];t[o]=s===Array?[e]:e,i.Metadata.setParamTypes(r,n,t)}break;case i.DecoratorTypes.PROP:const p=e||i.Metadata.getType(r,n);if(i.Metadata.getType(r,n),p===Object)throw new a(r,n);c(r,n,{resolver(o,a,{options:c,...u}){const h=i.Metadata.getType(r,n);if(a.set(s,{...c}),h===Array){let r;return r||(r=o.getMany(e,a,u),a.delete(s)),r.forEach(((e,t)=>{(0,i.isPromise)(r)&&e.then((e=>{r[t]=e}))})),()=>t(r)}let l;return l||(l=o.invoke(p,a,u),a.delete(s)),(0,i.isPromise)(l)&&l.then((e=>{l=e})),()=>t(l)}});break;default:throw new i.UnsupportedDecoratorType(u,[r,n,o])}}}function p(e={}){return(...t)=>{switch((0,i.decoratorTypeOf)(t)){case i.DecoratorTypes.CLASS:(0,i.StoreSet)("configuration",e)(t[0]);break;default:case i.DecoratorTypes.PARAM_CTOR:return u(p)(t[0],t[1],t[2])}}}function h(t,r){return(n,s)=>{i.Store.from(n).merge(e,{[s]:{bindingType:o.CONSTANT,propertyKey:s,expression:t,defaultValue:r}})}}!function(e){e.METHOD="method",e.PROPERTY="property",e.CONSTANT="constant",e.VALUE="value",e.INTERCEPTOR="interceptor"}(o||(o={}));var l,f,d=r(917);!function(e){e.SINGLETON="singleton",e.REQUEST="request",e.INSTANCE="instance"}(l||(l={})),function(e){e.VALUE="value",e.FACTORY="factory",e.SERVICE="service",e.PROVIDER="provider",e.MODULE="module",e.CONTROLLER="controller",e.INTERCEPTOR="interceptor",e.MIDDLEWARE="middleware"}(f||(f={}));class m{type=f.PROVIDER;deps;imports;useFactory;useAsyncFactory;useValue;hooks;_useClass;_provide;_store;_tokenStore;constructor(e,t={}){this.provide=e,this.useClass=e,Object.assign(this,t)}get token(){return this._provide}get provide(){return this._provide}set provide(e){e&&(this._provide=(0,i.getClassOrSymbol)(e),this._tokenStore=this._store=i.Store.from(e))}get useClass(){return this._useClass}set useClass(e){(0,i.isClass)(e)&&(this._useClass=(0,i.classOf)(e),this._store=i.Store.from(e),this.hooks=(0,i.methodsOf)(this._useClass).reduce(((e,{propertyKey:t})=>String(t).startsWith("$")?{...e,[t]:(e,...r)=>e[t](...r)}:e),{}))}get className(){return this.name}get name(){return(0,i.nameOf)(this.provide)}get store(){return this._store}get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}get scope(){return this.isAsync()?l.SINGLETON:this.get("scope")}set scope(e){this.store.set("scope",e)}get configuration(){return this.get("configuration")}set configuration(e){this.store.set("configuration",e)}get children(){return this.store.get("childrenControllers",[])}get(e){return this.store.get(e)||this._tokenStore.get(e)}isAsync(){return!!this.useAsyncFactory}clone(){return new((0,i.classOf)(this))(this._provide,this)}hasChildren(){return!!this.children.length}hasParent(){return!!this.store.get("parentController")}toString(){return["Token",this.name,this.useClass&&(0,i.nameOf)(this.useClass),this.useFactory&&"Factory",this.useValue&&"Value",this.useAsyncFactory&&"AsyncFactory"].filter(Boolean).join(":")}}class y extends Map{#l=new Map;get(e){return super.get((0,i.getClassOrSymbol)(e))}has(e){return super.has((0,i.getClassOrSymbol)(e))}set(e,t){return super.set((0,i.getClassOrSymbol)(e),t),this}merge(e,t){const r=this.createIfNotExists(e,t);return Object.keys(t).forEach((e=>{r[e]=t[e]})),this.set(e,r),r}delete(e){return super.delete((0,i.getClassOrSymbol)(e))}createRegistry(e,t,r={}){const n=this.getRegistrySettings(e);return r=Object.assign(n,{...r,model:t}),this.#l.set(e,r),this}onInvoke(e,t,r){const n=this.#l.get(e.type);n?.onInvoke&&n.onInvoke(e,t,r)}getRegistrySettings(e){let t="provider";if("string"==typeof e)t=e;else{const r=this.get(e);r&&(t=r.type)}return this.#l.get(t)||{model:m}}createRegisterFn(e){return(t,r)=>{t=Object.assign({instance:r},t,{type:e}),this.merge(t.provide,t)}}createIfNotExists(e,t){const r=t.type||f.PROVIDER;if(!this.has(e)){const{model:n=m}=this.#l.get(r)||{},s=new n(e,t);this.set(e,s)}return this.get(e)}}const g=new y;function O(e){if(!e.provide)throw new Error("Provider.provide is required");return g.merge(e.provide,e)}g.createRegistry(f.CONTROLLER,m);const b=(e,t)=>{e.provide||(e={provide:e}),e=Object.assign({scope:l.SINGLETON,useValue:t},e,{type:f.VALUE}),g.merge(e.provide,e)},v=g.createRegisterFn(f.CONTROLLER);function S(e){const{children:t=[],path:r,...n}=function(e){return"string"==typeof e||e instanceof RegExp||(0,i.isArrayOrArrayClass)(e)?{path:e}:e}(e);return(0,i.useDecorators)((e=>{v({provide:e,...n})}),r&&(0,d.Path)(r),(0,d.Children)(...t))}function E(e={}){return t=>{O({...e,...e.provide?{useClass:t}:{provide:t}})}}function T(t,r){return(...n)=>{const[s,a,c]=n;switch((0,i.decoratorTypeOf)(n)){case i.DecoratorTypes.CLASS:(0,i.decorateMethodsOf)(s,T(t,r));break;case i.DecoratorTypes.METHOD:return i.Store.from(s).merge(e,{[a]:{options:r,propertyKey:a,useType:t,bindingType:o.INTERCEPTOR}}),c}}}function R(){return E({type:f.INTERCEPTOR})}function A(e,t,{optional:r=!1,packageName:n=t.toString()}={}){return(s,o)=>{let a,u;c(s,o,{resolver:s=>async()=>{if(!u){const o=await(0,i.importPackage)(n,t,r);if(u=o[e],!u&&!r)throw new Error(`Unable to lazy load the "${e}". The token isn't a valid token provider.`);a=u?await s.lazyInvoke(u):{}}return a}})}}function w(e,t){return A(e,t,{optional:!0})}function P(e={}){const{scopes:t,imports:r,resolvers:n,deps:s,scope:o,...a}=e;return(0,i.useDecorators)(p(a),E({type:f.MODULE,scope:l.SINGLETON,imports:r,deps:s,injectable:!1,resolvers:n}))}function C(e=l.REQUEST){return(0,i.StoreSet)("scope",e)}function _(e,t,r){C(l.INSTANCE)((0,i.classOf)(e)),u(s)(e,t,r)}function x(e){return t=>{g.get(e).useClass=t}}function M(){return E()}function k(t){return(r,n,o)=>{switch((0,i.decoratorTypeOf)([r,n,o])){case i.DecoratorTypes.PARAM_CTOR:i.Store.from(r).merge(`${s}:${o}`,t);break;case i.DecoratorTypes.PROP:i.Store.from(r).merge(e,{[n]:{options:t}});break;default:throw new i.UnsupportedDecoratorType(k,[r,n,o])}}}function N(t,r){return(n,s)=>{i.Store.from(n).merge(e,{[s]:{bindingType:o.VALUE,propertyKey:s,expression:t,defaultValue:r}})}}class D extends Map{add(e,t={}){const r=g.get(e)?.clone()||new m(e);return Object.assign(r,t),super.set(e,r)}addProvider(e,t={}){return this.add(e,t)}hasProvider(e){return super.has(e)}setProvider(e,t){return super.set(e,t)}getProvider(e){return super.get(e)}getProviders(e){return[...this].reduce(((t,[r,n])=>n.type!==e&&e?t:[...t,n]),[])}addProviders(e){e.forEach((e=>{this.hasProvider(e.provide)||this.setProvider(e.provide,e.clone())}))}}class j extends m{tokenRouter;constructor(e,t={}){super(e,t),this.type=f.CONTROLLER}get middlewares(){return Object.assign({use:[],useAfter:[],useBefore:[]},this.store.get("middlewares",{}))}set middlewares(e){const t=this.middlewares;Object.keys(e).forEach((r=>{((e,t,r)=>{t[e]=t[e].concat(r[e])})(r,t,e)})),this.store.set("middlewares",t)}}class $ extends Map{hooks=new i.Hooks;async destroy(){await this.hooks.asyncEmit("$onDestroy")}}const I=e=>e=>(process.env.NO_COLOR,e),L={red:I(),yellow:I(),green:I()};class H extends Error{name="INJECTION_ERROR";tokens=[];origin;constructor(e,t){super((0,i.isString)(t)?t:""),this.tokens=[e],t&&((0,i.isString)(t)?this.origin={message:t,stack:this.stack}:t.tokens?(this.tokens=this.tokens.concat(t.tokens),this.origin=t.origin):(this.origin=t,this.stack=t.stack));const r=this.origin?"\nOrigin: "+this.origin.message:"",n=this.tokens.map((e=>(0,i.nameOf)(e))).join(" > ");this.message=`Injection failed on ${n}${r}`}static throwInjectorError(e,t,r){throw t&&(0,i.isClass)(e)&&(r.message=function(e,t){let r="";const n=(0,i.getConstructorArgNames)(e).map(((e,n)=>(t.index===n&&(r=e,e=L.red(e)),`${e}: ${(0,i.nameOf)(t.deps[n])}`))).join(", "),s=(0,i.nameOf)(e)+"->constructor("+n+")",o=s.indexOf(r)-5;return"Unable to inject dependency. "+t.message+"\n\n"+s+"\n"+(o>-1?(e=>" ".repeat(e)+L.red("^"+"‾".repeat(r.length-1)))(o):"")}(e,{...t,message:r.message})),new H(e,r)}}class G extends Error{name="UNDEFINED_TOKEN_ERROR";constructor(){super("Given token is undefined. Have you enabled emitDecoratorMetadata in your tsconfig.json or decorated your class with @Injectable, @Service, ... decorator ?")}}class U{default=new Map;map=new Map;constructor(e={}){Object.entries({scopes:{},resolvers:[],imports:[],routes:[],logger:{},...e}).forEach((([e,t])=>{this.default.set(e,t)}))}get version(){return this.get("version")}set version(e){this.map.set("version",e)}get rootDir(){return this.get("rootDir")}set rootDir(e){this.map.set("rootDir",e)}get env(){return this.map.get("env")}set env(e){this.map.set("env",e)}get scopes(){return this.map.get("scopes")}set scopes(e){this.map.set("scopes",e)}get resolvers(){return this.getRaw("resolvers")}set resolvers(e){this.map.set("resolvers",e)}get imports(){return this.get("imports")}set imports(e){this.map.set("imports",e)}get routes(){return this.get("routes")}set routes(e){this.map.set("routes",e)}get logger(){return this.get("logger")}set logger(e){const t={...this.logger,...e};this.map.set("logger",t)}get debug(){return"debug"===this.logger.level}set debug(e){this.logger={...this.logger,level:e?"debug":"info"}}forEach(e,t){return new Set([...Array.from(this.default.keys()),...Array.from(this.map.keys())]).forEach((t=>{e(this.getRaw(t),t,this.map)}),t)}set(e,t){return"string"==typeof e?Reflect.has(this,e)?this[e]=t:this.setRaw(e,t):Object.entries(e).forEach((([e,t])=>{this.set(e,t)})),this}setRaw(e,t){return(0,i.setValue)(this.map,e,t),this}get(e,t){return this.getRaw(e,t)}resolve(e){return e.replace("${rootDir}",this.rootDir)}getRaw(e,t){const r=(0,i.getValue)(this.map,e);return void 0!==r?r:(0,i.getValue)(this.default,e,t)}}function q(e){const t=new D(g.entries());return e&&t.delete(e),t}Object.create,Object.create;const F=["mount","imports"];function B(e){return e?(0,i.isArray)(e)?e.filter(i.isClass).map((e=>({token:e}))):Object.keys(e).reduce(((t,r)=>[...t,...[].concat(e[r]).filter(i.isClass).map((e=>({route:r,token:e})))]),[]):[]}function K(e){return e.map((({token:e})=>g.get(e))).filter((e=>e?.type===f.MODULE&&e.configuration)).flatMap((e=>J(e.configuration)))}function J(e){const t=F.flatMap((t=>B(e[t])));return[...K(t),...t].filter((e=>!!e.route))}var V;let z=V=class extends D{settings=new U;logger=console;resolvedConfiguration=!1;#f=new $;#d=new i.Hooks;constructor(){super(),this.#f.set(V,this)}get resolvers(){return this.settings.resolvers}get scopes(){return this.settings.scopes||{}}scopeOf(e){return e.scope||this.scopes[e.type]||l.SINGLETON}toArray(){return[...this.#f.values()]}get(e,t={}){const r=this.getInstance(e);if(void 0!==r)return r;if(!this.hasProvider(e))for(const r of this.resolvers){const n=r.get(e,t);if(void 0!==n)return n}}getMany(e,t,r){return this.getProviders(e).map((e=>this.invoke(e.token,t,r)))}has(e){return void 0!==this.#f.get(e)}invoke(e,t,r={}){let n=t?t.get(e):void 0;if(void 0!==n)return n;if(e===p)return this.settings;if(n=r.rebuild?void 0:this.getInstance(e),null!=n)return n;if(e===s)return{};const o=this.ensureProvider(e);if(!o||r.rebuild)return n=this.resolve(e,t,r),this.hasProvider(e)&&this.#f.set(e,n),n;switch(n=this.resolve(e,t,r),this.scopeOf(o)){case l.SINGLETON:return o.hooks&&!r.rebuild&&this.registerHooks(o,n),o.isAsync()&&(0,i.isPromise)(n)?(this.#f.set(e,n),n=n.then((t=>(this.#f.set(e,t),t))),n):(this.#f.set(e,n),n);case l.REQUEST:return t&&(t.set(e,n),o.hooks&&o.hooks.$onDestroy&&t.hooks.on("$onDestroy",((...e)=>o.hooks.$onDestroy(n,...e)))),n}return n}async loadAsync(){for(const[,e]of this)!this.has(e.token)&&e.isAsync()&&await this.invoke(e.token)}loadSync(){for(const[,e]of this)this.has(e.token)||this.scopeOf(e)!==l.SINGLETON||this.invoke(e.token)}bootstrap(e=q()){return this.addProviders(e),this.resolveConfiguration(),this.settings.imports=this.settings.imports?.map((e=>{if("token"in e&&"use"in e){const{token:t,use:r}=e,n=this.getProvider(t);if(n)return n.useValue=r,n.useFactory=void 0,n.useAsyncFactory=void 0,void(n.useClass=void 0)}return e})).filter(Boolean),this}loadModule(e){this.settings.routes=this.settings.routes.concat(J(this.settings));const t=q();return t.delete(e),t.addProvider(e,{type:"server:module",scope:l.SINGLETON}),this.load(t)}async load(e=q()){this.bootstrap(e),await this.loadAsync(),this.loadSync(),await this.emit("$beforeInit"),await this.emit("$onInit")}resolveConfiguration(){if(this.resolvedConfiguration)return;const e=new Map;super.forEach((t=>{t.configuration&&"server:module"!==t.type&&Object.entries(t.configuration).forEach((([t,r])=>{["resolvers","mount","imports"].includes(t)||(r=e.has(t)?(0,i.deepMerge)(e.get(t),r):(0,i.deepClone)(r),e.set(t,r))})),t.resolvers&&(this.settings.resolvers=this.settings.resolvers.concat(t.resolvers))})),e.forEach(((e,t)=>{this.settings.set(t,(0,i.deepMerge)(e,this.settings.get(t)))})),this.resolvedConfiguration=!0}bindInjectableProperties(t,r,n){const s=(0,i.ancestorsOf)((0,i.classOf)(t)).reduce(((t,r)=>({...t,...i.Store.from(r).get(e)||{}})),{});Object.values(s).forEach((e=>{switch(e.bindingType){case o.PROPERTY:this.bindProperty(t,e,r,n);break;case o.CONSTANT:this.bindConstant(t,e);break;case o.VALUE:this.bindValue(t,e);break;case o.INTERCEPTOR:this.bindInterceptor(t,e)}}))}bindProperty(e,{propertyKey:t,resolver:r,options:n={}},s,o){let a;a=r(this,s,{...o,options:n}),(0,i.catchError)((()=>Object.defineProperty(e,t,{get:a})))}bindValue(e,{propertyKey:t,expression:r,defaultValue:n}){const s={get:()=>this.settings.get(r)||n,set:e=>this.settings.set(r,e),enumerable:!0,configurable:!0};(0,i.catchError)((()=>Object.defineProperty(e,t,s)))}bindConstant(e,{propertyKey:t,expression:r,defaultValue:n}){let s;const o={get:()=>{if(void 0!==s)return s;const e=this.settings.get(r,n);return s=Object.freeze((0,i.deepClone)(e)),s},enumerable:!0,configurable:!0};(0,i.catchError)((()=>Object.defineProperty(e,t,o)))}bindInterceptor(e,{propertyKey:t,useType:r,options:n}){const s=(0,i.classOf)(e),o=e[t];e[t]=(...i)=>{const a=t=>{if(!t)return o.apply(e,i);throw t},c={target:s,propertyKey:t,args:i,options:n,next:a};return this.get(r).intercept({...c,options:n},a)}}async lazyInvoke(e){let t=this.getInstance(e);return t||(t=await this.invoke(e),(0,i.isFunction)(t?.$onInit)&&await t.$onInit()),t}emit(e,...t){return this.#d.asyncEmit(e,t)}alter(e,t,...r){return this.#d.alter(e,t,r)}alterAsync(e,t,...r){return this.#d.asyncAlter(e,t,r)}destroy(){return this.emit("$onDestroy")}ensureProvider(e){return!this.hasProvider(e)&&g.has(e)&&this.addProvider(e),this.getProvider(e)}getInstance(e){return this.#f.get(e)}resolve(e,t=new $,r={}){const n=this.mapInvokeOptions(e,t,r),{token:o,deps:a,construct:c,imports:u,provider:p}=n;let h;p&&g.onInvoke(p,t,{...n,injector:this});let l=!1;try{const e=e=>(n,o)=>{if(l={token:n,index:o,deps:a},n!==s){const e=p?.store?.get(`${s}:${o}`);t.set(s,e||{})}return(0,i.isArray)(n)?this.getMany(n[0],t,r):(0,i.isInheritedFrom)(n,m,1)?p:this.invoke(n,t,{parent:e})};u.forEach(e());const n=a.map(e(o));l=!1,h=c(n)}catch(e){H.throwInjectorError(o,l,e)}if(void 0===h)throw new H(o,`Unable to create new instance from undefined value. Check your provider declaration for ${(0,i.nameOf)(o)}`);return h&&(0,i.isClass)((0,i.classOf)(h))&&this.bindInjectableProperties(h,t,r),h}mapInvokeOptions(e,t,r){let n,o,a=r.imports,c=r.deps,u=r.scope;if(!e)throw new G;return this.hasProvider(e)?o=this.getProvider(e):(o=new m(e),this.resolvers.forEach((r=>{const n=r.get(e,t.get(s));void 0!==n&&(o.useFactory=()=>n)}))),u=u||this.scopeOf(o),c=c||o.deps,a=a||o.imports,void 0!==o.useValue?n=()=>(0,i.isFunction)(o.useValue)?o.useValue():o.useValue:o.useFactory?n=e=>o.useFactory(...e):o.useAsyncFactory?n=async e=>(e=await Promise.all(e),o.useAsyncFactory(...e)):(c=c||i.Metadata.getParamTypes(o.useClass),n=e=>new o.useClass(...e)),{token:e,scope:u||i.Store.from(e).get("scope")||l.SINGLETON,deps:c||[],imports:a||[],construct:n,provider:o}}registerHooks(e,t){e.hooks&&Object.entries(e.hooks).forEach((([r,n])=>{this.#d.on(r,((...r)=>n(this.get(e.token)||t,...r)))}))}};function W(e={},t={}){return Object.entries(t).reduce(((e,[t,r])=>({...e,[t]:(e[t]||[]).concat(r)})),e)}function X(e,t={}){const r=i.Store.from(e).get("configuration")||{};return{...r,...t,mount:W(r.mount,t.mount)}}z=V=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}([E({scope:l.SINGLETON,global:!0}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[])}()],z)})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.di=t():e.di=t()}(self,(()=>(()=>{var e={122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{camelCase:()=>m,camelCaseTransform:()=>f,camelCaseTransformMerge:()=>d,capitalCase:()=>O,capitalCaseTransform:()=>g,constantCase:()=>S,dotCase:()=>T,headerCase:()=>A,noCase:()=>c,paramCase:()=>P,pascalCase:()=>h,pascalCaseTransform:()=>p,pascalCaseTransformMerge:()=>l,pathCase:()=>_,sentenceCase:()=>M,sentenceCaseTransform:()=>x,snakeCase:()=>k});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},n.apply(this,arguments)};Object.create,Object.create;var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},s.apply(this,arguments)};function o(e){return e.toLowerCase()}Object.create,Object.create;var i=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],a=/[^A-Z0-9]+/gi;function c(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,n=void 0===r?i:r,s=t.stripRegexp,c=void 0===s?a:s,p=t.transform,l=void 0===p?o:p,h=t.delimiter,f=void 0===h?" ":h,d=u(u(e,n,"$1\0$2"),c,"\0"),m=0,y=d.length;"\0"===d.charAt(m);)m++;for(;"\0"===d.charAt(y-1);)y--;return d.slice(m,y).split("\0").map(l).join(f)}function u(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}function p(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function l(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function h(e,t){return void 0===t&&(t={}),c(e,s({delimiter:"",transform:p},t))}function f(e,t){return 0===t?e.toLowerCase():p(e,t)}function d(e,t){return 0===t?e.toLowerCase():l(e)}function m(e,t){return void 0===t&&(t={}),h(e,n({transform:f},t))}var y=function(){return y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},y.apply(this,arguments)};function g(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function O(e,t){return void 0===t&&(t={}),c(e,y({delimiter:" ",transform:g},t))}Object.create,Object.create;var b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},b.apply(this,arguments)};function v(e){return e.toUpperCase()}function S(e,t){return void 0===t&&(t={}),c(e,b({delimiter:"_",transform:v},t))}Object.create,Object.create;var E=function(){return E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},E.apply(this,arguments)};function T(e,t){return void 0===t&&(t={}),c(e,E({delimiter:"."},t))}Object.create,Object.create;var R=function(){return R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},R.apply(this,arguments)};function A(e,t){return void 0===t&&(t={}),O(e,R({delimiter:"-"},t))}Object.create,Object.create;var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},w.apply(this,arguments)};function P(e,t){return void 0===t&&(t={}),T(e,w({delimiter:"-"},t))}Object.create,Object.create;var C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},C.apply(this,arguments)};function _(e,t){return void 0===t&&(t={}),T(e,C({delimiter:"/"},t))}function x(e,t){var r=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(r):r}function M(e,t){return void 0===t&&(t={}),c(e,n({delimiter:" ",transform:x},t))}function k(e,t){return void 0===t&&(t={}),T(e,n({delimiter:"_"},t))}Object.create,Object.create},886:e=>{var t;self,t=()=>(()=>{var e={738:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=o(e);function o(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===n.Reflect?n.Reflect=e:s=o(n.Reflect,s),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,i={__proto__:[]}instanceof Array,a=!o&&!i,c={create:o?function(){return D(Object.create(null))}:i?function(){return D({__proto__:null})}:function(){return D({})},has:a?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:a?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),p="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,l=p||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[s]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,s=r+1;s<n;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[s]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}():Map,h=p||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[s]=function(){return this.keys()},e}():Set,f=new(p||"function"!=typeof WeakMap?function(){var e=c.create(),r=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=s(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=s(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return s(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=s(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(c.has(e,t));return e[t]=!0,t}function s(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:c.create()})}return e[r]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):o(new Uint8Array(e),e):o(new Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<16;++n){var s=t[n];4!==n&&6!==n&&8!==n||(r+="-"),s<16&&(r+="0"),r+=s.toString(16).toLowerCase()}return r}}():WeakMap);function d(e,t,r){var n=f.get(e);if(T(n)){if(!r)return;n=new l,f.set(e,n)}var s=n.get(t);if(T(s)){if(!r)return;s=new l,n.set(t,s)}return s}function m(e,t,r){if(y(e,t,r))return!0;var n=N(t);return!R(n)&&m(e,n,r)}function y(e,t,r){var n=d(t,r,!1);return!T(n)&&!!n.has(e)}function g(e,t,r){if(y(e,t,r))return O(e,t,r);var n=N(t);return R(n)?void 0:g(e,n,r)}function O(e,t,r){var n=d(t,r,!1);if(!T(n))return n.get(e)}function b(e,t,r,n){d(r,n,!0).set(e,t)}function v(e,t){var r=S(e,t),n=N(e);if(null===n)return r;var s=v(n,t);if(s.length<=0)return r;if(r.length<=0)return s;for(var o=new h,i=[],a=0,c=r;a<c.length;a++){var u=c[a];o.has(u)||(o.add(u),i.push(u))}for(var p=0,l=s;p<l.length;p++)u=l[p],o.has(u)||(o.add(u),i.push(u));return i}function S(e,t){var r=[],n=d(e,t,!1);if(T(n))return r;for(var o=function(e){var t=x(e,s);if(!C(t))throw new TypeError;var r=t.call(e);if(!A(r))throw new TypeError;return r}(n.keys()),i=0;;){var a=M(o);if(!a)return r.length=i,r;var c=a.value;try{r[i]=c}catch(e){try{k(o)}finally{throw e}}i++}}function E(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function T(e){return void 0===e}function R(e){return null===e}function A(e){return"object"==typeof e?null!==e:"function"==typeof e}function w(e){var t=function(e,t){switch(E(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",s=x(e,n);if(void 0!==s){var o=s.call(e,r);if(A(o))throw new TypeError;return o}return function(e,t){var r,n,s=e.toString;if(C(s)&&!A(n=s.call(e)))return n;if(C(r=e.valueOf)&&!A(n=r.call(e)))return n;throw new TypeError}(e)}(e);return"symbol"==typeof t?t:function(e){return""+e}(t)}function P(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function C(e){return"function"==typeof e}function _(e){return"function"==typeof e}function x(e,t){var r=e[t];if(null!=r){if(!C(r))throw new TypeError;return r}}function M(e){var t=e.next();return!t.done&&t}function k(e){var t=e.return;t&&t.call(e)}function N(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var s=n.constructor;return"function"!=typeof s||s===e?t:s}function D(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(T(r)){if(!P(e))throw new TypeError;if(!_(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!T(n)&&!R(n)){if(!_(n))throw new TypeError;t=n}}return t}(e,t)}if(!P(e))throw new TypeError;if(!A(t))throw new TypeError;if(!A(n)&&!T(n)&&!R(n))throw new TypeError;return R(n)&&(n=void 0),function(e,t,r,n){for(var s=e.length-1;s>=0;--s){var o=(0,e[s])(t,r,n);if(!T(o)&&!R(o)){if(!A(o))throw new TypeError;n=o}}return n}(e,t,r=w(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!A(r))throw new TypeError;if(!T(n)&&!function(e){switch(E(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;b(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!A(r))throw new TypeError;return T(n)||(n=w(n)),b(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),m(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),y(e,t,r)})),e("getMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),g(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!A(t))throw new TypeError;return T(r)||(r=w(r)),O(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!A(e))throw new TypeError;return T(t)||(t=w(t)),v(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!A(e))throw new TypeError;return T(t)||(t=w(t)),S(e,t)})),e("deleteMetadata",(function(e,t,r){if(!A(t))throw new TypeError;T(r)||(r=w(r));var n=d(t,r,!1);if(T(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var s=f.get(t);return s.delete(r),s.size>0||f.delete(t),!0}))}(s)}()}(n||(n={}))},330:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},82:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},335:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}r=1;for(var s=arguments,o=s.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(s[r++]);case"%d":return Number(s[r++]);case"%j":try{return JSON.stringify(s[r++])}catch(e){return"[Circular]"}default:return e}})),c=s[r];r<o;c=s[++r])d(c)||!b(c)?a+=" "+c:a+=" "+i(c);return a},t.deprecate=function(e,n){if(g(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var s=!1;return function(){if(!s){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),s=!0}return e.apply(this,arguments)}};var s,o={};function i(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(n,e);return y(s)||(s=u(e,s,n)),s}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var i=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),S(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(r);if(0===i.length){if(E(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var b,T="",R=!1,A=["{","}"];return h(r)&&(R=!0,A=["[","]"]),E(r)&&(T=" [Function"+(r.name?": "+r.name:"")+"]"),O(r)&&(T=" "+RegExp.prototype.toString.call(r)),v(r)&&(T=" "+Date.prototype.toUTCString.call(r)),S(r)&&(T=" "+p(r)),0!==i.length||R&&0!=r.length?n<0?O(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),b=R?function(e,t,r,n,s){for(var o=[],i=0,a=t.length;i<a;++i)P(t,String(i))?o.push(l(e,t,r,n,String(i),!0)):o.push("");return s.forEach((function(s){s.match(/^\d+$/)||o.push(l(e,t,r,n,s,!0))})),o}(e,r,n,a,i):i.map((function(t){return l(e,r,n,a,t,R)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(b,T,A)):A[0]+T+A[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,s,o){var i,a,c;if((c=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),P(n,s)||(i="["+s+"]"),a||(e.seen.indexOf(c.value)<0?(a=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),g(i)){if(o&&s.match(/^\d+$/))return a;(i=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+a}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function O(e){return b(e)&&"[object RegExp]"===T(e)}function b(e){return"object"==typeof e&&null!==e}function v(e){return b(e)&&"[object Date]"===T(e)}function S(e){return b(e)&&("[object Error]"===T(e)||e instanceof Error)}function E(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function R(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(s)&&(s=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=f,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=O,t.isObject=b,t.isDate=v,t.isError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(82);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var e=new Date,t=[R(e.getHours()),R(e.getMinutes()),R(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=r(330),t._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},340:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=340,e.exports=t}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e,t){return Object.getOwnPropertyDescriptor(e&&e.prototype||e,t)}function t(t,r){return e(t,r)?.value}function s(t=!0){return(r,n)=>{const s=e(r,n)||{writable:!0,enumerable:!0};return s.configurable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}r.r(n),r.d(n,{AnyToPromise:()=>fe,AnyToPromiseResponseTypes:()=>le,AnyToPromiseStatus:()=>pe,CLASS_STORE:()=>W,Configurable:()=>s,DecoratorTypes:()=>o,Deprecated:()=>a,Enumerable:()=>c,Env:()=>he,EnvTypes:()=>de,Hooks:()=>me,METHOD_STORE:()=>X,Metadata:()=>z,NotConfigurable:()=>u,NotEnumerable:()=>p,PARAM_STORE:()=>Y,PROPERTY_STORE:()=>Q,Readonly:()=>h,Store:()=>te,StoreFn:()=>re,StoreMerge:()=>ne,StoreSet:()=>se,Type:()=>ye,UnsupportedDecoratorType:()=>ge,Writable:()=>l,ancestorOf:()=>Te,ancestorsOf:()=>Ae,catchAsyncError:()=>be,catchError:()=>Oe,classOf:()=>d,cleanObject:()=>$e,constructorOf:()=>Le,createInstance:()=>j,decorateMethodsOf:()=>Ce,decoratorArgs:()=>_e,decoratorTypeOf:()=>m,deepClone:()=>D,deepMerge:()=>G,descriptorOf:()=>e,getClass:()=>f,getClassOrSymbol:()=>Fe,getConstructor:()=>Ie,getConstructorArgNames:()=>Be,getEnumerableKeys:()=>Ve,getHostInfoFromPort:()=>De,getInheritedClass:()=>Re,getValue:()=>ze,importPackage:()=>je,inheritedDescriptorOf:()=>xe,isArray:()=>y,isArrayOrArrayClass:()=>g,isArrowFn:()=>He,isBoolean:()=>S,isBooleanOrBooleanClass:()=>E,isBuffer:()=>k,isClass:()=>qe,isClassObject:()=>Ge,isCollection:()=>We,isDate:()=>O,isEmpty:()=>Xe,isEnumerable:()=>Je,isFunction:()=>b,isInheritedFrom:()=>Qe,isMethodDescriptor:()=>t,isNil:()=>v,isNumber:()=>T,isNumberOrNumberClass:()=>R,isObject:()=>oe,isObservable:()=>ie,isPlainObject:()=>Ue,isPrimitive:()=>C,isPrimitiveClass:()=>_,isPrimitiveOrPrimitiveClass:()=>P,isPromise:()=>ae,isProtectedKey:()=>$,isRegExp:()=>N,isSerializable:()=>Ye,isStream:()=>ce,isString:()=>A,isStringOrStringClass:()=>w,isSymbol:()=>x,isSymbolOrSymbolClass:()=>M,mergeReducerBuilder:()=>L,methodsOf:()=>Pe,nameOf:()=>F,nameOfClass:()=>U,nameOfSymbol:()=>q,objectKeys:()=>I,primitiveOf:()=>Ze,prototypeOf:()=>we,proxyDelegation:()=>Ee,setValue:()=>et,toMap:()=>rt,toStringConstructor:()=>Ke,uniq:()=>ve,uniqBy:()=>Se,useDecorators:()=>Me,useMethodDecorator:()=>ke,useMethodDecorators:()=>Ne});var o,i=r(335);function a(e){return(t,r,n)=>{const s=n.value;return n.value=(0,i.deprecate)(s,e),n}}function c(t=!0){return(r,n)=>{const s=e(r,n)||{writable:!0,configurable:!0};return s.enumerable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}function u(){return s(!1)}function p(){return c(!1)}function l(t=!0){return(r,n)=>{const s=e(r,n)||{configurable:!0,enumerable:!0};return s.writable=t,Object.defineProperty(r&&r.prototype||r,n,s),s}}function h(){return l(!1)}function f(e){return e.prototype?e:e.constructor}function d(e){return f(e)}function m(e){const[t,r,n]=e,s=e=>t!==d(t)?e:`${e}.static`;return"number"==typeof n?r?s("parameter"):"parameter.constructor":n&&n.value?s("method"):r&&void 0===n||n?s("property"):o.CLASS}function y(e){return Array.isArray(e)}function g(e){return e===Array||y(e)}function O(e){return e===Date||e instanceof Date&&!isNaN(+e)}function b(e){return"function"==typeof e}function v(e){return null==e}function S(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}function E(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}function T(e){return"number"==typeof e}function R(e){return"number"==typeof e||e instanceof Number||e===Number}function A(e){return"string"==typeof e}function w(e){return"string"==typeof e||e instanceof String||e===String}function P(e){return w(e)||R(e)||E(e)}function C(e){return A(e)||T(e)||S(e)}function _(e){return[String,Number,Boolean].includes(e)}function x(e){return"symbol"==typeof e}function M(e){return"symbol"==typeof e||e instanceof Symbol||e===Symbol}function k(e){return"undefined"!=typeof Buffer&&(e===Buffer||e instanceof Buffer)}function N(e){return e instanceof RegExp}function D(e,t=new WeakMap){let r;if((e=>v(e)||C(e)||x(e)||b(e))(e))return e;if(k(e)){const t=Buffer.alloc(e.length);return e.copy(t),t}if(O(e))return new Date(e);if(N(e))return new RegExp(e);const n=t.get(e);if(n)return n;y(e)?r=[]:(r={},t.set(e,r));for(const n in e){const s=Object.getOwnPropertyDescriptor(e,n);s&&(b(s.value)?Object.defineProperty(r,n,s):r[n]=D(s.value,t))}if(!y(e)){const t=Reflect.getPrototypeOf(e);Reflect.setPrototypeOf(r,t)}return r}function j(e){return e&&d(e)!==Object?Object.create(e):{}}function $(e){return["__proto__","constructor","prototype"].includes(e)}function I(e){return Object.keys(e).filter((e=>!$(e)))}function L(e){return(t,r,n)=>{const s=t.findIndex((t=>e(t,r)));return-1===s?[...t,r]:(t[s]=G(t[s],r,n),t)}}!function(e){e.PARAM="parameter",e.PARAM_CTOR="parameter.constructor",e.PARAM_STC="parameter.static",e.PROP="property",e.PROP_STC="property.static",e.METHOD="method",e.METHOD_STC="method.static",e.CLASS="class"}(o||(o={}));const H=L(((e,t)=>e===t));function G(e,t,r={}){if(function(e,t){return null==e||""===e&&""!==t}(t,e))return e;if(function(e,t){return C(e)||x(e)||b(e)||void 0===t}(t,e))return t;if(Array.isArray(e)){const n=function({reducers:e,parentKey:t}){return e?t&&e[t]?e[t]:e.default||H:H}(r);return[].concat(t).reduce(((e,t)=>n(e,t,r)),[...e])}return[...I(e),...I(t)].reduce(((n,s)=>{const o=G(e&&e[s],t&&t[s],{...r,parentKey:s});return r.cleanUndefinedProps&&void 0===o?n:{...n,[s]:o}}),j(e))}function U(e){return"function"==typeof e?e.name:e.constructor.name}const q=e=>e.toString().replace("Symbol(","").replace(")","");function F(e){switch(typeof e){default:return""+e;case"symbol":return q(e);case"function":return U(e)}}r(738);const K="design:paramtypes",B="design:type",J="design:returntype",V=new Map;class z{static get(e,t,r){return Reflect.getMetadata(e,d(t),r)}static getOwn(e,t,r){return Reflect.getOwnMetadata(e,d(t),r)}static getType(e,t){return Reflect.getMetadata(B,e,t)}static getOwnType(e,t){return Reflect.getMetadata(B,e,t)}static getReturnType(e,t){return Reflect.getMetadata(J,e,t)}static getOwnReturnType(e,t){return Reflect.getOwnMetadata(J,e,t)}static has(e,t,r){try{return Reflect.hasMetadata(e,d(t),r)}catch(e){}return!1}static hasOwn(e,t,r){return Reflect.hasOwnMetadata(e,d(t),r)}static delete(e,t,r){return Reflect.deleteMetadata(e,d(t),r)}static setParamTypes(e,t,r){return this.set(K,r,e.prototype,t)}static getTargetsFromPropertyKey=e=>V.has(e)&&V.get(e)||[];static set(e,t,r,n){const s=V.has(e)&&V.get(e)||[],o=d(r);-1===s.indexOf(o)&&(s.push(o),V.set(e,s)),Reflect.defineMetadata(e,t,d(r),n)}static getParamTypes(e,t){return Reflect.getMetadata(K,e,t)||[]}static getOwnParamTypes(e,t){return Reflect.getOwnMetadata(K,e,t)||[]}}const W="tsed:class:store",X="tsed:method:store",Q="tsed:property:store",Y="tsed:param:store",Z=new Map;function ee(e,...t){if(x(t[0]))return Z.has(t[0])||Z.set(t[0],new te),Z.get(t[0]);{const r=z;return r.hasOwn(e,...t)||r.set(e,new te,...t),r.getOwn(e,...t)}}class te{_entries=new Map;static from(...e){return function(e){const[t,r,n]=e;switch(m(e)){case o.PARAM_CTOR:case o.PARAM_STC:case o.PARAM:const e=ee(Y,t,r);return e.has(""+n)||e.set(""+n,new te),e.get(""+n);case o.PROP:case o.PROP_STC:return ee(Q,t,r);case o.METHOD:case o.METHOD_STC:return ee(X,t,r);case o.CLASS:return ee(W,t)}}(e)}static fromMethod(t,r){return te.from(t,r,e(t,r))}static mergeStoreFrom(e,t,...r){const n=te.from(e,...r);return te.from(t,...r)._entries.forEach(((e,t)=>{n.merge(t,e)})),n}static mergeStoreMethodFrom(t,r,n){return this.mergeStoreFrom(t,r,n,e(t,n))}get(e,t){return this._entries.get(F(e))||t}has(e){return this._entries.has(F(e))}set(e,t){return this._entries.set(F(e),t),this}delete(e){return this._entries.delete(F(e))}merge(e,t,r=!1){let n=this.get(e);return n&&(t=D(t),n=D(n),t=r?G(t,n):G(n,t)),this.set(e,t),this}toJson(){return[...this._entries.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}}function re(e){return(...t)=>{const r=te.from(...t),n=e(r,t);return"function"==typeof n&&n(...t),t[2]}}function ne(e,t){return re((r=>{r.merge(e,t)}))}function se(e,t){return re((r=>{r.set(e,t)}))}function oe(e){return"object"==typeof e}function ie(e){return!!e&&"function"==typeof e.lift&&"function"==typeof e.subscribe}function ae(e){return e===Promise||e instanceof Promise||!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}function ce(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function ue(e){return oe(e)&&"data"in e&&"headers"in e&&"status"in e&&"statusText"in e}var pe,le,he;!function(e){e.PENDING="PENDING",e.CANCELED="CANCELED",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(pe||(pe={})),function(e){e.STREAM="STREAM",e.BUFFER="BUFFER",e.DATA="DATA"}(le||(le={}));class fe{status=pe.PENDING;args;#e;#t;#r=!1;#n;constructor({hasNextFunction:e=!1}={}){this.#r=e,this.#n=new Promise(((e,t)=>{this.#e=e,this.#t=t}))}isDone(){return this.status!==pe.PENDING}get next(){return this.#r=!0,e=>{if(!this.isDone())return e?this.reject(e):this.resolve({type:le.DATA})}}call(e){if(this.isDone())return Promise.resolve(this);try{this.handle(e())}catch(e){this.reject(e)}return this.#n}reject(e){this.isDone()||(this.done(pe.REJECTED),this.#t(e))}resolve(e={}){this.isDone()||(this.done(pe.RESOLVED),this.#e({...e,state:pe.RESOLVED}))}destroy(){}cancel(){if(!this.isDone())return this.done(pe.CANCELED),this.#e({state:pe.CANCELED})}done(e){this.destroy(),this.status=e}handle(e,t={}){if(!this.isDone()){if(e){if(this.isCanceledResponse(e))return this.cancel();if(ie(e)&&(e=e.toPromise()),ue(e))return this.handle(e.data,{...t,status:e.status,headers:e.headers});if(ce(e))return this.resolve({...t,type:le.STREAM,data:e});if(ce(e)||Buffer.isBuffer(e))return this.resolve({...t,type:le.BUFFER,data:e});if(ae(e))return e.then((e=>this.handle(e,t))).catch((e=>e.response&&ue(e.response)?this.handle(e.response):this.reject(e)))}return this.#r?void 0:this.resolve({...t,data:e,type:le.DATA})}}isCanceledResponse(e){return e===pe.CANCELED}}!function(e){e.PROD="production",e.DEV="development",e.TEST="test"}(he||(he={}));const de=he;class me{#s={};on(e,t){return this.#s[e]||(this.#s[e]=[]),this.#s[e].push(t),this}off(e,t){return this.#s[e]&&(this.#s[e]=this.#s[e].filter((e=>e===t))),this}emit(e,t=[],r=null){const n=this.#s[e];if(n?.length)for(const e of n)e.call(r,...t)}alter(e,t,r=[],n=null){const s=this.#s[e];if(s?.length)for(const e of s)t=e.call(n,t,...r);return t}async asyncEmit(e,t=[],r=null){const n=this.#s[e];if(n?.length){const e=n.map((e=>e.call(r,...t)));await Promise.all(e)}}async asyncAlter(e,t,r=[],n=null){const s=this.#s[e];if(s?.length)for(const e of s)t=await e.call(n,t,...r);return t}destroy(){this.#s={}}}const ye=Function;r.g.Type=ye;class ge extends Error{name;constructor(e,t){super(ge.buildMessage(e,t))}static buildMessage(e,t){const[r,n,s]=t,o=m(t),i=o.split("/")[0],a="parameter"===i?".["+s+"]":"",c=n?"."+n:"parameter"===i?".constructor":"",u=F(d(r))+c+a;return`${e.name} cannot be used as ${o} decorator on ${u}`}}function Oe(e){try{e()}catch(e){return e}}async function be(e){try{await e()}catch(e){return e}}function ve(e){return Array.from(new Set(e).values())}function Se(e,t="id"){const r=new Map;return e.forEach((e=>{r.set(e[t],e)})),Array.from(r.values())}function Ee(e,t={}){const{handlers:r={},remove:n,ownKeys:s}=t,o=t.getter||((e,t)=>e.get(t)),i=t.setter||((e,t,r)=>!!e.set(t,r)),a=(e,t)=>Reflect.has(e,t)||"symbol"==typeof t;return new Proxy(e,{getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e,t),has:(e,t)=>a(e,t)?Reflect.has(e,t):void 0!==o(e,t),get:(e,t,r)=>a(e,t)?Reflect.get(e,t,r):o(e,t),set:(e,t,r,n)=>a(e,t)?Reflect.set(e,t,r,n):!!i(e,t,r,n),deleteProperty:(e,t)=>a(e,t)||!n?Reflect.deleteProperty(e,t):n(e,t),defineProperty:(e,t,r)=>Reflect.defineProperty(e,t,r),ownKeys:e=>ve(Reflect.ownKeys(e).concat(s&&s(e)||[])),...r})}function Te(e){return e&&Object.getPrototypeOf(e)}function Re(e){return Te(e)}function Ae(e){const t=[];let r=d(e);for(;r&&""!==F(r);)t.unshift(r),r=Re(r);return t}function we(e){return d(e)===e?e.prototype:e}function Pe(e){const t=new Map;return Ae(e=d(e)).forEach((e=>{Reflect.ownKeys(we(e)).forEach((r=>{"constructor"!==r&&t.set(r,{target:e,propertyKey:r})}))})),Array.from(t.values())}function Ce(t,r){Pe(t).forEach((({target:n,propertyKey:s})=>{const o=we(t);n!==d(t)&&(Object.defineProperty(o,s,{writable:!0,configurable:!0,value(...e){return we(n)[s].apply(this,e)}}),te.mergeStoreMethodFrom(t,n,s));const i=r(o,s,e(t,s));i&&Object.defineProperty(o,s,i)}))}function _e(t,r){return[t,r,e(t,r)]}function xe(e,t){for(const r of Ae(e)){const e=Object.getOwnPropertyDescriptor(r&&r.prototype||r,t);if(e)return e}}function Me(...e){return(...t)=>{e.filter((e=>!!e)).forEach((e=>{e(...t)}))}}function ke(t){return(r,n)=>t(r,n,e(r,n))}function Ne(...t){return(r,n)=>{t.filter(Boolean).forEach((t=>t(r,n,e(r,n))))}}function De(e,t){let r="0.0.0.0",n=t;return"string"==typeof t&&t.indexOf(":")>-1&&([r,n]=t.split(":"),n=+n),{protocol:e,address:r,port:n,toString(){return[`${this.protocol}://${this.address}`,"number"==typeof this.port&&this.port].filter(Boolean).join(":")}}}async function je(e,t=(()=>r(340)(e)),n=!1){try{return await t()}catch(e){if(!n)throw e;return{}}}function $e(e,t=[]){return Object.entries(e).reduce(((e,[r,n])=>$(r)||t.includes(r)||void 0===n?e:{...e,[r]:n}),{})}function Ie(e){return"function"==typeof e?e:e.constructor}function Le(e){return Ie(e)}function He(e){return e&&b(e)&&!e.prototype}function Ge(e){return e===Object}function Ue(e){return Ge(d(e))&&e!==Object}function qe(e){return!!e&&!He(e)&&!(x(e)||P(e)||Ge(e)||O(e)||ae(e)||g(e)||k(e))}function Fe(e){return qe(e)?d(e):e}function Ke(e){return`${(Le(e).toString().split("\n").find((e=>e.indexOf("constructor(")>-1))||"constructor()").replace("{","").trim()}`}function Be(e){return Ke(e).split("constructor(")[1].split(")")[0].split(", ").filter(Boolean).map((e=>e.trim()))}function Je(e,t){const r=d(e);if(r){const e=xe(r,t);if(e)return e.enumerable}return Object.prototype.propertyIsEnumerable.call(e,t)}function Ve(e){const t=[];for(const r in e)!$(r)&&Je(e,r)&&t.push(r);return t}function ze(...e){const t=(e=>{const[t,r,n,s="."]=e;return oe(r)||A(t)?{expression:t,scope:r,defaultValue:n,separator:s}:{expression:r,scope:t,defaultValue:n,separator:s}})(e);let r=t.scope;const{expression:n,defaultValue:s,separator:o}=t;if(!n)return r;if(!r)return s;const i=n.split(o),a=e=>{if(r){if(void 0!==r[e]||oe(r)&&e in r)return r[e];if(b(r.get))return r.get(e)}};for(;(r=a(i.shift()))&&i.length;);return void 0===r?s:r}function We(e){return g(e)||e===Map||e instanceof Map||e===Set||e instanceof Set||e===WeakMap||e instanceof WeakMap||e===WeakSet||e instanceof WeakSet}function Xe(e){return""===e||v(e)}function Qe(e,t,r=5){if(!e||!t)return!1;for(e=d(e),t=d(t);""!==F(e);){if(!r)return!1;if(e===t)return!0;e=Te(e),r--}return!1}function Ye(e){return!(Buffer.isBuffer(e)||ce(e)||S(e)||T(e)||A(e)||v(e))}function Ze(e){return w(e)?"string":R(e)?"number":E(e)?"boolean":"any"}function et(e,t,r,n="."){const s=t.split(n);for(;o=s.shift(),i=!s.length,!$(o)&&(i?("function"==typeof e.set?e.set(o,r):e[o]=r,0):("function"==typeof e.set?(e.has(o)||e.set(o,{}),e=e.get(o)):e=e[o]=e[o]||{},1)););var o,i}function tt(e){return e?A(e)?t=>t[e]:e:(e,t)=>String(t)}function rt(e,t){if(y(e)){const r=tt(t||"id");return e.reduce(((e,t,n)=>([].concat(r(t,n)).forEach((r=>{const n=e.get(r);t=n?.merge?.(t)||t,e.set(r,t)})),e)),new Map)}const r=tt(t);return Object.entries(e).reduce(((e,[t,n])=>e.set(r(n,t),n)),new Map)}})(),n})(),e.exports=t()},917:(e,t,r)=>{var n;self,n=(e,t)=>(()=>{"use strict";var r={379:e=>{const t="\\\\/",r=`[^${t}]`,n="\\.",s="\\/",o="[^/]",i=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${n}{1,2}${i}`,u={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:c,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${o}*?`,START_ANCHOR:a,SEP:"/"},p={...u,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?p:u}},390:(e,t,r)=>{const n=r(379),s=r(290),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:u}=n,p=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>s.escapeRegex(e))).join("..")}return r},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,h=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=u[e]||e;const r={...t},h="number"==typeof r.maxLength?Math.min(o,r.maxLength):o;let f=e.length;if(f>h)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${h}`);const d={type:"bos",value:"",output:r.prepend||""},m=[d],y=r.capture?"":"?:",g=n.globChars(r.windows),O=n.extglobChars(g),{DOT_LITERAL:b,PLUS_LITERAL:v,SLASH_LITERAL:S,ONE_CHAR:E,DOTS_SLASH:T,NO_DOT:R,NO_DOT_SLASH:A,NO_DOTS_SLASH:w,QMARK:P,QMARK_NO_DOT:C,STAR:_,START_ANCHOR:x}=g,M=e=>`(${y}(?:(?!${x}${e.dot?T:b}).)*?)`,k=r.dot?"":R,N=r.dot?P:C;let D=!0===r.bash?M(r):_;r.capture&&(D=`(${D})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const j={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};e=s.removePrefix(e,j),f=e.length;const $=[],I=[],L=[];let H,G=d;const U=()=>j.index===f-1,q=j.peek=(t=1)=>e[j.index+t],F=j.advance=()=>e[++j.index],K=()=>e.slice(j.index+1),B=(e="",t=0)=>{j.consumed+=e,j.index+=t},J=e=>{j.output+=null!=e.output?e.output:e.value,B(e.value)},V=()=>{let e=1;for(;"!"===q()&&("("!==q(2)||"?"===q(3));)F(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},z=e=>{j[e]++,L.push(e)},W=e=>{j[e]--,L.pop()},X=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||$.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,j.output+=G.output)}if($.length&&"paren"!==e.type&&!O[e.value]&&($[$.length-1].inner+=e.value),(e.value||e.output)&&J(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,m.push(e),G=e},Q=(e,t)=>{const n={...O[t],conditions:1,inner:""};n.prev=G,n.parens=j.parens,n.output=j.output;const s=(r.capture?"(":"")+n.open;z("parens"),X({type:e,value:t,output:j.output?"":E}),X({type:"paren",extglob:!0,value:F(),output:s}),$.push(n)},Y=e=>{let t=e.close+(r.capture?")":"");if("negate"===e.type){let n=D;e.inner&&e.inner.length>1&&e.inner.includes("/")&&(n=M(r)),(n!==D||U()||/^\)+$/.test(K()))&&(t=e.close=`)$))${n}`),"bos"===e.prev.type&&U()&&(j.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:H,output:t}),W("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,o=e.replace(c,((e,t,r,s,o,i)=>"\\"===s?(n=!0,e):"?"===s?t?t+s+(o?P.repeat(o.length):""):0===i?N+(o?P.repeat(o.length):""):P.repeat(r.length):"."===s?b.repeat(r.length):"*"===s?t?t+s+(o?D:""):D:t?e:`\\${e}`));return!0===n&&(o=!0===r.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===r.contains?(j.output=e,j):(j.output=s.wrapOutput(o,j,t),j)}for(;!U();){if(H=F(),"\0"===H)continue;if("\\"===H){const e=q();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",X({type:"text",value:H});continue}const t=/^\\+/.exec(K());let n=0;if(t&&t[0].length>2&&(n=t[0].length,j.index+=n,n%2!=0&&(H+="\\")),!0===r.unescape?H=F()||"":H+=F()||"",0===j.brackets){X({type:"text",value:H});continue}}if(j.brackets>0&&("]"!==H||"["===G.value||"[^"===G.value)){if(!1!==r.posix&&":"===H){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),n=i[r];if(n){G.value=t+n,j.backtrack=!0,F(),d.output||1!==m.indexOf(G)||(d.output=E);continue}}}("["===H&&":"!==q()||"-"===H&&"]"===q())&&(H=`\\${H}`),"]"!==H||"["!==G.value&&"[^"!==G.value||(H=`\\${H}`),!0===r.posix&&"!"===H&&"["===G.value&&(H="^"),G.value+=H,J({value:H});continue}if(1===j.quotes&&'"'!==H){H=s.escapeRegex(H),G.value+=H,J({value:H});continue}if('"'===H){j.quotes=1===j.quotes?0:1,!0===r.keepQuotes&&X({type:"text",value:H});continue}if("("===H){z("parens"),X({type:"paren",value:H});continue}if(")"===H){if(0===j.parens&&!0===r.strictBrackets)throw new SyntaxError(l("opening","("));const e=$[$.length-1];if(e&&j.parens===e.parens+1){Y($.pop());continue}X({type:"paren",value:H,output:j.parens?")":"\\)"}),W("parens");continue}if("["===H){if(!0!==r.nobracket&&K().includes("]"))z("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));H=`\\${H}`}X({type:"bracket",value:H});continue}if("]"===H){if(!0===r.nobracket||G&&"bracket"===G.type&&1===G.value.length){X({type:"text",value:H,output:`\\${H}`});continue}if(0===j.brackets){if(!0===r.strictBrackets)throw new SyntaxError(l("opening","["));X({type:"text",value:H,output:`\\${H}`});continue}W("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),G.value+=H,J({value:H}),!1===r.literalBrackets||s.hasRegexChars(e))continue;const t=s.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===r.literalBrackets){j.output+=t,G.value=t;continue}G.value=`(${y}${t}|${G.value})`,j.output+=G.value;continue}if("{"===H&&!0!==r.nobrace){z("braces");const e={type:"brace",value:H,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};I.push(e),X(e);continue}if("}"===H){const e=I[I.length-1];if(!0===r.nobrace||!e){X({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=m.slice(),n=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=p(n,r),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=j.output.slice(0,e.outputIndex),n=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",j.output=r;for(const e of n)j.output+=e.output||e.value}X({type:"brace",value:H,output:t}),W("braces"),I.pop();continue}if("|"===H){$.length>0&&$[$.length-1].conditions++,X({type:"text",value:H});continue}if(","===H){let e=H;const t=I[I.length-1];t&&"braces"===L[L.length-1]&&(t.comma=!0,e="|"),X({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",m.pop(),G=d;continue}X({type:"slash",value:H,output:S});continue}if("."===H){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const e=I[I.length-1];G.type="dots",G.output+=H,G.value+=H,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){X({type:"text",value:H,output:b});continue}X({type:"dot",value:H,output:b});continue}if("?"===H){if((!G||"("!==G.value)&&!0!==r.noextglob&&"("===q()&&"?"!==q(2)){Q("qmark",H);continue}if(G&&"paren"===G.type){const e=q();let t=H;if("<"===e&&!s.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${H}`),X({type:"text",value:H,output:t});continue}if(!0!==r.dot&&("slash"===G.type||"bos"===G.type)){X({type:"qmark",value:H,output:C});continue}X({type:"qmark",value:H,output:P});continue}if("!"===H){if(!0!==r.noextglob&&"("===q()&&("?"!==q(2)||!/[!=<:]/.test(q(3)))){Q("negate",H);continue}if(!0!==r.nonegate&&0===j.index){V();continue}}if("+"===H){if(!0!==r.noextglob&&"("===q()&&"?"!==q(2)){Q("plus",H);continue}if(G&&"("===G.value||!1===r.regex){X({type:"plus",value:H,output:v});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){X({type:"plus",value:H});continue}X({type:"plus",value:v});continue}if("@"===H){if(!0!==r.noextglob&&"("===q()&&"?"!==q(2)){X({type:"at",extglob:!0,value:H,output:""});continue}X({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=a.exec(K());e&&(H+=e[0],j.index+=e[0].length),X({type:"text",value:H});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=H,G.output=D,j.backtrack=!0,j.globstar=!0,B(H);continue}let t=K();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Q("star",H);continue}if("star"===G.type){if(!0===r.noglobstar){B(H);continue}const n=G.prev,s=n.prev,o="slash"===n.type||"bos"===n.type,i=s&&("star"===s.type||"globstar"===s.type);if(!0===r.bash&&(!o||t[0]&&"/"!==t[0])){X({type:"star",value:H,output:""});continue}const a=j.braces>0&&("comma"===n.type||"brace"===n.type),c=$.length&&("pipe"===n.type||"paren"===n.type);if(!o&&"paren"!==n.type&&!a&&!c){X({type:"star",value:H,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[j.index+4];if(r&&"/"!==r)break;t=t.slice(3),B("/**",3)}if("bos"===n.type&&U()){G.type="globstar",G.value+=H,G.output=M(r),j.output=G.output,j.globstar=!0,B(H);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!i&&U()){j.output=j.output.slice(0,-(n.output+G.output).length),n.output=`(?:${n.output}`,G.type="globstar",G.output=M(r)+(r.strictSlashes?")":"|$)"),G.value+=H,j.globstar=!0,j.output+=n.output+G.output,B(H);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";j.output=j.output.slice(0,-(n.output+G.output).length),n.output=`(?:${n.output}`,G.type="globstar",G.output=`${M(r)}${S}|${S}${e})`,G.value+=H,j.output+=n.output+G.output,j.globstar=!0,B(H+F()),X({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){G.type="globstar",G.value+=H,G.output=`(?:^|${S}|${M(r)}${S})`,j.output=G.output,j.globstar=!0,B(H+F()),X({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=M(r),G.value+=H,j.output+=G.output,j.globstar=!0,B(H);continue}const n={type:"star",value:H,output:D};!0!==r.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==r.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=A,G.output+=A):!0===r.dot?(j.output+=w,G.output+=w):(j.output+=k,G.output+=k),"*"!==q()&&(j.output+=E,G.output+=E)),X(n)):(n.output=H,X(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=k+n.output),X(n))}for(;j.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));j.output=s.escapeLast(j.output,"["),W("brackets")}for(;j.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing",")"));j.output=s.escapeLast(j.output,"("),W("parens")}for(;j.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","}"));j.output=s.escapeLast(j.output,"{"),W("braces")}if(!0===r.strictSlashes||"star"!==G.type&&"bracket"!==G.type||X({type:"maybe_slash",value:"",output:`${S}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};h.fastpaths=(e,t)=>{const r={...t},i="number"==typeof r.maxLength?Math.min(o,r.maxLength):o,a=e.length;if(a>i)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${i}`);e=u[e]||e;const{DOT_LITERAL:c,SLASH_LITERAL:p,ONE_CHAR:l,DOTS_SLASH:h,NO_DOT:f,NO_DOTS:d,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:g}=n.globChars(r.windows),O=r.dot?d:f,b=r.dot?m:f,v=r.capture?"":"?:";let S=!0===r.bash?".*?":y;r.capture&&(S=`(${S})`);const E=e=>!0===e.noglobstar?S:`(${v}(?:(?!${g}${e.dot?h:c}).)*?)`,T=e=>{switch(e){case"*":return`${O}${l}${S}`;case".*":return`${c}${l}${S}`;case"*.*":return`${O}${S}${c}${l}${S}`;case"*/*":return`${O}${S}${p}${l}${b}${S}`;case"**":return O+E(r);case"**/*":return`(?:${O}${E(r)}${p})?${b}${l}${S}`;case"**/*.*":return`(?:${O}${E(r)}${p})?${b}${S}${c}${l}${S}`;case"**/.*":return`(?:${O}${E(r)}${p})?${c}${l}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=T(t[1]);if(!r)return;return r+c+t[2]}}},R=s.removePrefix(e,{negated:!1,prefix:""});let A=T(R);return A&&!0!==r.strictSlashes&&(A+=`${p}?`),A},e.exports=h},555:(e,t,r)=>{const n=r(270),s=r(390),o=r(290),i=r(379),a=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map((e=>a(e,t,r))),s=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return s}const n=(s=e)&&"object"==typeof s&&!Array.isArray(s)&&e.tokens&&e.input;var s;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},i=o.windows,c=n?a.compileRe(e,t):a.makeRe(e,t,!1,!0),u=c.state;delete c.state;let p=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=a(o.ignore,e,r)}const l=(r,n=!1)=>{const{isMatch:s,match:l,output:h}=a.test(r,c,t,{glob:e,posix:i}),f={glob:e,state:u,regex:c,posix:i,input:r,output:h,match:l,isMatch:s};return"function"==typeof o.onResult&&o.onResult(f),!1===s?(f.isMatch=!1,!!n&&f):p(r)?("function"==typeof o.onIgnore&&o.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof o.onMatch&&o.onMatch(f),!n||f)};return r&&(l.state=u),l};a.test=(e,t,r,{glob:n,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=r||{},c=i.format||(s?o.toPosixSlashes:null);let u=e===n,p=u&&c?c(e):e;return!1===u&&(p=c?c(e):e,u=p===n),!1!==u&&!0!==i.capture||(u=!0===i.matchBase||!0===i.basename?a.matchBase(e,t,r,s):t.exec(p)),{isMatch:Boolean(u),match:u,output:p}},a.matchBase=(e,t,r)=>(t instanceof RegExp?t:a.makeRe(t,r)).test(o.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map((e=>a.parse(e,t))):s(e,{...t,fastpaths:!1}),a.scan=(e,t)=>n(e,t),a.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const s=t||{},o=s.contains?"":"^",i=s.contains?"":"$";let c=`${o}(?:${e.output})${i}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=a.toRegex(c,t);return!0===n&&(u.state=e),u},a.makeRe=(e,t,r=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");const o=t||{};let i,c={negated:!1,fastpaths:!0},u="";return e.startsWith("./")&&(e=e.slice(2),u=c.prefix="./"),!1===o.fastpaths||"."!==e[0]&&"*"!==e[0]||(i=s.fastpaths(e,t)),void 0===i?(c=s(e,t),c.prefix=u+(c.prefix||"")):c.output=i,a.compileRe(c,t,r,n)},a.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=i,e.exports=a},270:(e,t,r)=>{const n=r(290),{CHAR_ASTERISK:s,CHAR_AT:o,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:O}=r(379),b=e=>e===p||e===i,v=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},S=e.length-1,E=!0===r.parts||!0===r.scanToEnd,T=[],R=[],A=[];let w,P,C=e,_=-1,x=0,M=0,k=!1,N=!1,D=!1,j=!1,$=!1,I=!1,L=!1,H=!1,G=!1,U=0,q={value:"",depth:0,isGlob:!1};const F=()=>_>=S,K=()=>(w=P,C.charCodeAt(++_));for(;_<S;){let e;if(P=K(),P!==i){if(!0===I||P===l){for(U++;!0!==F()&&(P=K());)if(P!==i)if(P!==l){if(!0!==I&&P===c&&(P=K())===c){if(k=q.isBrace=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}if(!0!==I&&P===a){if(k=q.isBrace=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===y&&(U--,0===U)){I=!1,k=q.isBrace=!0,G=!0;break}}else U++;else L=q.backslashes=!0,K();if(!0===E)continue;break}if(P!==p){if(!0!==r.noext&&1==(P===d||P===o||P===s||P===m||P===u)&&C.charCodeAt(_+1)===h){if(D=q.isGlob=!0,j=q.isExtglob=!0,G=!0,!0===E){for(;!0!==F()&&(P=K());)if(P!==i){if(P===g){D=q.isGlob=!0,G=!0;break}}else L=q.backslashes=!0,P=K();continue}break}if(P===s){if(w===s&&($=q.isGlobstar=!0),D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===m){if(D=q.isGlob=!0,G=!0,!0===E)continue;break}if(P===f)for(;!0!==F()&&(e=K());)if(e!==i){if(e===O){if(N=q.isBracket=!0,D=q.isGlob=!0,G=!0,!0===E)continue;break}}else L=q.backslashes=!0,K();if(!0===r.nonegate||P!==u||_!==x){if(!0!==r.noparen&&P===h){if(D=q.isGlob=!0,!0===E){for(;!0!==F()&&(P=K());)if(P!==h){if(P===g){G=!0;break}}else L=q.backslashes=!0,P=K();continue}break}if(!0===D){if(G=!0,!0===E)continue;break}}else H=q.negated=!0,x++}else{if(T.push(_),R.push(q),q={value:"",depth:0,isGlob:!1},!0===G)continue;if(w===c&&_===x+1){x+=2;continue}M=_+1}}else L=q.backslashes=!0,P=K(),P===l&&(I=!0)}!0===r.noext&&(j=!1,D=!1);let B=C,J="",V="";x>0&&(J=C.slice(0,x),C=C.slice(x),M-=x),B&&!0===D&&M>0?(B=C.slice(0,M),V=C.slice(M)):!0===D?(B="",V=C):B=C,B&&""!==B&&"/"!==B&&B!==C&&b(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),!0===r.unescape&&(V&&(V=n.removeBackslashes(V)),B&&!0===L&&(B=n.removeBackslashes(B)));const z={prefix:J,input:e,start:x,base:B,glob:V,isBrace:k,isBracket:N,isGlob:D,isExtglob:j,isGlobstar:$,negated:H};if(!0===r.tokens&&(z.maxDepth=0,b(P)||R.push(q),z.tokens=R),!0===r.parts||!0===r.tokens){let t;for(let n=0;n<T.length;n++){const s=t?t+1:x,o=T[n],i=e.slice(s,o);r.tokens&&(0===n&&0!==x?(R[n].isPrefix=!0,R[n].value=J):R[n].value=i,v(R[n]),z.maxDepth+=R[n].depth),0===n&&""===i||A.push(i),t=o}if(t&&t+1<e.length){const n=e.slice(t+1);A.push(n),r.tokens&&(R[R.length-1].value=n,v(R[R.length-1]),z.maxDepth+=R[R.length-1].depth)}z.slashes=T,z.parts=A}return z}},290:(e,t,r)=>{const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:i}=r(379);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>o.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(i,"\\$1"),t.toPosixSlashes=e=>e.replace(n,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.escapeLast=(e,r,n)=>{const s=e.lastIndexOf(r,n);return-1===s?e:"\\"===e[s-1]?t.escapeLast(e,r,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n},t.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")},870:(e,t,r)=>{e.exports=r(555)},203:(e,t,r)=>{var n=r(739);function s(e){if(!Object.prototype.hasOwnProperty.call(o.message,e))throw new Error("invalid status code: "+e);return o.message[e]}function o(e){if("number"==typeof e)return s(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(o.code,t))throw new Error('invalid status message: "'+e+'"');return o.code[t]}(e):s(t)}e.exports=o,o.message=n,o.code=function(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r],s=Number(r);t[n.toLowerCase()]=s})),t}(n),o.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(n),o.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},o.empty={204:!0,205:!0,304:!0},o.retry={502:!0,503:!0,504:!0}},803:t=>{t.exports=e},598:e=>{e.exports=t},739:e=>{e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication 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":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","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","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{s.r(o),s.d(o,{AcceptMime:()=>mr,AdditionalProperties:()=>qe,All:()=>Lr,AllOf:()=>Fe,Allow:()=>Be,Any:()=>Je,AnyOf:()=>Ve,ArrayOf:()=>ke,Children:()=>_e,CollectionContains:()=>De,CollectionOf:()=>Me,Const:()=>ze,Consumes:()=>yr,ContentType:()=>Rr,Converter:()=>Mn,CustomKey:()=>We,CustomKeys:()=>Xe,DateFormat:()=>dt,DateTime:()=>ft,DecoratorContext:()=>gr,Default:()=>Qe,DefaultMsg:()=>Ye,Delete:()=>qr,Deprecated:()=>Ar,Description:()=>Ze,Discriminator:()=>b,DiscriminatorKey:()=>et,DiscriminatorValue:()=>xe,Email:()=>ht,EndpointMetadata:()=>re,Enum:()=>tt,ErrorMsg:()=>je,Example:()=>rt,Examples:()=>nt,ExclusiveMaximum:()=>it,ExclusiveMinimum:()=>ut,For:()=>Lt,Format:()=>lt,ForwardGroups:()=>Ot,GenericOf:()=>hr,Generics:()=>fr,Get:()=>Hr,Groups:()=>Tt,HTTP_METHODS:()=>we,HTTP_STATUS_MESSAGES:()=>K,Head:()=>Fr,Header:()=>wr,Hidden:()=>Rt,Ignore:()=>wt,In:()=>Pr,InFile:()=>Cr,Integer:()=>Pt,JSON_TYPES:()=>d,JsonClassStore:()=>R,JsonEntitiesContainer:()=>c,JsonEntityComponent:()=>T,JsonEntityFn:()=>Ce,JsonEntityStore:()=>u,JsonFormatTypes:()=>pt,JsonLazyRef:()=>se,JsonMap:()=>$,JsonMedia:()=>Y,JsonMethodStore:()=>te,JsonOperation:()=>ee,JsonOperationPathsMap:()=>Qr,JsonOperationRoute:()=>Zr,JsonParameter:()=>H,JsonParameterStore:()=>G,JsonParameterTypes:()=>M,JsonPropertyStore:()=>A,JsonRequestBody:()=>X,JsonResponse:()=>Z,JsonSchema:()=>E,Location:()=>_r,MapOf:()=>Ne,Max:()=>ot,MaxItems:()=>Ie,MaxLength:()=>Ct,MaxProperties:()=>Le,Maximum:()=>st,Min:()=>ct,MinItems:()=>He,MinLength:()=>_t,MinProperties:()=>Ge,Minimum:()=>at,MultipleOf:()=>xt,Name:()=>Mt,Nullable:()=>kt,OneOf:()=>Nt,OperationId:()=>xr,OperationMethods:()=>Pe,OperationPath:()=>Mr,Optional:()=>Dt,Options:()=>Br,ParamMetadata:()=>U,Partial:()=>kr,Patch:()=>Kr,Path:()=>Nr,Pattern:()=>jt,Post:()=>Gr,Produces:()=>dr,Property:()=>Ke,PropertyMetadata:()=>w,Put:()=>Ur,ReadOnly:()=>$t,RecordOf:()=>Ht,Redirect:()=>Dr,Required:()=>Gt,RequiredGroups:()=>Ut,Returns:()=>Tr,Route:()=>Ir,Schema:()=>It,Security:()=>Jr,SpecTypes:()=>x,Status:()=>Vr,Summary:()=>zr,Tags:()=>Wr,TimeFormat:()=>mt,Title:()=>qt,TypeError:()=>Ft,UniqueItems:()=>Ue,Uri:()=>yt,Url:()=>gt,View:()=>Xr,WriteOnly:()=>Kt,allOf:()=>ur,alterIgnore:()=>fe,alterOneOf:()=>Se,alterRequiredGroups:()=>be,any:()=>ir,anyMapper:()=>oe,anyOf:()=>ar,array:()=>rr,boolean:()=>Wt,buildPath:()=>en,classMapper:()=>ie,concatParameters:()=>tn,concatPath:()=>Yr,createRef:()=>D,createRefName:()=>N,date:()=>Xt,datetime:()=>Qt,defineStatusModel:()=>br,email:()=>Zt,enums:()=>lr,enumsRegistry:()=>h,execMapper:()=>i,formatParameterType:()=>I,from:()=>Bt,generateSpec:()=>Nn,genericsMapper:()=>ae,getComputedType:()=>f,getGenericsMap:()=>P,getInheritedStores:()=>ce,getJsonEntityStore:()=>ne,getJsonPathParameters:()=>nn,getJsonSchema:()=>jn,getJsonSchemaMapper:()=>n,getJsonType:()=>m,getOperationsRoutes:()=>$n,getOperationsStores:()=>rn,getProperties:()=>Ln,getPropertiesStores:()=>In,getRequiredProperties:()=>ve,getSpec:()=>dn,getSpecType:()=>mn,getSpecTypeFromSpec:()=>yn,getStatusConstant:()=>B,getStatusMessage:()=>J,getStatusModel:()=>vr,hasMapper:()=>a,inheritedClassMapper:()=>ue,inlineEnums:()=>Ee,integer:()=>Vt,isParameterType:()=>L,isRedirectionStatus:()=>z,isSuccessStatus:()=>V,itemMapper:()=>pe,lazyRef:()=>pr,lazyRefMapper:()=>le,map:()=>nr,mapAliasedProperties:()=>Oe,mapGenericsOptions:()=>C,mapHeaders:()=>Q,mapMapper:()=>he,mapNullableType:()=>de,mapOpenSpec:()=>vn,mapOpenSpec2:()=>On,mapOpenSpec3:()=>bn,mapOpenSpecInfo:()=>gn,mapRouteOptions:()=>jr,matchGroups:()=>Et,mergeOperation:()=>sn,mergeSpec:()=>hn,number:()=>Jt,object:()=>or,objectMapper:()=>me,ofMapper:()=>ye,oneOf:()=>cr,operationIdFormatter:()=>on,parameters:()=>cn,popGenerics:()=>_,propertiesMapper:()=>ge,registerJsonSchemaMapper:()=>r,schemaMapper:()=>Ae,schemesReducer:()=>an,security:()=>un,serializeEnum:()=>y,serializeEnumValues:()=>g,set:()=>sr,string:()=>zt,tagsReducer:()=>pn,time:()=>Yt,toJsonMapCollection:()=>W,toJsonRegex:()=>O,toRef:()=>j,transformInformation:()=>xn,transformSecurity:()=>_n,transformToOS2:()=>kn,uri:()=>er,url:()=>tr,withErrorMsg:()=>$e});var e=s(803);const t=new Map;function r(e,r){return t.set(e,r)}function n(e){if(!t.has(e))throw new Error(`JsonSchema ${e} mapper doesn't exists`);return t.get(e)}function i(e,t,r,s){return n(e)(t,r,s)}function a(e){return t.has(e)}const c=new Map;class u{propertyKey;propertyName;index;descriptor;decoratorType;collectionType;token;store;isStore=!0;parent;target;_type;_schema;constructor(e){const{target:t,propertyKey:r,descriptor:n,index:s,decoratorType:o}=e;this.target=t,this.propertyKey=r,this.propertyName=String(r),this.descriptor=n,this.index=s,this.decoratorType=o,this.token=t,this.store=e.store,this.parent=this}get targetName(){return(0,e.nameOf)(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return(0,e.isArrayOrArrayClass)(this.collectionType)}get discriminatorAncestor(){const t=(0,e.ancestorsOf)(this.target).find((e=>u.from(e).schema.isDiscriminator));return t&&u.from(t)}get isPrimitive(){return(0,e.isPrimitiveOrPrimitiveClass)(this._type)}get isDate(){return(0,e.isDate)(this.computedType)}get isObject(){return(0,e.isObject)(this.computedType)}get isClass(){return(0,e.isClass)(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){return this.schema.isDiscriminator&&this.discriminatorAncestor?.schema.discriminator().base!==this.target}static from(...t){if(t[0].isStore)return t[0];const r=t[0];t.length>1&&(t[0]=(0,e.prototypeOf)(t[0]));const n=e.Store.from(...t);if(!n.has("JsonEntityStore")){const s=(0,e.decoratorTypeOf)(t),o=c.get(s);if(!o)throw Error("Unsupported json entity type");const i=new o({store:n,decoratorType:s,target:(0,e.classOf)(r),propertyKey:t[1],index:"number"==typeof t[2]?t[2]:void 0,descriptor:"object"==typeof t[2]?t[2]:void 0});i.build(),n.set("JsonEntityStore",i)}return n.get("JsonEntityStore")}static fromMethod(t,r){return this.from(t,r,(0,e.descriptorOf)(t,r))}static get(t,r,n){return u.from((0,e.prototypeOf)(t),r,n)}isGetterOnly(){return(0,e.isObject)(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t)}toString(){return[this.targetName,this.propertyName,this.index].filter((e=>void 0!==e)).join(":")}buildType(t){(0,e.isCollection)(t)?this.collectionType=t:(this._type=t,this._type&&(0,e.isPlainObject)(this._type)&&(this._type=String))}getBestType(){return this.itemSchema.isDiscriminator?this.itemSchema.discriminator():(0,e.isClassObject)(this.type)?this.itemSchema.getTarget():this.type}}function p(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create,Object.create;const h=new Map;function f(t){return(0,e.isPromise)(t)||t===Function?Object:(0,e.isClass)(t)||(0,e.isSymbol)(t)||(0,e.isPrimitiveOrPrimitiveClass)(t)||(0,e.isClassObject)(t)||(0,e.isDate)(t)||(0,e.isCollection)(t)?(0,e.classOf)(t):(0,e.isArrowFn)(t)?t():t}const d=["string","number","integer","boolean","object","array","null","any"];function m(t){return null===t?"null":(0,e.isPrimitiveOrPrimitiveClass)(t)?d.indexOf(t)>-1?t:"string"==typeof t?"file"===t?"file":"generic":(0,e.primitiveOf)(t):t===Array?"array":(0,e.isArray)(t)?t.map(m):t===Set?"array":(0,e.isDate)(t)||(0,e.isBuffer)(t)?"string":"object"}const y=t=>(0,e.isObject)(t)&&null!==t?Object.entries(t).reduce(((e,[t,r])=>isNaN(+t)?e.concat(r):e),[]):t;function g(t){const r=t.reduce(((e,t)=>e.concat(y(t))),[]),n=r.reduce(((e,t)=>e.add((e=>null===e?"null":typeof e)(t))),new Set);return{values:(0,e.uniq)(r),types:n}}function O(e){return String(e).replace(/^(\/)(.*)(\/)$/,"$2")}class b{propertyName;base;values=new Map;types=new Map;constructor({base:t,propertyName:r,types:n,values:s}={}){Object.assign(this,(0,e.cleanObject)({base:t,propertyName:r,types:n?new Map(n):void 0,values:s?new Map(s):void 0}))}add(e,t){return t.forEach((t=>{this.values.set(t,e)})),this.types.set(e,t),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const t=this.types.get(e);return t?t[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function v(e){return e instanceof E?e:Object.entries(e).reduce(((e,[t,r])=>(e[O(t)]=S(r),e)),{})}function S(t){return(0,e.isArray)(t)?t.map(S):t.isStore||t.isJsonSchema||t.isLazyRef?t:(0,e.classOf)(t)!==Object&&(0,e.isClass)(t)?u.from(t).schema:(0,e.isObject)(t)?E.from(t):(0,e.isPrimitiveClass)(t)?E.from({type:t}):t}class E extends Map{isJsonSchema=!0;$hooks=new e.Hooks;$required=new Set;$allow=[];$selfRequired;$forwardGroups=!1;isDiscriminatorKey=!1;isDiscriminator=!1;#t=!1;#e=null;#r;#o=[];#n=new Map;#i;#s;#a=!1;#c=!1;#u=!1;constructor(e={}){super(),e&&this.assign(e)}get alias(){return this.#n}get nestedGenerics(){return this.#o}set nestedGenerics(e){this.#o=e}get genericLabels(){return this.#r}set genericLabels(e){this.#r=e}get isClass(){return(0,e.isClass)(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(this.#s)}get isCollection(){return this.#c}get isGeneric(){return this.#a}get discriminatorAncestor(){const t=(0,e.ancestorsOf)(this.#s).find((e=>u.from(e).schema.isDiscriminator));return t&&u.from(t).schema}get hasGenerics(){return!(!this.nestedGenerics||!this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return this.#u}get isNullable(){return this.#t||this.$allow.includes(null)}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}get hasDiscriminator(){return!!this.#e}static from(e={}){return new E(e)}nullable(e){this.#t=e}itemSchema(e={}){return this.#i=this.#i||S(e),this.#i.assign(e),this.#i}getAliasOf(e){return this.#n.get(e)}addAlias(e,t){return this.#n.set(e,t),this.#n.set(t,e),this}removeAlias(e){const t=this.#n.get(e);return t&&this.#n.delete(t),this.#n.delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return this.#u=!0,super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){if("boolean"==typeof e){const t=e;e=()=>t}return this.$hooks.on("ignore",e),this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,this.#e=this.#e||new b({base:this.#s})}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const t=this.discriminatorAncestor.discriminator();t.add(this.#s,e),this.isDiscriminator=!0;const r=this.get("properties"),n=r[t.propertyName]||new E({type:"string"});return 1===e.length?(n.const(e[0]),n.examples([e[0]])):(n.enum(...e),n.examples(e)),r[t.propertyName]=n,this.set("properties",r),this}additionalItems(e){return super.set("additionalItems",S(e)),this}contains(e){return super.set("contains",S(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",this.#i=S(e)),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return this.$allow.push(...e),this}required(t=!0){if(!(0,e.isArray)(t)){const e=this.clone();return e.$selfRequired=t,e}return this.$required.clear(),t.forEach((e=>this.$required.add(e))),this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",v(e)),this}addProperty(e,t){const r=this.get("properties")||{};return r[e]=t,super.set("properties",v(r)),this}patternProperties(e){return super.set("patternProperties",v(e)),this}additionalProperties(e){return super.set("additionalProperties",S(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",v(e)),this}propertyNames(e){return super.set("propertyNames",S(e)),this}enum(e,...t){if(h.has(e))return this.enum(h.get(e));if(e instanceof E)e.getName()?super.set("enum",e):super.set("enum",e.get("enum")).any(...e.getJsonType());else{const{values:r,types:n}=g([e,t].flat());super.set("enum",r).any(...n)}return this}definitions(e){return super.set("definitions",v(e)),this}allOf(e){return super.set("allOf",e.map(S)),this}anyOf(e){return super.set("anyOf",e.map(S)),this}oneOf(e){let t=e.map(S);if(1===t.length&&!(e[0]instanceof E)){if(!t[0].hasDiscriminator)return this.type(e[0]);const r=t[0].discriminator().children();if(!r.length)return this.type(e[0]);t=r.map(S)}super.set("oneOf",t);const r=t[0];if(r.isDiscriminator){const e=r.discriminatorAncestor.discriminator(),{propertyName:t}=e;super.set("discriminator",{propertyName:t}),this.isDiscriminator=!0,this.#e=e}return this}not(e){return super.set("not",S(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",O(e)),this}format(e){return super.set("format",e),this}type(t){switch(t){case Map:super.set("type",m(t)),this.#s=t,this.#c=!0,this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case Array:super.set("type",m(t)),this.#s=t,this.#c=!0,this.has("items")||super.set("items",this.itemSchema({}));break;case Set:super.set("type",m(t)),this.#s=t,this.#c=!0,this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":super.set("type",m(t)),this.integer();break;case Object:case Date:case Boolean:case Number:case String:super.set("type",m(t)),this.#s=t,this.has("properties")||super.set("properties",{});break;default:if((0,e.isClass)(t)||(0,e.isFunction)(t))super.set("type",void 0),this.#s=t,this.has("properties")||super.set("properties",{});else{const e=m(t);"generic"===e?(this.#a=!0,super.set("$ref",t)):super.set("type",e)}}return this}any(...t){return t.filter((t=>(0,e.isClass)(t))).length>=2?this.oneOf(t.filter((e=>null!==e&&(this.nullable(!0),!0)))):(t.length?(t=(0,e.uniq)(t).map(m)).includes("null")&&(this.nullable(!0),t=t.filter((e=>"null"!==e))):(t=["integer","number","string","boolean","array","object"],this.nullable(!0)),this.type(1===t.length?t[0]:t)),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,t){return super.set(`#${e}`,t),this}toObject(e){return this.toJSON(e)}toJSON(e){let t=!1;e||(t=!0,e={schemas:{},inlineEnums:!0});const r=i("schema",this,e);return t&&e.schemas&&Object.keys(e.schemas).length&&(r.definitions=e.schemas),r}assign(e={}){return(e instanceof E?[...e.entries()]:Object.entries(e)).forEach((([e,t])=>{this.set(e,t)})),e instanceof E&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach((e=>{this.$required.add(e)})),this.#e=this.#e?new b(this.#e):null,this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,this.#u=e.#u,this.#n=new Map(this.#n.entries()),e.#r&&(this.#r=[...e.#r]),this.#o=e.#o.map((e=>[...e])),this.#s=e.#s,this.#a=e.#a,this.#c=e.#c,this.#u=e.#u,super.set("type",e.get("type"))),this}set(t,r){return t in this?(0,e.isFunction)(this[t])&&this[t](r):super.set(t,r),this}getComputedType(){return f(this.#s)}getComputedItemType(){return this.#i?this.#i.getComputedType():this.getComputedType()}getJsonType(){return this.get("type")||m(this.getComputedType())}getTarget(){return this.#s}getName(){return this.get("name")||((0,e.isClass)(this.#s)?(0,e.nameOf)((0,e.classOf)(this.getComputedType())):"")}clone(){return new E(this)}}function T(e){return t=>{c.set(e,t)}}let R=class extends u{children=new Map;get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=E.from({type:this.type})}};R=p([T(e.DecoratorTypes.CLASS)],R);let A=class extends u{parent=u.from(this.target);get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(e){e?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}build(){this._type||this.buildType(e.Metadata.getType((0,e.prototypeOf)(this.target),this.propertyKey)),this._type=this._type||Object;let t=this.parent.schema.get("properties")[this.propertyName];t||(this.parent.children.set(this.propertyName,this),t=E.from({type:this.collectionType||this.type}),this.collectionType&&t.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,t),this._schema=t}static get(t,r){return u.from((0,e.prototypeOf)(t),r)}};A=p([T(e.DecoratorTypes.PROP)],A);const w=A;function P(e,t){return e.reduce(((e,r,n)=>e.set(r,t[n])),new Map)}function C(e){if(e.genericLabels&&e.genericTypes){const{genericLabels:t,genericTypes:r,...n}=e;return{...n,generics:P(t,r)}}return e}function _(e){const[t,...r]=e.nestedGenerics;return{genericTypes:t,nestedGenerics:r}}var x,M,k=s(598);function N(e,t){return t.groups&&t.groups.length?(0,k.pascalCase)(`${e} ${t.groupsName||t.groups.join(" ")}`):e}function D(t,r,n){const s=function(e){const{host:t="#/"+("openapi3"===e.specType?"components/schemas":"definitions")}=e;return t}(n),o={$ref:`${s}/${t}`},i=r.isNullable,a=r.isReadOnly,c=r.isWriteOnly;if(i||a||c)switch(n.specType){case x.OPENAPI:return(0,e.cleanObject)({nullable:!!i||void 0,readOnly:!!a||void 0,writeOnly:!!c||void 0,oneOf:[o]});case x.JSON:return(0,e.cleanObject)({readOnly:a,writeOnly:c,oneOf:[o]})}return o}function j(e,t,r){const n=N(e.getName(),r);return r.schemas[n]=t,D(n,e,r)}!function(e){e.JSON="jsonschema",e.SWAGGER="swagger2",e.OPENAPI="openapi3"}(x||(x={}));class $ extends Map{constructor(e={}){super(),this.assign(e)}assign(t={}){return Object.entries(t).forEach((([t,r])=>{(0,e.isFunction)(this[t])?this[t](r):this.set(t,r)})),this}toJSON(e={}){return i("map",this,e)}}function I(e){return String(e).toLowerCase().replace("raw_","").replace("cookies","cookie")}function L(e){return Object.values(M).includes(I(e))}!function(e){e.BODY="body",e.PATH="path",e.QUERY="query",e.HEADER="header",e.COOKIES="cookie",e.FILES="files"}(M||(M={}));class H extends ${nestedGenerics=[];groups;groupsName;$schema;expression;getName(){const e=this.get("name");return"files"===this.get("in")?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,t=""){return this.set("in",I(e)),this.expression=t,this}required(e){return this.set("required",e),this}schema(e){return this.$schema=e,this}toJSON(t={}){if(!L(this.get("in")))return null;const r=(0,e.toMap)(t.schemas||{});return this.build({...t,groups:this.groups,groupsName:this.groupsName},r)}build(e,t){const{type:r,schema:n,...s}=super.toJSON(e),o=i("item",this.$schema,{...e,..._(this)});switch(s.required=s.required||this.get("in")===M.PATH,this.get("in")){case M.FILES:return this.getFileSchema(o,s);case M.QUERY:if(o.$ref){if(!s.name)return this.refToParameters(s,e,t);s.style="deepObject"}}return s.schema=o,s}getFileSchema(t,r){const n={type:"string",format:"binary",oneOf:void 0};return"array"===t.type?(t.items=(0,e.cleanObject)({...t.items,...n}),r.schema=t):r.schema=(0,e.cleanObject)({...t,...n}),r}refToParameters(t,r,n){const s=N(this.$schema.getName(),r),o=r.schemas[s];return r.schemas[s]&&!n.has(s)&&delete r.schemas[this.$schema.getName()],Object.entries(o.properties||{}).reduce(((r,[n,{description:s,...i}])=>[...r,(0,e.cleanObject)({...t,name:n,required:(o.required||[]).includes(n),description:s,schema:i,style:i.$ref?"deepObject":void 0})]),[])}}let G=class extends u{paramType;expression;dataPath;pipes;parameter=new H;parent=u.fromMethod(this.target,this.propertyKey);constructor(e){super(e),this.pipes=e.pipes||[],this.paramType=e.paramType||this.paramType,this.expression=e.expression||this.expression,this.dataPath=e.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(e){this.parameter.nestedGenerics=e}get required(){return!!this.parameter.get("required")}set required(e){this.parameter.required(e)}get allowedRequiredValues(){return this.schema.$allow}static getParams(t,r){const n=[],s=(0,e.ancestorsOf)(t).reverse().find((t=>(0,e.isMethodDescriptor)(t,r)&&u.fromMethod(t,r).children.size));return s?(u.fromMethod(s,r).children.forEach(((e,t)=>{n[+t]=e})),n):[]}static get(t,r,n){return u.from((0,e.prototypeOf)(t),r,n)}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}getSchema(t){return(0,e.isCollection)(t)||!(0,e.isClass)(t)?E.from({type:t}):u.from(t).schema}build(){if(!this._type){const t=e.Metadata.getParamTypes((0,e.prototypeOf)(this.target),this.propertyKey)[this.index];this.buildType(t)}this._type=this._type||Object,this._schema||(this.parent.children.set(this.index,this),this._schema=this.getSchema(this.collectionType||this.type),this.parameter.schema(this._schema),this.collectionType&&this._schema.itemSchema(this.getSchema(this.type)),this.parent.operation.addParameter(this.index,this.parameter))}};G=p([T(e.DecoratorTypes.PARAM),l("design:paramtypes",[Object])],G);const U=G;var q=s(203),F=s.n(q);const K=F().codes.reduce(((e,t)=>{const r=String(F()(t));return{...e,[String(t)]:{label:r,code:(0,k.constantCase)(r)}}}),{});function B(e){return K[e]?.code}function J(e){return K[e]?.label}K[200].label="Success",K[200].code="SUCCESS";const V=e=>Number(e)&&200<=Number(e)&&Number(e)<300,z=e=>Number(e)&&300<=Number(e)&&Number(e)<400;function W(e,t=$){return Object.entries(e).reduce(((e,[r,n])=>(e.set(r,new t(n)),e)),new $)}class X extends ${constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",W(e)),this}addContent(e,t,r){const n=this.get("content"),s=new $;return s.set("schema",t),r&&s.set("examples",r),n.set(e,s),this}required(e){return this.set("required",e),this}}function Q(t){return Object.keys(t).reduce(((r,n)=>{const s=t[n];let o=typeof s,i={example:s};return"object"===o&&(i=s,i.example=void 0===i.value?i.example:i.value,delete i.value,o=typeof i.example),i.type=i.type||o,r[n]=(0,e.cleanObject)(i),r}),{})}class Y extends ${groups=[];groupsName;allowedGroups;schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}toJSON(e={}){let t=[...this.groups||[]];return super.toJSON({...e,groups:t,groupsName:this.groupsName})}}class Z extends ${status;constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",Q(e)),this}content(e){return this.set("content",W(e,Y)),this}getContent(){return this.get("content")}getMedia(e,t=!0){return t&&this.addMedia(e),this.getContent()?.get(e)}addMedia(e){const t=this.get("content");return t.has(e)||t.set(e,new Y),this}toJSON(e={}){const t=super.toJSON(e);return 204===this.status&&delete t.content,t.headers&&Object.entries(t.headers).forEach((([e,{type:r,...n}])=>{t.headers[e]={...n,schema:{type:r}}})),t}}class ee extends ${operationPaths=new Map;#p;#l=!1;constructor(e={}){super({parameters:[],responses:new $,...e})}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return this.#p}tags(e){return super.set("tags",e),this}addTags(t){return t=(0,e.uniqBy)([...this.get("tags")||[],...t],"name"),this.tags(t)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return this.#p=e,this}getStatus(){return this.#p||200}setRedirection(e=302){return this.#l=!0,this.#p=e,this}isRedirection(e){return this.#l&&e?z(e):this.#l}addResponse(t,r){if((V(t)||z(t))&&!this.#p){const e=this.getResponseOf(200);this.getResponses().set(t.toString(),e).delete("200"),this.defaultStatus(Number(t))}const n="default"===t?this.getStatus().toString():t.toString(),s=this.getResponses().get(n);return s?(r.forEach(((t,r)=>{["content"].includes(r)||s.set(r,(0,e.deepMerge)(s.get(r),t))})),s.status=Number(n)):(r.status=Number(n),this.getResponses().set(n,r)),this}getResponses(){return this.get("responses")}getResponseOf(e){return("default"===e?this.response:this.getResponses().get(String(e)))||new Z}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(t,r){const n=this.get("security")||{};return n[t]=(0,e.uniq)([...n[t]||[],...r]),this.security(n)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,t){-1===e&&(e=this.get("parameters").length),this.get("parameters")[e]=t}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(t){const r=(0,e.uniq)([].concat(this.get("produces"),t)).filter(Boolean);this.set("produces",r)}addOperationPath(e,t,r={}){return this.operationPaths.set(String(e)+String(t),{...r,method:e,path:t}),this}toJSON(e={}){const t=super.toJSON({...e,ignore:["parameters"]}),r=[],n=[];if(t.security&&(t.security=[].concat(t.security)),this.get("parameters").forEach((t=>{L(this.get("in"))||t.get("in")&&([M.BODY,M.FILES].includes(t.get("in"))?r.push(t):n.push(...[].concat(t.toJSON(e))))})),t.parameters=n.filter(Boolean),0===this.get("responses").size&&(t.responses={200:{description:J(200)}}),r.length){const n=function(e,t){let r=new E;const n={},s=[];let o=0;return e.forEach((e=>{const i=e.getName();Array.from(e.entries()).filter((([e])=>!["in","name"].includes(e))).forEach((([e,t])=>{void 0===n[e]&&(n[e]=t)}));const a=e.toJSON(t);i?(r.addProperty(i,a.schema||{type:a.type}),e.get("required")&&r.addRequired(i),o++):s.push(a)})),o||1!==s.length?(r.type("object"),{schema:r.toJSON(t),required:!1,...n}):s[0]}(r,e);t.requestBody=function(e,{schema:t,examples:r,in:n,...s}){const o=new X(s);return(e.get("consumes")?.length?e.get("consumes"):["application/json"]).forEach((e=>{o.addContent(e,t,r)})),o}(this,n).toJSON(e)}return delete t.consumes,delete t.produces,t}}let te=class extends u{parent=u.from(this.target);middlewares=[];beforeMiddlewares=[];afterMiddlewares=[];operation=new ee;children=new Map;constructor(t){super({store:e.Store.fromMethod(t.target,t.propertyKey),descriptor:(0,e.descriptorOf)(t.target,t.propertyKey),...t});const{beforeMiddlewares:r=[],middlewares:n=[],afterMiddlewares:s=[]}=t;this.after(s),this.before(r),this.use(n)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(e){this.store.set("view",e)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(e){this.store.set("acceptMimes",e)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(t,r,n){return n=n||(0,e.descriptorOf)((0,e.prototypeOf)(t),r),u.from((0,e.prototypeOf)(t),r,n)}getResponseOptions(e,{contentType:t="application/json",includes:r}={}){const n=this.operation.getResponseOf(e).getMedia(t,!1);if(n&&n.has("schema")){const e=n.get("schema");let t=n.groups;return r&&n.allowedGroups?.size&&(t=[...t||[],...r.filter((e=>n.allowedGroups.has(e)))]),{type:e.getComputedItemType(),groups:t}}return{type:this.type}}before(t){return this.beforeMiddlewares=this.beforeMiddlewares.concat(t).filter(e.isFunction),this}after(t){return this.afterMiddlewares=this.afterMiddlewares.concat(t).filter(e.isFunction),this}use(t){return this.middlewares=this.middlewares.concat(t).filter(e.isFunction),this}get(t){const r=e.Store.from(this.target).get(t);return(0,e.deepMerge)(r,this.store.get(t))}getParamTypes(){return[...this.children.values()].reduce(((e,t)=>({...e,[t.paramType]:!0})),{})}build(){if(!this._type){let t=e.Metadata.getReturnType(this.target,this.propertyKey);t=(0,e.isPromise)(t)?void 0:t,this.buildType(t)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),(0,e.isCollection)(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=E.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}};te=p([T(e.DecoratorTypes.METHOD),l("design:paramtypes",[Object])],te);const re=te;function ne(...e){return u.from(...e)}c.set(e.DecoratorTypes.CLASS,R),c.set(e.DecoratorTypes.PROP,A),c.set(e.DecoratorTypes.PARAM,G),c.set(e.DecoratorTypes.METHOD,te);class se{getType;isLazyRef=!0;constructor(e){this.getType=e}get target(){return this.getType()}get schema(){return ne(this.getType()).schema}get name(){return(0,e.nameOf)(this.getType())}toJSON(e){return this.getType()&&i("schema",this.schema,e)}}function oe(e,t={}){if("object"!=typeof e||null===e)return e;if(e instanceof se)return i("lazyRef",e,t);if(e instanceof E&&e.get("enum")instanceof E){const r=e.get("enum");return j(r,r.toJSON(t),t)}if("toJSON"in e){const r=e.toJSON(C(t));return e.canRef?j(e,r,t):r}return i("object",e,t)}function ie(e,t){const r=u.from(e.class),n=N(r.schema.getName()||e.getName(),t);if(e.hasGenerics){const{type:n,properties:s,additionalProperties:o,items:a,...c}=e.toJSON(t),u={...i("any",r.schema,{...t,..._(e),root:!1}),...c};if(u.title){const r=N(u.title,t);return t.schemas[r]=u,delete u.title,D(r,e,t)}return u}return t.schemas&&!t.schemas[n]&&(t.schemas[n]={},t.schemas[n]=i("any",r.schema,C({...t,root:!1}))),D(n,e,t)}function ae(t,r){const{generics:n}=r;if(n&&t.$ref&&n.has(t.$ref)){let s=n.get(t.$ref);if((0,e.isPrimitiveClass)(s))return{type:m(s)};if(s===Date)return{type:"string",format:"date-time"};if(s.toJSON)return s.toJSON({...r,generics:void 0});if(s===Object)return{type:"object"};if((0,e.isClass)(s)){const e={class:s};return 0===r.nestedGenerics.length?i("class",e,{...r,generics:void 0}):i("schema",u.from(e.class).schema,{...r,..._(r),root:!1})}}return t}function ce(t){const r=t.isStore?t:ne(t);return r.$inherited||(r.$inherited=(0,e.ancestorsOf)(r.target).reverse().reduce(((e,t)=>e.set(t,ne(t))),new Map)),r.$inherited}function ue(t,{target:r,...n}){const s=Array.from(ce(r).entries()).filter((([t])=>(0,e.classOf)(t)!==(0,e.classOf)(r)));if(s.length){const r=s.reduce(((t,[,r])=>(0,e.deepMerge)(t,i("schema",r.schema,n))),{});t=(0,e.deepMerge)(r,t)}return t}function pe(e,t){return e&&e.isClass?i("class",e,t):i("any",e,t)}function le(e,t){const r=e.name;if(t.$refs?.find((t=>t===e.target)))return D(r,e.schema,t);t.$refs=[...t.$refs||[],e.target];const n=e.toJSON(C(t));return j(e.schema,n,t)}function he(e,{ignore:t=[],...r}){return r=C(r),Array.from(e.entries()).reduce(((e,[n,s])=>(t.includes(n)||(e[n]=i("item",s,r)),e)),{})}function fe(e,t){let r=e?.$hooks?.alter("ignore",!1,[t]);return r||(!1!==t.groups?e?.$hooks?.alter("groups",!1,[t.groups]):r)}function de(t,r,n){if(!r?.isNullable)return t;let s=[].concat(t.type).filter(Boolean);switch(n.specType){default:case x.JSON:t.discriminator||(t.oneOf?function(e){return e.oneOf.find((e=>"null"===e.type))}(t)||t.oneOf.unshift({type:"null"}):t.type=(0,e.uniq)(["null",...s]));break;case x.OPENAPI:t.nullable=!0,t.oneOf||(s.length>1?(t.oneOf=s.map((e=>({type:e}))),delete t.type):t.type=s[0])}return t}function me(t,r){const{specType:n,operationIdFormatter:s,root:o,schemas:a,genericTypes:c,nestedGenerics:u,useAlias:p,genericLabels:l,...h}=r;return Object.entries(t).reduce(((e,[n,s])=>{if(!1!==r.withIgnoredProps&&!fe(s,h)){const o={...r,groups:t?.$forwardGroups||s?.$forwardGroups?r.groups:void 0};e[n]=i("item",s,o),e[n]=de(e[n],s,o)}return e}),(0,e.isArray)(t)?[]:{})}function ye(e,t,r){return e.map((e=>i("item",e,{...t,genericLabels:r.genericLabels})))}function ge(e,t,r){return e.isClass?i("class",e,t):i("any",e,{...t,genericLabels:r.genericLabels})}function Oe(e,t){return Object.entries(e).reduce(((e,[r,n])=>(e[r=t.get(r)||r]=n,e)),{})}function be(e,t,r){return!1!==r.groups?t?.$hooks?.alter("requiredGroups",e,[r.groups]):e}function ve(t,r,n){if(n.groups&&n.groups.includes("partial"))return t.discriminator?{...t,required:[t.discriminator.propertyName]}:t;let s=function(t,r,n){let s=t.required||[];return s=[...s,...r.$required],r.get("properties")&&(s=Object.entries(r.get("properties")).reduce(((e,[t,r])=>r&&void 0!==r.$selfRequired?r.$selfRequired?e.concat(t):e.filter((e=>e===t)):e),s)),be((0,e.uniq)(s),r,n)}(t,r,n);return s=(0,e.uniq)(s).reduce(function(e,t,r={}){const{useAlias:n}=r,s=Object.keys(e.properties||{});return(r,o)=>{const i=n&&t.alias.get(o)||o;if(s.includes(i)){const n=t.get("properties")[o],s=e.properties[i];return e.properties[i]=function(e,t){if(!t?.$allow.includes("")&&[].concat(t?.get("type")).includes("string")){const t=e?.minLength;if(void 0===t)return{...e,minLength:1}}return e}(s,n),r.concat(i)}return r}}(t,r,n),[]),t.discriminator&&s.push(t.discriminator.propertyName),s.length?{...t,required:s}:t}function Se(e,t,r){return e.oneOf&&!1!==r.groups&&(e={...e,oneOf:t.$hooks.alter("oneOf",e.oneOf,[r.groups])}),!(e.oneOf||e.allOf||e.anyOf)||e.items||e.properties||delete e.type,e}function Ee(e,t,r){return r.inlineEnums&&e.enum?.isJsonSchema&&(e.enum=e.enum.toJSON().enum),e.enum&&(e.type="object"===e.type||void 0===e.type?"string":e.type),e}r("any",oe),r("class",ie),r("generics",ae),r("inheritedClass",ue),r("item",pe),r("lazyRef",le),r("map",he),r("object",me),r("anyOf",ye),r("allOf",ye),r("oneOf",ye),r("properties",ge),r("items",ge),r("additionalProperties",ge),r("propertyNames",ge),r("contains",ge),r("dependencies",ge),r("patternProperties",ge),r("additionalItems",ge),r("not",ge),r("definitions",ge);const Te=["name","$required","$hooks","_nestedGenerics",x.OPENAPI,x.SWAGGER,x.JSON],Re=["const"];function Ae(t,r){const{useAlias:n=!0,schemas:s={}}=r;r={...r,useAlias:n,schemas:s};let o=[...t.keys()].filter((e=>!function(e,{specType:t=x.JSON,customKeys:r=!1}){return Te.includes(e)||e.startsWith("#")&&(!1===r||t!==x.JSON)||t!==x.JSON&&Re.includes(e)}(e,r))).reduce(((s,o)=>{let c=t.get(o);if("type"===(o=o.replace(/^#/,"")))return{...s,[o]:t.getJsonType()};if(function(t,r,n){return"examples"===t&&(0,e.isObject)(r)&&x.OPENAPI===n.specType}(o,c,r)&&(o="example",c=Object.values(c)[0]),c&&"object"==typeof c&&a(o)){if(c=i(o,c,r,t),function(e,t){return"object"==typeof t&&["items","properties","additionalProperties"].includes(e)&&0===Object.keys(t).length}(o,c))return s;(function(e,t,r){return"object"==typeof t&&r&&["properties","additionalProperties"].includes(e)})(o,c,n)&&(c=Oe(c,t.alias))}return{...s,[o]:c}}),{});return t.isClass&&(o=i("inheritedClass",o,{...r,root:!1,schemas:s,target:t.getComputedType()})),o=i("generics",o,{...r,root:!1,schemas:s}),t.has(r.specType)&&(o={...o,...t.get(r.specType).toJSON(r)}),o=ve(o,t,{...r,useAlias:n}),o=de(o,t,r),o=Se(o,t,r),o=Ee(o,0,r),o}r("schema",Ae);const we=["all","checkout","connect","copy","delete","get","head","lock","merge","mkactivity","mkcol","move","m-search","notify","options","param","patch","post","propfind","propatch","purge","put","report","search","subscribe","trace","unlock","unsuscribe"];var Pe;function Ce(e){return(...t)=>{const r=e(ne(...t),t);"function"==typeof r&&r(...t)}}function _e(...t){return Ce((r=>{r.store.set("childrenControllers",t),t.forEach((t=>{e.Store.from(t).set("parentController",r.token)}))}))}function xe(e,...t){return Ce((r=>{e=e||(0,k.snakeCase)(r.targetName),r.discriminatorAncestor&&r.schema.discriminatorValue(e,...t)}))}function Me(e,t){if(!e)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let n=!1;const s=(...s)=>{const o=u.from(...s);t&&(o.collectionType=t,o.schema.type(t)),o.type=e,o.itemSchema.type(e),o.schema.assign(r),o.isArray&&n&&(o.schema.set("contains",o.schema.get("items")),o.schema.delete("items"))};return s.MinItems=e=>(r.minItems=e,s),s.MaxItems=e=>(r.maxItems=e,s),s.MinProperties=e=>(r.minProperties=e,s),s.MaxProperties=e=>(r.maxProperties=e,s),s.Contains=()=>(n=!0,s),s.UniqueItems=(e=!0)=>(r.uniqueItems=e,s),s}function ke(e){return Me(e,Array)}function Ne(e){return Me(e,Map)}function De(e){return Me(e).Contains()}function je(e){return Ce((t=>{const r=t.parentSchema.get("#errorMessage")||{};t.parentSchema.customKey("errorMessage",{...r,...e})}))}function $e(t,r){const n={};return(...s)=>{const o=(0,e.useDecorators)(r(...s));return o.Error=r=>(n.message=r,(0,e.useDecorators)(o,n.message&&je({[t]:r}))),o}}!function(e){e.ALL="ALL",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.HEAD="HEAD",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.CUSTOM="CUSTOM"}(Pe||(Pe={}));const Ie=$e("maxItems",(e=>{if(e<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return Ce((t=>{t.schema.maxItems(e)}))})),Le=$e("maxProperties",(e=>{if(e<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return Ce((t=>{t.isCollection?t.schema.maxProperties(e):t.itemSchema.maxProperties(e)}))})),He=$e("minItems",(e=>{if(e<0)throw new Error("The value of minItems MUST be a non-negative integer.");return Ce((t=>{t.schema.minItems(e)}))})),Ge=$e("minProperties",(e=>{if(e<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return Ce((t=>{t.isCollection?t.schema.minProperties(e):t.itemSchema.minProperties(e)}))})),Ue=$e("uniqueItems",((e=!0)=>Ce((t=>{t.schema.uniqueItems(e)}))));function qe(e){return Ce(((t,r)=>{t.itemSchema.additionalProperties(e)}))}function Fe(...e){return Ce((t=>{t.itemSchema.allOf(e)}))}function Ke(t){return Ce((r=>{t&&((0,e.isClass)(t)&&(r.type=t),r.itemSchema.type(t))}))}function Be(...t){const r=t.find((t=>(0,e.isClass)(t)));return(0,e.useDecorators)(r&&Ke(r),Ce(((r,n)=>{r.schema.allow(...t),r.decoratorType===e.DecoratorTypes.PARAM&&(r.required=!0),r.decoratorType===e.DecoratorTypes.PROP&&r.parentSchema.addRequired(r.propertyName)})))}function Je(...e){return Ce((t=>{t.itemSchema.any(...e)}))}function Ve(...e){return Ce((t=>{t.itemSchema.anyOf(e)}))}function ze(e){return Ce((t=>{t.itemSchema.const(e)}))}function We(e,t){return Ce((r=>{r.itemSchema.customKey(e,t)}))}function Xe(e){return Ce((t=>{Object.entries(e).forEach((([e,r])=>{t.itemSchema.customKey(e,r)}))}))}function Qe(e){return Ce((t=>{t.itemSchema.default(e)}))}function Ye(t){return(0,e.useDecorators)(je({_:t}))}function Ze(t){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.PROP:case e.DecoratorTypes.CLASS:r.schema.description(t);break;case e.DecoratorTypes.PARAM:r.parameter.description(t);break;case e.DecoratorTypes.METHOD:r.operation?.description(t)}}))}function et(){return(0,e.useDecorators)(Ke(),Ce((e=>{e.discriminatorKey()})))}const tt=$e("enum",(function(e,...t){return Ce((r=>{r.itemSchema.enum(e,...t)}))}));function rt(...e){return Ce((t=>{t.schema.examples(e)}))}function nt(e){return Ce((t=>{t.parameter.examples(e)}))}const st=$e("maximum",((e,t=!1)=>Ce((r=>{t?r.itemSchema.exclusiveMaximum(e):r.itemSchema.maximum(e)})))),ot=st,it=$e("exclusiveMaximum",((e,t=!0)=>st(e,t))),at=$e("minimum",((e,t=!1)=>Ce((r=>{t?r.itemSchema.exclusiveMinimum(e):r.itemSchema.minimum(e)})))),ct=at,ut=$e("exclusiveMinimum",((e,t=!0)=>at(e,t)));var pt;!function(e){e.DATE_TIME="date-time",e.DATE="date",e.TIME="time",e.EMAIL="email",e.HOSTNAME="hostname",e.IPV4="ipv4",e.IPV6="ipv6",e.URI="uri",e.URL="url",e.URI_REF="uri-reference",e.URI_TEMPLATE="uri-template",e.JSON_POINTER="json-pointer",e.RELATIVE_JSON_POINTER="relative-json-pointer",e.UUID="uuid",e.REGEX="regex"}(pt||(pt={}));const lt=$e("format",(e=>Ce((t=>{t.itemSchema.format(e)})))),ht=$e("format",(()=>lt(pt.EMAIL))),ft=$e("format",(()=>lt(pt.DATE_TIME))),dt=$e("format",(()=>lt(pt.DATE))),mt=$e("format",(()=>lt(pt.TIME))),yt=$e("format",(()=>lt(pt.URI))),gt=$e("format",(()=>lt(pt.URL)));function Ot(e=!0){return Ce((t=>{t.schema.$forwardGroups=e}))}var bt=s(870),vt=s.n(bt);function St(e,t){t=[].concat(t),e=[].concat(e);let r=new Set,n=new Set,s=new Set,o=0,i=e=>{s.add(e.output)};for(let s=0;s<t.length;s++){let a=vt()(String(t[s]),{onResult:i},!0),c=a.state.negated||a.state.negatedExtglob;c&&o++;for(let t of e){let e=a(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),n.add(e.output)))}}return!!(o===t.length?[...s]:[...n]).filter((e=>!r.has(e))).length}function Et(e,t=[]){const r=e.filter((e=>e.startsWith("!"))).map((e=>e.replace("!",""))),n=e.filter((e=>!e.startsWith("!")));return!!(r.length&&t.length&&St(r,t))||!!n.length&&!St(e.filter((e=>!e.startsWith("!"))),t)}function Tt(...t){return Ce((r=>{switch(r.decoratorType){case e.DecoratorTypes.CLASS:!function(e,t){const r=Object.entries(e[0]);t.children.forEach((e=>{Tt(...r.filter((([,t])=>t.includes(e.propertyName))).map((([e])=>e)))(e.target,e.propertyKey)}))}(t,r);break;case e.DecoratorTypes.PROP:r.schema.$hooks.on("groups",((e,r)=>!(e||!Et(t,r))||e));break;case e.DecoratorTypes.PARAM:let n="";2==t.length&&(0,e.isArray)(t[1])&&(n=t[0],t=t[1]),r.parameter.groups=t,r.parameter.groupsName=n}}))}function Rt(){return(0,e.StoreSet)("hidden",!0)}const At=(e,t)=>!0!==t.mongoose;function wt(e=At){return Ce((t=>{t.schema.ignore(e)}))}function Pt(){return Ce((e=>{e.itemSchema.type("integer")}))}const Ct=$e("maxLength",(e=>{if(e<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return Ce((t=>{t.itemSchema.maxLength(e)}))})),_t=$e("minLength",(e=>{if(e<0)throw new Error("The value of minLength MUST be a non-negative integer.");return Ce((t=>{t.itemSchema.minLength(e)}))})),xt=$e("multipleOf",(e=>{if(e<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return Ce((t=>{t.itemSchema.multipleOf(e)}))}));function Mt(t){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.CLASS:r.schema.name(t);break;case e.DecoratorTypes.PARAM:r.parameter.name(t);break;default:r.parent.schema.addAlias(n[1],t)}}))}function kt(t,...r){return r=[t,...r],(0,e.useDecorators)(1===r.length&&Ke(r[0]),Je(null,...r))}function Nt(...e){return Ce((t=>{t.itemSchema.oneOf(e),t.type=Object}))}function Dt(){return Ce((t=>{switch(t.decoratorType){case e.DecoratorTypes.PARAM:t.required=!1;break;case e.DecoratorTypes.PROP:t.parentSchema.removeRequired(t.propertyName)}}))}const jt=$e("pattern",(e=>Ce((t=>{t.itemSchema.pattern(e)}))));function $t(e=!0){return Ce((t=>{t.itemSchema.readOnly(e)}))}function It(e){return Ce((t=>{Object.entries(e).forEach((([e,r])=>{t.schema.set(e,r)}))}))}function Lt(e,t){return Ce((r=>{r.schema.set(e,t)}))}function Ht(e,...t){return It({properties:{...t.reduce(((t,r)=>({...t,[r]:e})),{})}})}const Gt=$e("required",((e=!0,...t)=>e?Be(...t):Dt()));function Ut(...e){return Ce((t=>{t.parent.schema.$hooks.on("requiredGroups",((r,n)=>Et(e,n)?r.filter((e=>e!==t.propertyKey)):r))}))}function qt(e){return Ce((t=>{t.schema.title(e)}))}function Ft(t){return Ce((()=>(0,e.useDecorators)(je({type:t}))))}function Kt(e=!0){return Ce((t=>{t.itemSchema.writeOnly(e)}))}function Bt(t=Object){if((0,e.isClass)(t)){const{schema:e}=ne(t);return e.properties=function(e){return Object.entries(e).forEach((([e,r])=>{ne(t.prototype,e).schema.assign(r)})),this},e}return E.from({type:t})}function Jt(){return Bt(Number)}function Vt(){return Bt(Number).integer()}function zt(){return Bt(String)}function Wt(){return Bt(Boolean)}function Xt(){return Bt(Date).format(pt.DATE)}function Qt(){return Bt(Date).format(pt.DATE_TIME)}function Yt(){return Bt(Date).format(pt.TIME)}function Zt(){return Bt(String).format(pt.EMAIL)}function er(){return Bt(String).format(pt.URI)}function tr(){return Bt(String).format(pt.URL)}function rr(){return Bt(Array)}function nr(){return Bt(Map).unknown(!0)}function sr(){return Bt(Array).uniqueItems(!0)}function or(e={}){return Bt(Object).properties(e)}function ir(...e){return Bt().any(...e)}function ar(...e){return Bt().anyOf(e)}function cr(...e){return Bt().oneOf(e)}function ur(...e){return Bt().allOf(e)}function pr(e){try{if(e())return u.from(e()).schema}catch(e){}return new se(e)}function lr(e){const t=zt().enum(e);return h.set(e,t),t}function hr(...t){const r=[t.map((t=>function(t){return(0,e.isObject)(t)&&!("toJSON"in t)}(t)?zt().enum(Object.values(t)):t))],n=(...e)=>{u.from(...e).nestedGenerics=r};return n.Nested=(...e)=>(r.push(e),n),n}function fr(...e){return t=>{u.from(t).schema.genericLabels=e}}function dr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.produces(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],dr(...t));break;default:throw new e.UnsupportedDecoratorType(dr,n)}}))}function mr(...t){return(0,e.useDecorators)(dr(...t),(0,e.StoreSet)("acceptMimes",t))}function yr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.consumes(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],yr(...t));break;default:throw new e.UnsupportedDecoratorType(yr,n)}}))}class gr extends Map{methods;decoratorType;entity;actions=[];constructor(e={}){super(),Object.entries(e).forEach((([e,t])=>{this.set(e,t)}))}addAction(e){return this.actions.push(e),this}build(){const e=(...t)=>this.bind(t,e),t=t=>{return r=(...e)=>{t in this?this[t](...e):this.set(t,e[0])},(...t)=>(r(...t),e);var r};return this.methods.forEach((r=>{e[(0,k.pascalCase)(r)]=t(r)})),e}toObject(){return[...this.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}getMergedKey(t,r){let n=this.get(t)||r;if(n)return this.decoratorType===e.DecoratorTypes.CLASS&&(n={...n,...r||{}}),{...r||{},...n}}bind(e,t){this.entity=u.from(...e),this.beforeInit(),this.onInit(e,t),this.afterInit()}onInit(e,t){this.forEach(((e,t)=>{this.onMapKey(t,e)}))}onMapKey(e,t){this.entity.set(e,t)}runActions(){return this.actions.forEach((e=>{e(this)})),this}beforeInit(){}afterInit(){}}const Or=new Map;function br(e,t){Or.set(e,t)}function vr(e){return Or.get(e)}function Sr(t){return t.map((t=>function(t){return(0,e.isObject)(t)&&!("toJSON"in t)}(t)?zt().enum(Object.values(t)):t))}class Er extends gr{methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location"];constructor({status:e,model:t}){super(),this.model(t),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&J(e)&&!this.get("description")&&(this.set("description",J(e)),this.get("model")||this.model(vr(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...Q(e)}),this}header(e,t){return this.headers({[e]:t})}location(e,t={}){return this.headers({Location:{...t,value:e}}),this}groups(...t){return 2===t.length&&(0,e.isArray)(t[1])?(this.set("groupsName",t[0]),this.set("groups",t[1])):this.set("groups",t),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const t=this.get("model");return this.checkPrimitive(t),this.checkCollection(t),this.addAction((t=>{this.get("schema").nestedGenerics.push(Sr(e))})),this}of(...t){const r=this.get("model");return this.checkPrimitive(r),this.addAction((()=>{const n=this.get("schema");(0,e.isCollection)(r)?n?.itemSchema({type:t[0]}):n?.nestedGenerics.push(Sr(t))})),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction((()=>{this.get("schema").assign(e)})),this}examples(t){return this.set("examples",(0,e.isString)(t)?[t]:t),this}title(e){return this.schema({title:e})}checkPrimitive(t){if((0,e.isPrimitiveOrPrimitiveClass)(t))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(t){if((0,e.isCollection)(t))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const t=this.get("model");let r=this.get("contentType");return!t||(0,e.isPlainObject)(t)||(0,e.isPrimitiveOrPrimitiveClass)(t)||(r=r||"application/json"),r}getStatus(){return this.get("status")||"default"}onInit(t,r){switch((0,e.decoratorTypeOf)(t)){case e.DecoratorTypes.METHOD:this.entity=u.from(...t),this.entity.operation&&this.map();break;case e.DecoratorTypes.CLASS:this.decoratorType=e.DecoratorTypes.CLASS,(0,e.decorateMethodsOf)(t[0],r)}}map(){const t=this.get("model"),{entity:r,decoratorType:n}=this,s=this.entity.operation,o=this.getStatus(),i=s.ensureResponseOf(o),a=this.getContentType();let{description:c=i.get("description")}=this.toObject();c&&(c=n===e.DecoratorTypes.CLASS&&i.get("description")||c,i.description(c));const u=this.getMergedKey("headers",i.get("headers"));return u&&i.headers(u),this.mapMedia(i),(V(this.get("status"))||"default"===o)&&t&&(r.type=t),a&&s.addProduce(a),this.runActions()}mapMedia(t){const r=this.getContentType(),n=this.get("model"),s=t.getMedia(r||"*/*"),o=s.get("schema")||new E({type:n}),i=this.get("groups"),a=this.get("groupsName"),c=this.get("allowedGroups"),u=this.entity.operation;if(n&&((0,e.isArray)(n)?o.oneOf(n.map((e=>({type:e})))):o.type(n)),this.set("schema",o),s.schema(o),s.groups=i,s.groupsName=a,c){s.allowedGroups=c;const e=new H;e.in("query").name("includes"),e.schema(E.from({type:"array",items:{type:"string",enum:[...c]}})),u.addParameter(-1,e)}const p=this.get("examples");return p&&s.examples(p),s}manyOf(t,r){const n=this.get("model");return this.addAction((()=>{const s=this.get("schema");(0,e.isCollection)(n)?(s.type(n||Object),s.itemSchema().set(t,r)):s.set(t,r)})),this}}function Tr(e,t){return new Er({status:e,model:t}).build()}function Rr(e){return Tr().ContentType(e)}function Ar(t=!0){return Ce(((r,n)=>{switch((0,e.decoratorTypeOf)(n)){case e.DecoratorTypes.METHOD:r.operation.deprecated(t);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],Ar(t));break;case e.DecoratorTypes.PARAM:r.parameter.set("deprecated",t);break;case e.DecoratorTypes.PROP:r.schema.set("deprecated",t);break;default:throw new e.UnsupportedDecoratorType(Ar,n)}}))}function wr(e,t){return void 0!==t&&(e={[e]:t}),Tr().Headers(e)}function Pr(t){const r=new H,n={},s=(o,i,a)=>{const c=u.from(o,i,a);switch(c.decoratorType){case e.DecoratorTypes.PARAM:c.parameter.in(t);break;case e.DecoratorTypes.METHOD:r.in(t),c.operation.addParameter(-1,r),r.schema(E.from(n));break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(o,s);break;default:throw new e.UnsupportedDecoratorType(Pr,[o,i,a])}};return s.Type=e=>(n.type=e,s),s.Name=e=>(r.name(e),s),s.Description=e=>(r.description(e),s),s.Required=(e=!0)=>(r.required(e),s),s.Pattern=e=>s.Schema({pattern:e.toString()}),s.Schema=e=>(Object.assign(n,e),s),s}function Cr(t){return(...r)=>{const[n,s,o]=r,i=e.Metadata.getParamTypes(n,s)[o]===Array,a=[t="object"==typeof t?void 0:t,!i&&"0"].filter(Boolean).join(".");(0,e.useDecorators)(Pr(M.FILES),Mt(a),(0,e.useMethodDecorators)(Tr(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),yr("multipart/form-data")))(...r)}}function _r(e,t){return Tr().Location(e,t)}function xr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(xr,n);r.operation.operationId(t)}))}function Mr(t,r="/"){return Ce(((n,s)=>{if(n.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(Mr,s);n.operation.addOperationPath(t.toUpperCase(),r)}))}function kr(){return Tt("partial")}function Nr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.CLASS)throw new e.UnsupportedDecoratorType(Nr,n);r.path=t}))}function Dr(...t){const{status:r,url:n,meta:s}=t.reduce(((t,r)=>(0,e.isNumber)(r)?(t.status=r,t):(0,e.isString)(r)?(t.url=r,t):(t.meta=r,t)),{status:302,url:"",meta:{}});return(0,e.useDecorators)(Tr(r).Location(n,s),Ce((e=>{e.operation?.setRedirection(r)})))}function jr(e){let t,r;const n=e.filter((e=>"string"==typeof e&&we.includes(e.toLowerCase())?(t=e.toLocaleUpperCase(),!1):"string"==typeof e||e instanceof RegExp?(r=e||"/",!1):!!e));return{path:r,method:t,use:n}}class $r extends gr{methods=["name","description","summary","method","id","use","useAfter","useBefore"];beforeInit(){const e=this.get("path"),t=Pe[this.get("method")]||Pe.CUSTOM;e&&this.entity.operation.addOperationPath(t,e)}onMapKey(e,t){switch(e){case"name":case"id":return void this.entity.operation.operationId(t);case"summary":return void this.entity.operation.summary(t);case"description":return void this.entity.operation.description(t);case"use":return void this.entity.use(t);case"useAfter":return void this.entity.after(t);case"useBefore":return void this.entity.before(t)}return super.onMapKey(e,t)}}function Ir(...e){const t=jr(e);return new $r(t).build()}function Lr(e="/",...t){return Ir(...[Pe.ALL,e].concat(t))}function Hr(e="/",...t){return Ir(...[Pe.GET,e].concat(t))}function Gr(e="/",...t){return Ir(...[Pe.POST,e].concat(t))}function Ur(e="/",...t){return Ir(...[Pe.PUT,e].concat(t))}function qr(e="/",...t){return Ir(...[Pe.DELETE,e].concat(t))}function Fr(e="/",...t){return Ir(...[Pe.HEAD,e].concat(t))}function Kr(e="/",...t){return Ir(...[Pe.PATCH,e].concat(t))}function Br(e="/",...t){return Ir(...[Pe.OPTIONS,e].concat(t))}function Jr(t,...r){return Ce(((n,s)=>{switch(n.decoratorType){case e.DecoratorTypes.METHOD:n.operation.addSecurityScopes(t,r);break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(s[0],Jr(t,...r));break;default:throw new e.UnsupportedDecoratorType(Jr,s)}}))}function Vr(e,t){return Tr(e,t)}function zr(t){return Ce(((r,n)=>{if(r.decoratorType!==e.DecoratorTypes.METHOD)throw new e.UnsupportedDecoratorType(zr,n);r.operation.summary(t)}))}function Wr(...t){return Ce(((r,n)=>{switch(r.decoratorType){case e.DecoratorTypes.METHOD:r.operation.addTags(function(e){return e.map((e=>"string"==typeof e?{name:e}:e))}(t));break;case e.DecoratorTypes.CLASS:(0,e.decorateMethodsOf)(n[0],Wr(...t));break;default:throw new e.UnsupportedDecoratorType(Wr,n)}}))}function Xr(t,r){return(0,e.StoreSet)("view",{path:t,options:r})}class Qr extends Map{setOperationPath(e){if(e.method!==Pe.CUSTOM){const t=this.getKey(e.method,e.path);this.set(t,e)}}getKey=(e,t)=>`${e}-${t}`}function Yr(e,t){if(e instanceof RegExp||t instanceof RegExp){if(!e)return t;if(!t)return e;const r=e instanceof RegExp?e:new RegExp(e,"gi"),n=t instanceof RegExp?t:new RegExp(t,"gi");return new RegExp(r.source+n.source,(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":""))}e&&t&&e.endsWith("/")&&t.startsWith("/")&&(t=t.slice(1));const r=(e||"")+(t||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class Zr{token;endpoint;operationPath;basePath;paramsTypes;constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){return this.operationPath?.path}get fullPath(){return Yr(this.basePath,this.path)}get method(){return this.operationPath?.method||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}function en(e){return e.split("/").filter(Boolean).join("/")}function tn(e,t){return e.map((e=>t.parameters.find((t=>t.in===e.in&&t.name===e.name))||e)).concat(...t.parameters.filter((e=>"path"!==e.in)))}function rn(e){const t=e.isStore?e:ne(e);if(!t.$operations){const e=new Qr;t.$operations=new Map,ce(t).forEach((e=>{e.children.forEach((e=>{e instanceof te&&!t.$operations.has(e.propertyKey)&&t.$operations.set(e.propertyKey,e)}))})),t.$operations.forEach((t=>{t.operation.operationPaths.forEach((t=>{e.setOperationPath(t)}))})),e.clear()}return t.$operations}function nn(e,t=""){t instanceof RegExp&&(t=t.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],n=[];let s=!1,o="";return function(e){let t=0;return e.split("").filter((e=>{"("===e&&t++;const r=0===t;return")"===e&&t--,r})).join("").split("/").filter((e=>!!e))}(`${e}${t}`).map((e=>{const t=e.replace(":","").replace("?","");if(e.includes(":")){const i=e.includes("?");i&&!s&&(s=!0,n.push({path:o,parameters:[].concat(r)}));const{prefix:a,name:c,postfix:u}=function(e){const[t,r]=e.split("="),n=(r||t).split(".");return{prefix:r&&t?`${t}=`:"",name:n.splice(0,1)[0],postfix:n.length?`.${n.join(".")}`:""}}(t);o+=`/${a}{${c}}${u}`,r.push({in:"path",name:c,type:"string",required:!0}),i&&s&&n.push({path:o,parameters:[].concat(r)})}else o+=`/${e}`})),n.length?n:[{path:o,parameters:[].concat(r)}]}function sn(e,t,{rootPath:r,specType:n,operationId:s,defaultTags:o,tags:i,path:a,method:c}){const u=nn(r,a).map((({path:e,parameters:t})=>(e=e||"/",n===x.OPENAPI&&(t=t.map((({type:e,...t})=>({...t,schema:{type:e}})))),{path:e,parameters:t})));return u.reduce(((e,{path:r,parameters:n})=>{n=tn(n,t),r=r||"/";const a=t.tags?.length?t.tags:[o];return e.paths[r]={...e.paths[r],[c.toLowerCase()]:{operationId:t.operationId||s(r),...t,tags:a.map((({name:e})=>e)),parameters:n}},i.push(...a),e}),e)}function on(e=""){const t=new Map;return(r,n,s="")=>{const o=((t,r)=>{const n=(e||"%c.%m").replace(/%c/,t).replace(/%m/,r);return""===e?(0,k.camelCase)(n):n})(r,n),i=r+n;if(!t.has(i))return t.set(i,0),o;const a=s.match(/{(\w+)}/gi);if(a){const e=r+n+a[0];if(!t.has(e))return t.set(e,0),(0,k.camelCase)(`${o} By ${a}`)}const c=t.get(i)+1;return t.set(i,c),`${o}_${c}`}}const an=(0,e.mergeReducerBuilder)(((e,t)=>e.type&&e.type===t.type||e.$ref&&e.$ref===t.$ref)),cn=(0,e.mergeReducerBuilder)(((e,t)=>e.in===t.in&&e.name===t.name)),un=(0,e.mergeReducerBuilder)(((e,t)=>!!Object.keys(t).find((t=>!!e[t])))),pn=(0,e.mergeReducerBuilder)(((e,t)=>e.name===t.name)),ln={security:un,parameters:cn,oneOf:an,anyOf:an,allOf:an,tags:pn};function hn(t,r){return(0,e.deepMerge)(t,r,{reducers:ln,cleanUndefinedProps:!0})}const fn=new Map;function dn(t,r={}){if(r={...r,operationIdFormatter:r.operationIdFormatter||on(r.operationIdPattern),root:!1},(0,e.isArray)(t)){let e={};return r={...r,specType:x.OPENAPI,paths:{},tags:[],schemas:{},append(t){e=hn(e,t)}},t.forEach((({token:e,...t})=>{const n=dn(e,{...r,...t});r.append(n)})),e}return function(e,t,r){fn.has(e)||fn.set(e,new Map);const n=fn.get(e),s=JSON.stringify(t);return n.has(s)||n.set(s,r()),n.get(s)}(t,r,(()=>function(t,r){const n=ne(t),{schemas:s={},paths:o={},rootPath:i="/",tags:a=[]}=r,c=x.OPENAPI,u=n.path,p=(0,e.cleanObject)({name:n.schema.getName(),description:n.schema.get("description")}),l={paths:o};return rn(t).forEach((e=>{if(e.store.get("hidden"))return;const t=e.operation.toJSON({...r,specType:c,schemas:s});e.operation.operationPaths.forEach((({path:n,method:s})=>{s&&sn(l,t,{rootPath:en(i+u),path:n,method:s,defaultTags:p,tags:a,specType:c,operationId:t=>r.operationIdFormatter(e.parent.schema.get("name")||e.parent.targetName,e.propertyName,t)})}))})),l.tags=(0,e.uniqBy)(a,"name"),Object.keys(s).length&&(l.components={schemas:s}),l}(t,r)))}function mn(e){return e.startsWith("3.")?x.OPENAPI:x.SWAGGER}function yn(e){return"openapi"in e?x.OPENAPI:x.SWAGGER}function gn(t){const{title:r,description:n,version:s,termsOfService:o,contact:i,license:a}=t;return(0,e.cleanObject)({version:s,title:r,description:n,termsOfService:o,contact:i,license:a})}function On(t,{version:r,specVersion:n,acceptMimes:s=["application/json"]}){const{paths:o,security:i,tags:a,host:c,basePath:u,schemes:p,consumes:l=[],produces:h=["application/json"],definitions:f,parameters:d,responses:m,securityDefinitions:y,externalDocs:g}=t;return{swagger:n,consumes:(0,e.uniq)([...s,...l]),produces:(0,e.uniq)([...h]),info:gn((0,e.getValue)(t,"info",{})),paths:o,host:c,basePath:u,schemes:p,definitions:f,parameters:d,responses:m,security:i,securityDefinitions:y,tags:a,externalDocs:g}}function bn(t,{specVersion:r}){const{servers:n,paths:s,components:o,security:i,tags:a,externalDocs:c}=t;return{openapi:r,info:gn((0,e.getValue)(t,"info",{})),servers:n,paths:s,components:o,security:i,tags:a,externalDocs:c}}function vn(t,{fileSpec:r,acceptMimes:n,specVersion:s,version:o}){const i={specVersion:s=s||(0,e.getValue)(t,"openapi",(0,e.getValue)(t,"swagger","2.0")),acceptMimes:n};switch(mn(s)){case x.OPENAPI:t=bn(t,i),r=r?bn(r,i):r;break;default:case x.SWAGGER:t=On(t,i),r=r?On(r,i):r}return t=hn(t,r),(0,e.setValue)(t,"info.title",(0,e.getValue)(t,"info.title","Api documentation")),(0,e.setValue)(t,"info.version",(0,e.getValue)(t,"info.version",o)),t}const Sn=["get","put","post","delete","options","head","patch","trace"],En=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],Tn=["type","items"],Rn=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,An={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function wn(e){if(Array.isArray(e))e.forEach(wn);else if("object"==typeof e)for(let t in e)"$ref"===t?e.$ref=e.$ref.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/"):wn(e[t])}function Pn(e){return new RegExp(Rn,"i").test(e)}function Cn(e){const t=Object.keys(An).map((e=>An[e]));return Object.keys(e).filter((e=>t.indexOf(e)>-1||Pn(e)))}function _n(e){function t(e){const{scheme:t,type:r,name:n,bearerFormat:s,flows:o,...i}=e;switch(r){case"http":if("basic"===t)return{...i,type:t};if("bearer"===t)return{...i,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const e=Object.keys(o)[0],n=o[e];let s=e;return"clientCredentials"===s?s="application":"authorizationCode"===s&&(s="accessCode"),{type:r,flow:s,authorizationUrl:n.authorizationUrl,tokenUrl:n.tokenUrl,scopes:n.scopes}}}return Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:t(n)})),{})}function xn(e){let t=e.url;const r=e.variables||{};for(const e in r){const n=r[e]||{};if(n.default){const r=RegExp(`{${e}}`,"g");t=t.replace(r,n.default)}}const n=new URL(t);return{host:n.host?n.host:void 0,basePath:n.pathname,schemes:null!==n.protocol?[n.protocol.substring(0,n.protocol.length-1)]:void 0}}class Mn{spec;constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?xn(e):{}}resolveReference(e,t,r){if(!t||!t.$ref)return t;const n=t.$ref;if(n.startsWith("#")){const t=n.split("/").map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~")));t.shift();let s=e;return t.forEach((e=>{s=s[e]})),r?JSON.parse(JSON.stringify(s)):s}}convert(){const t={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,wn(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],(0,e.cleanObject)({...t,...this.spec})}convertOperations(e,t){return Object.entries(e).reduce(((e,[r,n])=>{const s=e[r]=this.resolveReference({...t,paths:e},n,!0);return this.convertParameters(s),Object.keys(s).forEach((r=>{if(Sn.indexOf(r)>=0){const n=s[r]=this.resolveReference({...t,paths:e},s[r],!0);this.convertOperationParameters(n),this.convertResponses(n)}})),e}),e)}convertOperationParameters(e){let t,r,n,s;if(e.parameters=e.parameters||[],e.requestBody){let o=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const t=Cn(e.requestBody.content)[0],r={content:{}},n=e.requestBody.content[t];n&&n.schema&&n.schema.$ref&&!n.schema.$ref.startsWith("#")&&(o=this.resolveReference(this.spec,n.schema,!0),r.content[`${t}`]={schema:o},o=r)}if(o.name="body",t=o.content,t&&Object.keys(t).length){if(n=Object.keys(t).filter((e=>e.indexOf("/")>0)),s=n.filter((e=>e.indexOf("*")<0)),r=Cn(t)[0],delete o.content,[An.APPLICATION_X_WWW_URLENCODED,An.MULTIPART_FORM_DATA].includes(r))if(e.consumes=s,o.in="formData",o.schema=t[r].schema,o.schema=this.resolveReference(this.spec,o.schema,!0),"object"===o.schema.type&&o.schema.properties){const t=o.schema.required||[];Object.keys(o.schema.properties).forEach((r=>{const n=o.schema.properties[r];if(!n.readOnly){const s={name:r,in:"formData",schema:n};t.indexOf(r)>=0&&(s.required=!0),e.parameters?.push(s)}}))}else e.parameters.push(o);else r?(e.consumes=s,o.in="body",o.schema=t[r].schema,e.parameters.push(o)):n&&(e.consumes=s||["application/octet-stream"],o.in="body",o.name=o.name||"file",delete o.type,o.schema=t[n[0]].schema||{type:"string",format:"binary"},e.parameters.push(o));o.schema&&this.convertSchema(o.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){void 0!==e.parameters&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach(((t,r)=>{if("body"!==(t=e.parameters[r]=this.resolveReference(this.spec,t,!1)).in){if(this.copySchemaProperties(t,En),this.copySchemaProperties(t,Tn),this.copySchemaXProperties(t),!t.description){const e=this.resolveReference(this.spec,t.schema,!1);e&&e.description&&(t.description=e.description)}void 0!==t.example&&(t["x-example"]=t.example),delete t.schema,delete t.allowReserved,delete t.example}if("array"===t.type)switch(t.style||("query"===t.in||"cookie"===t.in?"form":"simple")){case"matrix":t.collectionFormat=t.explode?void 0:"csv";break;case"label":t.collectionFormat=void 0;break;case"simple":t.collectionFormat="csv";break;case"spaceDelimited":t.collectionFormat="ssv";break;case"pipeDelimited":t.collectionFormat="pipes";break;case"deepOpbject":t.collectionFormat="multi";break;case"form":t.collectionFormat=!1===t.explode?"csv":"multi"}delete t.style,delete t.explode})))}copySchemaProperties(e,t){let r=this.resolveReference(this.spec,e.schema,!0);r&&t.forEach((t=>{const n=r[t];"additionalProperties"===t&&"boolean"==typeof n||void 0!==n&&(e[t]=n)}))}copySchemaXProperties(e){let t=this.resolveReference(this.spec,e.schema,!0);t&&Object.keys(t).forEach((r=>{Reflect.hasOwnProperty.call(t,r)&&!Reflect.hasOwnProperty.call(e,r)&&r.startsWith("x-")&&(e[r]=t[r])}))}convertResponses(e){Object.keys(e.responses||{}).forEach((t=>{const r=e.responses[t]=this.resolveReference(this.spec,e.responses[t],!0);if(r.content){let t=null,n=null;if(Object.keys(r.content).forEach((s=>{const o=s.indexOf("*")<0?s:"application/octet-stream";e.produces?e.produces.indexOf(o)<0&&e.produces.push(o):e.produces=[o];const i=r.content[s];t=t||i.schema,!n&&Pn(o)&&(n=i.schema),i.example&&(r.examples=r.examples||{},r.examples[o]=i.example)})),t){r.schema=n||t;const e=this.resolveReference(this.spec,r.schema,!0);e&&r.schema.$ref&&!r.schema.$ref.startsWith("#")&&(r.schema=e),this.convertSchema(r.schema,"response")}}Object.keys(r.headers||{}).forEach((e=>{const t=this.resolveReference(this.spec,r.headers[e],!0);t.schema&&(t.type=t.schema.type,t.format=t.schema.format,delete t.schema),r.headers[e]=t})),delete r.content}))}convertSchema(e,t){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const r in e.allOf)this.convertSchema(e.allOf[r],t);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach((r=>{!0===e.properties[r].writeOnly&&"response"===t?delete e.properties[r]:(this.convertSchema(e.properties[r],t),delete e.properties[r].writeOnly)}));break;case"array":e.items&&this.convertSchema(e.items,t)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),void 0!==e.deprecated&&(void 0===e["x-deprecated"]&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach((e=>{this.convertSchema(this.spec.definitions[e])})),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach((t=>{const r=e[t];if("string"!=typeof r)return void console.warn(`Ignoring ${r} for ${t} in discriminator.mapping.`);let n;if(/^[a-zA-Z0-9._-]+$/.test(r))try{n=this.resolveReference(this.spec,{$ref:`#/components/schemas/${r}`},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} as schema name in discriminator.mapping: ${e}`)}if(!n)try{n=this.resolveReference(this.spec,{$ref:r},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} in discriminator.mapping: ${e}`)}n?(n["x-discriminator-value"]=t,n["x-ms-discriminator-value"]=t):console.warn(`Unable to resolve ${r} for ${t} in discriminator.mapping.`)}))}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=_n(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function kn(e){return new Mn(e).convert()}async function Nn({tokens:t,...r}){const{version:n="1.0.0",acceptMimes:s,specPath:o,specVersion:i}=r,a=vn((0,e.getValue)(r,"spec",{}),{fileSpec:{},version:n,specVersion:i,acceptMimes:s}),c=yn(a),u=hn(a,dn(t,r));return c===x.SWAGGER?kn(u):u}const Dn="$cache:schemes";function jn(e,t={}){const r=ne(e),n=t.specType||x.JSON;return t={endpoint:!0,groups:[],inlineEnums:n===x.JSON,...t,specType:n,schemas:{}},"parameter"===r.decoratorType&&(t={...t,genericTypes:r.nestedGenerics[0],nestedGenerics:r.nestedGenerics,groups:r.parameter?.groups}),function(e,t){const r=e.store.get(Dn)||new Map,n=function(e){return JSON.stringify(e)}(t);if(!r.has(n)){const s=i("schema",e.schema,t);Object.keys(t.schemas).length&&(s.definitions=t.schemas),r.set(n,s)}return e.store.set(Dn,r),r.get(n)}(r,t)}function $n(e,t={}){const r=e.isStore?e:ne(e),n=Yr(t.basePath,r.path);let s=[];return t.withChildren&&(s=r.get("childrenControllers",[]).reduce(((e,r)=>e.concat($n(r,{...t,basePath:n}))),s)),[...rn(e).values()].reduce(((t,r)=>{const{operation:s}=r;return s&&s.operationPaths.forEach((s=>{t.push(new Zr({basePath:n,token:e,endpoint:r,operationPath:s}))})),t}),s)}function In(e){const t=e.isStore?e:ne(e);if(!t.$properties){const e=ce(t);t.$properties=new Map,e.forEach((e=>{e.children.forEach((e=>{t.$properties.has(e.propertyKey)||t.$properties.set(e.propertyKey,e)}))}))}return t.$properties}function Ln(e,t={}){const r=In(e),n=new Map;return r.forEach(((e,r)=>{!t.withIgnoredProps&&fe(e.itemSchema,t)||n.set(r,e)})),n}})(),o})(),e.exports=n(r(886),r(122))}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Configuration:()=>p,Constant:()=>l,Container:()=>D,Controller:()=>S,ControllerProvider:()=>j,DIConfiguration:()=>U,DI_PARAMS:()=>t,DI_PARAM_OPTIONS:()=>s,GlobalProviderRegistry:()=>y,GlobalProviders:()=>g,INJECTABLE_PROP:()=>e,Inject:()=>u,Injectable:()=>E,InjectablePropertyType:()=>o,InjectionError:()=>H,InjectorService:()=>z,Intercept:()=>T,Interceptor:()=>R,InvalidPropertyTokenError:()=>a,LOGGER:()=>W,LazyInject:()=>A,LocalsContainer:()=>$,Module:()=>P,OptionalLazyInject:()=>w,Opts:()=>_,OverrideProvider:()=>x,Provider:()=>m,ProviderScope:()=>h,ProviderType:()=>f,Scope:()=>C,Service:()=>M,UndefinedTokenError:()=>G,UseOpts:()=>k,Value:()=>N,colors:()=>L,createContainer:()=>q,getConfiguration:()=>Q,getTokens:()=>K,injectProperty:()=>c,mergeMount:()=>X,registerController:()=>v,registerProvider:()=>O,registerValue:()=>b,resolveControllers:()=>J});const e="DI:INJECTABLE_PROP",t="DI:PARAMS",s="DI:PARAM:OPTIONS";var o,i=r(886);class a extends Error{name="INVALID_TOKEN_ERROR";constructor(e,t){super(`Object isn't a valid token. Please check the token set on ${(0,i.nameOf)((0,i.classOf)(e))}.${t}.\n- Check that it is not a circular reference.\n- Check that the token (class or symbol) exists`)}}function c(t,r,n){i.Store.from(t).merge(e,{[r]:{bindingType:i.DecoratorTypes.PROP,propertyKey:r,...n}})}function u(e,t=(e=>e)){return(r,n,o)=>{switch((0,i.decoratorTypeOf)([r,n,o])){case i.DecoratorTypes.PARAM_CTOR:if(e){const t=i.Metadata.getParamTypes(r,n),s=t[o];t[o]=s===Array?[e]:e,i.Metadata.setParamTypes(r,n,t)}break;case i.DecoratorTypes.PROP:const p=e||i.Metadata.getType(r,n);if(i.Metadata.getType(r,n),p===Object)throw new a(r,n);c(r,n,{resolver(o,a,{options:c,...u}){const l=i.Metadata.getType(r,n);if(a.set(s,{...c}),l===Array){let r;return r||(r=o.getMany(e,a,u),a.delete(s)),r.forEach(((e,t)=>{(0,i.isPromise)(r)&&e.then((e=>{r[t]=e}))})),()=>t(r)}let h;return h||(h=o.invoke(p,a,u),a.delete(s)),(0,i.isPromise)(h)&&h.then((e=>{h=e})),()=>t(h)}});break;default:throw new i.UnsupportedDecoratorType(u,[r,n,o])}}}function p(e={}){return(...t)=>{switch((0,i.decoratorTypeOf)(t)){case i.DecoratorTypes.CLASS:(0,i.StoreSet)("configuration",e)(t[0]);break;default:case i.DecoratorTypes.PARAM_CTOR:return u(p)(t[0],t[1],t[2])}}}function l(t,r){return(n,s)=>{i.Store.from(n).merge(e,{[s]:{bindingType:o.CONSTANT,propertyKey:s,expression:t,defaultValue:r}})}}!function(e){e.METHOD="method",e.PROPERTY="property",e.CONSTANT="constant",e.VALUE="value",e.INTERCEPTOR="interceptor"}(o||(o={}));var h,f,d=r(917);!function(e){e.SINGLETON="singleton",e.REQUEST="request",e.INSTANCE="instance"}(h||(h={})),function(e){e.VALUE="value",e.FACTORY="factory",e.SERVICE="service",e.PROVIDER="provider",e.MODULE="module",e.CONTROLLER="controller",e.INTERCEPTOR="interceptor",e.MIDDLEWARE="middleware"}(f||(f={}));class m{type=f.PROVIDER;deps;imports;useFactory;useAsyncFactory;useValue;hooks;_useClass;_provide;_store;_tokenStore;constructor(e,t={}){this.provide=e,this.useClass=e,Object.assign(this,t)}get token(){return this._provide}get provide(){return this._provide}set provide(e){e&&(this._provide=(0,i.getClassOrSymbol)(e),this._tokenStore=this._store=i.Store.from(e))}get useClass(){return this._useClass}set useClass(e){(0,i.isClass)(e)&&(this._useClass=(0,i.classOf)(e),this._store=i.Store.from(e),this.hooks=(0,i.methodsOf)(this._useClass).reduce(((e,{propertyKey:t})=>String(t).startsWith("$")?{...e,[t]:(e,...r)=>e[t](...r)}:e),{}))}get className(){return this.name}get name(){return(0,i.nameOf)(this.provide)}get store(){return this._store}get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}get scope(){return this.isAsync()?h.SINGLETON:this.get("scope")}set scope(e){this.store.set("scope",e)}get configuration(){return this.get("configuration")}set configuration(e){this.store.set("configuration",e)}get children(){return this.store.get("childrenControllers",[])}get(e){return this.store.get(e)||this._tokenStore.get(e)}isAsync(){return!!this.useAsyncFactory}clone(){return new((0,i.classOf)(this))(this._provide,this)}hasChildren(){return!!this.children.length}hasParent(){return!!this.store.get("parentController")}toString(){return["Token",this.name,this.useClass&&(0,i.nameOf)(this.useClass),this.useFactory&&"Factory",this.useValue&&"Value",this.useAsyncFactory&&"AsyncFactory"].filter(Boolean).join(":")}}class y extends Map{#h=new Map;get(e){return super.get((0,i.getClassOrSymbol)(e))}has(e){return super.has((0,i.getClassOrSymbol)(e))}set(e,t){return super.set((0,i.getClassOrSymbol)(e),t),this}merge(e,t){const r=this.createIfNotExists(e,t);return Object.keys(t).forEach((e=>{r[e]=t[e]})),this.set(e,r),r}delete(e){return super.delete((0,i.getClassOrSymbol)(e))}createRegistry(e,t,r={}){const n=this.getRegistrySettings(e);return r=Object.assign(n,{...r,model:t}),this.#h.set(e,r),this}onInvoke(e,t,r){const n=this.#h.get(e.type);n?.onInvoke&&n.onInvoke(e,t,r)}getRegistrySettings(e){let t="provider";if("string"==typeof e)t=e;else{const r=this.get(e);r&&(t=r.type)}return this.#h.get(t)||{model:m}}createRegisterFn(e){return(t,r)=>{t=Object.assign({instance:r},t,{type:e}),this.merge(t.provide,t)}}createIfNotExists(e,t){const r=t.type||f.PROVIDER;if(!this.has(e)){const{model:n=m}=this.#h.get(r)||{},s=new n(e,t);this.set(e,s)}return this.get(e)}}const g=new y;function O(e){if(!e.provide)throw new Error("Provider.provide is required");return g.merge(e.provide,e)}g.createRegistry(f.CONTROLLER,m);const b=(e,t)=>{e.provide||(e={provide:e}),e=Object.assign({scope:h.SINGLETON,useValue:t},e,{type:f.VALUE}),g.merge(e.provide,e)},v=g.createRegisterFn(f.CONTROLLER);function S(e){const{children:t=[],path:r,...n}=function(e){return"string"==typeof e||e instanceof RegExp||(0,i.isArrayOrArrayClass)(e)?{path:e}:e}(e);return(0,i.useDecorators)((e=>{v({provide:e,...n})}),r&&(0,d.Path)(r),(0,d.Children)(...t))}function E(e={}){return t=>{O({...e,...e.provide?{useClass:t}:{provide:t}})}}function T(t,r){return(...n)=>{const[s,a,c]=n;switch((0,i.decoratorTypeOf)(n)){case i.DecoratorTypes.CLASS:(0,i.decorateMethodsOf)(s,T(t,r));break;case i.DecoratorTypes.METHOD:return i.Store.from(s).merge(e,{[a]:{options:r,propertyKey:a,useType:t,bindingType:o.INTERCEPTOR}}),c}}}function R(){return E({type:f.INTERCEPTOR})}function A(e,t,{optional:r=!1,packageName:n=t.toString()}={}){return(s,o)=>{let a,u;c(s,o,{resolver:s=>async()=>{if(!u){const o=await(0,i.importPackage)(n,t,r);if(u=o[e],!u&&!r)throw new Error(`Unable to lazy load the "${e}". The token isn't a valid token provider.`);a=u?await s.lazyInvoke(u):{}}return a}})}}function w(e,t){return A(e,t,{optional:!0})}function P(e={}){const{scopes:t,imports:r,resolvers:n,deps:s,scope:o,...a}=e;return(0,i.useDecorators)(p(a),E({type:f.MODULE,scope:h.SINGLETON,imports:r,deps:s,injectable:!1,resolvers:n}))}function C(e=h.REQUEST){return(0,i.StoreSet)("scope",e)}function _(e,t,r){C(h.INSTANCE)((0,i.classOf)(e)),u(s)(e,t,r)}function x(e){return t=>{g.get(e).useClass=t}}function M(){return E()}function k(t){return(r,n,o)=>{switch((0,i.decoratorTypeOf)([r,n,o])){case i.DecoratorTypes.PARAM_CTOR:i.Store.from(r).merge(`${s}:${o}`,t);break;case i.DecoratorTypes.PROP:i.Store.from(r).merge(e,{[n]:{options:t}});break;default:throw new i.UnsupportedDecoratorType(k,[r,n,o])}}}function N(t,r){return(n,s)=>{i.Store.from(n).merge(e,{[s]:{bindingType:o.VALUE,propertyKey:s,expression:t,defaultValue:r}})}}class D extends Map{add(e,t={}){const r=g.get(e)?.clone()||new m(e);return Object.assign(r,t),super.set(e,r)}addProvider(e,t={}){return this.add(e,t)}hasProvider(e){return super.has(e)}setProvider(e,t){return super.set(e,t)}getProvider(e){return super.get(e)}getProviders(e){return[...this].reduce(((t,[r,n])=>n.type!==e&&e?t:[...t,n]),[])}addProviders(e){e.forEach((e=>{this.hasProvider(e.provide)||this.setProvider(e.provide,e.clone())}))}}class j extends m{tokenRouter;constructor(e,t={}){super(e,t),this.type=f.CONTROLLER}get middlewares(){return Object.assign({use:[],useAfter:[],useBefore:[]},this.store.get("middlewares",{}))}set middlewares(e){const t=this.middlewares;Object.keys(e).forEach((r=>{((e,t,r)=>{t[e]=t[e].concat(r[e])})(r,t,e)})),this.store.set("middlewares",t)}}class $ extends Map{hooks=new i.Hooks;async destroy(){await this.hooks.asyncEmit("$onDestroy")}}const I=e=>e=>(process.env.NO_COLOR,e),L={red:I(),yellow:I(),green:I()};class H extends Error{name="INJECTION_ERROR";tokens=[];origin;constructor(e,t){super((0,i.isString)(t)?t:""),this.tokens=[e],t&&((0,i.isString)(t)?this.origin={message:t,stack:this.stack}:t.tokens?(this.tokens=this.tokens.concat(t.tokens),this.origin=t.origin):(this.origin=t,this.stack=t.stack));const r=this.origin?"\nOrigin: "+this.origin.message:"",n=this.tokens.map((e=>(0,i.nameOf)(e))).join(" > ");this.message=`Injection failed on ${n}${r}`}static throwInjectorError(e,t,r){throw t&&(0,i.isClass)(e)&&(r.message=function(e,t){let r="";const n=(0,i.getConstructorArgNames)(e).map(((e,n)=>(t.index===n&&(r=e,e=L.red(e)),`${e}: ${(0,i.nameOf)(t.deps[n])}`))).join(", "),s=(0,i.nameOf)(e)+"->constructor("+n+")",o=s.indexOf(r)-5;return"Unable to inject dependency. "+t.message+"\n\n"+s+"\n"+(o>-1?(e=>" ".repeat(e)+L.red("^"+"‾".repeat(r.length-1)))(o):"")}(e,{...t,message:r.message})),new H(e,r)}}class G extends Error{name="UNDEFINED_TOKEN_ERROR";constructor(){super("Given token is undefined. Have you enabled emitDecoratorMetadata in your tsconfig.json or decorated your class with @Injectable, @Service, ... decorator ?")}}class U{default=new Map;map=new Map;constructor(e={}){return Object.entries({scopes:{},resolvers:[],imports:[],routes:[],logger:{},...e}).forEach((([e,t])=>{this.default.set(e,t)})),(0,i.proxyDelegation)(this,{ownKeys:e=>[...e.default.keys(),...e.map.keys()]})}get version(){return this.get("version")}set version(e){this.map.set("version",e)}get rootDir(){return this.get("rootDir")}set rootDir(e){this.map.set("rootDir",e)}get env(){return this.map.get("env")}set env(e){this.map.set("env",e)}get scopes(){return this.map.get("scopes")}set scopes(e){this.map.set("scopes",e)}get resolvers(){return this.getRaw("resolvers")}set resolvers(e){this.map.set("resolvers",e)}get imports(){return this.get("imports")}set imports(e){this.map.set("imports",e)}get routes(){return this.get("routes")}set routes(e){this.map.set("routes",e)}get logger(){return this.get("logger")}set logger(e){const t={...this.logger,...e};this.map.set("logger",t)}get debug(){return"debug"===this.logger.level}set debug(e){this.logger={...this.logger,level:e?"debug":"info"}}forEach(e,t){return new Set([...Array.from(this.default.keys()),...Array.from(this.map.keys())]).forEach((t=>{e(this.getRaw(t),t,this.map)}),t)}set(e,t){return"string"==typeof e?Reflect.has(this,e)?this[e]=t:this.setRaw(e,t):Object.entries(e).forEach((([e,t])=>{this.set(e,t)})),this}setRaw(e,t){return(0,i.setValue)(this.map,e,t),this}get(e,t){return this.getRaw(e,t)}resolve(e){return e.replace("${rootDir}",this.rootDir)}getRaw(e,t){const r=(0,i.getValue)(this.map,e);return void 0!==r?r:(0,i.getValue)(this.default,e,t)}}function q(e){const t=new D(g.entries());return e&&t.delete(e),t}Object.create,Object.create;const F=["mount","imports"];function K(e){return e?(0,i.isArray)(e)?e.filter(i.isClass).map((e=>({token:e}))):Object.keys(e).reduce(((t,r)=>[...t,...[].concat(e[r]).filter(i.isClass).map((e=>({route:r,token:e})))]),[]):[]}function B(e){return e.map((({token:e})=>g.get(e))).filter((e=>e?.type===f.MODULE&&e.configuration)).flatMap((e=>J(e.configuration)))}function J(e){const t=F.flatMap((t=>K(e[t])));return[...B(t),...t].filter((e=>!!e.route))}var V;let z=V=class extends D{settings=new U;logger=console;resolvedConfiguration=!1;#f=new $;#d=new i.Hooks;constructor(){super(),this.#f.set(V,this)}get resolvers(){return this.settings.resolvers}get scopes(){return this.settings.scopes||{}}scopeOf(e){return e.scope||this.scopes[e.type]||h.SINGLETON}toArray(){return[...this.#f.values()]}get(e,t={}){const r=this.getInstance(e);if(void 0!==r)return r;if(!this.hasProvider(e))for(const r of this.resolvers){const n=r.get(e,t);if(void 0!==n)return n}}getMany(e,t,r){return this.getProviders(e).map((e=>this.invoke(e.token,t,r)))}has(e){return void 0!==this.#f.get(e)}invoke(e,t,r={}){let n=t?t.get(e):void 0;if(void 0!==n)return n;if(e===p)return this.settings;if(n=r.rebuild?void 0:this.getInstance(e),null!=n)return n;if(e===s)return{};const o=this.ensureProvider(e);if(!o||r.rebuild)return n=this.resolve(e,t,r),this.hasProvider(e)&&this.#f.set(e,n),n;switch(n=this.resolve(e,t,r),this.scopeOf(o)){case h.SINGLETON:return o.hooks&&!r.rebuild&&this.registerHooks(o,n),o.isAsync()&&(0,i.isPromise)(n)?(this.#f.set(e,n),n=n.then((t=>(this.#f.set(e,t),t))),n):(this.#f.set(e,n),n);case h.REQUEST:return t&&(t.set(e,n),o.hooks&&o.hooks.$onDestroy&&t.hooks.on("$onDestroy",((...e)=>o.hooks.$onDestroy(n,...e)))),n}return n}async loadAsync(){for(const[,e]of this)!this.has(e.token)&&e.isAsync()&&await this.invoke(e.token)}loadSync(){for(const[,e]of this)this.has(e.token)||this.scopeOf(e)!==h.SINGLETON||this.invoke(e.token)}bootstrap(e=q()){return this.addProviders(e),this.resolveConfiguration(),this.settings.imports=this.settings.imports?.map((e=>{if("token"in e&&"use"in e){const{token:t,use:r}=e,n=this.getProvider(t);if(n)return n.useValue=r,n.useFactory=void 0,n.useAsyncFactory=void 0,void(n.useClass=void 0)}return e})).filter(Boolean),this}loadModule(e){this.settings.routes=this.settings.routes.concat(J(this.settings));const t=q();return t.delete(e),t.addProvider(e,{type:"server:module",scope:h.SINGLETON}),this.load(t)}async load(e=q()){this.bootstrap(e),await this.loadAsync(),this.loadSync(),await this.emit("$beforeInit"),await this.emit("$onInit")}resolveConfiguration(){if(this.resolvedConfiguration)return;const e=new Map;super.forEach((t=>{t.configuration&&"server:module"!==t.type&&Object.entries(t.configuration).forEach((([t,r])=>{["resolvers","mount","imports"].includes(t)||(r=e.has(t)?(0,i.deepMerge)(e.get(t),r):(0,i.deepClone)(r),e.set(t,r))})),t.resolvers&&(this.settings.resolvers=this.settings.resolvers.concat(t.resolvers))})),e.forEach(((e,t)=>{this.settings.set(t,(0,i.deepMerge)(e,this.settings.get(t)))})),this.resolvedConfiguration=!0}bindInjectableProperties(t,r,n){const s=(0,i.ancestorsOf)((0,i.classOf)(t)).reduce(((t,r)=>({...t,...i.Store.from(r).get(e)||{}})),{});Object.values(s).forEach((e=>{switch(e.bindingType){case o.PROPERTY:this.bindProperty(t,e,r,n);break;case o.CONSTANT:this.bindConstant(t,e);break;case o.VALUE:this.bindValue(t,e);break;case o.INTERCEPTOR:this.bindInterceptor(t,e)}}))}bindProperty(e,{propertyKey:t,resolver:r,options:n={}},s,o){let a;a=r(this,s,{...o,options:n}),(0,i.catchError)((()=>Object.defineProperty(e,t,{get:a})))}bindValue(e,{propertyKey:t,expression:r,defaultValue:n}){const s={get:()=>this.settings.get(r)||n,set:e=>this.settings.set(r,e),enumerable:!0,configurable:!0};(0,i.catchError)((()=>Object.defineProperty(e,t,s)))}bindConstant(e,{propertyKey:t,expression:r,defaultValue:n}){let s;const o={get:()=>{if(void 0!==s)return s;const e=this.settings.get(r,n);return s=Object.freeze((0,i.deepClone)(e)),s},enumerable:!0,configurable:!0};(0,i.catchError)((()=>Object.defineProperty(e,t,o)))}bindInterceptor(e,{propertyKey:t,useType:r,options:n}){const s=(0,i.classOf)(e),o=e[t];e[t]=(...i)=>{const a=t=>{if(!t)return o.apply(e,i);throw t},c={target:s,propertyKey:t,args:i,options:n,next:a};return this.get(r).intercept({...c,options:n},a)}}async lazyInvoke(e){let t=this.getInstance(e);return t||(t=await this.invoke(e),(0,i.isFunction)(t?.$onInit)&&await t.$onInit()),t}emit(e,...t){return this.#d.asyncEmit(e,t)}alter(e,t,...r){return this.#d.alter(e,t,r)}alterAsync(e,t,...r){return this.#d.asyncAlter(e,t,r)}destroy(){return this.emit("$onDestroy")}ensureProvider(e){return!this.hasProvider(e)&&g.has(e)&&this.addProvider(e),this.getProvider(e)}getInstance(e){return this.#f.get(e)}resolve(e,t=new $,r={}){const n=this.mapInvokeOptions(e,t,r),{token:o,deps:a,construct:c,imports:u,provider:p}=n;let l;p&&g.onInvoke(p,t,{...n,injector:this});let h=!1;try{const e=e=>(n,o)=>{if(h={token:n,index:o,deps:a},n!==s){const e=p?.store?.get(`${s}:${o}`);t.set(s,e||{})}return(0,i.isArray)(n)?this.getMany(n[0],t,r):(0,i.isInheritedFrom)(n,m,1)?p:this.invoke(n,t,{parent:e})};u.forEach(e());const n=a.map(e(o));h=!1,l=c(n)}catch(e){H.throwInjectorError(o,h,e)}if(void 0===l)throw new H(o,`Unable to create new instance from undefined value. Check your provider declaration for ${(0,i.nameOf)(o)}`);return l&&(0,i.isClass)((0,i.classOf)(l))&&this.bindInjectableProperties(l,t,r),l}mapInvokeOptions(e,t,r){let n,o,a=r.imports,c=r.deps,u=r.scope;if(!e)throw new G;return this.hasProvider(e)?o=this.getProvider(e):(o=new m(e),this.resolvers.forEach((r=>{const n=r.get(e,t.get(s));void 0!==n&&(o.useFactory=()=>n)}))),u=u||this.scopeOf(o),c=c||o.deps,a=a||o.imports,void 0!==o.useValue?n=()=>(0,i.isFunction)(o.useValue)?o.useValue():o.useValue:o.useFactory?n=e=>o.useFactory(...e):o.useAsyncFactory?n=async e=>(e=await Promise.all(e),o.useAsyncFactory(...e)):(c=c||i.Metadata.getParamTypes(o.useClass),n=e=>new o.useClass(...e)),{token:e,scope:u||i.Store.from(e).get("scope")||h.SINGLETON,deps:c||[],imports:a||[],construct:n,provider:o}}registerHooks(e,t){e.hooks&&Object.entries(e.hooks).forEach((([r,n])=>{this.#d.on(r,((...r)=>n(this.get(e.token)||t,...r)))}))}};z=V=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}([E({scope:h.SINGLETON,global:!0}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[])}()],z);const W=Symbol.for("LOGGER");function X(e={},t={}){return Object.entries(t).reduce(((e,[t,r])=>({...e,[t]:(e[t]||[]).concat(r)})),e)}function Q(e,t={}){const r=i.Store.from(e).get("configuration")||{};return{...r,...t,mount:X(r.mount,t.mount)}}O({provide:W,deps:[z],useFactory:e=>e.logger})})(),n})()));
2
2
  //# sourceMappingURL=di.umd.min.js.map