@tsed/schema 7.10.0-rc.2 → 7.10.0-rc.4

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,2CCPT,MAAMC,EAAY,EAAQ,IACpBC,EAAU,EAAQ,KAClBC,EAAS,EAAQ,KACjBC,EAAQ,EAAQ,KAgBhBC,EAAS,CAACC,EAAOC,EAAU,CAAC,KAChC,IAAIC,EAAS,GAEb,GAAIC,MAAMC,QAAQJ,GAChB,IAAK,IAAIK,KAAWL,EAAO,CACzB,IAAIM,EAASP,EAAOQ,OAAOF,EAASJ,GAChCE,MAAMC,QAAQE,GAChBJ,EAAOM,QAAQF,GAEfJ,EAAOM,KAAKF,EAEhB,MAEAJ,EAAS,GAAGO,OAAOV,EAAOQ,OAAOP,EAAOC,IAM1C,OAHIA,IAA8B,IAAnBA,EAAQJ,SAAuC,IAApBI,EAAQS,UAChDR,EAAS,IAAI,IAAIS,IAAIT,KAEhBA,CAAM,EAiBfH,EAAOD,MAAQ,CAACE,EAAOC,EAAU,CAAC,IAAMH,EAAME,EAAOC,GAgBrDF,EAAOJ,UAAY,CAACK,EAAOC,EAAU,CAAC,IAE3BN,EADY,iBAAVK,EACQD,EAAOD,MAAME,EAAOC,GAEtBD,EAFgCC,GAoBnDF,EAAOH,QAAU,CAACI,EAAOC,EAAU,CAAC,KACb,iBAAVD,IACTA,EAAQD,EAAOD,MAAME,EAAOC,IAEvBL,EAAQI,EAAOC,IAoBxBF,EAAOF,OAAS,CAACG,EAAOC,EAAU,CAAC,KACZ,iBAAVD,IACT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AkBloC,IAC3CkoC,EAAiBz/C,OAAOw/C,GAAoBjoC,EAAO,IACnD/X,EACHq3C,eAEL4I,IAEA,IAAI7H,GAAoBrgC,GAAOiI,UAAU7d,QAAO,CAACg+C,EAAQtI,KAC5D,MAAM,UAAErT,GAAcqT,EAWtB,OAVIrT,GACAA,EAAU0B,eAAep+B,SAASqvC,IAC9BgJ,EAAO5/C,KAAK,IAAIq3C,GAAmB,CAC/BP,WACAt/B,QACA8/B,WACAV,kBACD,IAGJgJ,CAAM,GACdF,EACP,CCvBO,SAASG,GAAoBpiC,GAChC,MAAMuW,EAAQvW,EAAOmb,QAAUnb,EAASorB,GAAmBprB,GAC3D,IAAKuW,EAAM8rB,YAAa,CACpB,MAAMvsB,EAAS4V,GAAmBnV,GAClCA,EAAM8rB,YAAc,IAAI1gC,IACxBmU,EAAOhsB,SAASwwC,IACZA,EAAa5c,SAAS5zB,SAASywC,IACtBhkB,EAAM8rB,YAAYzzC,IAAI2rC,EAAUlyB,cACjCkO,EAAM8rB,YAAYv/B,IAAIy3B,EAAUlyB,YAAakyB,EACjD,GACF,GAEV,CACA,OAAOhkB,EAAM8rB,WACjB,CAIO,SAASC,GAActiC,EAAQhe,EAAU,CAAC,GAC7C,MAAM8zB,EAASssB,GAAoBpiC,GAC7BtY,EAAM,IAAIia,IAShB,OARAmU,EAAOhsB,SAAQ,CAACysB,EAAOtmB,MACdjO,EAAQwqC,kBACLN,GAAY3V,EAAMsF,WAAY75B,IAItC0F,EAAIob,IAAI7S,EAAKsmB,EAAM,IAEhB7uB,CACX","sources":["webpack://schema/webpack/universalModuleDefinition","webpack://schema/../../../node_modules/braces/index.js","webpack://schema/../../../node_modules/braces/lib/compile.js","webpack://schema/../../../node_modules/braces/lib/constants.js","webpack://schema/../../../node_modules/braces/lib/expand.js","webpack://schema/../../../node_modules/braces/lib/parse.js","webpack://schema/../../../node_modules/braces/lib/stringify.js","webpack://schema/../../../node_modules/braces/lib/utils.js","webpack://schema/../../../node_modules/fill-range/index.js","webpack://schema/../../../node_modules/micromatch/index.js","webpack://schema/../../../node_modules/path/path.js","webpack://schema/../../../node_modules/picomatch/index.js","webpack://schema/../../../node_modules/picomatch/lib/constants.js","webpack://schema/../../../node_modules/picomatch/lib/parse.js","webpack://schema/../../../node_modules/picomatch/lib/picomatch.js","webpack://schema/../../../node_modules/picomatch/lib/scan.js","webpack://schema/../../../node_modules/picomatch/lib/utils.js","webpack://schema/../../../node_modules/reflect-metadata/Reflect.js","webpack://schema/../../../node_modules/statuses/index.js","webpack://schema/../../../node_modules/to-regex-range/index.js","webpack://schema/../../../node_modules/to-regex-range/node_modules/is-number/index.js","webpack://schema/../../../node_modules/util/node_modules/inherits/inherits_browser.js","webpack://schema/../../../node_modules/util/support/isBufferBrowser.js","webpack://schema/../../../node_modules/util/util.js","webpack://schema/../../core/lib/esm/utils/imports/ lazy namespace object","webpack://schema/webpack/bootstrap","webpack://schema/webpack/runtime/compat get default export","webpack://schema/webpack/runtime/define property getters","webpack://schema/webpack/runtime/global","webpack://schema/webpack/runtime/hasOwnProperty shorthand","webpack://schema/webpack/runtime/make namespace object","webpack://schema/../../core/lib/esm/domain/DecoratorTypes.js","webpack://schema/../../core/lib/esm/utils/objects/classOf.js","webpack://schema/../../core/lib/esm/utils/decorators/decoratorTypeOf.js","webpack://schema/../../core/lib/esm/utils/objects/isArray.js","webpack://schema/../../core/lib/esm/utils/objects/isDate.js","webpack://schema/../../core/lib/esm/utils/objects/isFunction.js","webpack://schema/../../core/lib/esm/utils/objects/isBoolean.js","webpack://schema/../../core/lib/esm/utils/objects/isNumber.js","webpack://schema/../../core/lib/esm/utils/objects/isString.js","webpack://schema/../../core/lib/esm/utils/objects/isPrimitive.js","webpack://schema/../../core/lib/esm/utils/objects/isSymbol.js","webpack://schema/../../core/lib/esm/utils/objects/isBuffer.js","webpack://schema/../../core/lib/esm/utils/objects/deepClone.js","webpack://schema/../../core/lib/esm/utils/objects/isNil.js","webpack://schema/../../core/lib/esm/utils/objects/isRegExp.js","webpack://schema/../../core/lib/esm/utils/objects/isProtectedKey.js","webpack://schema/../../core/lib/esm/utils/objects/objectKeys.js","webpack://schema/../../core/lib/esm/utils/objects/deepMerge.js","webpack://schema/../../core/lib/esm/utils/objects/createInstance.js","webpack://schema/../../core/lib/esm/utils/objects/descriptorOf.js","webpack://schema/../../core/lib/esm/utils/objects/nameOf.js","webpack://schema/../../core/lib/esm/domain/Metadata.js","webpack://schema/../../core/lib/esm/domain/Store.js","webpack://schema/../../core/lib/esm/decorators/storeSet.js","webpack://schema/../../core/lib/esm/decorators/storeFn.js","webpack://schema/../../core/lib/esm/domain/AnyToPromise.js","webpack://schema/../../core/lib/esm/domain/Env.js","webpack://schema/../../core/lib/esm/domain/Hooks.js","webpack://schema/../../core/lib/esm/domain/Type.js","webpack://schema/../../core/lib/esm/errors/UnsupportedDecoratorType.js","webpack://schema/../../core/lib/esm/utils/uniq.js","webpack://schema/../../core/lib/esm/utils/objects/ancestorOf.js","webpack://schema/../../core/lib/esm/utils/objects/ancestorsOf.js","webpack://schema/../../core/lib/esm/utils/objects/prototypeOf.js","webpack://schema/../../core/lib/esm/utils/decorators/decorateMethodsOf.js","webpack://schema/../../core/lib/esm/utils/objects/methodsOf.js","webpack://schema/../../core/lib/esm/utils/decorators/useDecorators.js","webpack://schema/../../core/lib/esm/utils/objects/cleanObject.js","webpack://schema/../../core/lib/esm/utils/objects/isObject.js","webpack://schema/../../core/lib/esm/utils/objects/getValue.js","webpack://schema/../../core/lib/esm/utils/objects/isArrowFn.js","webpack://schema/../../core/lib/esm/utils/objects/isPlainObject.js","webpack://schema/../../core/lib/esm/utils/objects/isPromise.js","webpack://schema/../../core/lib/esm/utils/objects/isClass.js","webpack://schema/../../core/lib/esm/utils/objects/isCollection.js","webpack://schema/../../core/lib/esm/utils/objects/setValue.js","webpack://schema/../../core/lib/esm/utils/objects/toMap.js","webpack://schema/./src/registries/JsonSchemaMapperContainer.ts","webpack://schema/./src/domain/JsonEntityStore.ts","webpack://schema/../../../node_modules/tslib/tslib.es6.js","webpack://schema/./src/utils/getComputedType.ts","webpack://schema/./src/utils/getJsonType.ts","webpack://schema/../../core/lib/esm/utils/objects/primitiveOf.js","webpack://schema/./src/utils/serializeEnumValues.ts","webpack://schema/./src/utils/toJsonRegex.ts","webpack://schema/./src/domain/JsonDiscriminator.ts","webpack://schema/./src/domain/JsonSchema.ts","webpack://schema/./src/decorators/config/jsonEntityComponent.ts","webpack://schema/./src/domain/JsonClassStore.ts","webpack://schema/./src/domain/JsonPropertyStore.ts","webpack://schema/./src/utils/generics.ts","webpack://schema/./src/domain/JsonMap.ts","webpack://schema/./src/domain/JsonParameterTypes.ts","webpack://schema/../../../node_modules/no-case/node_modules/lower-case/dist.es2015/index.js","webpack://schema/../../../node_modules/no-case/dist.es2015/index.js","webpack://schema/./src/domain/SpecTypes.ts","webpack://schema/../../../node_modules/pascal-case/dist.es2015/index.js","webpack://schema/./src/utils/ref.ts","webpack://schema/./src/domain/JsonParameter.ts","webpack://schema/./src/domain/JsonParameterStore.ts","webpack://schema/../../../node_modules/constant-case/node_modules/upper-case/dist.es2015/index.js","webpack://schema/./src/constants/httpStatusMessages.ts","webpack://schema/../../../node_modules/constant-case/dist.es2015/index.js","webpack://schema/./src/utils/isSuccessStatus.ts","webpack://schema/./src/utils/toJsonMapCollection.ts","webpack://schema/./src/domain/JsonRequestBody.ts","webpack://schema/./src/utils/mapHeaders.ts","webpack://schema/./src/domain/JsonResponse.ts","webpack://schema/./src/domain/JsonOperation.ts","webpack://schema/./src/domain/JsonMethodStore.ts","webpack://schema/./src/utils/getJsonEntityStore.ts","webpack://schema/./src/domain/JsonLazyRef.ts","webpack://schema/./src/components/anyMapper.ts","webpack://schema/./src/components/classMapper.ts","webpack://schema/./src/components/genericsMapper.ts","webpack://schema/./src/utils/getInheritedStores.ts","webpack://schema/./src/components/inheritedClassMapper.ts","webpack://schema/./src/components/itemMapper.ts","webpack://schema/./src/components/lazyRefMapper.ts","webpack://schema/./src/components/mapMapper.ts","webpack://schema/./src/hooks/alterIgnore.ts","webpack://schema/./src/utils/mapNullableType.ts","webpack://schema/./src/components/objectMapper.ts","webpack://schema/./src/components/ofMapper.ts","webpack://schema/./src/components/propertiesMapper.ts","webpack://schema/./src/domain/JsonAliasMap.ts","webpack://schema/./src/hooks/alterRequiredGroups.ts","webpack://schema/./src/utils/getRequiredProperties.ts","webpack://schema/./src/hooks/alterOneOf.ts","webpack://schema/./src/components/schemaMapper.ts","webpack://schema/./src/constants/httpMethods.ts","webpack://schema/./src/domain/JsonFormatTypes.ts","webpack://schema/./src/decorators/common/jsonEntityFn.ts","webpack://schema/./src/decorators/class/children.ts","webpack://schema/./src/decorators/class/discriminatorValue.ts","webpack://schema/../../../node_modules/change-case/node_modules/snake-case/dist.es2015/index.js","webpack://schema/../../../node_modules/dot-case/dist.es2015/index.js","webpack://schema/./src/decorators/collections/collectionOf.ts","webpack://schema/./src/decorators/collections/collectionContains.ts","webpack://schema/./src/decorators/collections/maxItems.ts","webpack://schema/./src/decorators/collections/maxProperties.ts","webpack://schema/./src/decorators/collections/minItems.ts","webpack://schema/./src/decorators/collections/minProperties.ts","webpack://schema/./src/decorators/collections/uniqueItems.ts","webpack://schema/./src/decorators/common/additionalProperties.ts","webpack://schema/./src/decorators/common/allOf.ts","webpack://schema/./src/decorators/common/property.ts","webpack://schema/./src/decorators/common/allow.ts","webpack://schema/./src/decorators/common/any.ts","webpack://schema/./src/decorators/common/anyOf.ts","webpack://schema/./src/decorators/common/const.ts","webpack://schema/./src/decorators/common/customKey.ts","webpack://schema/./src/decorators/common/default.ts","webpack://schema/./src/decorators/common/description.ts","webpack://schema/./src/decorators/common/discriminatorKey.ts","webpack://schema/./src/decorators/common/enum.ts","webpack://schema/./src/decorators/common/example.ts","webpack://schema/./src/decorators/common/examples.ts","webpack://schema/./src/decorators/common/maximum.ts","webpack://schema/./src/decorators/common/exclusiveMaximum.ts","webpack://schema/./src/decorators/common/minimum.ts","webpack://schema/./src/decorators/common/exclusiveMinimum.ts","webpack://schema/./src/decorators/common/format.ts","webpack://schema/./src/decorators/common/forwardGroups.ts","webpack://schema/./src/utils/matchGroups.ts","webpack://schema/./src/decorators/common/groups.ts","webpack://schema/./src/decorators/common/hidden.ts","webpack://schema/./src/decorators/common/ignore.ts","webpack://schema/./src/decorators/common/integer.ts","webpack://schema/./src/decorators/common/maxLength.ts","webpack://schema/./src/decorators/common/minLength.ts","webpack://schema/./src/decorators/common/multipleOf.ts","webpack://schema/./src/decorators/common/name.ts","webpack://schema/./src/decorators/common/nullable.ts","webpack://schema/./src/decorators/common/oneOf.ts","webpack://schema/./src/decorators/common/optional.ts","webpack://schema/./src/decorators/common/pattern.ts","webpack://schema/./src/decorators/common/readOnly.ts","webpack://schema/./src/decorators/common/schema.ts","webpack://schema/./src/decorators/common/recordOf.ts","webpack://schema/./src/decorators/common/required.ts","webpack://schema/./src/decorators/common/requiredGroups.ts","webpack://schema/./src/decorators/common/title.ts","webpack://schema/./src/decorators/common/writeOnly.ts","webpack://schema/./src/utils/from.ts","webpack://schema/./src/decorators/generics/genericOf.ts","webpack://schema/./src/decorators/generics/generics.ts","webpack://schema/./src/decorators/operations/produces.ts","webpack://schema/./src/decorators/operations/acceptMime.ts","webpack://schema/./src/decorators/operations/consumes.ts","webpack://schema/./src/domain/DecoratorContext.ts","webpack://schema/./src/utils/defineStatusModel.ts","webpack://schema/./src/decorators/operations/returns.ts","webpack://schema/./src/decorators/operations/contentType.ts","webpack://schema/./src/decorators/operations/deprecated.ts","webpack://schema/./src/decorators/operations/header.ts","webpack://schema/./src/decorators/operations/in.ts","webpack://schema/./src/decorators/operations/inFile.ts","webpack://schema/../../core/lib/esm/utils/decorators/useMethodDecorators.js","webpack://schema/./src/decorators/operations/location.ts","webpack://schema/./src/decorators/operations/operationId.ts","webpack://schema/./src/decorators/operations/operationPath.ts","webpack://schema/./src/decorators/operations/partial.ts","webpack://schema/./src/decorators/operations/path.ts","webpack://schema/./src/decorators/operations/redirect.ts","webpack://schema/./src/utils/mapRouteOptions.ts","webpack://schema/./src/decorators/operations/route.ts","webpack://schema/./src/decorators/operations/security.ts","webpack://schema/./src/decorators/operations/status.ts","webpack://schema/./src/decorators/operations/summary.ts","webpack://schema/./src/decorators/operations/tags.ts","webpack://schema/./src/decorators/operations/view.ts","webpack://schema/./src/domain/JsonOperationPathsMap.ts","webpack://schema/./src/utils/concatPath.ts","webpack://schema/./src/domain/JsonOperationRoute.ts","webpack://schema/./src/utils/buildPath.ts","webpack://schema/./src/utils/concatParameters.ts","webpack://schema/./src/utils/getOperationsStores.ts","webpack://schema/./src/utils/getJsonPathParameters.ts","webpack://schema/./src/utils/mergeOperation.ts","webpack://schema/../../../node_modules/change-case/node_modules/camel-case/dist.es2015/index.js","webpack://schema/./src/utils/operationIdFormatter.ts","webpack://schema/./src/utils/mergeSpec.ts","webpack://schema/./src/utils/getSpec.ts","webpack://schema/./src/utils/getSpecType.ts","webpack://schema/./src/utils/mapOpenSpecInfo.ts","webpack://schema/./src/utils/mapOpenSpec2.ts","webpack://schema/./src/utils/mapOpenSpec3.ts","webpack://schema/./src/utils/mapOpenSpec.ts","webpack://schema/./src/utils/transformToOS2.ts","webpack://schema/./src/utils/generateSpec.ts","webpack://schema/./src/utils/getJsonSchema.ts","webpack://schema/./src/utils/getOperationsRoutes.ts","webpack://schema/./src/utils/getPropertiesStores.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"schema\"] = factory();\n\telse\n\t\troot[\"schema\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nconst stringify = require('./lib/stringify');\nconst compile = require('./lib/compile');\nconst expand = require('./lib/expand');\nconst parse = require('./lib/parse');\n\n/**\n * Expand the given pattern or create a regex-compatible string.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']\n * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nconst braces = (input, options = {}) => {\n let output = [];\n\n if (Array.isArray(input)) {\n for (let pattern of input) {\n let result = braces.create(pattern, options);\n if (Array.isArray(result)) {\n output.push(...result);\n } else {\n output.push(result);\n }\n }\n } else {\n output = [].concat(braces.create(input, options));\n }\n\n if (options && options.expand === true && options.nodupes === true) {\n output = [...new Set(output)];\n }\n return output;\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * // braces.parse(pattern, [, options]);\n * const ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * ```\n * @param {String} pattern Brace pattern to parse\n * @param {Object} options\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = (input, options = {}) => parse(input, options);\n\n/**\n * Creates a braces string from an AST, or an AST node.\n *\n * ```js\n * const braces = require('braces');\n * let ast = braces.parse('foo/{a,b}/bar');\n * console.log(stringify(ast.nodes[2])); //=> '{a,b}'\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.stringify = (input, options = {}) => {\n if (typeof input === 'string') {\n return stringify(braces.parse(input, options), options);\n }\n return stringify(input, options);\n};\n\n/**\n * Compiles a brace pattern into a regex-compatible, optimized string.\n * This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.compile('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.compile = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n return compile(input, options);\n};\n\n/**\n * Expands a brace pattern into an array. This method is called by the\n * main [braces](#braces) function when `options.expand` is true. Before\n * using this method it's recommended that you read the [performance notes](#performance))\n * and advantages of using [.compile](#compile) instead.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n\n let result = expand(input, options);\n\n // filter out empty strings if specified\n if (options.noempty === true) {\n result = result.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options.nodupes === true) {\n result = [...new Set(result)];\n }\n\n return result;\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array\n * (if `options.expand` is true), a highly optimized regex-compatible string.\n * This method is called by the main [braces](#braces) function.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = (input, options = {}) => {\n if (input === '' || input.length < 3) {\n return [input];\n }\n\n return options.expand !== true\n ? braces.compile(input, options)\n : braces.expand(input, options);\n};\n\n/**\n * Expose \"braces\"\n */\n\nmodule.exports = braces;\n","'use strict';\n\nconst fill = require('fill-range');\nconst utils = require('./utils');\n\nconst compile = (ast, options = {}) => {\n let walk = (node, parent = {}) => {\n let invalidBlock = utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let invalid = invalidBlock === true || invalidNode === true;\n let prefix = options.escapeInvalid === true ? '\\\\' : '';\n let output = '';\n\n if (node.isOpen === true) {\n return prefix + node.value;\n }\n if (node.isClose === true) {\n return prefix + node.value;\n }\n\n if (node.type === 'open') {\n return invalid ? (prefix + node.value) : '(';\n }\n\n if (node.type === 'close') {\n return invalid ? (prefix + node.value) : ')';\n }\n\n if (node.type === 'comma') {\n return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n let range = fill(...args, { ...options, wrap: false, toRegex: true });\n\n if (range.length !== 0) {\n return args.length > 1 && range.length > 1 ? `(${range})` : range;\n }\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += walk(child, node);\n }\n }\n return output;\n };\n\n return walk(ast);\n};\n\nmodule.exports = compile;\n","'use strict';\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n\n // Digits\n CHAR_0: '0', /* 0 */\n CHAR_9: '9', /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 'A', /* A */\n CHAR_LOWERCASE_A: 'a', /* a */\n CHAR_UPPERCASE_Z: 'Z', /* Z */\n CHAR_LOWERCASE_Z: 'z', /* z */\n\n CHAR_LEFT_PARENTHESES: '(', /* ( */\n CHAR_RIGHT_PARENTHESES: ')', /* ) */\n\n CHAR_ASTERISK: '*', /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: '&', /* & */\n CHAR_AT: '@', /* @ */\n CHAR_BACKSLASH: '\\\\', /* \\ */\n CHAR_BACKTICK: '`', /* ` */\n CHAR_CARRIAGE_RETURN: '\\r', /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */\n CHAR_COLON: ':', /* : */\n CHAR_COMMA: ',', /* , */\n CHAR_DOLLAR: '$', /* . */\n CHAR_DOT: '.', /* . */\n CHAR_DOUBLE_QUOTE: '\"', /* \" */\n CHAR_EQUAL: '=', /* = */\n CHAR_EXCLAMATION_MARK: '!', /* ! */\n CHAR_FORM_FEED: '\\f', /* \\f */\n CHAR_FORWARD_SLASH: '/', /* / */\n CHAR_HASH: '#', /* # */\n CHAR_HYPHEN_MINUS: '-', /* - */\n CHAR_LEFT_ANGLE_BRACKET: '<', /* < */\n CHAR_LEFT_CURLY_BRACE: '{', /* { */\n CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */\n CHAR_LINE_FEED: '\\n', /* \\n */\n CHAR_NO_BREAK_SPACE: '\\u00A0', /* \\u00A0 */\n CHAR_PERCENT: '%', /* % */\n CHAR_PLUS: '+', /* + */\n CHAR_QUESTION_MARK: '?', /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */\n CHAR_RIGHT_CURLY_BRACE: '}', /* } */\n CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */\n CHAR_SEMICOLON: ';', /* ; */\n CHAR_SINGLE_QUOTE: '\\'', /* ' */\n CHAR_SPACE: ' ', /* */\n CHAR_TAB: '\\t', /* \\t */\n CHAR_UNDERSCORE: '_', /* _ */\n CHAR_VERTICAL_LINE: '|', /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\\uFEFF' /* \\uFEFF */\n};\n","'use strict';\n\nconst fill = require('fill-range');\nconst stringify = require('./stringify');\nconst utils = require('./utils');\n\nconst append = (queue = '', stash = '', enclose = false) => {\n let result = [];\n\n queue = [].concat(queue);\n stash = [].concat(stash);\n\n if (!stash.length) return queue;\n if (!queue.length) {\n return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;\n }\n\n for (let item of queue) {\n if (Array.isArray(item)) {\n for (let value of item) {\n result.push(append(value, stash, enclose));\n }\n } else {\n for (let ele of stash) {\n if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;\n result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));\n }\n }\n }\n return utils.flatten(result);\n};\n\nconst expand = (ast, options = {}) => {\n let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;\n\n let walk = (node, parent = {}) => {\n node.queue = [];\n\n let p = parent;\n let q = parent.queue;\n\n while (p.type !== 'brace' && p.type !== 'root' && p.parent) {\n p = p.parent;\n q = p.queue;\n }\n\n if (node.invalid || node.dollar) {\n q.push(append(q.pop(), stringify(node, options)));\n return;\n }\n\n if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {\n q.push(append(q.pop(), ['{}']));\n return;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n\n if (utils.exceedsLimit(...args, options.step, rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n\n let range = fill(...args, options);\n if (range.length === 0) {\n range = stringify(node, options);\n }\n\n q.push(append(q.pop(), range));\n node.nodes = [];\n return;\n }\n\n let enclose = utils.encloseBrace(node);\n let queue = node.queue;\n let block = node;\n\n while (block.type !== 'brace' && block.type !== 'root' && block.parent) {\n block = block.parent;\n queue = block.queue;\n }\n\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i];\n\n if (child.type === 'comma' && node.type === 'brace') {\n if (i === 1) queue.push('');\n queue.push('');\n continue;\n }\n\n if (child.type === 'close') {\n q.push(append(q.pop(), queue, enclose));\n continue;\n }\n\n if (child.value && child.type !== 'open') {\n queue.push(append(queue.pop(), child.value));\n continue;\n }\n\n if (child.nodes) {\n walk(child, node);\n }\n }\n\n return queue;\n };\n\n return utils.flatten(walk(ast));\n};\n\nmodule.exports = expand;\n","'use strict';\n\nconst stringify = require('./stringify');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n CHAR_BACKSLASH, /* \\ */\n CHAR_BACKTICK, /* ` */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_RIGHT_SQUARE_BRACKET, /* ] */\n CHAR_DOUBLE_QUOTE, /* \" */\n CHAR_SINGLE_QUOTE, /* ' */\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_NOBREAK_SPACE\n} = require('./constants');\n\n/**\n * parse\n */\n\nconst parse = (input, options = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n let opts = options || {};\n let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n if (input.length > max) {\n throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);\n }\n\n let ast = { type: 'root', input, nodes: [] };\n let stack = [ast];\n let block = ast;\n let prev = ast;\n let brackets = 0;\n let length = input.length;\n let index = 0;\n let depth = 0;\n let value;\n let memo = {};\n\n /**\n * Helpers\n */\n\n const advance = () => input[index++];\n const push = node => {\n if (node.type === 'text' && prev.type === 'dot') {\n prev.type = 'text';\n }\n\n if (prev && prev.type === 'text' && node.type === 'text') {\n prev.value += node.value;\n return;\n }\n\n block.nodes.push(node);\n node.parent = block;\n node.prev = prev;\n prev = node;\n return node;\n };\n\n push({ type: 'bos' });\n\n while (index < length) {\n block = stack[stack.length - 1];\n value = advance();\n\n /**\n * Invalid chars\n */\n\n if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {\n continue;\n }\n\n /**\n * Escaped chars\n */\n\n if (value === CHAR_BACKSLASH) {\n push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });\n continue;\n }\n\n /**\n * Right square bracket (literal): ']'\n */\n\n if (value === CHAR_RIGHT_SQUARE_BRACKET) {\n push({ type: 'text', value: '\\\\' + value });\n continue;\n }\n\n /**\n * Left square bracket: '['\n */\n\n if (value === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n\n let closed = true;\n let next;\n\n while (index < length && (next = advance())) {\n value += next;\n\n if (next === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n continue;\n }\n\n if (next === CHAR_BACKSLASH) {\n value += advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n brackets--;\n\n if (brackets === 0) {\n break;\n }\n }\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === CHAR_LEFT_PARENTHESES) {\n block = push({ type: 'paren', nodes: [] });\n stack.push(block);\n push({ type: 'text', value });\n continue;\n }\n\n if (value === CHAR_RIGHT_PARENTHESES) {\n if (block.type !== 'paren') {\n push({ type: 'text', value });\n continue;\n }\n block = stack.pop();\n push({ type: 'text', value });\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Quotes: '|\"|`\n */\n\n if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {\n let open = value;\n let next;\n\n if (options.keepQuotes !== true) {\n value = '';\n }\n\n while (index < length && (next = advance())) {\n if (next === CHAR_BACKSLASH) {\n value += next + advance();\n continue;\n }\n\n if (next === open) {\n if (options.keepQuotes === true) value += next;\n break;\n }\n\n value += next;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Left curly brace: '{'\n */\n\n if (value === CHAR_LEFT_CURLY_BRACE) {\n depth++;\n\n let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;\n let brace = {\n type: 'brace',\n open: true,\n close: false,\n dollar,\n depth,\n commas: 0,\n ranges: 0,\n nodes: []\n };\n\n block = push(brace);\n stack.push(block);\n push({ type: 'open', value });\n continue;\n }\n\n /**\n * Right curly brace: '}'\n */\n\n if (value === CHAR_RIGHT_CURLY_BRACE) {\n if (block.type !== 'brace') {\n push({ type: 'text', value });\n continue;\n }\n\n let type = 'close';\n block = stack.pop();\n block.close = true;\n\n push({ type, value });\n depth--;\n\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Comma: ','\n */\n\n if (value === CHAR_COMMA && depth > 0) {\n if (block.ranges > 0) {\n block.ranges = 0;\n let open = block.nodes.shift();\n block.nodes = [open, { type: 'text', value: stringify(block) }];\n }\n\n push({ type: 'comma', value });\n block.commas++;\n continue;\n }\n\n /**\n * Dot: '.'\n */\n\n if (value === CHAR_DOT && depth > 0 && block.commas === 0) {\n let siblings = block.nodes;\n\n if (depth === 0 || siblings.length === 0) {\n push({ type: 'text', value });\n continue;\n }\n\n if (prev.type === 'dot') {\n block.range = [];\n prev.value += value;\n prev.type = 'range';\n\n if (block.nodes.length !== 3 && block.nodes.length !== 5) {\n block.invalid = true;\n block.ranges = 0;\n prev.type = 'text';\n continue;\n }\n\n block.ranges++;\n block.args = [];\n continue;\n }\n\n if (prev.type === 'range') {\n siblings.pop();\n\n let before = siblings[siblings.length - 1];\n before.value += prev.value + value;\n prev = before;\n block.ranges--;\n continue;\n }\n\n push({ type: 'dot', value });\n continue;\n }\n\n /**\n * Text\n */\n\n push({ type: 'text', value });\n }\n\n // Mark imbalanced braces and brackets as invalid\n do {\n block = stack.pop();\n\n if (block.type !== 'root') {\n block.nodes.forEach(node => {\n if (!node.nodes) {\n if (node.type === 'open') node.isOpen = true;\n if (node.type === 'close') node.isClose = true;\n if (!node.nodes) node.type = 'text';\n node.invalid = true;\n }\n });\n\n // get the location of the block on parent.nodes (block's siblings)\n let parent = stack[stack.length - 1];\n let index = parent.nodes.indexOf(block);\n // replace the (invalid) block with it's nodes\n parent.nodes.splice(index, 1, ...block.nodes);\n }\n } while (stack.length > 0);\n\n push({ type: 'eos' });\n return ast;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst utils = require('./utils');\n\nmodule.exports = (ast, options = {}) => {\n let stringify = (node, parent = {}) => {\n let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let output = '';\n\n if (node.value) {\n if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {\n return '\\\\' + node.value;\n }\n return node.value;\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += stringify(child);\n }\n }\n return output;\n };\n\n return stringify(ast);\n};\n\n","'use strict';\n\nexports.isInteger = num => {\n if (typeof num === 'number') {\n return Number.isInteger(num);\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isInteger(Number(num));\n }\n return false;\n};\n\n/**\n * Find a node of the given type\n */\n\nexports.find = (node, type) => node.nodes.find(node => node.type === type);\n\n/**\n * Find a node of the given type\n */\n\nexports.exceedsLimit = (min, max, step = 1, limit) => {\n if (limit === false) return false;\n if (!exports.isInteger(min) || !exports.isInteger(max)) return false;\n return ((Number(max) - Number(min)) / Number(step)) >= limit;\n};\n\n/**\n * Escape the given node with '\\\\' before node.value\n */\n\nexports.escapeNode = (block, n = 0, type) => {\n let node = block.nodes[n];\n if (!node) return;\n\n if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {\n if (node.escaped !== true) {\n node.value = '\\\\' + node.value;\n node.escaped = true;\n }\n }\n};\n\n/**\n * Returns true if the given brace node should be enclosed in literal braces\n */\n\nexports.encloseBrace = node => {\n if (node.type !== 'brace') return false;\n if ((node.commas >> 0 + node.ranges >> 0) === 0) {\n node.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a brace node is invalid.\n */\n\nexports.isInvalidBrace = block => {\n if (block.type !== 'brace') return false;\n if (block.invalid === true || block.dollar) return true;\n if ((block.commas >> 0 + block.ranges >> 0) === 0) {\n block.invalid = true;\n return true;\n }\n if (block.open !== true || block.close !== true) {\n block.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a node is an open or close node\n */\n\nexports.isOpenOrClose = node => {\n if (node.type === 'open' || node.type === 'close') {\n return true;\n }\n return node.open === true || node.close === true;\n};\n\n/**\n * Reduce an array of text nodes.\n */\n\nexports.reduce = nodes => nodes.reduce((acc, node) => {\n if (node.type === 'text') acc.push(node.value);\n if (node.type === 'range') node.type = 'text';\n return acc;\n}, []);\n\n/**\n * Flatten an array\n */\n\nexports.flatten = (...args) => {\n const result = [];\n const flat = arr => {\n for (let i = 0; i < arr.length; i++) {\n let ele = arr[i];\n Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);\n }\n return result;\n };\n flat(args);\n return result;\n};\n","/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nconst util = require('util');\nconst toRegexRange = require('to-regex-range');\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\n\nconst transform = toNumber => {\n return value => toNumber === true ? Number(value) : String(value);\n};\n\nconst isValidValue = value => {\n return typeof value === 'number' || (typeof value === 'string' && value !== '');\n};\n\nconst isNumber = num => Number.isInteger(+num);\n\nconst zeros = input => {\n let value = `${input}`;\n let index = -1;\n if (value[0] === '-') value = value.slice(1);\n if (value === '0') return false;\n while (value[++index] === '0');\n return index > 0;\n};\n\nconst stringify = (start, end, options) => {\n if (typeof start === 'string' || typeof end === 'string') {\n return true;\n }\n return options.stringify === true;\n};\n\nconst pad = (input, maxLength, toNumber) => {\n if (maxLength > 0) {\n let dash = input[0] === '-' ? '-' : '';\n if (dash) input = input.slice(1);\n input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));\n }\n if (toNumber === false) {\n return String(input);\n }\n return input;\n};\n\nconst toMaxLen = (input, maxLength) => {\n let negative = input[0] === '-' ? '-' : '';\n if (negative) {\n input = input.slice(1);\n maxLength--;\n }\n while (input.length < maxLength) input = '0' + input;\n return negative ? ('-' + input) : input;\n};\n\nconst toSequence = (parts, options) => {\n parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\n let prefix = options.capture ? '' : '?:';\n let positives = '';\n let negatives = '';\n let result;\n\n if (parts.positives.length) {\n positives = parts.positives.join('|');\n }\n\n if (parts.negatives.length) {\n negatives = `-(${prefix}${parts.negatives.join('|')})`;\n }\n\n if (positives && negatives) {\n result = `${positives}|${negatives}`;\n } else {\n result = positives || negatives;\n }\n\n if (options.wrap) {\n return `(${prefix}${result})`;\n }\n\n return result;\n};\n\nconst toRange = (a, b, isNumbers, options) => {\n if (isNumbers) {\n return toRegexRange(a, b, { wrap: false, ...options });\n }\n\n let start = String.fromCharCode(a);\n if (a === b) return start;\n\n let stop = String.fromCharCode(b);\n return `[${start}-${stop}]`;\n};\n\nconst toRegex = (start, end, options) => {\n if (Array.isArray(start)) {\n let wrap = options.wrap === true;\n let prefix = options.capture ? '' : '?:';\n return wrap ? `(${prefix}${start.join('|')})` : start.join('|');\n }\n return toRegexRange(start, end, options);\n};\n\nconst rangeError = (...args) => {\n return new RangeError('Invalid range arguments: ' + util.inspect(...args));\n};\n\nconst invalidRange = (start, end, options) => {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n};\n\nconst invalidStep = (step, options) => {\n if (options.strictRanges === true) {\n throw new TypeError(`Expected step \"${step}\" to be a number`);\n }\n return [];\n};\n\nconst fillNumbers = (start, end, step = 1, options = {}) => {\n let a = Number(start);\n let b = Number(end);\n\n if (!Number.isInteger(a) || !Number.isInteger(b)) {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n }\n\n // fix negative zero\n if (a === 0) a = 0;\n if (b === 0) b = 0;\n\n let descending = a > b;\n let startString = String(start);\n let endString = String(end);\n let stepString = String(step);\n step = Math.max(Math.abs(step), 1);\n\n let padded = zeros(startString) || zeros(endString) || zeros(stepString);\n let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;\n let toNumber = padded === false && stringify(start, end, options) === false;\n let format = options.transform || transform(toNumber);\n\n if (options.toRegex && step === 1) {\n return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);\n }\n\n let parts = { negatives: [], positives: [] };\n let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n if (options.toRegex === true && step > 1) {\n push(a);\n } else {\n range.push(pad(format(a, index), maxLen, toNumber));\n }\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return step > 1\n ? toSequence(parts, options)\n : toRegex(range, null, { wrap: false, ...options });\n }\n\n return range;\n};\n\nconst fillLetters = (start, end, step = 1, options = {}) => {\n if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {\n return invalidRange(start, end, options);\n }\n\n\n let format = options.transform || (val => String.fromCharCode(val));\n let a = `${start}`.charCodeAt(0);\n let b = `${end}`.charCodeAt(0);\n\n let descending = a > b;\n let min = Math.min(a, b);\n let max = Math.max(a, b);\n\n if (options.toRegex && step === 1) {\n return toRange(min, max, false, options);\n }\n\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n range.push(format(a, index));\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return toRegex(range, null, { wrap: false, options });\n }\n\n return range;\n};\n\nconst fill = (start, end, step, options = {}) => {\n if (end == null && isValidValue(start)) {\n return [start];\n }\n\n if (!isValidValue(start) || !isValidValue(end)) {\n return invalidRange(start, end, options);\n }\n\n if (typeof step === 'function') {\n return fill(start, end, 1, { transform: step });\n }\n\n if (isObject(step)) {\n return fill(start, end, 0, step);\n }\n\n let opts = { ...options };\n if (opts.capture === true) opts.wrap = true;\n step = step || opts.step || 1;\n\n if (!isNumber(step)) {\n if (step != null && !isObject(step)) return invalidStep(step, opts);\n return fill(start, end, 1, step);\n }\n\n if (isNumber(start) && isNumber(end)) {\n return fillNumbers(start, end, step, opts);\n }\n\n return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);\n};\n\nmodule.exports = fill;\n","'use strict';\n\nconst util = require('util');\nconst braces = require('braces');\nconst picomatch = require('picomatch');\nconst utils = require('picomatch/lib/utils');\nconst isEmptyString = val => val === '' || val === './';\n\n/**\n * Returns an array of strings that match one or more glob patterns.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm(list, patterns[, options]);\n *\n * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {String|Array<string>} `list` List of strings to match.\n * @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options)\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nconst micromatch = (list, patterns, options) => {\n patterns = [].concat(patterns);\n list = [].concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = state => {\n items.add(state.output);\n if (options && options.onResult) {\n options.onResult(state);\n }\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) negatives++;\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n let matches = result.filter(item => !omit.has(item));\n\n if (options && matches.length === 0) {\n if (options.failglob === true) {\n throw new Error(`No matches found for \"${patterns.join(', ')}\"`);\n }\n\n if (options.nonull === true || options.nullglob === true) {\n return options.unescape ? patterns.map(p => p.replace(/\\\\/g, '')) : patterns;\n }\n }\n\n return matches;\n};\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.match = micromatch;\n\n/**\n * Returns a matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matcher(pattern[, options]);\n *\n * const isMatch = mm.matcher('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options`\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nmicromatch.matcher = (pattern, options) => picomatch(pattern, options);\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.isMatch(string, patterns[, options]);\n *\n * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(mm.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `[options]` See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.any = micromatch.isMatch;\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.not(list, patterns[, options]);\n *\n * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nmicromatch.not = (list, patterns, options = {}) => {\n patterns = [].concat(patterns).map(String);\n let result = new Set();\n let items = [];\n\n let onResult = state => {\n if (options.onResult) options.onResult(state);\n items.push(state.output);\n };\n\n let matches = new Set(micromatch(list, patterns, { ...options, onResult }));\n\n for (let item of items) {\n if (!matches.has(item)) {\n result.add(item);\n }\n }\n return [...result];\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var mm = require('micromatch');\n * // mm.contains(string, pattern[, options]);\n *\n * console.log(mm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(mm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any of the patterns matches any part of `str`.\n * @api public\n */\n\nmicromatch.contains = (str, pattern, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n if (Array.isArray(pattern)) {\n return pattern.some(p => micromatch.contains(str, p, options));\n }\n\n if (typeof pattern === 'string') {\n if (isEmptyString(str) || isEmptyString(pattern)) {\n return false;\n }\n\n if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {\n return true;\n }\n }\n\n return micromatch.isMatch(str, pattern, { ...options, contains: true });\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matchKeys(object, patterns[, options]);\n *\n * const obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(mm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nmicromatch.matchKeys = (obj, patterns, options) => {\n if (!utils.isObject(obj)) {\n throw new TypeError('Expected the first argument to be an object');\n }\n let keys = micromatch(Object.keys(obj), patterns, options);\n let res = {};\n for (let key of keys) res[key] = obj[key];\n return res;\n};\n\n/**\n * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.some(list, patterns[, options]);\n *\n * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`\n * @api public\n */\n\nmicromatch.some = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (items.some(item => isMatch(item))) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if every string in the given `list` matches\n * any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.every(list, patterns[, options]);\n *\n * console.log(mm.every('foo.js', ['foo.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`\n * @api public\n */\n\nmicromatch.every = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (!items.every(item => isMatch(item))) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns true if **all** of the given `patterns` match\n * the specified string.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.all(string, patterns[, options]);\n *\n * console.log(mm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.all = (str, patterns, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n return [].concat(patterns).every(p => picomatch(p, options)(str));\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.capture(pattern, string[, options]);\n *\n * console.log(mm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `glob` Glob pattern to use for matching.\n * @param {String} `input` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nmicromatch.capture = (glob, input, options) => {\n let posix = utils.isWindows(options);\n let regex = picomatch.makeRe(String(glob), { ...options, capture: true });\n let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);\n\n if (match) {\n return match.slice(1).map(v => v === void 0 ? '' : v);\n }\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.makeRe(pattern[, options]);\n *\n * console.log(mm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nmicromatch.makeRe = (...args) => picomatch.makeRe(...args);\n\n/**\n * Scan a glob pattern to separate the pattern into segments. Used\n * by the [split](#split) method.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.scan(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\nmicromatch.scan = (...args) => picomatch.scan(...args);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.parse(pattern[, options]);\n * ```\n * @param {String} `glob`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as regex source string.\n * @api public\n */\n\nmicromatch.parse = (patterns, options) => {\n let res = [];\n for (let pattern of [].concat(patterns || [])) {\n for (let str of braces(String(pattern), options)) {\n res.push(picomatch.parse(str, options));\n }\n }\n return res;\n};\n\n/**\n * Process the given brace `pattern`.\n *\n * ```js\n * const { braces } = require('micromatch');\n * console.log(braces('foo/{a,b,c}/bar'));\n * //=> [ 'foo/(a|b|c)/bar' ]\n *\n * console.log(braces('foo/{a,b,c}/bar', { expand: true }));\n * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]\n * ```\n * @param {String} `pattern` String with brace pattern to process.\n * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.\n * @return {Array}\n * @api public\n */\n\nmicromatch.braces = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n if ((options && options.nobrace === true) || !/\\{.*\\}/.test(pattern)) {\n return [pattern];\n }\n return braces(pattern, options);\n};\n\n/**\n * Expand braces\n */\n\nmicromatch.braceExpand = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n return micromatch.braces(pattern, { ...options, expand: true });\n};\n\n/**\n * Expose micromatch\n */\n\nmodule.exports = micromatch;\n","// Copyright Joyent, Inc. and other Node contributors.\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a\r\n// copy of this software and associated documentation files (the\r\n// \"Software\"), to deal in the Software without restriction, including\r\n// without limitation the rights to use, copy, modify, merge, publish,\r\n// distribute, sublicense, and/or sell copies of the Software, and to permit\r\n// persons to whom the Software is furnished to do so, subject to the\r\n// following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included\r\n// in all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\r\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\r\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n'use strict';\r\n\r\n\r\nvar isWindows = process.platform === 'win32';\r\nvar util = require('util');\r\n\r\n\r\n// resolves . and .. elements in a path array with directory names there\r\n// must be no slashes or device names (c:\\) in the array\r\n// (so also no leading and trailing slashes - it does not distinguish\r\n// relative and absolute paths)\r\nfunction normalizeArray(parts, allowAboveRoot) {\r\n var res = [];\r\n for (var i = 0; i < parts.length; i++) {\r\n var p = parts[i];\r\n\r\n // ignore empty parts\r\n if (!p || p === '.')\r\n continue;\r\n\r\n if (p === '..') {\r\n if (res.length && res[res.length - 1] !== '..') {\r\n res.pop();\r\n } else if (allowAboveRoot) {\r\n res.push('..');\r\n }\r\n } else {\r\n res.push(p);\r\n }\r\n }\r\n\r\n return res;\r\n}\r\n\r\n// returns an array with empty elements removed from either end of the input\r\n// array or the original array if no elements need to be removed\r\nfunction trimArray(arr) {\r\n var lastIndex = arr.length - 1;\r\n var start = 0;\r\n for (; start <= lastIndex; start++) {\r\n if (arr[start])\r\n break;\r\n }\r\n\r\n var end = lastIndex;\r\n for (; end >= 0; end--) {\r\n if (arr[end])\r\n break;\r\n }\r\n\r\n if (start === 0 && end === lastIndex)\r\n return arr;\r\n if (start > end)\r\n return [];\r\n return arr.slice(start, end + 1);\r\n}\r\n\r\n// Regex to split a windows path into three parts: [*, device, slash,\r\n// tail] windows-only\r\nvar splitDeviceRe =\r\n /^([a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?([\\\\\\/])?([\\s\\S]*?)$/;\r\n\r\n// Regex to split the tail part of the above into [*, dir, basename, ext]\r\nvar splitTailRe =\r\n /^([\\s\\S]*?)((?:\\.{1,2}|[^\\\\\\/]+?|)(\\.[^.\\/\\\\]*|))(?:[\\\\\\/]*)$/;\r\n\r\nvar win32 = {};\r\n\r\n// Function to split a filename into [root, dir, basename, ext]\r\nfunction win32SplitPath(filename) {\r\n // Separate device+slash from tail\r\n var result = splitDeviceRe.exec(filename),\r\n device = (result[1] || '') + (result[2] || ''),\r\n tail = result[3] || '';\r\n // Split the tail into dir, basename and extension\r\n var result2 = splitTailRe.exec(tail),\r\n dir = result2[1],\r\n basename = result2[2],\r\n ext = result2[3];\r\n return [device, dir, basename, ext];\r\n}\r\n\r\nfunction win32StatPath(path) {\r\n var result = splitDeviceRe.exec(path),\r\n device = result[1] || '',\r\n isUnc = !!device && device[1] !== ':';\r\n return {\r\n device: device,\r\n isUnc: isUnc,\r\n isAbsolute: isUnc || !!result[2], // UNC paths are always absolute\r\n tail: result[3]\r\n };\r\n}\r\n\r\nfunction normalizeUNCRoot(device) {\r\n return '\\\\\\\\' + device.replace(/^[\\\\\\/]+/, '').replace(/[\\\\\\/]+/g, '\\\\');\r\n}\r\n\r\n// path.resolve([from ...], to)\r\nwin32.resolve = function() {\r\n var resolvedDevice = '',\r\n resolvedTail = '',\r\n resolvedAbsolute = false;\r\n\r\n for (var i = arguments.length - 1; i >= -1; i--) {\r\n var path;\r\n if (i >= 0) {\r\n path = arguments[i];\r\n } else if (!resolvedDevice) {\r\n path = process.cwd();\r\n } else {\r\n // Windows has the concept of drive-specific current working\r\n // directories. If we've resolved a drive letter but not yet an\r\n // absolute path, get cwd for that drive. We're sure the device is not\r\n // an unc path at this points, because unc paths are always absolute.\r\n path = process.env['=' + resolvedDevice];\r\n // Verify that a drive-local cwd was found and that it actually points\r\n // to our drive. If not, default to the drive's root.\r\n if (!path || path.substr(0, 3).toLowerCase() !==\r\n resolvedDevice.toLowerCase() + '\\\\') {\r\n path = resolvedDevice + '\\\\';\r\n }\r\n }\r\n\r\n // Skip empty and invalid entries\r\n if (!util.isString(path)) {\r\n throw new TypeError('Arguments to path.resolve must be strings');\r\n } else if (!path) {\r\n continue;\r\n }\r\n\r\n var result = win32StatPath(path),\r\n device = result.device,\r\n isUnc = result.isUnc,\r\n isAbsolute = result.isAbsolute,\r\n tail = result.tail;\r\n\r\n if (device &&\r\n resolvedDevice &&\r\n device.toLowerCase() !== resolvedDevice.toLowerCase()) {\r\n // This path points to another device so it is not applicable\r\n continue;\r\n }\r\n\r\n if (!resolvedDevice) {\r\n resolvedDevice = device;\r\n }\r\n if (!resolvedAbsolute) {\r\n resolvedTail = tail + '\\\\' + resolvedTail;\r\n resolvedAbsolute = isAbsolute;\r\n }\r\n\r\n if (resolvedDevice && resolvedAbsolute) {\r\n break;\r\n }\r\n }\r\n\r\n // Convert slashes to backslashes when `resolvedDevice` points to an UNC\r\n // root. Also squash multiple slashes into a single one where appropriate.\r\n if (isUnc) {\r\n resolvedDevice = normalizeUNCRoot(resolvedDevice);\r\n }\r\n\r\n // At this point the path should be resolved to a full absolute path,\r\n // but handle relative paths to be safe (might happen when process.cwd()\r\n // fails)\r\n\r\n // Normalize the tail path\r\n resolvedTail = normalizeArray(resolvedTail.split(/[\\\\\\/]+/),\r\n !resolvedAbsolute).join('\\\\');\r\n\r\n return (resolvedDevice + (resolvedAbsolute ? '\\\\' : '') + resolvedTail) ||\r\n '.';\r\n};\r\n\r\n\r\nwin32.normalize = function(path) {\r\n var result = win32StatPath(path),\r\n device = result.device,\r\n isUnc = result.isUnc,\r\n isAbsolute = result.isAbsolute,\r\n tail = result.tail,\r\n trailingSlash = /[\\\\\\/]$/.test(tail);\r\n\r\n // Normalize the tail path\r\n tail = normalizeArray(tail.split(/[\\\\\\/]+/), !isAbsolute).join('\\\\');\r\n\r\n if (!tail && !isAbsolute) {\r\n tail = '.';\r\n }\r\n if (tail && trailingSlash) {\r\n tail += '\\\\';\r\n }\r\n\r\n // Convert slashes to backslashes when `device` points to an UNC root.\r\n // Also squash multiple slashes into a single one where appropriate.\r\n if (isUnc) {\r\n device = normalizeUNCRoot(device);\r\n }\r\n\r\n return device + (isAbsolute ? '\\\\' : '') + tail;\r\n};\r\n\r\n\r\nwin32.isAbsolute = function(path) {\r\n return win32StatPath(path).isAbsolute;\r\n};\r\n\r\nwin32.join = function() {\r\n var paths = [];\r\n for (var i = 0; i < arguments.length; i++) {\r\n var arg = arguments[i];\r\n if (!util.isString(arg)) {\r\n throw new TypeError('Arguments to path.join must be strings');\r\n }\r\n if (arg) {\r\n paths.push(arg);\r\n }\r\n }\r\n\r\n var joined = paths.join('\\\\');\r\n\r\n // Make sure that the joined path doesn't start with two slashes, because\r\n // normalize() will mistake it for an UNC path then.\r\n //\r\n // This step is skipped when it is very clear that the user actually\r\n // intended to point at an UNC path. This is assumed when the first\r\n // non-empty string arguments starts with exactly two slashes followed by\r\n // at least one more non-slash character.\r\n //\r\n // Note that for normalize() to treat a path as an UNC path it needs to\r\n // have at least 2 components, so we don't filter for that here.\r\n // This means that the user can use join to construct UNC paths from\r\n // a server name and a share name; for example:\r\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\')\r\n if (!/^[\\\\\\/]{2}[^\\\\\\/]/.test(paths[0])) {\r\n joined = joined.replace(/^[\\\\\\/]{2,}/, '\\\\');\r\n }\r\n\r\n return win32.normalize(joined);\r\n};\r\n\r\n\r\n// path.relative(from, to)\r\n// it will solve the relative path from 'from' to 'to', for instance:\r\n// from = 'C:\\\\orandea\\\\test\\\\aaa'\r\n// to = 'C:\\\\orandea\\\\impl\\\\bbb'\r\n// The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\r\nwin32.relative = function(from, to) {\r\n from = win32.resolve(from);\r\n to = win32.resolve(to);\r\n\r\n // windows is not case sensitive\r\n var lowerFrom = from.toLowerCase();\r\n var lowerTo = to.toLowerCase();\r\n\r\n var toParts = trimArray(to.split('\\\\'));\r\n\r\n var lowerFromParts = trimArray(lowerFrom.split('\\\\'));\r\n var lowerToParts = trimArray(lowerTo.split('\\\\'));\r\n\r\n var length = Math.min(lowerFromParts.length, lowerToParts.length);\r\n var samePartsLength = length;\r\n for (var i = 0; i < length; i++) {\r\n if (lowerFromParts[i] !== lowerToParts[i]) {\r\n samePartsLength = i;\r\n break;\r\n }\r\n }\r\n\r\n if (samePartsLength == 0) {\r\n return to;\r\n }\r\n\r\n var outputParts = [];\r\n for (var i = samePartsLength; i < lowerFromParts.length; i++) {\r\n outputParts.push('..');\r\n }\r\n\r\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\r\n\r\n return outputParts.join('\\\\');\r\n};\r\n\r\n\r\nwin32._makeLong = function(path) {\r\n // Note: this will *probably* throw somewhere.\r\n if (!util.isString(path))\r\n return path;\r\n\r\n if (!path) {\r\n return '';\r\n }\r\n\r\n var resolvedPath = win32.resolve(path);\r\n\r\n if (/^[a-zA-Z]\\:\\\\/.test(resolvedPath)) {\r\n // path is local filesystem path, which needs to be converted\r\n // to long UNC path.\r\n return '\\\\\\\\?\\\\' + resolvedPath;\r\n } else if (/^\\\\\\\\[^?.]/.test(resolvedPath)) {\r\n // path is network UNC path, which needs to be converted\r\n // to long UNC path.\r\n return '\\\\\\\\?\\\\UNC\\\\' + resolvedPath.substring(2);\r\n }\r\n\r\n return path;\r\n};\r\n\r\n\r\nwin32.dirname = function(path) {\r\n var result = win32SplitPath(path),\r\n root = result[0],\r\n dir = result[1];\r\n\r\n if (!root && !dir) {\r\n // No dirname whatsoever\r\n return '.';\r\n }\r\n\r\n if (dir) {\r\n // It has a dirname, strip trailing slash\r\n dir = dir.substr(0, dir.length - 1);\r\n }\r\n\r\n return root + dir;\r\n};\r\n\r\n\r\nwin32.basename = function(path, ext) {\r\n var f = win32SplitPath(path)[2];\r\n // TODO: make this comparison case-insensitive on windows?\r\n if (ext && f.substr(-1 * ext.length) === ext) {\r\n f = f.substr(0, f.length - ext.length);\r\n }\r\n return f;\r\n};\r\n\r\n\r\nwin32.extname = function(path) {\r\n return win32SplitPath(path)[3];\r\n};\r\n\r\n\r\nwin32.format = function(pathObject) {\r\n if (!util.isObject(pathObject)) {\r\n throw new TypeError(\r\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\r\n );\r\n }\r\n\r\n var root = pathObject.root || '';\r\n\r\n if (!util.isString(root)) {\r\n throw new TypeError(\r\n \"'pathObject.root' must be a string or undefined, not \" +\r\n typeof pathObject.root\r\n );\r\n }\r\n\r\n var dir = pathObject.dir;\r\n var base = pathObject.base || '';\r\n if (!dir) {\r\n return base;\r\n }\r\n if (dir[dir.length - 1] === win32.sep) {\r\n return dir + base;\r\n }\r\n return dir + win32.sep + base;\r\n};\r\n\r\n\r\nwin32.parse = function(pathString) {\r\n if (!util.isString(pathString)) {\r\n throw new TypeError(\r\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\r\n );\r\n }\r\n var allParts = win32SplitPath(pathString);\r\n if (!allParts || allParts.length !== 4) {\r\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\r\n }\r\n return {\r\n root: allParts[0],\r\n dir: allParts[0] + allParts[1].slice(0, -1),\r\n base: allParts[2],\r\n ext: allParts[3],\r\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\r\n };\r\n};\r\n\r\n\r\nwin32.sep = '\\\\';\r\nwin32.delimiter = ';';\r\n\r\n\r\n// Split a filename into [root, dir, basename, ext], unix version\r\n// 'root' is just a slash, or nothing.\r\nvar splitPathRe =\r\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\r\nvar posix = {};\r\n\r\n\r\nfunction posixSplitPath(filename) {\r\n return splitPathRe.exec(filename).slice(1);\r\n}\r\n\r\n\r\n// path.resolve([from ...], to)\r\n// posix version\r\nposix.resolve = function() {\r\n var resolvedPath = '',\r\n resolvedAbsolute = false;\r\n\r\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\r\n var path = (i >= 0) ? arguments[i] : process.cwd();\r\n\r\n // Skip empty and invalid entries\r\n if (!util.isString(path)) {\r\n throw new TypeError('Arguments to path.resolve must be strings');\r\n } else if (!path) {\r\n continue;\r\n }\r\n\r\n resolvedPath = path + '/' + resolvedPath;\r\n resolvedAbsolute = path[0] === '/';\r\n }\r\n\r\n // At this point the path should be resolved to a full absolute path, but\r\n // handle relative paths to be safe (might happen when process.cwd() fails)\r\n\r\n // Normalize the path\r\n resolvedPath = normalizeArray(resolvedPath.split('/'),\r\n !resolvedAbsolute).join('/');\r\n\r\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\r\n};\r\n\r\n// path.normalize(path)\r\n// posix version\r\nposix.normalize = function(path) {\r\n var isAbsolute = posix.isAbsolute(path),\r\n trailingSlash = path && path[path.length - 1] === '/';\r\n\r\n // Normalize the path\r\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\r\n\r\n if (!path && !isAbsolute) {\r\n path = '.';\r\n }\r\n if (path && trailingSlash) {\r\n path += '/';\r\n }\r\n\r\n return (isAbsolute ? '/' : '') + path;\r\n};\r\n\r\n// posix version\r\nposix.isAbsolute = function(path) {\r\n return path.charAt(0) === '/';\r\n};\r\n\r\n// posix version\r\nposix.join = function() {\r\n var path = '';\r\n for (var i = 0; i < arguments.length; i++) {\r\n var segment = arguments[i];\r\n if (!util.isString(segment)) {\r\n throw new TypeError('Arguments to path.join must be strings');\r\n }\r\n if (segment) {\r\n if (!path) {\r\n path += segment;\r\n } else {\r\n path += '/' + segment;\r\n }\r\n }\r\n }\r\n return posix.normalize(path);\r\n};\r\n\r\n\r\n// path.relative(from, to)\r\n// posix version\r\nposix.relative = function(from, to) {\r\n from = posix.resolve(from).substr(1);\r\n to = posix.resolve(to).substr(1);\r\n\r\n var fromParts = trimArray(from.split('/'));\r\n var toParts = trimArray(to.split('/'));\r\n\r\n var length = Math.min(fromParts.length, toParts.length);\r\n var samePartsLength = length;\r\n for (var i = 0; i < length; i++) {\r\n if (fromParts[i] !== toParts[i]) {\r\n samePartsLength = i;\r\n break;\r\n }\r\n }\r\n\r\n var outputParts = [];\r\n for (var i = samePartsLength; i < fromParts.length; i++) {\r\n outputParts.push('..');\r\n }\r\n\r\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\r\n\r\n return outputParts.join('/');\r\n};\r\n\r\n\r\nposix._makeLong = function(path) {\r\n return path;\r\n};\r\n\r\n\r\nposix.dirname = function(path) {\r\n var result = posixSplitPath(path),\r\n root = result[0],\r\n dir = result[1];\r\n\r\n if (!root && !dir) {\r\n // No dirname whatsoever\r\n return '.';\r\n }\r\n\r\n if (dir) {\r\n // It has a dirname, strip trailing slash\r\n dir = dir.substr(0, dir.length - 1);\r\n }\r\n\r\n return root + dir;\r\n};\r\n\r\n\r\nposix.basename = function(path, ext) {\r\n var f = posixSplitPath(path)[2];\r\n // TODO: make this comparison case-insensitive on windows?\r\n if (ext && f.substr(-1 * ext.length) === ext) {\r\n f = f.substr(0, f.length - ext.length);\r\n }\r\n return f;\r\n};\r\n\r\n\r\nposix.extname = function(path) {\r\n return posixSplitPath(path)[3];\r\n};\r\n\r\n\r\nposix.format = function(pathObject) {\r\n if (!util.isObject(pathObject)) {\r\n throw new TypeError(\r\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\r\n );\r\n }\r\n\r\n var root = pathObject.root || '';\r\n\r\n if (!util.isString(root)) {\r\n throw new TypeError(\r\n \"'pathObject.root' must be a string or undefined, not \" +\r\n typeof pathObject.root\r\n );\r\n }\r\n\r\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\r\n var base = pathObject.base || '';\r\n return dir + base;\r\n};\r\n\r\n\r\nposix.parse = function(pathString) {\r\n if (!util.isString(pathString)) {\r\n throw new TypeError(\r\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\r\n );\r\n }\r\n var allParts = posixSplitPath(pathString);\r\n if (!allParts || allParts.length !== 4) {\r\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\r\n }\r\n allParts[1] = allParts[1] || '';\r\n allParts[2] = allParts[2] || '';\r\n allParts[3] = allParts[3] || '';\r\n\r\n return {\r\n root: allParts[0],\r\n dir: allParts[0] + allParts[1].slice(0, -1),\r\n base: allParts[2],\r\n ext: allParts[3],\r\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\r\n };\r\n};\r\n\r\n\r\nposix.sep = '/';\r\nposix.delimiter = ':';\r\n\r\n\r\nif (isWindows)\r\n module.exports = win32;\r\nelse /* posix */\r\n module.exports = posix;\r\n\r\nmodule.exports.posix = posix;\r\nmodule.exports.win32 = win32;\r\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","/*! *****************************************************************************\nCopyright (C) Microsoft. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\nvar Reflect;\n(function (Reflect) {\n // Metadata Proposal\n // https://rbuckton.github.io/reflect-metadata/\n (function (factory) {\n var root = typeof global === \"object\" ? global :\n typeof self === \"object\" ? self :\n typeof this === \"object\" ? this :\n Function(\"return this;\")();\n var exporter = makeExporter(Reflect);\n if (typeof root.Reflect === \"undefined\") {\n root.Reflect = Reflect;\n }\n else {\n exporter = makeExporter(root.Reflect, exporter);\n }\n factory(exporter);\n function makeExporter(target, previous) {\n return function (key, value) {\n if (typeof target[key] !== \"function\") {\n Object.defineProperty(target, key, { configurable: true, writable: true, value: value });\n }\n if (previous)\n previous(key, value);\n };\n }\n })(function (exporter) {\n var hasOwn = Object.prototype.hasOwnProperty;\n // feature test for Symbol support\n var supportsSymbol = typeof Symbol === \"function\";\n var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== \"undefined\" ? Symbol.toPrimitive : \"@@toPrimitive\";\n var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== \"undefined\" ? Symbol.iterator : \"@@iterator\";\n var supportsCreate = typeof Object.create === \"function\"; // feature test for Object.create support\n var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support\n var downLevel = !supportsCreate && !supportsProto;\n var HashMap = {\n // create an object in dictionary mode (a.k.a. \"slow\" mode in v8)\n create: supportsCreate\n ? function () { return MakeDictionary(Object.create(null)); }\n : supportsProto\n ? function () { return MakeDictionary({ __proto__: null }); }\n : function () { return MakeDictionary({}); },\n has: downLevel\n ? function (map, key) { return hasOwn.call(map, key); }\n : function (map, key) { return key in map; },\n get: downLevel\n ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; }\n : function (map, key) { return map[key]; },\n };\n // Load global or shim versions of Map, Set, and WeakMap\n var functionPrototype = Object.getPrototypeOf(Function);\n var usePolyfill = typeof process === \"object\" && process.env && process.env[\"REFLECT_METADATA_USE_MAP_POLYFILL\"] === \"true\";\n var _Map = !usePolyfill && typeof Map === \"function\" && typeof Map.prototype.entries === \"function\" ? Map : CreateMapPolyfill();\n var _Set = !usePolyfill && typeof Set === \"function\" && typeof Set.prototype.entries === \"function\" ? Set : CreateSetPolyfill();\n var _WeakMap = !usePolyfill && typeof WeakMap === \"function\" ? WeakMap : CreateWeakMapPolyfill();\n // [[Metadata]] internal slot\n // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots\n var Metadata = new _WeakMap();\n /**\n * Applies a set of decorators to a property of a target object.\n * @param decorators An array of decorators.\n * @param target The target object.\n * @param propertyKey (Optional) The property key to decorate.\n * @param attributes (Optional) The property descriptor for the target key.\n * @remarks Decorators are applied in reverse order.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Example = Reflect.decorate(decoratorsArray, Example);\n *\n * // property (on constructor)\n * Reflect.decorate(decoratorsArray, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.decorate(decoratorsArray, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Object.defineProperty(Example, \"staticMethod\",\n * Reflect.decorate(decoratorsArray, Example, \"staticMethod\",\n * Object.getOwnPropertyDescriptor(Example, \"staticMethod\")));\n *\n * // method (on prototype)\n * Object.defineProperty(Example.prototype, \"method\",\n * Reflect.decorate(decoratorsArray, Example.prototype, \"method\",\n * Object.getOwnPropertyDescriptor(Example.prototype, \"method\")));\n *\n */\n function decorate(decorators, target, propertyKey, attributes) {\n if (!IsUndefined(propertyKey)) {\n if (!IsArray(decorators))\n throw new TypeError();\n if (!IsObject(target))\n throw new TypeError();\n if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))\n throw new TypeError();\n if (IsNull(attributes))\n attributes = undefined;\n propertyKey = ToPropertyKey(propertyKey);\n return DecorateProperty(decorators, target, propertyKey, attributes);\n }\n else {\n if (!IsArray(decorators))\n throw new TypeError();\n if (!IsConstructor(target))\n throw new TypeError();\n return DecorateConstructor(decorators, target);\n }\n }\n exporter(\"decorate\", decorate);\n // 4.1.2 Reflect.metadata(metadataKey, metadataValue)\n // https://rbuckton.github.io/reflect-metadata/#reflect.metadata\n /**\n * A default metadata decorator factory that can be used on a class, class member, or parameter.\n * @param metadataKey The key for the metadata entry.\n * @param metadataValue The value for the metadata entry.\n * @returns A decorator function.\n * @remarks\n * If `metadataKey` is already defined for the target and target key, the\n * metadataValue for that key will be overwritten.\n * @example\n *\n * // constructor\n * @Reflect.metadata(key, value)\n * class Example {\n * }\n *\n * // property (on constructor, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticProperty;\n * }\n *\n * // property (on prototype, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * property;\n * }\n *\n * // method (on constructor)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticMethod() { }\n * }\n *\n * // method (on prototype)\n * class Example {\n * @Reflect.metadata(key, value)\n * method() { }\n * }\n *\n */\n function metadata(metadataKey, metadataValue) {\n function decorator(target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))\n throw new TypeError();\n OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n }\n return decorator;\n }\n exporter(\"metadata\", metadata);\n /**\n * Define a unique metadata entry on the target.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param metadataValue A value that contains attached metadata.\n * @param target The target object on which to define metadata.\n * @param propertyKey (Optional) The property key for the target.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Reflect.defineMetadata(\"custom:annotation\", options, Example);\n *\n * // property (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticMethod\");\n *\n * // method (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"method\");\n *\n * // decorator factory as metadata-producing annotation.\n * function MyAnnotation(options): Decorator {\n * return (target, key?) => Reflect.defineMetadata(\"custom:annotation\", options, target, key);\n * }\n *\n */\n function defineMetadata(metadataKey, metadataValue, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n }\n exporter(\"defineMetadata\", defineMetadata);\n /**\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryHasMetadata(metadataKey, target, propertyKey);\n }\n exporter(\"hasMetadata\", hasMetadata);\n /**\n * Gets a value indicating whether the target object has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasOwnMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);\n }\n exporter(\"hasOwnMetadata\", hasOwnMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function getMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryGetMetadata(metadataKey, target, propertyKey);\n }\n exporter(\"getMetadata\", getMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function getOwnMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);\n }\n exporter(\"getOwnMetadata\", getOwnMetadata);\n /**\n * Gets the metadata keys defined on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"method\");\n *\n */\n function getMetadataKeys(target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryMetadataKeys(target, propertyKey);\n }\n exporter(\"getMetadataKeys\", getMetadataKeys);\n /**\n * Gets the unique metadata keys defined on the target object.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"method\");\n *\n */\n function getOwnMetadataKeys(target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n return OrdinaryOwnMetadataKeys(target, propertyKey);\n }\n exporter(\"getOwnMetadataKeys\", getOwnMetadataKeys);\n /**\n * Deletes the metadata entry from the target object with the provided key.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata entry was found and deleted; otherwise, false.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function deleteMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target))\n throw new TypeError();\n if (!IsUndefined(propertyKey))\n propertyKey = ToPropertyKey(propertyKey);\n var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);\n if (IsUndefined(metadataMap))\n return false;\n if (!metadataMap.delete(metadataKey))\n return false;\n if (metadataMap.size > 0)\n return true;\n var targetMetadata = Metadata.get(target);\n targetMetadata.delete(propertyKey);\n if (targetMetadata.size > 0)\n return true;\n Metadata.delete(target);\n return true;\n }\n exporter(\"deleteMetadata\", deleteMetadata);\n function DecorateConstructor(decorators, target) {\n for (var i = decorators.length - 1; i >= 0; --i) {\n var decorator = decorators[i];\n var decorated = decorator(target);\n if (!IsUndefined(decorated) && !IsNull(decorated)) {\n if (!IsConstructor(decorated))\n throw new TypeError();\n target = decorated;\n }\n }\n return target;\n }\n function DecorateProperty(decorators, target, propertyKey, descriptor) {\n for (var i = decorators.length - 1; i >= 0; --i) {\n var decorator = decorators[i];\n var decorated = decorator(target, propertyKey, descriptor);\n if (!IsUndefined(decorated) && !IsNull(decorated)) {\n if (!IsObject(decorated))\n throw new TypeError();\n descriptor = decorated;\n }\n }\n return descriptor;\n }\n function GetOrCreateMetadataMap(O, P, Create) {\n var targetMetadata = Metadata.get(O);\n if (IsUndefined(targetMetadata)) {\n if (!Create)\n return undefined;\n targetMetadata = new _Map();\n Metadata.set(O, targetMetadata);\n }\n var metadataMap = targetMetadata.get(P);\n if (IsUndefined(metadataMap)) {\n if (!Create)\n return undefined;\n metadataMap = new _Map();\n targetMetadata.set(P, metadataMap);\n }\n return metadataMap;\n }\n // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata\n function OrdinaryHasMetadata(MetadataKey, O, P) {\n var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn)\n return true;\n var parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent))\n return OrdinaryHasMetadata(MetadataKey, parent, P);\n return false;\n }\n // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata\n function OrdinaryHasOwnMetadata(MetadataKey, O, P) {\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap))\n return false;\n return ToBoolean(metadataMap.has(MetadataKey));\n }\n // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata\n function OrdinaryGetMetadata(MetadataKey, O, P) {\n var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn)\n return OrdinaryGetOwnMetadata(MetadataKey, O, P);\n var parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent))\n return OrdinaryGetMetadata(MetadataKey, parent, P);\n return undefined;\n }\n // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata\n function OrdinaryGetOwnMetadata(MetadataKey, O, P) {\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap))\n return undefined;\n return metadataMap.get(MetadataKey);\n }\n // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata\n function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);\n metadataMap.set(MetadataKey, MetadataValue);\n }\n // 3.1.6.1 OrdinaryMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys\n function OrdinaryMetadataKeys(O, P) {\n var ownKeys = OrdinaryOwnMetadataKeys(O, P);\n var parent = OrdinaryGetPrototypeOf(O);\n if (parent === null)\n return ownKeys;\n var parentKeys = OrdinaryMetadataKeys(parent, P);\n if (parentKeys.length <= 0)\n return ownKeys;\n if (ownKeys.length <= 0)\n return parentKeys;\n var set = new _Set();\n var keys = [];\n for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {\n var key = ownKeys_1[_i];\n var hasKey = set.has(key);\n if (!hasKey) {\n set.add(key);\n keys.push(key);\n }\n }\n for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {\n var key = parentKeys_1[_a];\n var hasKey = set.has(key);\n if (!hasKey) {\n set.add(key);\n keys.push(key);\n }\n }\n return keys;\n }\n // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys\n function OrdinaryOwnMetadataKeys(O, P) {\n var keys = [];\n var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap))\n return keys;\n var keysObj = metadataMap.keys();\n var iterator = GetIterator(keysObj);\n var k = 0;\n while (true) {\n var next = IteratorStep(iterator);\n if (!next) {\n keys.length = k;\n return keys;\n }\n var nextValue = IteratorValue(next);\n try {\n keys[k] = nextValue;\n }\n catch (e) {\n try {\n IteratorClose(iterator);\n }\n finally {\n throw e;\n }\n }\n k++;\n }\n }\n // 6 ECMAScript Data Typ0es and Values\n // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values\n function Type(x) {\n if (x === null)\n return 1 /* Null */;\n switch (typeof x) {\n case \"undefined\": return 0 /* Undefined */;\n case \"boolean\": return 2 /* Boolean */;\n case \"string\": return 3 /* String */;\n case \"symbol\": return 4 /* Symbol */;\n case \"number\": return 5 /* Number */;\n case \"object\": return x === null ? 1 /* Null */ : 6 /* Object */;\n default: return 6 /* Object */;\n }\n }\n // 6.1.1 The Undefined Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type\n function IsUndefined(x) {\n return x === undefined;\n }\n // 6.1.2 The Null Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type\n function IsNull(x) {\n return x === null;\n }\n // 6.1.5 The Symbol Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type\n function IsSymbol(x) {\n return typeof x === \"symbol\";\n }\n // 6.1.7 The Object Type\n // https://tc39.github.io/ecma262/#sec-object-type\n function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }\n // 7.1 Type Conversion\n // https://tc39.github.io/ecma262/#sec-type-conversion\n // 7.1.1 ToPrimitive(input [, PreferredType])\n // https://tc39.github.io/ecma262/#sec-toprimitive\n function ToPrimitive(input, PreferredType) {\n switch (Type(input)) {\n case 0 /* Undefined */: return input;\n case 1 /* Null */: return input;\n case 2 /* Boolean */: return input;\n case 3 /* String */: return input;\n case 4 /* Symbol */: return input;\n case 5 /* Number */: return input;\n }\n var hint = PreferredType === 3 /* String */ ? \"string\" : PreferredType === 5 /* Number */ ? \"number\" : \"default\";\n var exoticToPrim = GetMethod(input, toPrimitiveSymbol);\n if (exoticToPrim !== undefined) {\n var result = exoticToPrim.call(input, hint);\n if (IsObject(result))\n throw new TypeError();\n return result;\n }\n return OrdinaryToPrimitive(input, hint === \"default\" ? \"number\" : hint);\n }\n // 7.1.1.1 OrdinaryToPrimitive(O, hint)\n // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive\n function OrdinaryToPrimitive(O, hint) {\n if (hint === \"string\") {\n var toString_1 = O.toString;\n if (IsCallable(toString_1)) {\n var result = toString_1.call(O);\n if (!IsObject(result))\n return result;\n }\n var valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n var result = valueOf.call(O);\n if (!IsObject(result))\n return result;\n }\n }\n else {\n var valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n var result = valueOf.call(O);\n if (!IsObject(result))\n return result;\n }\n var toString_2 = O.toString;\n if (IsCallable(toString_2)) {\n var result = toString_2.call(O);\n if (!IsObject(result))\n return result;\n }\n }\n throw new TypeError();\n }\n // 7.1.2 ToBoolean(argument)\n // https://tc39.github.io/ecma262/2016/#sec-toboolean\n function ToBoolean(argument) {\n return !!argument;\n }\n // 7.1.12 ToString(argument)\n // https://tc39.github.io/ecma262/#sec-tostring\n function ToString(argument) {\n return \"\" + argument;\n }\n // 7.1.14 ToPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-topropertykey\n function ToPropertyKey(argument) {\n var key = ToPrimitive(argument, 3 /* String */);\n if (IsSymbol(key))\n return key;\n return ToString(key);\n }\n // 7.2 Testing and Comparison Operations\n // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations\n // 7.2.2 IsArray(argument)\n // https://tc39.github.io/ecma262/#sec-isarray\n function IsArray(argument) {\n return Array.isArray\n ? Array.isArray(argument)\n : argument instanceof Object\n ? argument instanceof Array\n : Object.prototype.toString.call(argument) === \"[object Array]\";\n }\n // 7.2.3 IsCallable(argument)\n // https://tc39.github.io/ecma262/#sec-iscallable\n function IsCallable(argument) {\n // NOTE: This is an approximation as we cannot check for [[Call]] internal method.\n return typeof argument === \"function\";\n }\n // 7.2.4 IsConstructor(argument)\n // https://tc39.github.io/ecma262/#sec-isconstructor\n function IsConstructor(argument) {\n // NOTE: This is an approximation as we cannot check for [[Construct]] internal method.\n return typeof argument === \"function\";\n }\n // 7.2.7 IsPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-ispropertykey\n function IsPropertyKey(argument) {\n switch (Type(argument)) {\n case 3 /* String */: return true;\n case 4 /* Symbol */: return true;\n default: return false;\n }\n }\n // 7.3 Operations on Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-objects\n // 7.3.9 GetMethod(V, P)\n // https://tc39.github.io/ecma262/#sec-getmethod\n function GetMethod(V, P) {\n var func = V[P];\n if (func === undefined || func === null)\n return undefined;\n if (!IsCallable(func))\n throw new TypeError();\n return func;\n }\n // 7.4 Operations on Iterator Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects\n function GetIterator(obj) {\n var method = GetMethod(obj, iteratorSymbol);\n if (!IsCallable(method))\n throw new TypeError(); // from Call\n var iterator = method.call(obj);\n if (!IsObject(iterator))\n throw new TypeError();\n return iterator;\n }\n // 7.4.4 IteratorValue(iterResult)\n // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue\n function IteratorValue(iterResult) {\n return iterResult.value;\n }\n // 7.4.5 IteratorStep(iterator)\n // https://tc39.github.io/ecma262/#sec-iteratorstep\n function IteratorStep(iterator) {\n var result = iterator.next();\n return result.done ? false : result;\n }\n // 7.4.6 IteratorClose(iterator, completion)\n // https://tc39.github.io/ecma262/#sec-iteratorclose\n function IteratorClose(iterator) {\n var f = iterator[\"return\"];\n if (f)\n f.call(iterator);\n }\n // 9.1 Ordinary Object Internal Methods and Internal Slots\n // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots\n // 9.1.1.1 OrdinaryGetPrototypeOf(O)\n // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof\n function OrdinaryGetPrototypeOf(O) {\n var proto = Object.getPrototypeOf(O);\n if (typeof O !== \"function\" || O === functionPrototype)\n return proto;\n // TypeScript doesn't set __proto__ in ES5, as it's non-standard.\n // Try to determine the superclass constructor. Compatible implementations\n // must either set __proto__ on a subclass constructor to the superclass constructor,\n // or ensure each class has a valid `constructor` property on its prototype that\n // points back to the constructor.\n // If this is not the same as Function.[[Prototype]], then this is definately inherited.\n // This is the case when in ES6 or when using __proto__ in a compatible browser.\n if (proto !== functionPrototype)\n return proto;\n // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.\n var prototype = O.prototype;\n var prototypeProto = prototype && Object.getPrototypeOf(prototype);\n if (prototypeProto == null || prototypeProto === Object.prototype)\n return proto;\n // If the constructor was not a function, then we cannot determine the heritage.\n var constructor = prototypeProto.constructor;\n if (typeof constructor !== \"function\")\n return proto;\n // If we have some kind of self-reference, then we cannot determine the heritage.\n if (constructor === O)\n return proto;\n // we have a pretty good guess at the heritage.\n return constructor;\n }\n // naive Map shim\n function CreateMapPolyfill() {\n var cacheSentinel = {};\n var arraySentinel = [];\n var MapIterator = /** @class */ (function () {\n function MapIterator(keys, values, selector) {\n this._index = 0;\n this._keys = keys;\n this._values = values;\n this._selector = selector;\n }\n MapIterator.prototype[\"@@iterator\"] = function () { return this; };\n MapIterator.prototype[iteratorSymbol] = function () { return this; };\n MapIterator.prototype.next = function () {\n var index = this._index;\n if (index >= 0 && index < this._keys.length) {\n var result = this._selector(this._keys[index], this._values[index]);\n if (index + 1 >= this._keys.length) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n }\n else {\n this._index++;\n }\n return { value: result, done: false };\n }\n return { value: undefined, done: true };\n };\n MapIterator.prototype.throw = function (error) {\n if (this._index >= 0) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n }\n throw error;\n };\n MapIterator.prototype.return = function (value) {\n if (this._index >= 0) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n }\n return { value: value, done: true };\n };\n return MapIterator;\n }());\n return /** @class */ (function () {\n function Map() {\n this._keys = [];\n this._values = [];\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n }\n Object.defineProperty(Map.prototype, \"size\", {\n get: function () { return this._keys.length; },\n enumerable: true,\n configurable: true\n });\n Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; };\n Map.prototype.get = function (key) {\n var index = this._find(key, /*insert*/ false);\n return index >= 0 ? this._values[index] : undefined;\n };\n Map.prototype.set = function (key, value) {\n var index = this._find(key, /*insert*/ true);\n this._values[index] = value;\n return this;\n };\n Map.prototype.delete = function (key) {\n var index = this._find(key, /*insert*/ false);\n if (index >= 0) {\n var size = this._keys.length;\n for (var i = index + 1; i < size; i++) {\n this._keys[i - 1] = this._keys[i];\n this._values[i - 1] = this._values[i];\n }\n this._keys.length--;\n this._values.length--;\n if (key === this._cacheKey) {\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n }\n return true;\n }\n return false;\n };\n Map.prototype.clear = function () {\n this._keys.length = 0;\n this._values.length = 0;\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n };\n Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); };\n Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); };\n Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); };\n Map.prototype[\"@@iterator\"] = function () { return this.entries(); };\n Map.prototype[iteratorSymbol] = function () { return this.entries(); };\n Map.prototype._find = function (key, insert) {\n if (this._cacheKey !== key) {\n this._cacheIndex = this._keys.indexOf(this._cacheKey = key);\n }\n if (this._cacheIndex < 0 && insert) {\n this._cacheIndex = this._keys.length;\n this._keys.push(key);\n this._values.push(undefined);\n }\n return this._cacheIndex;\n };\n return Map;\n }());\n function getKey(key, _) {\n return key;\n }\n function getValue(_, value) {\n return value;\n }\n function getEntry(key, value) {\n return [key, value];\n }\n }\n // naive Set shim\n function CreateSetPolyfill() {\n return /** @class */ (function () {\n function Set() {\n this._map = new _Map();\n }\n Object.defineProperty(Set.prototype, \"size\", {\n get: function () { return this._map.size; },\n enumerable: true,\n configurable: true\n });\n Set.prototype.has = function (value) { return this._map.has(value); };\n Set.prototype.add = function (value) { return this._map.set(value, value), this; };\n Set.prototype.delete = function (value) { return this._map.delete(value); };\n Set.prototype.clear = function () { this._map.clear(); };\n Set.prototype.keys = function () { return this._map.keys(); };\n Set.prototype.values = function () { return this._map.values(); };\n Set.prototype.entries = function () { return this._map.entries(); };\n Set.prototype[\"@@iterator\"] = function () { return this.keys(); };\n Set.prototype[iteratorSymbol] = function () { return this.keys(); };\n return Set;\n }());\n }\n // naive WeakMap shim\n function CreateWeakMapPolyfill() {\n var UUID_SIZE = 16;\n var keys = HashMap.create();\n var rootKey = CreateUniqueKey();\n return /** @class */ (function () {\n function WeakMap() {\n this._key = CreateUniqueKey();\n }\n WeakMap.prototype.has = function (target) {\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? HashMap.has(table, this._key) : false;\n };\n WeakMap.prototype.get = function (target) {\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? HashMap.get(table, this._key) : undefined;\n };\n WeakMap.prototype.set = function (target, value) {\n var table = GetOrCreateWeakMapTable(target, /*create*/ true);\n table[this._key] = value;\n return this;\n };\n WeakMap.prototype.delete = function (target) {\n var table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? delete table[this._key] : false;\n };\n WeakMap.prototype.clear = function () {\n // NOTE: not a real clear, just makes the previous data unreachable\n this._key = CreateUniqueKey();\n };\n return WeakMap;\n }());\n function CreateUniqueKey() {\n var key;\n do\n key = \"@@WeakMap@@\" + CreateUUID();\n while (HashMap.has(keys, key));\n keys[key] = true;\n return key;\n }\n function GetOrCreateWeakMapTable(target, create) {\n if (!hasOwn.call(target, rootKey)) {\n if (!create)\n return undefined;\n Object.defineProperty(target, rootKey, { value: HashMap.create() });\n }\n return target[rootKey];\n }\n function FillRandomBytes(buffer, size) {\n for (var i = 0; i < size; ++i)\n buffer[i] = Math.random() * 0xff | 0;\n return buffer;\n }\n function GenRandomBytes(size) {\n if (typeof Uint8Array === \"function\") {\n if (typeof crypto !== \"undefined\")\n return crypto.getRandomValues(new Uint8Array(size));\n if (typeof msCrypto !== \"undefined\")\n return msCrypto.getRandomValues(new Uint8Array(size));\n return FillRandomBytes(new Uint8Array(size), size);\n }\n return FillRandomBytes(new Array(size), size);\n }\n function CreateUUID() {\n var data = GenRandomBytes(UUID_SIZE);\n // mark as random - RFC 4122 § 4.4\n data[6] = data[6] & 0x4f | 0x40;\n data[8] = data[8] & 0xbf | 0x80;\n var result = \"\";\n for (var offset = 0; offset < UUID_SIZE; ++offset) {\n var byte = data[offset];\n if (offset === 4 || offset === 6 || offset === 8)\n result += \"-\";\n if (byte < 16)\n result += \"0\";\n result += byte.toString(16).toLowerCase();\n }\n return result;\n }\n }\n // uses a heuristic used by v8 and chakra to force an object into dictionary mode.\n function MakeDictionary(obj) {\n obj.__ = undefined;\n delete obj.__;\n return obj;\n }\n });\n})(Reflect || (Reflect = {}));\n","/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n","/*!\n * to-regex-range <https://github.com/micromatch/to-regex-range>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst isNumber = require('is-number');\n\nconst toRegexRange = (min, max, options) => {\n if (isNumber(min) === false) {\n throw new TypeError('toRegexRange: expected the first argument to be a number');\n }\n\n if (max === void 0 || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new TypeError('toRegexRange: expected the second argument to be a number.');\n }\n\n let opts = { relaxZeros: true, ...options };\n if (typeof opts.strictZeros === 'boolean') {\n opts.relaxZeros = opts.strictZeros === false;\n }\n\n let relax = String(opts.relaxZeros);\n let shorthand = String(opts.shorthand);\n let capture = String(opts.capture);\n let wrap = String(opts.wrap);\n let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;\n\n if (toRegexRange.cache.hasOwnProperty(cacheKey)) {\n return toRegexRange.cache[cacheKey].result;\n }\n\n let a = Math.min(min, max);\n let b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n let result = min + '|' + max;\n if (opts.capture) {\n return `(${result})`;\n }\n if (opts.wrap === false) {\n return result;\n }\n return `(?:${result})`;\n }\n\n let isPadded = hasPadding(min) || hasPadding(max);\n let state = { min, max, a, b };\n let positives = [];\n let negatives = [];\n\n if (isPadded) {\n state.isPadded = isPadded;\n state.maxLen = String(state.max).length;\n }\n\n if (a < 0) {\n let newMin = b < 0 ? Math.abs(b) : 1;\n negatives = splitToPatterns(newMin, Math.abs(a), state, opts);\n a = state.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, state, opts);\n }\n\n state.negatives = negatives;\n state.positives = positives;\n state.result = collatePatterns(negatives, positives, opts);\n\n if (opts.capture === true) {\n state.result = `(${state.result})`;\n } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {\n state.result = `(?:${state.result})`;\n }\n\n toRegexRange.cache[cacheKey] = state;\n return state.result;\n};\n\nfunction collatePatterns(neg, pos, options) {\n let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n let intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n let nines = 1;\n let zeros = 1;\n\n let stop = countNines(min, nines);\n let stops = new Set([max]);\n\n while (min <= stop && stop <= max) {\n stops.add(stop);\n nines += 1;\n stop = countNines(min, nines);\n }\n\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops.add(stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops = [...stops];\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return { pattern: start, count: [], digits: 0 };\n }\n\n let zipped = zip(start, stop);\n let digits = zipped.length;\n let pattern = '';\n let count = 0;\n\n for (let i = 0; i < digits; i++) {\n let [startDigit, stopDigit] = zipped[i];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit, options);\n\n } else {\n count++;\n }\n }\n\n if (count) {\n pattern += options.shorthand === true ? '\\\\d' : '[0-9]';\n }\n\n return { pattern, count: [count], digits };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n let ranges = splitToRanges(min, max);\n let tokens = [];\n let start = min;\n let prev;\n\n for (let i = 0; i < ranges.length; i++) {\n let max = ranges[i];\n let obj = rangeToPattern(String(start), String(max), options);\n let zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.count.length > 1) {\n prev.count.pop();\n }\n\n prev.count.push(obj.count[0]);\n prev.string = prev.pattern + toQuantifier(prev.count);\n start = max + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(max, tok, options);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.count);\n tokens.push(obj);\n start = max + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n let result = [];\n\n for (let ele of arr) {\n let { string } = ele;\n\n // only push if _both_ are negative...\n if (!intersection && !contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n\n // or _both_ are positive\n if (intersection && contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n }\n return result;\n}\n\n/**\n * Zip strings\n */\n\nfunction zip(a, b) {\n let arr = [];\n for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction contains(arr, key, val) {\n return arr.some(ele => ele[key] === val);\n}\n\nfunction countNines(min, len) {\n return Number(String(min).slice(0, -len) + '9'.repeat(len));\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n let [start = 0, stop = ''] = digits;\n if (stop || start > 1) {\n return `{${start + (stop ? ',' + stop : '')}}`;\n }\n return '';\n}\n\nfunction toCharacterClass(a, b, options) {\n return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;\n}\n\nfunction hasPadding(str) {\n return /^-?(0+)\\d/.test(str);\n}\n\nfunction padZeros(value, tok, options) {\n if (!tok.isPadded) {\n return value;\n }\n\n let diff = Math.abs(tok.maxLen - String(value).length);\n let relax = options.relaxZeros !== false;\n\n switch (diff) {\n case 0:\n return '';\n case 1:\n return relax ? '0?' : '0';\n case 2:\n return relax ? '0{0,2}' : '00';\n default: {\n return relax ? `0{0,${diff}}` : `0{${diff}}`;\n }\n }\n}\n\n/**\n * Cache\n */\n\ntoRegexRange.cache = {};\ntoRegexRange.clearCache = () => (toRegexRange.cache = {});\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n","/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(num) {\n if (typeof num === 'number') {\n return num - num === 0;\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);\n }\n return false;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(() => {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = () => ([]);\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 62;\nmodule.exports = webpackEmptyAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var DecoratorTypes;\n(function (DecoratorTypes) {\n DecoratorTypes[\"PARAM\"] = \"parameter\";\n DecoratorTypes[\"PARAM_CTOR\"] = \"parameter.constructor\";\n DecoratorTypes[\"PARAM_STC\"] = \"parameter.static\";\n DecoratorTypes[\"PROP\"] = \"property\";\n DecoratorTypes[\"PROP_STC\"] = \"property.static\";\n DecoratorTypes[\"METHOD\"] = \"method\";\n DecoratorTypes[\"METHOD_STC\"] = \"method.static\";\n DecoratorTypes[\"CLASS\"] = \"class\";\n})(DecoratorTypes || (DecoratorTypes = {}));\n//# sourceMappingURL=DecoratorTypes.js.map","/**\n * Get the provide constructor if target is an instance.\n * @param target\n * @returns {*}\n */\nexport function getClass(target) {\n return target.prototype ? target : target.constructor;\n}\n/**\n * Get the provide constructor if target is an instance.\n * @param target\n * @returns {*}\n * @alias getClass\n */\nexport function classOf(target) {\n return getClass(target);\n}\n//# sourceMappingURL=classOf.js.map","import { DecoratorTypes } from \"../../domain/DecoratorTypes\";\nimport { classOf } from \"../objects/classOf\";\nexport function decoratorTypeOf(args) {\n const [target, propertyKey, descriptor] = args;\n const staticType = (type) => {\n return target !== classOf(target) ? type : `${type}.static`;\n };\n if (typeof descriptor === \"number\") {\n return propertyKey ? staticType(\"parameter\") : \"parameter.constructor\";\n }\n if (descriptor && descriptor.value) {\n return staticType(\"method\");\n }\n if ((propertyKey && descriptor === undefined) || descriptor) {\n return staticType(\"property\");\n }\n return DecoratorTypes.CLASS;\n}\n//# sourceMappingURL=decoratorTypeOf.js.map","/**\n * Return true if value is an array\n * @param target\n * @returns {boolean}\n */\nexport function isArray(target) {\n return Array.isArray(target);\n}\n/**\n * Return true if the clazz is an array.\n * @param target\n * @returns {boolean}\n * @ignore\n */\nexport function isArrayOrArrayClass(target) {\n return target === Array || isArray(target);\n}\n//# sourceMappingURL=isArray.js.map","/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isDate(target) {\n return target === Date || (target instanceof Date && !isNaN(+target));\n}\n//# sourceMappingURL=isDate.js.map","export function isFunction(target) {\n return typeof target === \"function\";\n}\n//# sourceMappingURL=isFunction.js.map","/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isBoolean(target) {\n return typeof target === \"boolean\" || target instanceof Boolean || target === Boolean;\n}\nexport function isBooleanOrBooleanClass(target) {\n return typeof target === \"boolean\" || target instanceof Boolean || target === Boolean;\n}\n//# sourceMappingURL=isBoolean.js.map","/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isNumber(target) {\n return typeof target === \"number\";\n}\nexport function isNumberOrNumberClass(target) {\n return typeof target === \"number\" || target instanceof Number || target === Number;\n}\n//# sourceMappingURL=isNumber.js.map","/**\n * @param target\n * @returns {boolean}\n */\nexport function isString(target) {\n return typeof target === \"string\";\n}\nexport function isStringOrStringClass(target) {\n return typeof target === \"string\" || target instanceof String || target === String;\n}\n//# sourceMappingURL=isString.js.map","import { isBoolean, isBooleanOrBooleanClass } from \"./isBoolean\";\nimport { isNumber, isNumberOrNumberClass } from \"./isNumber\";\nimport { isString, isStringOrStringClass } from \"./isString\";\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n * @ignore\n */\nexport function isPrimitiveOrPrimitiveClass(target) {\n return isStringOrStringClass(target) || isNumberOrNumberClass(target) || isBooleanOrBooleanClass(target);\n}\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n */\nexport function isPrimitive(target) {\n return isString(target) || isNumber(target) || isBoolean(target);\n}\nexport function isPrimitiveClass(target) {\n return [String, Number, Boolean].includes(target);\n}\n//# sourceMappingURL=isPrimitive.js.map","/**\n *\n * @param target\n */\nexport function isSymbol(target) {\n return typeof target === \"symbol\";\n}\nexport function isSymbolOrSymbolClass(target) {\n return typeof target === \"symbol\" || target instanceof Symbol || target === Symbol;\n}\n//# sourceMappingURL=isSymbol.js.map","/**\n * Tests to see if the object is Buffer\n * @param target\n * @returns {boolean}\n */\nexport function isBuffer(target) {\n return target === Buffer || target instanceof Buffer;\n}\n//# sourceMappingURL=isBuffer.js.map","import { isArray } from \"./isArray\";\nimport { isDate } from \"./isDate\";\nimport { isFunction } from \"./isFunction\";\nimport { isNil } from \"./isNil\";\nimport { isPrimitive } from \"./isPrimitive\";\nimport { isSymbol } from \"./isSymbol\";\nimport { isBuffer } from \"./isBuffer\";\nimport { isRegExp } from \"./isRegExp\";\nconst isBasicType = (source) => isNil(source) || isPrimitive(source) || isSymbol(source) || isFunction(source);\n/**\n * Return a cloned value\n * @param source\n * @param stack\n */\nexport function deepClone(source, stack = new WeakMap()) {\n let dest;\n if (isBasicType(source)) {\n return source;\n }\n if (isBuffer(source)) {\n const copy = Buffer.alloc(source.length);\n source.copy(copy);\n return copy;\n }\n if (isDate(source)) {\n return new Date(source);\n }\n if (isRegExp(source)) {\n return new RegExp(source);\n }\n const stacked = stack.get(source);\n if (stacked) {\n // See issue #1619\n return stacked;\n }\n if (isArray(source)) {\n dest = [];\n }\n else {\n dest = {};\n stack.set(source, dest);\n }\n for (const key in source) {\n // Use getOwnPropertyDescriptor instead of source[key] to prevent from triggering setter/getter.\n const descriptor = Object.getOwnPropertyDescriptor(source, key);\n if (descriptor) {\n if (!isFunction(descriptor.value)) {\n dest[key] = deepClone(descriptor.value, stack);\n }\n else {\n Object.defineProperty(dest, key, descriptor);\n }\n }\n }\n if (!isArray(source)) {\n const prototype = Reflect.getPrototypeOf(source);\n Reflect.setPrototypeOf(dest, prototype);\n }\n return dest;\n}\n//# sourceMappingURL=deepClone.js.map","export function isNil(value) {\n return value === undefined || value === null;\n}\n//# sourceMappingURL=isNil.js.map","export function isRegExp(target) {\n return target instanceof RegExp;\n}\n//# sourceMappingURL=isRegExp.js.map","/**\n * Prevent prototype pollution vulnerability\n * @param key\n */\nexport function isProtectedKey(key) {\n return [\"__proto__\", \"constructor\", \"prototype\"].includes(key);\n}\n//# sourceMappingURL=isProtectedKey.js.map","import { isProtectedKey } from \"./isProtectedKey\";\nexport function objectKeys(obj) {\n return Object.keys(obj).filter((key) => !isProtectedKey(key));\n}\n//# sourceMappingURL=objectKeys.js.map","import { createInstance } from \"./createInstance\";\nimport { isFunction } from \"./isFunction\";\nimport { isPrimitive } from \"./isPrimitive\";\nimport { isSymbol } from \"./isSymbol\";\nimport { objectKeys } from \"./objectKeys\";\nexport function mergeReducerBuilder(cb) {\n return (collection, value, options) => {\n const index = collection.findIndex((item) => cb(item, value));\n if (index === -1) {\n return [...collection, value];\n }\n collection[index] = deepMerge(collection[index], value, options);\n return collection;\n };\n}\nconst defaultReducer = mergeReducerBuilder((a, b) => a === b);\nfunction getReducer({ reducers, parentKey }) {\n if (!reducers) {\n return defaultReducer;\n }\n if (parentKey && reducers[parentKey]) {\n return reducers[parentKey];\n }\n return reducers[\"default\"] || defaultReducer;\n}\nfunction shouldReturnObj(obj, source) {\n return isPrimitive(obj) || isSymbol(obj) || isFunction(obj) || source === undefined;\n}\nfunction shouldReturnSource(obj, source) {\n return obj === undefined || obj === null || (obj === \"\" && source !== \"\");\n}\nexport function deepMerge(source, obj, options = {}) {\n if (shouldReturnSource(obj, source)) {\n return source;\n }\n if (shouldReturnObj(obj, source)) {\n return obj;\n }\n if (Array.isArray(source)) {\n const reducer = getReducer(options);\n return [].concat(obj).reduce((out, value) => reducer(out, value, options), [...source]);\n }\n return [...objectKeys(source), ...objectKeys(obj)].reduce((out, key) => {\n const src = source && source[key];\n const value = deepMerge(src, obj && obj[key], {\n ...options,\n parentKey: key\n });\n if (options.cleanUndefinedProps && value === undefined) {\n return out;\n }\n return {\n ...out,\n [key]: value\n };\n }, createInstance(source));\n}\n//# sourceMappingURL=deepMerge.js.map","import { classOf } from \"./classOf\";\nexport function createInstance(obj) {\n return obj ? (classOf(obj) !== Object ? Object.create(obj) : {}) : {};\n}\n//# sourceMappingURL=createInstance.js.map","/**\n * Return the descriptor for a given class and propertyKey\n * @param target\n * @param {string} propertyKey\n * @returns {PropertyDescriptor}\n */\nexport function descriptorOf(target, propertyKey) {\n return Object.getOwnPropertyDescriptor((target && target.prototype) || target, propertyKey);\n}\nexport function isMethodDescriptor(target, propertyKey) {\n return descriptorOf(target, propertyKey)?.value;\n}\n//# sourceMappingURL=descriptorOf.js.map","/**\n * Get the provide name.\n * @param targetClass\n */\nexport function nameOfClass(targetClass) {\n return typeof targetClass === \"function\" ? targetClass.name : targetClass.constructor.name;\n}\n/**\n * Get symbol name.\n * @param sym\n */\nexport const nameOfSymbol = (sym) => sym.toString().replace(\"Symbol(\", \"\").replace(\")\", \"\");\n/**\n * Get object name\n */\nexport function nameOf(obj) {\n switch (typeof obj) {\n default:\n return \"\" + obj;\n case \"symbol\":\n return nameOfSymbol(obj);\n case \"function\":\n return nameOfClass(obj);\n }\n}\n//# sourceMappingURL=nameOf.js.map","import \"reflect-metadata\";\nimport { classOf } from \"../utils/objects/classOf\";\n/**\n * Metadata key\n * @private\n * @type {string}\n */\nconst DESIGN_PARAM_TYPES = \"design:paramtypes\";\n/**\n * Metadata key\n * @private\n * @type {string}\n */\nconst DESIGN_TYPE = \"design:type\";\n/**\n * Metadata key\n * @private\n * @type {string}\n */\nconst DESIGN_RETURN_TYPE = \"design:returntype\";\n/**\n * Properties collections\n * @private\n * @type {string}\n */\nconst PROPERTIES = new Map();\n/**\n * @stable\n */\nexport class Metadata {\n /**\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\n * @param key A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Metadata.get(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Metadata.get(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Metadata.get(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Metadata.get(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Metadata.get(\"custom:annotation\", Example.prototype, \"method\");\n * ```\n *\n */\n static get(key, target, propertyKey) {\n return Reflect.getMetadata(key, classOf(target), propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\n * @param key A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Metadata.getOwn(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Metadata.getOwn(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Metadata.getOwn(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Metadata.getOwn(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Metadata.getOwn(\"custom:annotation\", Example.prototype, \"method\");\n * ```\n *\n */\n static getOwn(key, target, propertyKey) {\n return Reflect.getOwnMetadata(key, classOf(target), propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getType(Example);\n *\n * // property (on constructor)\n * result = Metadata.getType(Example, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getType(Example, \"staticMethod\");\n * ```\n *\n */\n static getType(target, propertyKey) {\n return Reflect.getMetadata(DESIGN_TYPE, target, propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getOwnType(Example);\n *\n * // property (on constructor)\n * result = Metadata.getOwnType(Example, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getOwnType(Example, \"staticMethod\");\n * ```\n *\n */\n static getOwnType(target, propertyKey) {\n return Reflect.getMetadata(DESIGN_TYPE, target, propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getReturnType(Example);\n *\n * // property (on constructor)\n * result = Metadata.getReturnType(Example, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getReturnType(Example, \"staticMethod\");\n * ```\n *\n */\n static getReturnType(target, propertyKey) {\n return Reflect.getMetadata(DESIGN_RETURN_TYPE, target, propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getOwnReturnType(Example);\n *\n * // property (on constructor)\n * result = Metadata.getOwnReturnType(Example, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getOwnReturnType(Example, \"staticMethod\");\n * ```\n *\n */\n static getOwnReturnType(target, propertyKey) {\n return Reflect.getOwnMetadata(DESIGN_RETURN_TYPE, target, propertyKey);\n }\n /**\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\n * @param key A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Metadata.has(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Metadata.has(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Metadata.has(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Metadata.has(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Metadata.has(\"custom:annotation\", Example.prototype, \"method\");\n * ```\n *\n */\n static has(key, target, propertyKey) {\n try {\n return Reflect.hasMetadata(key, classOf(target), propertyKey);\n }\n catch (er) { }\n return false;\n }\n /**\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\n * @param key A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Metadata.has(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Metadata.hasOwn(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Metadata.hasOwn(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Metadata.hasOwn(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Metadata.hasOwn(\"custom:annotation\", Example.prototype, \"method\");\n * ```\n *\n */\n static hasOwn(key, target, propertyKey) {\n return Reflect.hasOwnMetadata(key, classOf(target), propertyKey);\n }\n /**\n * Deletes the metadata entry from the target object with the provided key.\n * @param key A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns `true` if the metadata entry was found and deleted; otherwise, false.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Metadata.delete(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Metadata.delete(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Metadata.delete(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Metadata.delete(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Metadata.delete(\"custom:annotation\", Example.prototype, \"method\");\n * ```\n *\n */\n static delete(key, target, propertyKey) {\n return Reflect.deleteMetadata(key, classOf(target), propertyKey);\n }\n /**\n * Set the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @param value A value that contains attached metadata.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.setParamTypes(Example, undefined, [Object]);\n *\n * // property (on constructor)\n * result = Metadata.setParamTypes(Example, \"staticProperty\", [Object]);\n *\n * // property (on prototype)\n * result = Metadata.setParamTypes(Example.prototype, \"property\", [Object]);\n *\n * // method (on constructor)\n * result = Metadata.setParamTypes(Example, \"staticMethod\", [Object]);\n *\n * // method (on prototype)\n * result = Metadata.setParamTypes(Example.prototype, \"method\", [Object]);\n * ```\n *\n */\n static setParamTypes(target, propertyKey, value) {\n return this.set(DESIGN_PARAM_TYPES, value, target.prototype, propertyKey);\n }\n /**\n * Get all metadata for a metadataKey.\n * @param metadataKey\n */\n static getTargetsFromPropertyKey = (metadataKey) => PROPERTIES.has(metadataKey) ? PROPERTIES.get(metadataKey) || [] : [];\n /**\n * Define a unique metadata entry on the target.\n * @param key A key used to store and retrieve metadata.\n * @param value A value that contains attached metadata.\n * @param target The target object on which to define metadata.\n * @param propertyKey The property key for the target.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Reflect.defineMetadata(\"custom:annotation\", options, Example);\n *\n * // property (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", Number, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", Number, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", Number, Example, \"staticMethod\");\n *\n * // method (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", Number, Example.prototype, \"method\");\n *\n * // decorator factory as metadata-producing annotation.\n * function MyAnnotation(options): PropertyDecorator {\n * return (target, key) => Reflect.defineMetadata(\"custom:annotation\", options, target, key);\n * }\n * ```\n *\n */\n static set(key, value, target, propertyKey) {\n const targets = PROPERTIES.has(key) ? PROPERTIES.get(key) || [] : [];\n const classConstructor = classOf(target);\n if (targets.indexOf(classConstructor) === -1) {\n targets.push(classConstructor);\n PROPERTIES.set(key, targets);\n }\n Reflect.defineMetadata(key, value, classOf(target), propertyKey);\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.\n * @param targetPrototype\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getParamTypes(Example.prototype);\n *\n * // property (on constructor)\n * result = Metadata.getParamTypes(Example.prototype, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getParamTypes(Example.prototype, \"staticMethod\");\n * ```\n *\n */\n static getParamTypes(targetPrototype, propertyKey) {\n return Reflect.getMetadata(DESIGN_PARAM_TYPES, targetPrototype, propertyKey) || [];\n }\n /**\n * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * ```typescript\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // on contructor\n * result = Metadata.getParamTypes(Example);\n *\n * // property (on constructor)\n * result = Metadata.getParamTypes(Example, \"staticProperty\");\n *\n * // method (on constructor)\n * result = Metadata.getParamTypes(Example, \"staticMethod\");\n * ```\n *\n */\n static getOwnParamTypes(target, propertyKey) {\n return Reflect.getOwnMetadata(DESIGN_PARAM_TYPES, target, propertyKey) || [];\n }\n}\n//# sourceMappingURL=Metadata.js.map","import { DecoratorTypes } from \"../domain/DecoratorTypes\";\nimport { decoratorTypeOf } from \"../utils/decorators/decoratorTypeOf\";\nimport { deepClone } from \"../utils/objects/deepClone\";\nimport { deepMerge } from \"../utils/objects/deepMerge\";\nimport { descriptorOf } from \"../utils/objects/descriptorOf\";\nimport { isSymbol } from \"../utils/objects/isSymbol\";\nimport { nameOf } from \"../utils/objects/nameOf\";\nimport { Metadata } from \"./Metadata\";\n/**\n * @ignore\n */\nexport const CLASS_STORE = \"tsed:class:store\";\n/**\n * @ignore\n */\nexport const METHOD_STORE = \"tsed:method:store\";\n/**\n * @ignore\n */\nexport const PROPERTY_STORE = \"tsed:property:store\";\n/**\n * @ignore\n */\nexport const PARAM_STORE = \"tsed:param:store\";\nconst stores = new Map();\nfunction storeGet(key, ...args) {\n if (isSymbol(args[0])) {\n if (!stores.has(args[0])) {\n stores.set(args[0], new Store());\n }\n return stores.get(args[0]);\n }\n else {\n const registry = Metadata;\n if (!registry.hasOwn(key, ...args)) {\n registry.set(key, new Store(), ...args);\n }\n return registry.getOwn(key, ...args);\n }\n}\nfunction defineStore(args) {\n const [target, propertyKey, descriptor] = args;\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PARAM_CTOR:\n case DecoratorTypes.PARAM_STC:\n case DecoratorTypes.PARAM:\n const store = storeGet(PARAM_STORE, target, propertyKey);\n if (!store.has(\"\" + descriptor)) {\n store.set(\"\" + descriptor, new Store());\n }\n return store.get(\"\" + descriptor);\n case DecoratorTypes.PROP:\n case DecoratorTypes.PROP_STC:\n return storeGet(PROPERTY_STORE, target, propertyKey);\n case DecoratorTypes.METHOD:\n case DecoratorTypes.METHOD_STC:\n return storeGet(METHOD_STORE, target, propertyKey);\n case DecoratorTypes.CLASS:\n return storeGet(CLASS_STORE, target);\n }\n}\nexport class Store {\n _entries = new Map();\n /**\n * Create or get a Store from args {target + methodName + descriptor}\n * @param args\n * @returns {Store}\n */\n static from(...args) {\n return defineStore(args);\n }\n /**\n * Create store on the method.\n * @param target\n * @param {string} propertyKey\n * @returns {Store}\n */\n static fromMethod(target, propertyKey) {\n return Store.from(target, propertyKey, descriptorOf(target, propertyKey));\n }\n static mergeStoreFrom(target, source, ...args) {\n const store = Store.from(target, ...args);\n Store.from(source, ...args)._entries.forEach((value, key) => {\n store.merge(key, value);\n });\n return store;\n }\n static mergeStoreMethodFrom(target, source, propertyKey) {\n return this.mergeStoreFrom(target, source, propertyKey, descriptorOf(target, propertyKey));\n }\n /**\n * The get() method returns a specified element from a Map object.\n * @param key Required. The key of the element to return from the Map object.\n * @param defaultValue\n * @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.\n */\n get(key, defaultValue) {\n return this._entries.get(nameOf(key)) || defaultValue;\n }\n /**\n * The has() method returns a boolean indicating whether an element with the specified key exists or not.\n * @param key\n * @returns {boolean}\n */\n has(key) {\n return this._entries.has(nameOf(key));\n }\n /**\n * The set() method adds or updates an element with a specified key and value to a Map object.\n * @param key Required. The key of the element to add to the Map object.\n * @param metadata Required. The value of the element to add to the Map object.\n */\n set(key, metadata) {\n this._entries.set(nameOf(key), metadata);\n return this;\n }\n /**\n * The delete() method removes the specified element from a Map object.\n * @param key Required. The key of the element to remove from the Map object.\n * @returns {boolean} Returns true if an element in the Map object existed and has been removed, or false if the element does not exist.\n */\n delete(key) {\n return this._entries.delete(nameOf(key));\n }\n /**\n * Merge given value with existing value.\n * @param key\n * @param value\n * @param inverse Change the merge order. Get the existing value and apply over given value\n * @returns {Store}\n */\n merge(key, value, inverse = false) {\n let _value_ = this.get(key);\n if (_value_) {\n value = deepClone(value);\n _value_ = deepClone(_value_);\n value = inverse ? deepMerge(value, _value_) : deepMerge(_value_, value);\n }\n this.set(key, value);\n return this;\n }\n toJson() {\n return [...this._entries.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n}\n//# sourceMappingURL=Store.js.map","import { StoreFn } from \"./storeFn\";\nexport function StoreSet(key, value) {\n return StoreFn((store) => {\n store.set(key, value);\n });\n}\n//# sourceMappingURL=storeSet.js.map","import { Store } from \"../domain/Store\";\n/**\n * Create a store correctly configured from the parameters given by the decorator.\n * The `fn` can return a decorator that will be initialized with the parameters (target, propertyKey, descriptor).\n * @param {(store: Store, parameters: DecoratorParameters) => void} fn\n * @returns {Function}\n */\nexport function StoreFn(fn) {\n return (...parameters) => {\n const store = Store.from(...parameters);\n const result = fn(store, parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n return parameters[2];\n };\n}\n//# sourceMappingURL=storeFn.js.map","import { isObservable } from \"../utils/objects/isObservable\";\nimport { isPromise } from \"../utils/objects/isPromise\";\nimport { isStream } from \"../utils/objects/isStream\";\n/**\n * @ignore\n */\nfunction isResponse(obj) {\n return obj.data && obj.headers && obj.status && obj.statusText;\n}\n/**\n * @ignore\n */\nexport var AnyToPromiseStatus;\n(function (AnyToPromiseStatus) {\n AnyToPromiseStatus[\"PENDING\"] = \"PENDING\";\n AnyToPromiseStatus[\"CANCELED\"] = \"CANCELED\";\n AnyToPromiseStatus[\"RESOLVED\"] = \"RESOLVED\";\n AnyToPromiseStatus[\"REJECTED\"] = \"REJECTED\";\n})(AnyToPromiseStatus || (AnyToPromiseStatus = {}));\nexport var AnyToPromiseResponseTypes;\n(function (AnyToPromiseResponseTypes) {\n AnyToPromiseResponseTypes[\"STREAM\"] = \"STREAM\";\n AnyToPromiseResponseTypes[\"BUFFER\"] = \"BUFFER\";\n AnyToPromiseResponseTypes[\"DATA\"] = \"DATA\";\n})(AnyToPromiseResponseTypes || (AnyToPromiseResponseTypes = {}));\nexport class AnyToPromise {\n status = AnyToPromiseStatus.PENDING;\n args;\n #resolves;\n #rejects;\n #hasNextFunction = false;\n #promise;\n constructor({ hasNextFunction = false } = {}) {\n this.#hasNextFunction = hasNextFunction;\n this.#promise = new Promise((resolve, reject) => {\n this.#resolves = resolve;\n this.#rejects = reject;\n });\n }\n isDone() {\n return this.status !== AnyToPromiseStatus.PENDING;\n }\n get next() {\n this.#hasNextFunction = true;\n return (error) => {\n if (this.isDone()) {\n return;\n }\n return error ? this.reject(error) : this.resolve({ type: AnyToPromiseResponseTypes.DATA });\n };\n }\n /**\n *\n */\n async call(cb) {\n if (this.isDone()) {\n return this;\n }\n try {\n this.handle(cb());\n }\n catch (er) {\n this.reject(er);\n }\n return this.#promise;\n }\n reject(er) {\n if (this.isDone()) {\n return;\n }\n this.done(AnyToPromiseStatus.REJECTED);\n this.#rejects(er);\n }\n resolve(response = {}) {\n if (this.isDone()) {\n return;\n }\n this.done(AnyToPromiseStatus.RESOLVED);\n this.#resolves({ ...response, state: AnyToPromiseStatus.RESOLVED });\n }\n destroy() { }\n cancel() {\n if (this.isDone()) {\n return;\n }\n this.done(AnyToPromiseStatus.CANCELED);\n return this.#resolves({ state: AnyToPromiseStatus.CANCELED });\n }\n done(status) {\n this.destroy();\n this.status = status;\n }\n handle(process, additionalProps = {}) {\n if (this.isDone()) {\n return;\n }\n if (process) {\n if (this.isCanceledResponse(process)) {\n // ABANDON\n return this.cancel();\n }\n if (isObservable(process)) {\n process = process.toPromise();\n }\n if (isResponse(process)) {\n return this.handle(process.data, {\n ...additionalProps,\n status: process.status,\n headers: process.headers\n });\n }\n if (isStream(process)) {\n return this.resolve({ ...additionalProps, type: AnyToPromiseResponseTypes.STREAM, data: process });\n }\n if (isStream(process) || Buffer.isBuffer(process)) {\n return this.resolve({ ...additionalProps, type: AnyToPromiseResponseTypes.BUFFER, data: process });\n }\n if (isPromise(process)) {\n return process\n .then((result) => this.handle(result, additionalProps))\n .catch((error) => {\n if (error.response && isResponse(error.response)) {\n return this.handle(error.response);\n }\n return this.reject(error);\n });\n }\n }\n if (!this.#hasNextFunction) {\n // no next function and empty response\n return this.resolve({\n ...additionalProps,\n data: process,\n type: AnyToPromiseResponseTypes.DATA\n });\n }\n }\n isCanceledResponse(process) {\n return process === AnyToPromiseStatus.CANCELED;\n }\n}\n//# sourceMappingURL=AnyToPromise.js.map","/**\n *\n */\nexport var Env;\n(function (Env) {\n Env[\"PROD\"] = \"production\";\n Env[\"DEV\"] = \"development\";\n Env[\"TEST\"] = \"test\";\n})(Env || (Env = {}));\n/**\n * Fallback\n * @type {Env}\n */\n// tslint:disable-next-line: variable-name\nexport const EnvTypes = Env;\n//# sourceMappingURL=Env.js.map","export class Hooks {\n #listeners = {};\n /**\n * Listen a hook event\n * @param event\n * @param cb\n */\n on(event, cb) {\n if (!this.#listeners[event]) {\n this.#listeners[event] = [];\n }\n this.#listeners[event].push(cb);\n return this;\n }\n /**\n * Remove a listener attached to an event\n * @param event\n * @param cb\n */\n off(event, cb) {\n if (this.#listeners[event]) {\n this.#listeners[event] = this.#listeners[event].filter((item) => item === cb);\n }\n return this;\n }\n /**\n * Trigger an event and call listener.\n * @param event\n * @param args\n * @param callThis\n */\n emit(event, args = [], callThis = null) {\n const listeners = this.#listeners[event];\n if (listeners?.length) {\n for (const cb of listeners) {\n cb.call(callThis, ...args);\n }\n }\n }\n /**\n * Trigger an event, listener alter given value and return it.\n * @param event\n * @param value\n * @param args\n * @param callThis\n */\n alter(event, value, args = [], callThis = null) {\n const listeners = this.#listeners[event];\n if (listeners?.length) {\n for (const cb of listeners) {\n value = cb.call(callThis, value, ...args);\n }\n }\n return value;\n }\n /**\n * Trigger an event and call async listener.\n * @param event\n * @param args\n * @param callThis\n */\n async asyncEmit(event, args = [], callThis = null) {\n const listeners = this.#listeners[event];\n if (listeners?.length) {\n const promises = listeners.map((cb) => cb.call(callThis, ...args));\n await Promise.all(promises);\n }\n }\n /**\n * Trigger an event, async listener alter given value and return it.\n * @param event\n * @param value\n * @param args\n * @param callThis\n */\n async asyncAlter(event, value, args = [], callThis = null) {\n const listeners = this.#listeners[event];\n if (listeners?.length) {\n for (const cb of listeners) {\n value = await cb.call(callThis, value, ...args);\n }\n }\n return value;\n }\n destroy() {\n this.#listeners = {};\n }\n}\n//# sourceMappingURL=Hooks.js.map","export const Type = Function;\n// @ts-ignore\nglobal.Type = Type;\n//# sourceMappingURL=Type.js.map","import { decoratorTypeOf } from \"../utils/decorators/decoratorTypeOf\";\nimport { classOf } from \"../utils/objects/classOf\";\nimport { nameOf } from \"../utils/objects/nameOf\";\nexport class UnsupportedDecoratorType extends Error {\n name;\n constructor(decorator, args) {\n super(UnsupportedDecoratorType.buildMessage(decorator, args));\n }\n static buildMessage(decorator, args) {\n const [target, propertyKey, index] = args;\n const bindingType = decoratorTypeOf(args);\n const shortBinding = bindingType.split(\"/\")[0];\n const param = shortBinding === \"parameter\" ? \".[\" + index + \"]\" : \"\";\n const cstr = shortBinding === \"parameter\" ? \".constructor\" : \"\";\n const method = propertyKey ? \".\" + propertyKey : cstr;\n const path = nameOf(classOf(target)) + method + param;\n return `${decorator.name} cannot be used as ${bindingType} decorator on ${path}`;\n }\n}\n//# sourceMappingURL=UnsupportedDecoratorType.js.map","export function uniq(list) {\n return Array.from(new Set(list).values());\n}\nexport function uniqBy(list, key = \"id\") {\n const map = new Map();\n list.forEach((item) => {\n map.set(item[key], item);\n });\n return Array.from(map.values());\n}\n//# sourceMappingURL=uniq.js.map","export function ancestorOf(target) {\n return target && Object.getPrototypeOf(target);\n}\nexport function getInheritedClass(target) {\n return ancestorOf(target);\n}\n//# sourceMappingURL=ancestorOf.js.map","import { classOf } from \"./classOf\";\nimport { getInheritedClass } from \"./ancestorOf\";\nimport { nameOf } from \"./nameOf\";\n/**\n *\n * @param target\n * @returns {Array}\n */\nexport function ancestorsOf(target) {\n const classes = [];\n let currentTarget = classOf(target);\n while (currentTarget && nameOf(currentTarget) !== \"\") {\n classes.unshift(currentTarget);\n currentTarget = getInheritedClass(currentTarget);\n }\n return classes;\n}\n//# sourceMappingURL=ancestorsOf.js.map","import { classOf } from \"./classOf\";\n/**\n * Return the prototype of the given class.\n * @param target\n * @returns {any}\n */\nexport function prototypeOf(target) {\n return classOf(target) === target ? target.prototype : target;\n}\n//# sourceMappingURL=prototypeOf.js.map","import { Store } from \"../../domain/Store\";\nimport { classOf } from \"../objects/classOf\";\nimport { descriptorOf } from \"../objects/descriptorOf\";\nimport { methodsOf } from \"../objects/methodsOf\";\nimport { prototypeOf } from \"../objects/prototypeOf\";\nexport function decorateMethodsOf(klass, decorator) {\n methodsOf(klass).forEach(({ target, propertyKey }) => {\n const proto = prototypeOf(klass);\n if (target !== classOf(klass)) {\n Object.defineProperty(proto, propertyKey, {\n writable: true,\n configurable: true,\n value(...args) {\n return prototypeOf(target)[propertyKey].apply(this, args);\n }\n });\n Store.mergeStoreMethodFrom(klass, target, propertyKey);\n }\n const newDescriptor = decorator(proto, propertyKey, descriptorOf(klass, propertyKey));\n if (newDescriptor) {\n Object.defineProperty(proto, propertyKey, newDescriptor);\n }\n });\n}\n//# sourceMappingURL=decorateMethodsOf.js.map","import { classOf } from \"./classOf\";\nimport { ancestorsOf } from \"./ancestorsOf\";\nimport { prototypeOf } from \"./prototypeOf\";\n/**\n * Return all methods for a given class.\n * @param target\n */\nexport function methodsOf(target) {\n const methods = new Map();\n target = classOf(target);\n ancestorsOf(target).forEach((target) => {\n const keys = Reflect.ownKeys(prototypeOf(target));\n keys.forEach((propertyKey) => {\n if (propertyKey !== \"constructor\") {\n methods.set(propertyKey, { target, propertyKey });\n }\n });\n });\n return Array.from(methods.values());\n}\n//# sourceMappingURL=methodsOf.js.map","export function useDecorators(...decorators) {\n return (...args) => {\n decorators\n .filter((o) => !!o)\n .forEach((decorator) => {\n decorator(...args);\n });\n };\n}\n//# sourceMappingURL=useDecorators.js.map","import { isProtectedKey } from \"./isProtectedKey\";\n/**\n * Remove undefined value\n * @param obj\n * @param ignore\n */\nexport function cleanObject(obj, ignore = []) {\n return Object.entries(obj).reduce((obj, [key, value]) => {\n if (isProtectedKey(key) || ignore.includes(key)) {\n return obj;\n }\n return value === undefined\n ? obj\n : {\n ...obj,\n [key]: value\n };\n }, {});\n}\n//# sourceMappingURL=cleanObject.js.map","export function isObject(target) {\n return typeof target === \"object\";\n}\n//# sourceMappingURL=isObject.js.map","import { isFunction } from \"./isFunction\";\nimport { isObject } from \"./isObject\";\nimport { isString } from \"./isString\";\nconst mapOptions = (args) => {\n const [expression, scope, defaultValue, separator = \".\"] = args;\n if (isObject(scope) || isString(expression)) {\n return {\n expression,\n scope,\n defaultValue,\n separator\n };\n }\n return {\n expression: scope,\n scope: expression,\n defaultValue,\n separator\n };\n};\nexport function getValue(...args) {\n const options = mapOptions(args);\n let scope = options.scope;\n const { expression, defaultValue, separator } = options;\n if (!expression) {\n return scope;\n }\n if (!scope) {\n return defaultValue;\n }\n const keys = expression.split(separator);\n const getValue = (key) => {\n if (scope) {\n if (scope[key] !== undefined || (isObject(scope) && key in scope)) {\n return scope[key];\n }\n if (isFunction(scope.get)) {\n return scope.get(key);\n }\n }\n };\n while ((scope = getValue(keys.shift())) && keys.length) { }\n return scope === undefined ? defaultValue : scope;\n}\n//# sourceMappingURL=getValue.js.map","import { isFunction } from \"./isFunction\";\nexport function isArrowFn(target) {\n return target && isFunction(target) && !target.prototype;\n}\n//# sourceMappingURL=isArrowFn.js.map","import { classOf } from \"./classOf\";\n/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isClassObject(target) {\n return target === Object;\n}\nexport function isPlainObject(target) {\n return isClassObject(classOf(target)) && target !== Object;\n}\n//# sourceMappingURL=isPlainObject.js.map","/**\n * Tests to see if the object is an ES2015 (ES6) Promise\n * @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}\n * @param target\n * @returns {boolean}\n */\nexport function isPromise(target) {\n return (target === Promise ||\n target instanceof Promise ||\n (!!target && typeof target.subscribe !== \"function\" && typeof target.then === \"function\"));\n}\n//# sourceMappingURL=isPromise.js.map","import { isArrayOrArrayClass } from \"./isArray\";\nimport { isArrowFn } from \"./isArrowFn\";\nimport { isBuffer } from \"./isBuffer\";\nimport { isDate } from \"./isDate\";\nimport { isClassObject } from \"./isPlainObject\";\nimport { isPrimitiveOrPrimitiveClass } from \"./isPrimitive\";\nimport { isPromise } from \"./isPromise\";\nimport { isSymbol } from \"./isSymbol\";\nexport function isClass(target) {\n if (!target) {\n return false;\n }\n if (isArrowFn(target)) {\n return false;\n }\n return !(isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isPromise(target) ||\n isArrayOrArrayClass(target) ||\n isBuffer(target));\n}\n//# sourceMappingURL=isClass.js.map","import { isArrayOrArrayClass } from \"./isArray\";\n/**\n * Return true if the target.\n * @param target\n * @returns {boolean}\n */\nexport function isCollection(target) {\n return (isArrayOrArrayClass(target) ||\n target === Map ||\n target instanceof Map ||\n target === Set ||\n target instanceof Set ||\n target === WeakMap ||\n target instanceof WeakMap ||\n target === WeakSet ||\n target instanceof WeakSet);\n}\n//# sourceMappingURL=isCollection.js.map","import { isProtectedKey } from \"./isProtectedKey\";\nexport function setValue(scope, expression, value, separator = \".\") {\n const keys = expression.split(separator);\n const setValue = (key, add) => {\n if (isProtectedKey(key)) {\n return false;\n }\n if (add) {\n if (typeof scope.set === \"function\") {\n scope.set(key, value);\n }\n else {\n scope[key] = value;\n }\n return false;\n }\n if (typeof scope.set === \"function\") {\n if (!scope.has(key)) {\n scope.set(key, {});\n }\n scope = scope.get(key);\n }\n else {\n scope = scope[key] = scope[key] || {};\n }\n return true;\n };\n while (setValue(keys.shift(), !keys.length)) { }\n}\n//# sourceMappingURL=setValue.js.map","import { isArray } from \"./isArray\";\nimport { isString } from \"./isString\";\nfunction createIdentityFn(keyOrFn) {\n if (!keyOrFn) {\n return (v, k) => String(k);\n }\n if (isString(keyOrFn)) {\n return (item) => {\n return item[keyOrFn];\n };\n }\n return keyOrFn;\n}\nexport function toMap(input, keyOrFn) {\n if (isArray(input)) {\n const identity = createIdentityFn(keyOrFn || \"id\");\n return input.reduce((map, value, index) => {\n const ids = [].concat(identity(value, index));\n ids.forEach((id) => map.set(id, value));\n return map;\n }, new Map());\n }\n const identity = createIdentityFn(keyOrFn);\n return Object.entries(input).reduce((map, [key, value]) => {\n return map.set(identity(value, key), value);\n }, new Map());\n}\n//# sourceMappingURL=toMap.js.map","/**\n * @ignore\n */\nconst JsonSchemaMappersContainer = new Map();\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type, mapper) {\n return JsonSchemaMappersContainer.set(type, mapper);\n}\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type) {\n // istanbul ignore next\n if (!JsonSchemaMappersContainer.has(type)) {\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n }\n return JsonSchemaMappersContainer.get(type);\n}\n/**\n * @ignore\n */\nexport function execMapper(type, schema, options, parent) {\n return getJsonSchemaMapper(type)(schema, options, parent);\n}\nexport function hasMapper(type) {\n return JsonSchemaMappersContainer.has(type);\n}\n","import { ancestorsOf, classOf, decoratorTypeOf, descriptorOf, isArrayOrArrayClass, isClass, isCollection, isDate, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, nameOf, prototypeOf, Store } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map();\nexport class JsonEntityStore {\n /**\n * Original property key decorated by the decorator\n */\n propertyKey;\n /**\n * Alias of the property\n */\n propertyName;\n /**\n * Parameter index\n */\n index;\n /**\n * Method's descriptor\n */\n descriptor;\n /**\n * Decorator type used to declare the JsonSchemaStore.\n */\n decoratorType;\n /**\n * Type of the collection (Array, Map, Set, etc...)\n */\n collectionType;\n token;\n store;\n isStore = true;\n parent;\n target;\n /**\n *\n */\n _type;\n /**\n * Ref to JsonSchema\n */\n _schema;\n constructor(options) {\n const { target, propertyKey, descriptor, index, decoratorType } = options;\n this.target = target;\n this.propertyKey = propertyKey;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName() {\n return nameOf(this.token);\n }\n get isCollection() {\n return !!this.collectionType;\n }\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor);\n }\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n get isDate() {\n return isDate(this.computedType);\n }\n get isObject() {\n return isObject(this.computedType);\n }\n get isClass() {\n return isClass(this.computedType);\n }\n /**\n * Return the JsonSchema\n */\n get schema() {\n return this._schema;\n }\n get nestedGenerics() {\n return this.schema.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n get type() {\n return this._type;\n }\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value) {\n this._type = value;\n this.build();\n }\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n get itemSchema() {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n get parentSchema() {\n return this.parent.schema;\n }\n get isDiscriminatorChild() {\n return this.schema.isDiscriminator && this.discriminatorAncestor?.schema.discriminator().base !== this.target;\n }\n static from(...args) {\n if (args[0].isStore) {\n return args[0];\n }\n const target = args[0];\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n const store = Store.from(...args);\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType);\n // istanbul ignore next\n if (!entityStore) {\n throw Error(\"Unsupported json entity type\");\n }\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n jsonSchemaStore.build();\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n return store.get(\"JsonEntityStore\");\n }\n static fromMethod(target, propertyKey) {\n return this.from(target, propertyKey, descriptorOf(target, propertyKey));\n }\n static get(target, propertyKey, descriptor) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n isGetterOnly() {\n return isObject(this.descriptor) && !this.descriptor.value && this.descriptor.get && !this.descriptor.set;\n }\n get(key, defaultValue) {\n return this.store.get(key, defaultValue);\n }\n set(key, value) {\n return this.store.set(key, value);\n }\n toString() {\n return [this.targetName, this.propertyName, this.index].filter((o) => o !== undefined).join(\":\");\n }\n buildType(type) {\n if (isCollection(type)) {\n this.collectionType = type;\n }\n else {\n this._type = type;\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { classOf, isArrowFn, isClass, isClassObject, isCollection, isDate, isPrimitiveOrPrimitiveClass, isPromise, isSymbol } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport function getComputedType(target) {\n if (isPromise(target)) {\n return Object;\n }\n if (isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)) {\n return classOf(target);\n }\n if (isArrowFn(target)) {\n return target();\n }\n return target;\n}\n","import { isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\nexport function getJsonType(value) {\n if (value === null) {\n return \"null\";\n }\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value) > -1) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n return \"generic\";\n }\n return primitiveOf(value);\n }\n if (value === Array) {\n return \"array\";\n }\n if (isArray(value)) {\n return value.map(getJsonType);\n }\n if (value === Set) {\n return \"array\";\n }\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n return \"object\";\n}\n","import { isBooleanOrBooleanClass } from \"./isBoolean\";\nimport { isNumberOrNumberClass } from \"./isNumber\";\nimport { isStringOrStringClass } from \"./isString\";\nexport function primitiveOf(target) {\n if (isStringOrStringClass(target)) {\n return \"string\";\n }\n if (isNumberOrNumberClass(target)) {\n return \"number\";\n }\n if (isBooleanOrBooleanClass(target)) {\n return \"boolean\";\n }\n return \"any\";\n}\n//# sourceMappingURL=primitiveOf.js.map","import { isObject, uniq } from \"@tsed/core\";\nexport const serializeEnum = (enumValue) => {\n if (isObject(enumValue) && enumValue !== null) {\n return Object.entries(enumValue).reduce((acc, [key, value]) => {\n if (isNaN(+key)) {\n return acc.concat(value);\n }\n return acc;\n }, []);\n }\n return enumValue;\n};\nexport function serializeEnumValues(enumValues) {\n const values = enumValues.reduce((acc, value) => acc.concat(serializeEnum(value)), []);\n const getValue = (value) => {\n return value === null ? \"null\" : typeof value;\n };\n const types = values.reduce((set, value) => set.add(getValue(value)), new Set());\n return { values: uniq(values), types };\n}\n","/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n","import { cleanObject } from \"@tsed/core\";\nexport class Discriminator {\n propertyName;\n base;\n values = new Map();\n types = new Map();\n constructor({ base, propertyName, types, values } = {}) {\n Object.assign(this, cleanObject({\n base,\n propertyName,\n types: types ? new Map(types) : undefined,\n values: values ? new Map(values) : undefined\n }));\n }\n add(type, values) {\n values.forEach((value) => {\n this.values.set(value, type);\n });\n this.types.set(type, values);\n return this;\n }\n getType(discriminatorValue) {\n return this.values.get(discriminatorValue) || this.base;\n }\n getValues(type) {\n return this.types.get(type);\n }\n getDefaultValue(type) {\n const values = this.types.get(type);\n return values ? values[0] : undefined;\n }\n children() {\n return [...new Set([...this.types.keys()])];\n }\n}\n","import { ancestorsOf, classOf, Hooks, isArray, isClass, isFunction, isObject, isPrimitiveClass, nameOf, uniq } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { getComputedType } from \"../utils/getComputedType\";\nimport { getJsonType } from \"../utils/getJsonType\";\nimport { serializeEnumValues } from \"../utils/serializeEnumValues\";\nimport { toJsonRegex } from \"../utils/toJsonRegex\";\nimport { Discriminator } from \"./JsonDiscriminator\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\nfunction mapProperties(properties) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n return Object.entries(properties).reduce((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n return properties;\n }, {});\n}\nfunction mapToJsonSchema(item) {\n if (isArray(item)) {\n return item.map(mapToJsonSchema);\n }\n if (item.isStore || item.isJsonSchema || item.isLazyRef) {\n return item;\n }\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n if (isObject(item)) {\n return JsonSchema.from(item);\n }\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({ type: item });\n }\n return item;\n}\nexport class JsonSchema extends Map {\n isJsonSchema = true;\n $hooks = new Hooks();\n $required = new Set();\n $allow = [];\n $selfRequired;\n $forwardGroups = false;\n isDiscriminatorKey = false;\n isDiscriminator = false;\n #nullable = false;\n #discriminator = null;\n #genericLabels;\n #nestedGenerics = [];\n #alias = new Map();\n #itemSchema;\n #target;\n #isGeneric = false;\n #isCollection = false;\n #ref = false;\n constructor(obj = {}) {\n super();\n if (obj) {\n this.assign(obj);\n }\n }\n get alias() {\n return this.#alias;\n }\n get nestedGenerics() {\n return this.#nestedGenerics;\n }\n set nestedGenerics(value) {\n this.#nestedGenerics = value;\n }\n get genericLabels() {\n return this.#genericLabels;\n }\n set genericLabels(value) {\n this.#genericLabels = value;\n }\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target);\n }\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n /**\n * Current schema has generics items\n */\n get hasGenerics() {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n get genericType() {\n return this.get(\"$ref\");\n }\n get class() {\n return this.getComputedType();\n }\n get canRef() {\n return this.#ref;\n }\n get isNullable() {\n return this.#nullable || this.$allow.includes(null);\n }\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n static from(obj = {}) {\n return new JsonSchema(obj);\n }\n nullable(value) {\n this.#nullable = value;\n }\n itemSchema(obj = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n return this.#itemSchema;\n }\n getAliasOf(property) {\n return this.#alias.get(property);\n }\n addAlias(property, alias) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n return this;\n }\n removeAlias(property) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n return this;\n }\n $id($id) {\n super.set(\"$id\", $id);\n return this;\n }\n $ref($ref) {\n super.set(\"$ref\", $ref);\n return this;\n }\n $schema($schema) {\n super.set(\"$schema\", $schema);\n return this;\n }\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name) {\n this.#ref = true;\n super.set(\"name\", name);\n return this;\n }\n name(name) {\n super.set(\"name\", name);\n return this;\n }\n ignore(cb) {\n if (typeof cb === \"boolean\") {\n const bool = cb;\n cb = () => bool;\n }\n this.$hooks.on(\"ignore\", cb);\n return this;\n }\n /**\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3\n */\n default(value) {\n super.set(\"default\", value);\n return this;\n }\n /**\n * More readible form of a one-element \"enum\"\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24\n */\n const(value) {\n super.set(\"const\", value);\n return this;\n }\n /**\n * This attribute is a string that provides a full description of the of purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n discriminatorKey(propertyName) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n return this;\n }\n discriminatorValue(...values) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n this.isDiscriminator = true;\n const properties = this.get(\"properties\");\n const schema = properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n }\n else {\n schema.enum(...values);\n schema.examples(values);\n }\n properties[discriminator.propertyName] = schema;\n this.set(\"properties\", properties);\n return this;\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * If \"items\" is an array of schemas, validation succeeds if every instance element\n * at a position greater than the size of \"items\" validates against \"additionalItems\".\n * Otherwise, \"additionalItems\" MUST be ignored, as the \"items\" schema\n * (possibly the default value of an empty schema) is applied to all elements.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10\n */\n additionalItems(additionalItems) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n return this;\n }\n /**\n * An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14\n */\n contains(contains) {\n super.set(\"contains\", mapToJsonSchema(contains));\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n example(...examples) {\n return this.examples(examples);\n }\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9\n */\n items(items) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11\n */\n maxItems(maxItems) {\n super.set(\"maxItems\", maxItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12\n */\n minItems(minItems) {\n super.set(\"minItems\", minItems);\n return this;\n }\n /**\n * If this keyword has boolean value false, the instance validates successfully.\n * If it has boolean value true, the instance validates successfully if all of its elements are unique.\n * Omitting this keyword has the same behavior as a value of false.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13\n */\n uniqueItems(uniqueItems) {\n super.set(\"uniqueItems\", uniqueItems);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15\n */\n maxProperties(maxProperties) {\n super.set(\"maxProperties\", maxProperties);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is greater than,\n * or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16\n */\n minProperties(minProperties) {\n super.set(\"minProperties\", minProperties);\n return this;\n }\n allow(...allow) {\n this.$allow.push(...allow);\n return this;\n }\n /**\n * Elements of this array must be unique.\n * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.\n * Omitting this keyword has the same behavior as an empty array.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17\n */\n required(required = true) {\n if (isArray(required)) {\n this.$required.clear();\n required.forEach((value) => this.$required.add(value));\n }\n else {\n const schema = this.clone();\n schema.$selfRequired = required;\n return schema;\n }\n return this;\n }\n addRequired(property) {\n this.$required.add(property);\n return this;\n }\n removeRequired(property) {\n this.$required.delete(property);\n return this;\n }\n isRequired(property) {\n return this.$required.has(property);\n }\n /**\n * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.\n * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,\n * the child instance for that name successfully validates against the corresponding schema.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18\n */\n properties(properties) {\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n addProperty(key, schema) {\n const properties = this.get(\"properties\") || {};\n properties[key] = schema;\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n /**\n * This attribute is an object that defines the schema for a set of property names of an object instance.\n * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.\n * If the pattern matches the name of a property on the instance object, the value of the instance's property\n * MUST be valid against the pattern name's schema value.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19\n */\n patternProperties(patternProperties) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n */\n additionalProperties(additionalProperties) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n return this;\n }\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown = true) {\n return this.additionalProperties(unknown);\n }\n /**\n * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.\n * Each property specifies a dependency.\n * If the dependency value is an array, each element in the array must be unique.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21\n */\n dependencies(dependencies) {\n super.set(\"dependencies\", mapProperties(dependencies));\n return this;\n }\n /**\n * Takes a schema which validates the names of all properties rather than their values.\n * Note the property name that the schema is testing will always be a string.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22\n */\n propertyNames(propertyNames) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n return this;\n }\n enum(enumValue, ...enumValues) {\n const { values, types } = serializeEnumValues([enumValue, enumValues].flat());\n super.set(\"enum\", values).any(...types);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions) {\n super.set(\"definitions\", mapProperties(definitions));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf) {\n super.set(\"allOf\", allOf.map(mapToJsonSchema));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf) {\n super.set(\"anyOf\", anyOf.map(mapToJsonSchema));\n return this;\n }\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf) {\n let resolvedOneOf = oneOf.map(mapToJsonSchema);\n if (resolvedOneOf.length === 1 && !(oneOf[0] instanceof JsonSchema)) {\n if (!resolvedOneOf[0].#discriminator) {\n return this.type(oneOf[0]);\n }\n const children = resolvedOneOf[0].discriminator().children();\n resolvedOneOf = children.map(mapToJsonSchema);\n }\n super.set(\"oneOf\", resolvedOneOf);\n const jsonSchema = resolvedOneOf[0];\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const { propertyName } = discriminator;\n super.set(\"discriminator\", { propertyName });\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not) {\n super.set(\"not\", mapToJsonSchema(not));\n return this;\n }\n /**\n * Must be strictly greater than 0.\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1\n */\n multipleOf(multipleOf) {\n super.set(\"multipleOf\", multipleOf);\n return this;\n }\n /**\n * Representing an inclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is less than or exactly equal to \"maximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2\n */\n maximum(maximum) {\n super.set(\"maximum\", maximum);\n return this;\n }\n /**\n * Representing an exclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is strictly less than (not equal to) to \"exclusiveMaximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3\n */\n exclusiveMaximum(exclusiveMaximum) {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n return this;\n }\n /**\n * Representing an inclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is greater than or exactly equal to \"minimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4\n */\n minimum(minimum) {\n super.set(\"minimum\", minimum);\n return this;\n }\n /**\n * Representing an exclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is strictly greater than (not equal to) to \"exclusiveMinimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5\n */\n exclusiveMinimum(exclusiveMinimum) {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6\n */\n maxLength(maxLength) {\n super.set(\"maxLength\", maxLength);\n return this;\n }\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7\n */\n minLength(minLength) {\n super.set(\"minLength\", minLength);\n return this;\n }\n /**\n * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8\n */\n pattern(pattern) {\n super.set(\"pattern\", toJsonRegex(pattern));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format) {\n super.set(\"format\", format);\n return this;\n }\n /**\n * A single type, or a union of simple types\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25\n */\n type(type) {\n switch (type) {\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"integer\":\n super.set(\"type\", getJsonType(type));\n this.integer();\n break;\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n }\n else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n }\n else {\n super.set(\"type\", jsonType);\n }\n }\n }\n return this;\n }\n any(...types) {\n const hasClasses = types.filter((type) => isClass(type));\n if (hasClasses.length >= 2) {\n this.oneOf(types.filter((value) => {\n if (value !== null) {\n this.nullable(true);\n return true;\n }\n return false;\n }));\n }\n else {\n // TODO when OS3 will the only minimal supported version, we'll can remove this code\n if (types.length) {\n types = uniq(types).map(getJsonType);\n if (types.includes(\"null\")) {\n this.nullable(true);\n types = types.filter((o) => o !== \"null\");\n }\n }\n else {\n types = [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\"];\n this.nullable(true);\n }\n this.type(types.length === 1 ? types[0] : types);\n }\n return this;\n }\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n return this;\n }\n /**\n * This attribute is a string that provides a short description of the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n title(title) {\n super.set(\"title\", title);\n return this;\n }\n readOnly(readOnly) {\n super.set(\"readOnly\", readOnly);\n return this;\n }\n writeOnly(readOnly) {\n super.set(\"writeOnly\", readOnly);\n return this;\n }\n customKey(key, value) {\n super.set(`#${key}`, value);\n return this;\n }\n toObject(options) {\n return this.toJSON(options);\n }\n toJSON(options) {\n let addDef = false;\n if (!options) {\n addDef = true;\n options = { schemas: {} };\n }\n const schema = execMapper(\"schema\", this, options);\n if (addDef && options.schemas && Object.keys(options.schemas).length) {\n schema.definitions = options.schemas;\n }\n return schema;\n }\n assign(obj = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n this.#ref = obj.#ref;\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n super.set(\"type\", obj.get(\"type\"));\n }\n return this;\n }\n set(key, value) {\n if (key in this) {\n isFunction(this[key]) && this[key](value);\n }\n else {\n super.set(key, value);\n }\n return this;\n }\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType() {\n return getComputedType(this.#target);\n }\n getComputedItemType() {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n /**\n * Return the Json type as string\n */\n getJsonType() {\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n getTarget() {\n return this.#target;\n }\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (this.#target ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n clone() {\n return new JsonSchema(this);\n }\n}\n","import { JsonEntitiesContainer } from \"../../domain/JsonEntityStore\";\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type) {\n return (target) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\nimport { JsonSchema } from \"./JsonSchema\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent\";\nlet JsonClassStore = class JsonClassStore extends JsonEntityStore {\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n children = new Map();\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n set path(path) {\n this.store.set(\"path\", path);\n }\n build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n this._type = this._type || Object;\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n};\nJsonClassStore = __decorate([\n JsonEntityComponent(DecoratorTypes.CLASS)\n], JsonClassStore);\nexport { JsonClassStore };\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\nimport { JsonSchema } from \"./JsonSchema\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent\";\nlet JsonPropertyStore = class JsonPropertyStore extends JsonEntityStore {\n parent = JsonEntityStore.from(this.target);\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return this.parent.schema.isRequired(this.propertyKey);\n }\n /**\n * Change the state of the required data.\n * @param value\n */\n set required(value) {\n if (value) {\n this.parent.schema.addRequired(this.propertyKey);\n }\n else {\n this.parent.schema.removeRequired(this.propertyKey);\n }\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n discriminatorKey() {\n this.parent.schema.discriminatorKey(String(this.propertyKey));\n this.itemSchema.isDiscriminatorKey = true;\n return this;\n }\n isDiscriminatorKey() {\n return this.itemSchema.isDiscriminatorKey;\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n build() {\n if (!this._type) {\n this.buildType(Metadata.getType(prototypeOf(this.target), this.propertyKey));\n }\n this._type = this._type || Object;\n const properties = this.parent.schema.get(\"properties\");\n let schema = properties[this.propertyName];\n if (!schema) {\n this.parent.children.set(this.propertyName, this);\n schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n schema.itemSchema(this.type);\n }\n }\n this.parent.schema.addProperty(this.propertyName, schema);\n this._schema = schema;\n }\n static get(target, propertyKey) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey);\n }\n};\nJsonPropertyStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PROP)\n], JsonPropertyStore);\nexport { JsonPropertyStore };\nexport const PropertyMetadata = JsonPropertyStore;\n","/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels, genericTypes) {\n return genericLabels.reduce((map, item, index) => map.set(item, genericTypes[index]), new Map());\n}\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options) {\n if (options.genericLabels && options.genericTypes) {\n const { genericLabels, genericTypes, ...ops } = options;\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n return options;\n}\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value) {\n const [genericTypes, ...out] = value.nestedGenerics;\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n","import { isFunction } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer\";\nexport class JsonMap extends Map {\n constructor(obj = {}) {\n super();\n this.assign(obj);\n }\n assign(obj = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n }\n else {\n this.set(key, value);\n }\n });\n return this;\n }\n toJSON(options = {}) {\n return execMapper(\"map\", this, options);\n }\n}\n","export var JsonParameterTypes;\n(function (JsonParameterTypes) {\n JsonParameterTypes[\"BODY\"] = \"body\";\n JsonParameterTypes[\"PATH\"] = \"path\";\n JsonParameterTypes[\"QUERY\"] = \"query\";\n JsonParameterTypes[\"HEADER\"] = \"header\";\n JsonParameterTypes[\"COOKIES\"] = \"cookie\";\n JsonParameterTypes[\"FILES\"] = \"files\";\n})(JsonParameterTypes || (JsonParameterTypes = {}));\n/**\n * @ignore\n */\nexport function formatParameterType(type) {\n return String(type).toLowerCase().replace(\"raw_\", \"\").replace(\"cookies\", \"cookie\");\n}\n/**\n * @ignore\n */\nexport function isParameterType(type) {\n return Object.values(JsonParameterTypes).includes(formatParameterType(type));\n}\n","/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return lowerCase(str);\n}\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str) {\n return str.toLowerCase();\n}\n//# sourceMappingURL=index.js.map","import { lowerCase } from \"lower-case\";\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n// Remove all non-word characters.\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input, options) {\n if (options === void 0) { options = {}; }\n var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input, re, value) {\n if (re instanceof RegExp)\n return input.replace(re, value);\n return re.reduce(function (input, re) { return input.replace(re, value); }, input);\n}\n//# sourceMappingURL=index.js.map","export var SpecTypes;\n(function (SpecTypes) {\n SpecTypes[\"JSON\"] = \"jsonschema\";\n SpecTypes[\"SWAGGER\"] = \"swagger2\";\n SpecTypes[\"OPENAPI\"] = \"openapi3\";\n})(SpecTypes || (SpecTypes = {}));\n","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function pascalCaseTransform(input, index) {\n var firstChar = input.charAt(0);\n var lowerChars = input.substr(1).toLowerCase();\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return \"_\" + firstChar + lowerChars;\n }\n return \"\" + firstChar.toUpperCase() + lowerChars;\n}\nexport function pascalCaseTransformMerge(input) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\nexport function pascalCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \"\", transform: pascalCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { cleanObject } from \"@tsed/core\";\n/**\n * ignore\n * @param options\n */\nfunction getHost(options) {\n const { host = `#/${options.specType === \"openapi3\" ? \"components/schemas\" : \"definitions\"}` } = options;\n return host;\n}\n/**\n * @ignore\n */\nexport function createRefName(name, options) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groups.join(\" \")}`);\n }\n return name;\n}\n/**\n * @ignore\n */\nexport function createRef(name, schema, options) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n const nullable = schema.isNullable;\n const readOnly = schema.isReadOnly;\n const writeOnly = schema.isWriteOnly;\n if (nullable || readOnly || writeOnly) {\n switch (options.specType) {\n case SpecTypes.OPENAPI:\n return cleanObject({\n nullable: nullable ? true : undefined,\n readOnly: readOnly ? true : undefined,\n writeOnly: writeOnly ? true : undefined,\n oneOf: [ref]\n });\n case SpecTypes.JSON:\n return cleanObject({\n readOnly,\n writeOnly,\n oneOf: [ref]\n });\n }\n }\n return ref;\n}\n/**\n * @ignore\n */\nexport function toRef(value, schema, options) {\n const name = createRefName(value.getName(), options);\n options.schemas[value.getName()] = schema;\n return createRef(name, value, options);\n}\n","import { cleanObject, toMap } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { popGenerics } from \"../utils/generics\";\nimport { JsonMap } from \"./JsonMap\";\nimport { formatParameterType, isParameterType, JsonParameterTypes } from \"./JsonParameterTypes\";\nimport { createRefName } from \"../utils/ref\";\nexport class JsonParameter extends JsonMap {\n nestedGenerics = [];\n groups;\n $schema;\n expression;\n getName() {\n const name = this.get(\"name\");\n if (this.get(\"in\") === \"files\") {\n return name.split(\".\")[0];\n }\n return name;\n }\n name(name) {\n this.set(\"name\", name);\n return this;\n }\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n in(inType, expression = \"\") {\n this.set(\"in\", formatParameterType(inType));\n this.expression = expression;\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n schema(schema) {\n this.$schema = schema;\n return this;\n }\n toJSON(options = {}) {\n if (!isParameterType(this.get(\"in\"))) {\n return null;\n }\n const schemasContainer = toMap(options.schemas || {});\n return this.build({ ...options, groups: this.groups }, schemasContainer);\n }\n build(options, schemasContainer) {\n const { type, schema, ...parameter } = super.toJSON(options);\n const jsonSchema = execMapper(\"item\", this.$schema, {\n ...options,\n ...popGenerics(this)\n });\n parameter.required = parameter.required || this.get(\"in\") === JsonParameterTypes.PATH;\n switch (this.get(\"in\")) {\n case JsonParameterTypes.FILES:\n return this.getFileSchema(jsonSchema, parameter);\n case JsonParameterTypes.QUERY:\n if (jsonSchema.$ref) {\n if (!parameter.name) {\n return this.refToParameters(parameter, options, schemasContainer);\n }\n parameter.style = \"deepObject\";\n }\n break;\n }\n parameter.schema = jsonSchema;\n return parameter;\n }\n getFileSchema(jsonSchema, parameter) {\n const schema = {\n type: \"string\",\n format: \"binary\",\n oneOf: undefined\n };\n if (jsonSchema.type === \"array\") {\n jsonSchema.items = cleanObject({\n ...jsonSchema.items,\n ...schema\n });\n parameter.schema = jsonSchema;\n }\n else {\n parameter.schema = cleanObject({\n ...jsonSchema,\n ...schema\n });\n }\n return parameter;\n }\n refToParameters(parameter, options, schemasContainer) {\n const name = createRefName(this.$schema.getName(), options);\n const schema = options.schemas[name];\n if (options.schemas[name] && !schemasContainer.has(name)) {\n delete options.schemas[this.$schema.getName()];\n }\n return Object.entries(schema.properties || {}).reduce((params, [key, { description, ...prop }]) => {\n return [\n ...params,\n cleanObject({\n ...parameter,\n name: key,\n required: (schema.required || []).includes(key),\n description,\n schema: prop,\n style: prop.$ref ? \"deepObject\" : undefined\n })\n ];\n }, []);\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\nimport { JsonParameter } from \"./JsonParameter\";\nimport { JsonSchema } from \"./JsonSchema\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent\";\nlet JsonParameterStore = class JsonParameterStore extends JsonEntityStore {\n paramType;\n expression;\n dataPath;\n /**\n * Define pipes can be called by the framework to transform input parameter\n */\n pipes;\n /**\n * Ref to JsonParameter when the decorated object is a parameter.\n */\n parameter = new JsonParameter();\n parent = JsonEntityStore.fromMethod(this.target, this.propertyKey);\n constructor(options) {\n super(options);\n this.pipes = options.pipes || [];\n this.paramType = options.paramType || this.paramType;\n this.expression = options.expression || this.expression;\n this.dataPath = options.dataPath || this.dataPath;\n }\n get nestedGenerics() {\n return this.parameter.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.parameter.nestedGenerics = nestedGenerics;\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return !!this.parameter.get(\"required\");\n }\n set required(value) {\n this.parameter.required(value);\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n static getParams(target, propertyKey) {\n const params = [];\n const klass = ancestorsOf(target)\n .reverse()\n .find((target) => {\n return isMethodDescriptor(target, propertyKey) && JsonEntityStore.fromMethod(target, propertyKey).children.size;\n });\n if (klass) {\n JsonEntityStore.fromMethod(klass, propertyKey).children.forEach((param, index) => {\n params[+index] = param;\n });\n return params;\n }\n return [];\n }\n static get(target, propertyKey, index) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, index);\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n getSchema(type) {\n if (isCollection(type) || !isClass(type)) {\n return JsonSchema.from({\n type\n });\n }\n return JsonEntityStore.from(type).schema;\n }\n build() {\n if (!this._type) {\n const type = Metadata.getParamTypes(prototypeOf(this.target), this.propertyKey)[this.index];\n this.buildType(type);\n }\n this._type = this._type || Object;\n if (!this._schema) {\n this.parent.children.set(this.index, this);\n this._schema = this.getSchema(this.collectionType || this.type);\n this.parameter.schema(this._schema);\n if (this.collectionType) {\n this._schema.itemSchema(this.getSchema(this.type));\n }\n this.parent.operation.addParameter(this.index, this.parameter);\n }\n }\n};\nJsonParameterStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PARAM),\n __metadata(\"design:paramtypes\", [Object])\n], JsonParameterStore);\nexport { JsonParameterStore };\nexport const ParamMetadata = JsonParameterStore;\n","/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n az: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n lt: {\n regexp: /[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,\n map: {\n i̇: \"\\u0049\",\n j̇: \"\\u004A\",\n į̇: \"\\u012E\",\n i̇̀: \"\\u00CC\",\n i̇́: \"\\u00CD\",\n i̇̃: \"\\u0128\",\n },\n },\n};\n/**\n * Localized upper case.\n */\nexport function localeUpperCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return upperCase(str);\n}\n/**\n * Upper case as a function.\n */\nexport function upperCase(str) {\n return str.toUpperCase();\n}\n//# sourceMappingURL=index.js.map","import statuses from \"statuses\";\nimport { constantCase } from \"change-case\";\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map, code) => {\n const message = String(statuses(code));\n return {\n ...map,\n [String(code)]: { label: message, code: constantCase(message) }\n };\n}, {});\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\nexport function getStatusConstant(status) {\n return HTTP_STATUS_MESSAGES[status]?.code;\n}\nexport function getStatusMessage(status) {\n return HTTP_STATUS_MESSAGES[status]?.label;\n}\n","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nimport { upperCase } from \"upper-case\";\nexport function constantCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \"_\", transform: upperCase }, options));\n}\n//# sourceMappingURL=index.js.map","export const isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n","import { JsonMap } from \"../domain/JsonMap\";\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n return content;\n }, new JsonMap());\n}\n","import { toJsonMapCollection } from \"../utils/toJsonMapCollection\";\nimport { JsonMap } from \"./JsonMap\";\nexport class JsonRequestBody extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content));\n return this;\n }\n addContent(mediaType, schema, examples) {\n const content = this.get(\"content\");\n const mediaContent = new JsonMap();\n mediaContent.set(\"schema\", schema);\n examples && mediaContent.set(\"examples\", examples);\n content.set(mediaType, mediaContent);\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers) {\n return Object.keys(headers).reduce((newHeaders, key) => {\n const value = headers[key];\n let type = typeof value;\n let options = {\n example: value\n };\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n options.type = options.type || type;\n newHeaders[key] = cleanObject(options);\n return newHeaders;\n }, {});\n}\n","import { mapHeaders } from \"../utils/mapHeaders\";\nimport { toJsonMapCollection } from \"../utils/toJsonMapCollection\";\nimport { JsonMap } from \"./JsonMap\";\nexport class JsonMedia extends JsonMap {\n groups = [];\n allowedGroups;\n schema(schema) {\n this.set(\"schema\", schema);\n return this;\n }\n examples(examples) {\n this.set(\"examples\", examples);\n return this;\n }\n toJSON(options = {}) {\n let groups = [...(this.groups || [])];\n return super.toJSON({ ...options, groups });\n }\n}\nexport class JsonResponse extends JsonMap {\n status;\n constructor(obj = {}) {\n super(obj);\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n headers(headers) {\n this.set(\"headers\", mapHeaders(headers));\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content, JsonMedia));\n return this;\n }\n getContent() {\n return this.get(\"content\");\n }\n getMedia(mediaType, create = true) {\n create && this.addMedia(mediaType);\n return this.getContent()?.get(mediaType);\n }\n addMedia(mediaType) {\n const content = this.get(\"content\");\n if (!content.has(mediaType)) {\n content.set(mediaType, new JsonMedia());\n }\n return this;\n }\n toJSON(options = {}) {\n const response = super.toJSON(options);\n if (this.status === 204) {\n delete response.content;\n }\n if (response.headers) {\n Object.entries(response.headers).forEach(([key, { type, ...props }]) => {\n response.headers[key] = {\n ...props,\n schema: {\n type\n }\n };\n });\n }\n return response;\n }\n}\n","import { deepMerge, uniq, uniqBy } from \"@tsed/core\";\nimport { getStatusMessage } from \"../constants/httpStatusMessages\";\nimport { isRedirectionStatus, isSuccessStatus } from \"../utils/isSuccessStatus\";\nimport { JsonMap } from \"./JsonMap\";\nimport { isParameterType, JsonParameterTypes } from \"./JsonParameterTypes\";\nimport { JsonRequestBody } from \"./JsonRequestBody\";\nimport { JsonResponse } from \"./JsonResponse\";\nimport { JsonSchema } from \"./JsonSchema\";\nexport class JsonOperation extends JsonMap {\n operationPaths = new Map();\n #status;\n #redirection = false;\n constructor(obj = {}) {\n super({ parameters: [], responses: new JsonMap(), ...obj });\n }\n get response() {\n return this.getResponses().get(this.getStatus().toString());\n }\n get status() {\n return this.#status;\n }\n tags(tags) {\n super.set(\"tags\", tags);\n return this;\n }\n addTags(tags) {\n tags = uniqBy([...(this.get(\"tags\") || []), ...tags], \"name\");\n return this.tags(tags);\n }\n summary(summary) {\n super.set(\"summary\", summary);\n return this;\n }\n operationId(operationId) {\n this.set(\"operationId\", operationId);\n return this;\n }\n responses(responses) {\n this.set(\"responses\", responses);\n return this;\n }\n defaultStatus(status) {\n this.#status = status;\n return this;\n }\n getStatus() {\n return this.#status || 200;\n }\n setRedirection(status = 302) {\n this.#redirection = true;\n this.#status = status;\n return this;\n }\n isRedirection(status) {\n if (this.#redirection) {\n if (status) {\n return isRedirectionStatus(status);\n }\n }\n return this.#redirection;\n }\n addResponse(statusCode, response) {\n if ((isSuccessStatus(statusCode) || isRedirectionStatus(statusCode)) && !this.#status) {\n const res = this.getResponseOf(200);\n this.getResponses().set(statusCode.toString(), res).delete(\"200\");\n this.defaultStatus(Number(statusCode));\n }\n const currentCode = statusCode === \"default\" ? this.getStatus().toString() : statusCode.toString();\n const currentResponse = this.getResponses().get(currentCode);\n if (!currentResponse) {\n response.status = Number(currentCode);\n this.getResponses().set(currentCode, response);\n }\n else {\n response.forEach((value, key) => {\n if (![\"content\"].includes(key)) {\n currentResponse.set(key, deepMerge(currentResponse.get(key), value));\n }\n });\n currentResponse.status = Number(currentCode);\n }\n return this;\n }\n getResponses() {\n return this.get(\"responses\");\n }\n getResponseOf(status) {\n return (status === \"default\" ? this.response : this.getResponses().get(String(status))) || new JsonResponse();\n }\n ensureResponseOf(status) {\n this.addResponse(status, this.getResponseOf(status));\n return this.getResponseOf(status);\n }\n getHeadersOf(status) {\n return this.getResponseOf(status).get(\"headers\") || {};\n }\n getContentTypeOf(status) {\n return [...this.getResponseOf(status).get(\"content\").keys()].slice(-1)[0];\n }\n security(security) {\n this.set(\"security\", security);\n return this;\n }\n addSecurityScopes(name, scopes) {\n const security = this.get(\"security\") || {};\n security[name] = uniq([...(security[name] || []), ...scopes]);\n return this.security(security);\n }\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n deprecated(deprecated) {\n super.set(\"deprecated\", deprecated);\n return this;\n }\n parameters(parameters) {\n super.set(\"parameters\", parameters);\n return this;\n }\n addParameter(index, parameter) {\n if (index === -1) {\n index = this.get(\"parameters\").length;\n }\n this.get(\"parameters\")[index] = parameter;\n }\n consumes(consumes) {\n super.set(\"consumes\", consumes);\n return this;\n }\n produces(produces) {\n super.set(\"produces\", produces);\n return this;\n }\n addProduce(produce) {\n const produces = uniq([].concat(this.get(\"produces\"), produce)).filter(Boolean);\n this.set(\"produces\", produces);\n }\n addOperationPath(method, path, options = {}) {\n this.operationPaths.set(String(method) + String(path), {\n ...options,\n method,\n path\n });\n return this;\n }\n toJSON(options = {}) {\n const operation = super.toJSON({ ...options, ignore: [\"parameters\"] });\n const bodyParameters = [];\n const parameters = [];\n if (operation.security) {\n operation.security = [].concat(operation.security);\n }\n this.get(\"parameters\").forEach((parameter) => {\n if (!isParameterType(this.get(\"in\"))) {\n if (parameter.get(\"in\")) {\n if ([JsonParameterTypes.BODY, JsonParameterTypes.FILES].includes(parameter.get(\"in\"))) {\n bodyParameters.push(parameter);\n }\n else {\n parameters.push(...[].concat(parameter.toJSON(options)));\n }\n }\n }\n });\n operation.parameters = parameters.filter(Boolean);\n if (this.get(\"responses\").size === 0) {\n operation.responses = {\n \"200\": {\n description: getStatusMessage(200)\n }\n };\n }\n if (bodyParameters.length) {\n const parameter = buildSchemaFromBodyParameters(bodyParameters, options);\n operation.requestBody = toRequestBody(this, parameter).toJSON(options);\n }\n delete operation.consumes;\n delete operation.produces;\n return operation;\n }\n}\nfunction toRequestBody(operation, { schema, examples, in: _, ...props }) {\n const requestBody = new JsonRequestBody(props);\n const consumes = operation.get(\"consumes\")?.length ? operation.get(\"consumes\") : [\"application/json\"];\n consumes.forEach((consume) => {\n requestBody.addContent(consume, schema, examples);\n });\n return requestBody;\n}\nfunction buildSchemaFromBodyParameters(parameters, options) {\n let schema = new JsonSchema();\n const props = {};\n const refs = [];\n let propsLength = 0;\n parameters.forEach((parameter) => {\n const name = parameter.getName();\n Array.from(parameter.entries())\n .filter(([key]) => ![\"in\", \"name\"].includes(key))\n .forEach(([key, value]) => {\n if (props[key] === undefined) {\n props[key] = value;\n }\n });\n const jsonParameter = parameter.toJSON(options);\n if (name) {\n schema.addProperty(name, jsonParameter.schema || {\n type: jsonParameter.type\n });\n if (parameter.get(\"required\")) {\n schema.addRequired(name);\n }\n propsLength++;\n }\n else {\n refs.push(jsonParameter);\n }\n });\n if (!propsLength) {\n if (refs.length === 1) {\n return refs[0];\n }\n }\n schema.type(\"object\");\n return { schema: schema.toJSON(options), required: false, ...props };\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\nimport { JsonOperation } from \"./JsonOperation\";\nimport { JsonSchema } from \"./JsonSchema\";\nlet JsonMethodStore = class JsonMethodStore extends JsonEntityStore {\n parent = JsonEntityStore.from(this.target);\n middlewares = [];\n beforeMiddlewares = [];\n afterMiddlewares = [];\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n operation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n children = new Map();\n constructor(options) {\n super({\n store: Store.fromMethod(options.target, options.propertyKey),\n descriptor: descriptorOf(options.target, options.propertyKey),\n ...options\n });\n const { beforeMiddlewares = [], middlewares = [], afterMiddlewares = [] } = options;\n this.after(afterMiddlewares);\n this.before(beforeMiddlewares);\n this.use(middlewares);\n }\n get params() {\n return this.parameters;\n }\n get view() {\n return this.store.get(\"view\");\n }\n set view(view) {\n this.store.set(\"view\", view);\n }\n get acceptMimes() {\n return this.store.get(\"acceptMimes\", []);\n }\n set acceptMimes(mimes) {\n this.store.set(\"acceptMimes\", mimes);\n }\n get parameters() {\n return [...this.children.values()];\n }\n get operationPaths() {\n return this.operation.operationPaths;\n }\n /**\n * Get an endpoint.\n * @param target\n * @param propertyKey\n * @param descriptor\n */\n static get(target, propertyKey, descriptor) {\n descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n getResponseOptions(status, { contentType = \"application/json\", includes } = {}) {\n const media = this.operation.getResponseOf(status).getMedia(contentType, false);\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\");\n let groups = media.groups;\n if (includes && media.allowedGroups?.size) {\n groups = [...(groups || []), ...includes.filter((include) => media.allowedGroups.has(include))];\n }\n return { type: schema.getComputedItemType(), groups };\n }\n return { type: this.type };\n }\n /**\n * Append middlewares to the beforeMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n before(args) {\n this.beforeMiddlewares = this.beforeMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Append middlewares to the afterMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n after(args) {\n this.afterMiddlewares = this.afterMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Store all arguments collected via Annotation.\n * @param args\n */\n use(args) {\n this.middlewares = this.middlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.\n *\n * @param key\n * @returns {any}\n */\n get(key) {\n const ctrlValue = Store.from(this.target).get(key);\n return deepMerge(ctrlValue, this.store.get(key));\n }\n getParamTypes() {\n return [...this.children.values()].reduce((obj, item) => ({\n ...obj,\n [item.paramType]: true\n }), {});\n }\n build() {\n if (!this._type) {\n let type = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n this.buildType(type);\n }\n this._type = this._type || Object;\n this.parent.children.set(this.propertyName, this);\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n};\nJsonMethodStore = __decorate([\n JsonEntityComponent(DecoratorTypes.METHOD),\n __metadata(\"design:paramtypes\", [Object])\n], JsonMethodStore);\nexport { JsonMethodStore };\nexport const EndpointMetadata = JsonMethodStore;\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntitiesContainer, JsonEntityStore } from \"../domain/JsonEntityStore\";\nimport { JsonClassStore } from \"../domain/JsonClassStore\";\nimport { JsonPropertyStore } from \"../domain/JsonPropertyStore\";\nimport { JsonParameterStore } from \"../domain/JsonParameterStore\";\nimport { JsonMethodStore } from \"../domain/JsonMethodStore\";\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\nexport function getJsonEntityStore(...args) {\n return JsonEntityStore.from(...args);\n}\n","import { nameOf } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore\";\nexport class JsonLazyRef {\n getType;\n isLazyRef = true;\n constructor(getType) {\n this.getType = getType;\n }\n get target() {\n return this.getType();\n }\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n get name() {\n return nameOf(this.getType());\n }\n toJSON(options) {\n return this.getType() && execMapper(\"schema\", this.schema, options);\n }\n}\n","import { JsonLazyRef } from \"../domain/JsonLazyRef\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { mapGenericsOptions } from \"../utils/generics\";\nimport { toRef } from \"../utils/ref\";\nexport function anyMapper(input, options = {}) {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", input, options);\n }\n if (\"toJSON\" in input) {\n const schema = input.toJSON(mapGenericsOptions(options));\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n return execMapper(\"object\", input, options);\n}\nregisterJsonSchemaMapper(\"any\", anyMapper);\n","import { JsonEntityStore } from \"../domain/JsonEntityStore\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { mapGenericsOptions, popGenerics } from \"../utils/generics\";\nimport { createRef, createRefName } from \"../utils/ref\";\nexport function classMapper(value, options) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n if (value.hasGenerics) {\n // Inline generic\n const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", store.schema, {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n if (schema.title) {\n const name = createRefName(schema.title, options);\n options.schemas[name] = schema;\n delete schema.title;\n return createRef(name, value, options);\n }\n return schema;\n }\n if (options.schemas && !options.schemas[name]) {\n options.schemas[name] = {}; // avoid infinite calls\n options.schemas[name] = execMapper(\"any\", store.schema, mapGenericsOptions({\n ...options,\n root: false\n }));\n }\n return createRef(name, value, options);\n}\nregisterJsonSchemaMapper(\"class\", classMapper);\n","import { isClass, isPrimitiveClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../domain/JsonEntityStore\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { popGenerics } from \"../utils/generics\";\nimport { getJsonType } from \"../utils/getJsonType\";\n/**\n * @ignore\n */\nexport function genericsMapper(obj, options) {\n const { generics } = options;\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n if (isClass(type)) {\n const model = {\n class: type\n };\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", model, {\n ...options,\n generics: undefined\n });\n }\n const store = JsonEntityStore.from(model.class);\n return execMapper(\"schema\", store.schema, {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n","import { ancestorsOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n return store.$inherited;\n}\n","import { classOf, deepMerge } from \"@tsed/core\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { getInheritedStores } from \"../utils/getInheritedStores\";\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj, { target, ...options }) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", store.schema, options));\n }, {});\n obj = deepMerge(schema, obj);\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nexport function itemMapper(value, options) {\n return value && value.isClass ? execMapper(\"class\", value, options) : execMapper(\"any\", value, options);\n}\nregisterJsonSchemaMapper(\"item\", itemMapper);\n","import { registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { mapGenericsOptions } from \"../utils/generics\";\nimport { createRef, toRef } from \"../utils/ref\";\nexport function lazyRefMapper(input, options) {\n const name = input.name;\n if (options.$refs?.find((t) => t === input.target)) {\n return createRef(name, input.schema, options);\n }\n options.$refs = [...(options.$refs || []), input.target];\n const schema = input.toJSON(mapGenericsOptions(options));\n return toRef(input.schema, schema, options);\n}\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n","import { mapGenericsOptions } from \"../utils/generics\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input, { ignore = [], ...options }) {\n options = mapGenericsOptions(options);\n return Array.from(input.entries()).reduce((obj, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n obj[key] = execMapper(\"item\", value, options);\n return obj;\n }, {});\n}\nregisterJsonSchemaMapper(\"map\", mapMapper);\n","/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema, options) {\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n if (result) {\n return result;\n }\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n return result;\n}\n","import { uniq } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nfunction hasNullable(obj) {\n return obj.oneOf.find((o) => o.type === \"null\");\n}\nexport function mapNullableType(obj, schema, options) {\n if (!schema?.isNullable) {\n return obj;\n }\n let types = [].concat(obj.type).filter(Boolean);\n switch (options.specType) {\n default:\n case SpecTypes.JSON:\n if (!obj.discriminator) {\n if (obj.oneOf) {\n if (!hasNullable(obj)) {\n obj.oneOf.unshift({\n type: \"null\"\n });\n }\n }\n else {\n obj.type = uniq([\"null\", ...types]);\n }\n }\n break;\n case SpecTypes.OPENAPI:\n obj.nullable = true;\n if (!obj.oneOf) {\n if (types.length > 1) {\n obj.oneOf = types.map((type) => ({ type }));\n delete obj.type;\n }\n else {\n obj.type = types[0];\n }\n }\n break;\n }\n return obj;\n}\n","import { isArray } from \"@tsed/core\";\nimport { alterIgnore } from \"../hooks/alterIgnore\";\nimport { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { mapNullableType } from \"../utils/mapNullableType\";\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input, options) {\n const { specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;\n return Object.entries(input).reduce((obj, [key, value]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", value, opts);\n obj[key] = mapNullableType(obj[key], value, opts);\n }\n return obj;\n }, isArray(input) ? [] : {});\n}\nregisterJsonSchemaMapper(\"object\", objectMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nexport function ofMapper(input, options, parent) {\n return input.map((value) => {\n return execMapper(\"item\", value, {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nexport function propertiesMapper(input, options, parent) {\n if (input.isClass) {\n return execMapper(\"class\", input, options);\n }\n return execMapper(\"any\", input, {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n","/**\n * @ignore\n */\nexport function mapAliasedProperties(value, alias) {\n return Object.entries(value).reduce((properties, [key, value]) => {\n key = alias.get(key) || key;\n properties[key] = value;\n return properties;\n }, {});\n}\n","/**\n * @ignore\n */\nexport function alterRequiredGroups(required, schema, options) {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n return required;\n}\n","import { uniq } from \"@tsed/core\";\nimport { alterRequiredGroups } from \"../hooks/alterRequiredGroups\";\nfunction applyStringRule(obj, propSchema) {\n if (!propSchema?.$allow.includes(\"\")) {\n if ([].concat(propSchema?.get(\"type\")).includes(\"string\")) {\n const minLength = obj?.minLength;\n // Disallow empty string\n if (minLength === undefined) {\n return {\n ...obj,\n minLength: 1\n };\n }\n }\n }\n return obj;\n}\nfunction mapRequiredProps(obj, schema, options = {}) {\n const { useAlias } = options;\n const props = Object.keys(obj.properties || {});\n return (keys, key) => {\n const aliasedKey = useAlias ? schema.alias.get(key) || key : key;\n if (props.includes(aliasedKey)) {\n const propSchema = schema.get(\"properties\")[key];\n const serializeSchema = obj.properties[aliasedKey];\n obj.properties[aliasedKey] = applyStringRule(serializeSchema, propSchema);\n return keys.concat(aliasedKey);\n }\n return keys;\n };\n}\nfunction extractRequiredProps(obj, schema, options) {\n let required = obj.required || [];\n required = [...required, ...schema.$required];\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n return required;\n }, required);\n }\n return alterRequiredGroups(uniq(required), schema, options);\n}\n/**\n * @ignore\n */\nexport function getRequiredProperties(obj, schema, options) {\n if (options.groups && options.groups.includes(\"partial\")) {\n return obj;\n }\n let required = extractRequiredProps(obj, schema, options);\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n if (required.length) {\n return {\n ...obj,\n required\n };\n }\n return obj;\n}\n","export function alterOneOf(obj, schema, options) {\n if (obj.oneOf && options.groups !== false) {\n obj = { ...obj, oneOf: schema.$hooks.alter(\"oneOf\", obj.oneOf, [options.groups]) };\n }\n if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {\n delete obj.type;\n }\n return obj;\n}\n","import { isObject } from \"@tsed/core\";\nimport { mapAliasedProperties } from \"../domain/JsonAliasMap\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { getRequiredProperties } from \"../utils/getRequiredProperties\";\nimport { alterOneOf } from \"../hooks/alterOneOf\";\nimport { mapNullableType } from \"../utils/mapNullableType\";\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [\"const\"];\n/**\n * @ignore\n */\nfunction isEmptyProperties(key, value) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n/**\n * @ignore\n */\nfunction shouldMapAlias(key, value, useAlias) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n/**\n * @ignore\n */\nfunction shouldSkipKey(key, { specType = SpecTypes.JSON, customKeys = false }) {\n return (IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));\n}\nfunction isExample(key, value, options) {\n return key === \"examples\" && isObject(value) && SpecTypes.OPENAPI === options.specType;\n}\nexport function schemaMapper(schema, options) {\n const { useAlias = true, schemas = {} } = options;\n options = {\n ...options,\n useAlias,\n schemas\n };\n let obj = [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item, key) => {\n let value = schema.get(key);\n key = key.replace(/^#/, \"\");\n if (key === \"type\") {\n return {\n ...item,\n [key]: schema.getJsonType()\n };\n }\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, value, options, schema);\n if (isEmptyProperties(key, value)) {\n return item;\n }\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n return {\n ...item,\n [key]: value\n };\n }, {});\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", obj, { ...options, root: false, schemas, target: schema.getComputedType() });\n }\n obj = execMapper(\"generics\", obj, { ...options, root: false, schemas });\n if (schema.has(options.specType)) {\n obj = {\n ...obj,\n ...schema.get(options.specType).toJSON(options)\n };\n }\n obj = getRequiredProperties(obj, schema, { ...options, useAlias });\n obj = mapNullableType(obj, schema, options);\n obj = alterOneOf(obj, schema, options);\n return obj;\n}\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n","export const HTTP_METHODS = [\n \"all\",\n \"checkout\",\n \"connect\",\n \"copy\",\n \"delete\",\n \"get\",\n \"head\",\n \"lock\",\n \"merge\",\n \"mkactivity\",\n \"mkcol\",\n \"move\",\n \"m-search\",\n \"notify\",\n \"options\",\n \"param\",\n \"patch\",\n \"post\",\n \"propfind\",\n \"propatch\",\n \"purge\",\n \"put\",\n \"report\",\n \"search\",\n \"subscribe\",\n \"trace\",\n \"unlock\",\n \"unsuscribe\"\n];\nexport var OperationMethods;\n(function (OperationMethods) {\n OperationMethods[\"ALL\"] = \"ALL\";\n OperationMethods[\"GET\"] = \"GET\";\n OperationMethods[\"POST\"] = \"POST\";\n OperationMethods[\"PUT\"] = \"PUT\";\n OperationMethods[\"PATCH\"] = \"PATCH\";\n OperationMethods[\"HEAD\"] = \"HEAD\";\n OperationMethods[\"DELETE\"] = \"DELETE\";\n OperationMethods[\"OPTIONS\"] = \"OPTIONS\";\n OperationMethods[\"CUSTOM\"] = \"CUSTOM\";\n})(OperationMethods || (OperationMethods = {}));\n","export var JsonFormatTypes;\n(function (JsonFormatTypes) {\n JsonFormatTypes[\"DATE_TIME\"] = \"date-time\";\n JsonFormatTypes[\"DATE\"] = \"date\";\n JsonFormatTypes[\"TIME\"] = \"time\";\n JsonFormatTypes[\"EMAIL\"] = \"email\";\n JsonFormatTypes[\"HOSTNAME\"] = \"hostname\";\n JsonFormatTypes[\"IPV4\"] = \"ipv4\";\n JsonFormatTypes[\"IPV6\"] = \"ipv6\";\n JsonFormatTypes[\"URI\"] = \"uri\";\n JsonFormatTypes[\"URL\"] = \"url\";\n JsonFormatTypes[\"URI_REF\"] = \"uri-reference\";\n JsonFormatTypes[\"URI_TEMPLATE\"] = \"uri-template\";\n JsonFormatTypes[\"JSON_POINTER\"] = \"json-pointer\";\n JsonFormatTypes[\"RELATIVE_JSON_POINTER\"] = \"relative-json-pointer\";\n JsonFormatTypes[\"UUID\"] = \"uuid\";\n JsonFormatTypes[\"REGEX\"] = \"regex\";\n})(JsonFormatTypes || (JsonFormatTypes = {}));\n","import { getJsonEntityStore } from \"../../utils/getJsonEntityStore\";\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn(fn) {\n return (...parameters) => {\n const result = fn(getJsonEntityStore(...parameters), parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n","import { Store } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children) {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n","import { snakeCase } from \"change-case\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value, ...values) {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n","import { __assign } from \"tslib\";\nimport { dotCase } from \"dot-case\";\nexport function snakeCase(input, options) {\n if (options === void 0) { options = {}; }\n return dotCase(input, __assign({ delimiter: \"_\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function dotCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \".\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { JsonEntityStore } from \"../../domain/JsonEntityStore\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type, collectionType) {\n if (!type) {\n 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.\");\n }\n const schema = {};\n let contains = false;\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n store.type = type;\n store.itemSchema.type(type);\n store.schema.assign(schema);\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n decorator.MinItems = (minItems) => {\n schema.minItems = minItems;\n return decorator;\n };\n decorator.MaxItems = (maxItems) => {\n schema.maxItems = maxItems;\n return decorator;\n };\n decorator.MinProperties = (minProperties) => {\n schema.minProperties = minProperties;\n return decorator;\n };\n decorator.MaxProperties = (maxProperties) => {\n schema.maxProperties = maxProperties;\n return decorator;\n };\n decorator.Contains = () => {\n contains = true;\n return decorator;\n };\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n return decorator;\n };\n return decorator;\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type) {\n return CollectionOf(type, Array);\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type) {\n return CollectionOf(type, Map);\n}\n","import { CollectionOf } from \"./collectionOf\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type) {\n return CollectionOf(type).Contains();\n}\n","import { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxItems(maxItems) {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n}\n","import { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxProperties(maxProperties) {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n}\n","import { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinItems(minItems) {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n}\n","import { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinProperties(minProperties) {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n}\n","import { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function UniqueItems(uniqueItems = true) {\n return JsonEntityFn((store) => {\n store.schema.uniqueItems(uniqueItems);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n","import { isClass } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n","import { DecoratorTypes, isClass, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\nimport { Property } from \"./property\";\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values) {\n const model = values.find((item) => isClass(item));\n return useDecorators(model && Property(model), JsonEntityFn((store, args) => {\n store.schema.allow(...values);\n if (store.decoratorType === DecoratorTypes.PARAM) {\n store.required = true;\n }\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n }));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key, value) {\n return JsonEntityFn((store) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj) {\n return JsonEntityFn((store) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.description(description);\n break;\n case DecoratorTypes.METHOD:\n store.operation?.description(description);\n break;\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\nimport { Property } from \"./property\";\nexport function DiscriminatorKey() {\n return useDecorators(Property(), JsonEntityFn((store) => {\n store.discriminatorKey();\n }));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\nexport function Enum(enumValue, ...enumValues) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples) {\n return JsonEntityFn((store) => {\n store.schema.examples(examples);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples) {\n return JsonEntityFn((store) => {\n store.parameter.examples(examples);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Maximum(maximum, exclusive = false) {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n}\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Max(maximum, exclusive = false) {\n return Maximum(maximum, exclusive);\n}\n","import { Maximum } from \"./maximum\";\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ExclusiveMaximum(maximum, exclusiveMaximum = true) {\n return Maximum(maximum, exclusiveMaximum);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Minimum(minimum, exclusive = false) {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n}\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Min(minimum, exclusive = false) {\n return Minimum(minimum, exclusive);\n}\n","import { Minimum } from \"./minimum\";\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ExclusiveMinimum(minimum, exclusiveMinimum = true) {\n return Minimum(minimum, exclusiveMinimum);\n}\n","import { JsonFormatTypes } from \"../../domain/JsonFormatTypes\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Format(format) {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n}\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n */\nexport function Email() {\n return Format(JsonFormatTypes.EMAIL);\n}\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n */\nexport function DateTime() {\n return Format(JsonFormatTypes.DATE_TIME);\n}\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function DateFormat() {\n return Format(JsonFormatTypes.DATE);\n}\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function TimeFormat() {\n return Format(JsonFormatTypes.TIME);\n}\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function Uri() {\n return Format(JsonFormatTypes.URI);\n}\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function Url() {\n return Format(JsonFormatTypes.URL);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true) {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n","import micromatch from \"micromatch\";\n/**\n * @ignore\n */\nexport function matchGroups(groups, compareWith = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith).length) {\n return true;\n }\n }\n if (groupsIncludes.length) {\n return !micromatch(groups.filter((group) => !group.startsWith(\"!\")), compareWith).length;\n }\n return false;\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { matchGroups } from \"../../utils/matchGroups\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * @ignore\n */\nfunction groupsClass(groups, entity) {\n const entries = Object.entries(groups[0]);\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator = Groups(...groups);\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\nexport function Groups(...groups) {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity);\n break;\n case DecoratorTypes.PROP:\n entity.schema.$hooks.on(\"groups\", (prev, givenGroups) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n entity.parameter.groups = groups;\n break;\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * @ignore\n */\nconst defaultCB = (value, ctx) => ctx.mongoose !== true;\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.mongoose) // don't ignore prop only if mongoose\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Post, Controller, BodyParams} from \"@tsed/common\";\n * import {Person} from \"../models/Person\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Ignore(cb = defaultCB) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function MaxLength(maxLength) {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function MinLength(minLength) {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function MultipleOf(multipleOf) {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n}\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { Any } from \"./any\";\nimport { Property } from \"./property\";\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type, ...types) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Pattern(pattern) {\n return JsonEntityFn((store) => {\n store.itemSchema.pattern(pattern);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema) {\n return JsonEntityFn((entity) => {\n Object.entries(partialSchema).forEach(([key, value]) => {\n entity.schema.set(key, value);\n });\n });\n}\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType, schema) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n","import { Schema } from \"./schema\";\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model, ...keys) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n","import { Allow } from \"./allow\";\nimport { Optional } from \"./optional\";\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Required(required = true, ...allowedRequiredValues) {\n return required ? Allow(...allowedRequiredValues) : Optional();\n}\n","import { matchGroups } from \"../../utils/matchGroups\";\nimport { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups) {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required, givenGroups) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key) => key !== entity.propertyKey);\n }\n return required;\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n","import { isClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../domain/JsonEntityStore\";\nimport { JsonFormatTypes } from \"../domain/JsonFormatTypes\";\nimport { JsonLazyRef } from \"../domain/JsonLazyRef\";\nimport { JsonSchema } from \"../domain/JsonSchema\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type = Object) {\n if (isClass(type)) {\n const { schema } = getJsonEntityStore(type);\n schema.properties = function properties(obj) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n return this;\n };\n return schema;\n }\n return JsonSchema.from({ type });\n}\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function number() {\n return from(Number);\n}\n/**\n * Declare a new integer model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function integer() {\n return from(Number).integer();\n}\n/**\n * Declare a new string model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function string() {\n return from(String);\n}\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function boolean() {\n return from(Boolean);\n}\n/**\n * Declare a new string model with `format: date`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function date() {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n/**\n * Declare a new string model with `format: datetime`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function datetime() {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n/**\n * Declare a new string model with `format: time`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function time() {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n/**\n * Declare a new string model with `format: email`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function email() {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri() {\n return from(String).format(JsonFormatTypes.URI);\n}\n/**\n * Declare a new string model with `format: url`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function url() {\n return from(String).format(JsonFormatTypes.URL);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array() {\n return from(Array);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map() {\n return from(Map).unknown(true);\n}\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function set() {\n return from(Array).uniqueItems(true);\n}\n/**\n * Declare a new object model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function object(properties = {}) {\n return from(Object).properties(properties);\n}\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function any(...types) {\n return from().any(...types);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n * @schemaFunctional\n */\nexport function anyOf(...anyOf) {\n return from().anyOf(anyOf);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf) {\n return from().oneOf(oneOf);\n}\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n * @schemaFunctional\n */\nexport function allOf(...allOf) {\n return from().allOf(allOf);\n}\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n *\n * @schemaFunctional\n */\nexport function lazyRef(cb) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema;\n }\n }\n catch (er) { }\n return new JsonLazyRef(cb);\n}\n","import { isObject } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore\";\nimport { string } from \"../../utils/from\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics) {\n const nestedGenerics = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n decorator.Nested = (...generics) => {\n nestedGenerics.push(generics);\n return decorator;\n };\n return decorator;\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore\";\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics) {\n return (target) => {\n const storedSchema = JsonEntityStore.from(target);\n storedSchema.schema.genericLabels = generics;\n };\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n","import { StoreSet, useDecorators } from \"@tsed/core\";\nimport { Produces } from \"./produces\";\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes) {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { JsonEntityStore } from \"./JsonEntityStore\";\n/**\n * @ignore\n */\nexport class DecoratorContext extends Map {\n methods;\n decoratorType;\n entity;\n actions = [];\n constructor(opts = {}) {\n super();\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n addAction(cb) {\n this.actions.push(cb);\n return this;\n }\n build() {\n const decorator = (...args) => this.bind(args, decorator);\n const wrap = (cb) => {\n return (...args) => {\n cb(...args);\n return decorator;\n };\n };\n const wrapKey = (key) => {\n return wrap((...values) => {\n key in this ? this[key](...values) : this.set(key, values[0]);\n });\n };\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n return decorator;\n }\n toObject() {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n getMergedKey(key, defaultValue) {\n let value = this.get(key) || defaultValue;\n if (!value) {\n return;\n }\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n bind(args, decorator) {\n this.entity = JsonEntityStore.from(...args);\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n onInit(args, decorator) {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n onMapKey(key, value) {\n this.entity.set(key, value);\n }\n runActions() {\n this.actions.forEach((action) => {\n action(this);\n });\n return this;\n }\n beforeInit() { }\n afterInit() { }\n}\n","const statusesModel = new Map();\nexport function defineStatusModel(status, model) {\n statusesModel.set(status, model);\n}\nexport function getStatusModel(status) {\n return statusesModel.get(status);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, isArray, isCollection, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, isString } from \"@tsed/core\";\nimport { getStatusMessage } from \"../../constants/httpStatusMessages\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore\";\nimport { JsonParameter } from \"../../domain/JsonParameter\";\nimport { JsonSchema } from \"../../domain/JsonSchema\";\nimport { getStatusModel } from \"../../utils/defineStatusModel\";\nimport { string } from \"../../utils/from\";\nimport { isSuccessStatus } from \"../../utils/isSuccessStatus\";\nimport { mapHeaders } from \"../../utils/mapHeaders\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\nfunction mapGenerics(types) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext {\n methods = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\"\n ];\n constructor({ status, model }) {\n super();\n this.model(model);\n this.status(status);\n }\n type(model) {\n return this.model(model);\n }\n model(model) {\n model && this.set(\"model\", model);\n return this;\n }\n status(status) {\n this.set(\"status\", status);\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n return this;\n }\n headers(headers) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n return this;\n }\n header(key, value) {\n return this.headers({ [key]: value });\n }\n location(path, meta = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n return this;\n }\n groups(...groups) {\n this.set(\"groups\", groups);\n return this;\n }\n allowedGroups(...allowedGroups) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n nested(...generics) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n this.addAction((ctx) => {\n this.get(\"schema\").nestedGenerics.push(mapGenerics(generics));\n });\n return this;\n }\n of(...types) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema?.itemSchema({ type: types[0] });\n }\n else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n return this;\n }\n ofInteger() {\n return this.of(\"integer\");\n }\n oneOf(...types) {\n return this.manyOf(\"oneOf\", types);\n }\n allOf(...types) {\n return this.manyOf(\"allOf\", types);\n }\n anyOf(...types) {\n return this.manyOf(\"anyOf\", types);\n }\n schema(partial) {\n this.addAction(() => {\n const schema = this.get(\"schema\");\n schema.assign(partial);\n });\n return this;\n }\n examples(examples) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n title(title) {\n return this.schema({ title });\n }\n checkPrimitive(model) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n checkCollection(model) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n if (model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) {\n contentType = contentType || \"application/json\";\n }\n return contentType;\n }\n getStatus() {\n return this.get(\"status\") || \"default\";\n }\n onInit(args, decorator) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n map() {\n const model = this.get(\"model\");\n const { entity, decoratorType } = this;\n const operation = this.entity.operation;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n let { description = response.get(\"description\") } = this.toObject();\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n if (headers) {\n response.headers(headers);\n }\n this.mapMedia(response);\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n // run additional actions\n return this.runActions();\n }\n mapMedia(response) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({ type: model });\n const groups = this.get(\"groups\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation;\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({ type })));\n }\n else {\n schema.type(model);\n }\n }\n this.set(\"schema\", schema);\n media.schema(schema);\n media.groups = groups;\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n }));\n operation.addParameter(-1, jsonParameter);\n }\n const examples = this.get(\"examples\");\n if (examples) {\n media.examples(examples);\n }\n return media;\n }\n manyOf(kind, types) {\n const model = this.get(\"model\");\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema.type(model || Object);\n schema.itemSchema().set(kind, types);\n }\n else {\n schema.set(kind, types);\n }\n });\n return this;\n }\n}\nexport function Returns(status, model) {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n return context.build();\n}\n","import { Returns } from \"./returns\";\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type) {\n return Returns().ContentType(type);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n store.parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n store.schema.set(\"deprecated\", deprecated);\n break;\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n","import { Returns } from \"./returns\";\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers, value) {\n if (value !== undefined) {\n headers = { [headers]: value };\n }\n return Returns().Headers(headers);\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore\";\nimport { JsonParameter } from \"../../domain/JsonParameter\";\nimport { JsonSchema } from \"../../domain/JsonSchema\";\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType) {\n const jsonParameter = new JsonParameter();\n const schema = {};\n const decorator = (target, propertyKey, index) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n store.operation.addParameter(-1, jsonParameter);\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n decorator.Type = (type) => {\n schema.type = type;\n return decorator;\n };\n decorator.Name = (name) => {\n jsonParameter.name(name);\n return decorator;\n };\n decorator.Description = (description) => {\n jsonParameter.description(description);\n return decorator;\n };\n decorator.Required = (required = true) => {\n jsonParameter.required(required);\n return decorator;\n };\n decorator.Pattern = (pattern) => {\n return decorator.Schema({ pattern: pattern.toString() });\n };\n decorator.Schema = (_schema) => {\n Object.assign(schema, _schema);\n return decorator;\n };\n return decorator;\n}\n","import { Metadata, useDecorators, useMethodDecorators } from \"@tsed/core\";\nimport { In } from \"./in\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes\";\nimport { Returns } from \"./returns\";\nimport { Name } from \"../common/name\";\nimport { Consumes } from \"./consumes\";\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name) {\n return (...args) => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index] === Array;\n name = (typeof name === \"object\" ? undefined : name);\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n const decorators = useDecorators(In(JsonParameterTypes.FILES), Name(expression), useMethodDecorators(Returns(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`), Consumes(\"multipart/form-data\")));\n decorators(...args);\n };\n}\n","import { descriptorOf } from \"../objects/descriptorOf\";\nexport function useMethodDecorator(decorator) {\n return (target, propertyKey) => decorator(target, propertyKey, descriptorOf(target, propertyKey));\n}\nexport function useMethodDecorators(...decorators) {\n return (target, propertyKey) => {\n decorators.filter(Boolean).forEach((decorator) => decorator(target, propertyKey, descriptorOf(target, propertyKey)));\n };\n}\n//# sourceMappingURL=useMethodDecorators.js.map","import { Returns } from \"./returns\";\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location, meta) {\n return Returns().Location(location, meta);\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n store.operation.operationId(operationId);\n });\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use theses decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method, path = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n store.operation.addOperationPath(method.toUpperCase(), path);\n });\n}\n","import { Groups } from \"../common/groups\";\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial() {\n return Groups(\"partial\");\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n store.path = path;\n });\n}\n","import { isNumber, isString, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\nimport { Returns } from \"./returns\";\nexport function Redirect(...args) {\n const { status, url, meta } = args.reduce((options, value) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n if (isString(value)) {\n options.url = value;\n return options;\n }\n options.meta = value;\n return options;\n }, { status: 302, url: \"\", meta: {} });\n return useDecorators(Returns(status).Location(url, meta), JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n }));\n}\n","import { HTTP_METHODS } from \"../constants/httpMethods\";\nexport function mapRouteOptions(args) {\n let method = undefined;\n let path = undefined;\n const handlers = args.filter((arg) => {\n if (typeof arg === \"string\" && HTTP_METHODS.includes(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n return false;\n }\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n return false;\n }\n return !!arg;\n });\n return {\n path,\n method,\n use: handlers\n };\n}\n","import { DecoratorContext } from \"../../domain/DecoratorContext\";\nimport { mapRouteOptions } from \"../../utils/mapRouteOptions\";\nimport { OperationMethods } from \"../../constants/httpMethods\";\nclass RouteDecoratorContext extends DecoratorContext {\n methods = [\"name\", \"description\", \"summary\", \"method\", \"id\", \"use\", \"useAfter\", \"useBefore\"];\n beforeInit() {\n const path = this.get(\"path\");\n const method = OperationMethods[this.get(\"method\")] || OperationMethods.CUSTOM;\n path && this.entity.operation.addOperationPath(method, path);\n }\n onMapKey(key, value) {\n switch (key) {\n case \"name\":\n case \"id\":\n this.entity.operation.operationId(value);\n return;\n case \"summary\":\n this.entity.operation.summary(value);\n return;\n case \"description\":\n this.entity.operation.description(value);\n return;\n case \"use\":\n this.entity.use(value);\n return;\n case \"useAfter\":\n this.entity.after(value);\n return;\n case \"useBefore\":\n this.entity.before(value);\n return;\n }\n return super.onMapKey(key, value);\n }\n}\nexport function Route(...args) {\n const routeOptions = mapRouteOptions(args);\n const context = new RouteDecoratorContext(routeOptions);\n return context.build();\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function All(path = \"/\", ...args) {\n return Route(...[OperationMethods.ALL, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Get(path = \"/\", ...args) {\n return Route(...[OperationMethods.GET, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Post(path = \"/\", ...args) {\n return Route(...[OperationMethods.POST, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Put(path = \"/\", ...args) {\n return Route(...[OperationMethods.PUT, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Delete(path = \"/\", ...args) {\n return Route(...[OperationMethods.DELETE, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Head(path = \"/\", ...args) {\n return Route(...[OperationMethods.HEAD, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Patch(path = \"/\", ...args) {\n return Route(...[OperationMethods.PATCH, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Options(path = \"/\", ...args) {\n return Route(...[OperationMethods.OPTIONS, path].concat(args));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add security metadata on the decorated method.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Security(\"write:calendars\")\n * async method() {}\n * }\n * ```\n *\n * @param name\n * @param scopes\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Security(name, ...scopes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.addSecurityScopes(name, scopes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Security(name, ...scopes));\n break;\n default:\n throw new UnsupportedDecoratorType(Security, args);\n }\n });\n}\n","import { Returns } from \"./returns\";\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v6 API introducing the chaining decorator concept.\n * Now a decorator like Returns can be used with another decorators like Description.\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Status(404, String).Description(\"Not Found\")\n * @Status(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ### Declaring a generic model\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Status(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Generics, Property, Returns} from \"@tsed/schema\";\n * import {Post} from \"@tsed/common\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Status(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Status(status, model) {\n return Returns(status, model);\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\n/**\n * Add summary metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Summary(\"summary\")\n * id: string;\n * }\n * ```\n *\n * @param summary\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Summary(summary) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(Summary, args);\n }\n store.operation.summary(summary);\n });\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn\";\nfunction mapTags(tags) {\n return tags.map((tag) => {\n if (typeof tag === \"string\") {\n return {\n name: tag\n };\n }\n return tag;\n });\n}\n/**\n * Add tags metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Tags(\"api\")\n * get() {}\n * }\n * ```\n *\n * @param tags\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Tags(...tags) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.addTags(mapTags(tags));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Tags(...tags));\n break;\n default:\n throw new UnsupportedDecoratorType(Tags, args);\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n */\nexport function View(path, options) {\n return StoreSet(\"view\", { path, options });\n}\n","import { OperationMethods } from \"../constants/httpMethods\";\nexport class JsonOperationPathsMap extends Map {\n setOperationPath(operationPath) {\n if (operationPath.method !== OperationMethods.CUSTOM) {\n const key = this.getKey(operationPath.method, operationPath.path);\n this.set(key, operationPath);\n }\n }\n getKey = (method, path) => `${method}-${path}`;\n}\n","export function concatPath(basePath, path) {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n if (!path) {\n return basePath;\n }\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n const result = (basePath || \"\") + (path || \"\");\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n","import { concatPath } from \"../utils/concatPath\";\nexport class JsonOperationRoute {\n token;\n endpoint;\n operationPath;\n basePath;\n paramsTypes;\n constructor(options) {\n Object.assign(this, options);\n this.paramsTypes = this.endpoint.getParamTypes();\n }\n get url() {\n return this.fullPath;\n }\n get path() {\n return this.operationPath?.path;\n }\n get fullPath() {\n return concatPath(this.basePath, this.path);\n }\n get method() {\n return this.operationPath?.method || \"USE\";\n }\n get name() {\n return `${this.endpoint.targetName}.${this.methodClassName}()`;\n }\n get className() {\n return this.endpoint.targetName;\n }\n get methodClassName() {\n return this.propertyKey;\n }\n get parameters() {\n return this.endpoint.parameters;\n }\n get propertyKey() {\n return String(this.endpoint.propertyKey);\n }\n get propertyName() {\n return this.endpoint.propertyName;\n }\n get store() {\n return this.endpoint.store;\n }\n get operation() {\n return this.endpoint.operation;\n }\n get operationId() {\n return this.operation.get(\"operationId\") || this.endpoint.propertyKey;\n }\n has(key) {\n return this.paramsTypes[key];\n }\n}\n","/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n","/**\n * @ignore\n */\nexport function concatParameters(parameters, operation) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p) => p.in === param.in && p.name === param.name);\n return f || param;\n })\n .concat(...operation.parameters.filter((param) => param.in !== \"path\"));\n}\n","import { JsonMethodStore } from \"../domain/JsonMethodStore\";\nimport { JsonOperationPathsMap } from \"../domain/JsonOperationPathsMap\";\nimport { getInheritedStores } from \"./getInheritedStores\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\n/**\n * @ignore\n */\nexport function getOperationsStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map();\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n store.$operations.forEach((store) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n operationPaths.clear();\n }\n return store.$operations;\n}\n","/**\n * @ignore\n */\nfunction getVariable(subpath) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\nfunction parseUrl(key) {\n let inCapture = 0;\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n const result = inCapture === 0;\n if (c === \")\") {\n inCapture--;\n }\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base, path = \"\") {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n const params = [];\n const paths = [];\n let isOptional = false;\n let current = \"\";\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n const { prefix, name, postfix } = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n }\n else {\n current += `/${key}`;\n }\n });\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params)\n }\n ];\n}\n","import { SpecTypes } from \"../domain/SpecTypes\";\nimport { concatParameters } from \"./concatParameters\";\nimport { getJsonPathParameters } from \"./getJsonPathParameters\";\n/**\n * @ignore\n */\nexport function mergeOperation(obj, operation, { rootPath, specType, operationId, defaultTags, tags, path, method }) {\n const pathParameters = getJsonPathParameters(rootPath, path).map(({ path, parameters }) => {\n path = path ? path : \"/\";\n // FIXME not on the right place\n if (specType === SpecTypes.OPENAPI) {\n parameters = parameters.map(({ type, ...param }) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n });\n }\n return { path, parameters };\n });\n return pathParameters.reduce((obj, { path, parameters }) => {\n parameters = concatParameters(parameters, operation);\n path = path ? path : \"/\";\n const operationTags = operation.tags?.length ? operation.tags : [defaultTags];\n obj.paths[path] = {\n ...obj.paths[path],\n [method.toLowerCase()]: {\n operationId: operation.operationId || operationId(path),\n ...operation,\n tags: operationTags.map(({ name }) => name),\n parameters\n }\n };\n tags.push(...operationTags);\n return obj;\n }, obj);\n}\n","import { __assign } from \"tslib\";\nimport { pascalCase, pascalCaseTransform, pascalCaseTransformMerge, } from \"pascal-case\";\nexport function camelCaseTransform(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\nexport function camelCaseTransformMerge(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\nexport function camelCase(input, options) {\n if (options === void 0) { options = {}; }\n return pascalCase(input, __assign({ transform: camelCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { camelCase } from \"change-case\";\nconst DEFAULT_PATTERN = \"%c.%m\";\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern = \"\") {\n const OPERATION_IDS = new Map();\n const transform = (name, propertyKey) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n return (name, propertyKey, path = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return operationId;\n }\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return camelCase(`${operationId} By ${result}`);\n }\n }\n const id = OPERATION_IDS.get(operationKey) + 1;\n OPERATION_IDS.set(operationKey, id);\n return `${operationId}_${id}`;\n };\n}\n","import { deepMerge, mergeReducerBuilder } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder((current, value) => (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref));\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec(spec, input) {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n","import { cleanObject, isArray, uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { buildPath } from \"./buildPath\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\nimport { getOperationsStores } from \"./getOperationsStores\";\nimport { mergeOperation } from \"./mergeOperation\";\nimport { operationIdFormatter } from \"./operationIdFormatter\";\nimport { mergeSpec } from \"./mergeSpec\";\n/**\n * @ignore\n */\nconst caches = new Map();\n/**\n * @ignore\n */\nfunction get(model, options, cb) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n const cache = caches.get(model);\n const key = JSON.stringify(options);\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n return cache.get(key);\n}\nfunction generate(model, options) {\n const store = getJsonEntityStore(model);\n const { schemas = {}, paths = {}, rootPath = \"/\", tags = [] } = options;\n const specType = SpecTypes.OPENAPI;\n const ctrlPath = store.path;\n const defaultTags = cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n });\n const specJson = { paths };\n getOperationsStores(model).forEach((operationStore) => {\n if (operationStore.store.get(\"hidden\")) {\n return;\n }\n const operation = operationStore.operation.toJSON({ ...options, specType, schemas });\n operationStore.operation.operationPaths.forEach(({ path, method }) => {\n if (method) {\n mergeOperation(specJson, operation, {\n rootPath: buildPath(rootPath + ctrlPath),\n path,\n method,\n defaultTags,\n tags,\n specType,\n operationId: (path) => options.operationIdFormatter(operationStore.parent.schema.get(\"name\") || operationStore.parent.targetName, operationStore.propertyName, path)\n });\n }\n });\n });\n specJson.tags = uniqBy(tags, \"name\");\n if (Object.keys(schemas).length) {\n specJson.components = {\n schemas\n };\n }\n return specJson;\n}\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model, options = {}) {\n options = {\n ...options,\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n if (isArray(model)) {\n let finalSpec = {};\n options = {\n ...options,\n specType: SpecTypes.OPENAPI,\n paths: {},\n tags: [],\n schemas: {},\n append(spec) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n model.forEach(({ token, ...opts }) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n options.append(spec);\n });\n return finalSpec;\n }\n return get(model, options, () => generate(model, options));\n}\n","import { SpecTypes } from \"../domain/SpecTypes\";\n/**\n * @ignore\n * @param version\n */\nexport function getSpecType(version) {\n return version.startsWith(\"3.\") ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n/**\n * @ignore\n * @param spec\n */\nexport function getSpecTypeFromSpec(spec) {\n return \"openapi\" in spec ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info) {\n const { title, description, version, termsOfService, contact, license } = info;\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n","import { getValue, uniq } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(spec, { version, specVersion, acceptMimes = [\"application/json\"] }) {\n const { paths, security, tags, host, basePath, schemes, consumes = [], produces = [\"application/json\"], definitions, parameters, responses, securityDefinitions, externalDocs } = spec;\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n","import { getValue } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec, { specVersion }) {\n const { servers, paths, components, security, tags, externalDocs } = spec;\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n","import { getValue, setValue } from \"@tsed/core\";\nimport { getSpecType } from \"./getSpecType\";\nimport { mapOpenSpec2 } from \"./mapOpenSpec2\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { mapOpenSpec3 } from \"./mapOpenSpec3\";\nimport { mergeSpec } from \"./mergeSpec\";\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec, { fileSpec, acceptMimes, specVersion, version }) {\n specVersion = specVersion || getValue(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n const options = {\n specVersion,\n acceptMimes\n };\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n spec = mergeSpec(spec, fileSpec);\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n return spec;\n}\n","\"use strict\";\nimport { cleanObject } from \"@tsed/core\";\nconst HTTP_METHODS = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"];\nconst SCHEMA_PROPERTIES = [\n \"format\",\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"minLength\",\n \"maxLength\",\n \"multipleOf\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"minProperties\",\n \"maxProperties\",\n \"additionalProperties\",\n \"pattern\",\n \"enum\",\n \"default\"\n];\nconst ARRAY_PROPERTIES = [\"type\", \"items\"];\nconst APPLICATION_JSON_REGEX = /^(application\\/json|[^;\\/ \\t]+\\/[^;\\/ \\t]+[+]json)[ \\t]*(;.*)?$/;\nconst SUPPORTED_MIME_TYPES = {\n APPLICATION_X_WWW_URLENCODED: \"application/x-www-form-urlencoded\",\n MULTIPART_FORM_DATA: \"multipart/form-data\"\n};\nfunction fixRef(ref) {\n return ref.replace(\"#/components/schemas/\", \"#/definitions/\").replace(\"#/components/\", \"#/x-components/\");\n}\nfunction fixRefs(obj) {\n if (Array.isArray(obj)) {\n obj.forEach(fixRefs);\n }\n else if (typeof obj === \"object\") {\n for (let key in obj) {\n if (key === \"$ref\") {\n obj.$ref = fixRef(obj.$ref);\n }\n else {\n fixRefs(obj[key]);\n }\n }\n }\n}\nfunction isJsonMimeType(type) {\n return new RegExp(APPLICATION_JSON_REGEX, \"i\").test(type);\n}\nfunction getSupportedMimeTypes(content) {\n const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {\n return SUPPORTED_MIME_TYPES[key];\n });\n return Object.keys(content).filter((key) => {\n return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);\n });\n}\nexport function transformSecurity(securitySchemes) {\n function map(security) {\n const { scheme, type, name, bearerFormat, flows, ...props } = security;\n switch (type) {\n case \"http\":\n if (scheme === \"basic\") {\n return {\n ...props,\n type: scheme\n };\n }\n if (scheme === \"bearer\") {\n return {\n ...props,\n type: \"apiKey\",\n name: \"Authorization\",\n in: \"header\"\n };\n }\n break;\n case \"oauth2\":\n const flowName = Object.keys(flows)[0];\n const flow = flows[flowName];\n let flowType = flowName;\n if (flowType === \"clientCredentials\") {\n flowType = \"application\";\n }\n else if (flowType === \"authorizationCode\") {\n flowType = \"accessCode\";\n }\n return {\n type,\n flow: flowType,\n authorizationUrl: flow.authorizationUrl,\n tokenUrl: flow.tokenUrl,\n scopes: flow.scopes\n };\n }\n }\n return Object.entries(securitySchemes).reduce((securityDefinitions, [key, security]) => {\n return {\n ...securityDefinitions,\n [key]: map(security)\n };\n }, {});\n}\nexport function transformInformation(server) {\n let serverUrl = server.url;\n const variables = server[\"variables\"] || {};\n for (const variable in variables) {\n const variableObject = variables[variable] || {};\n if (variableObject[\"default\"]) {\n const re = RegExp(`{${variable}}`, \"g\");\n serverUrl = serverUrl.replace(re, variableObject[\"default\"]);\n }\n }\n const url = new URL(serverUrl);\n return {\n host: url.host ? url.host : undefined,\n basePath: url.pathname,\n schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined\n };\n}\nexport class Converter {\n spec;\n constructor(spec) {\n this.spec = JSON.parse(JSON.stringify(spec));\n }\n convertInfos() {\n const server = this.spec.servers && this.spec.servers[0];\n if (server) {\n return transformInformation(server);\n }\n return {};\n }\n resolveReference(base, obj, shouldClone) {\n if (!obj || !obj.$ref) {\n return obj;\n }\n const ref = obj.$ref;\n if (ref.startsWith(\"#\")) {\n const keys = ref.split(\"/\").map((k) => k.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n keys.shift();\n let cur = base;\n keys.forEach((k) => {\n cur = cur[k];\n });\n return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;\n }\n }\n convert() {\n const spec = {\n swagger: \"2.0\",\n ...this.convertInfos(),\n paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined\n };\n if (this.spec.components) {\n this.convertSchemas();\n this.convertSecurityDefinitions();\n this.spec[\"x-components\"] = this.spec.components;\n delete this.spec.components;\n fixRefs(this.spec);\n }\n delete this.spec.servers;\n delete this.spec.openapi;\n delete this.spec[\"x-components\"];\n return cleanObject({\n ...spec,\n ...this.spec\n });\n }\n convertOperations(paths, spec) {\n return Object.entries(paths).reduce((paths, [path, operation]) => {\n const pathObject = (paths[path] = this.resolveReference({ ...spec, paths }, operation, true));\n this.convertParameters(pathObject); // converts common parameters\n Object.keys(pathObject).forEach((method) => {\n if (HTTP_METHODS.indexOf(method) >= 0) {\n const operation = (pathObject[method] = this.resolveReference({ ...spec, paths }, pathObject[method], true));\n this.convertOperationParameters(operation);\n this.convertResponses(operation);\n }\n });\n return paths;\n }, paths);\n }\n convertOperationParameters(operation) {\n let content, contentKey, mediaRanges, mediaTypes;\n operation.parameters = operation.parameters || [];\n if (operation.requestBody) {\n let param = this.resolveReference(this.spec, operation.requestBody, true);\n // fixing external $ref in body\n if (operation.requestBody.content) {\n const type = getSupportedMimeTypes(operation.requestBody.content)[0];\n const structuredObj = { content: {} };\n const data = operation.requestBody.content[type];\n if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith(\"#\")) {\n param = this.resolveReference(this.spec, data.schema, true);\n structuredObj[\"content\"][`${type}`] = { schema: param };\n param = structuredObj;\n }\n }\n param.name = \"body\";\n content = param.content;\n if (content && Object.keys(content).length) {\n mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf(\"/\") > 0);\n mediaTypes = mediaRanges.filter((range) => range.indexOf(\"*\") < 0);\n contentKey = getSupportedMimeTypes(content)[0];\n delete param.content;\n if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {\n operation.consumes = mediaTypes;\n param.in = \"formData\";\n param.schema = content[contentKey].schema;\n param.schema = this.resolveReference(this.spec, param.schema, true);\n if (param.schema.type === \"object\" && param.schema.properties) {\n const required = param.schema.required || [];\n Object.keys(param.schema.properties).forEach((name) => {\n const schema = param.schema.properties[name];\n // readOnly properties should not be sent in requests\n if (!schema.readOnly) {\n const formDataParam = {\n name,\n in: \"formData\",\n schema\n };\n if (required.indexOf(name) >= 0) {\n formDataParam.required = true;\n }\n operation.parameters?.push(formDataParam);\n }\n });\n }\n else {\n operation.parameters.push(param);\n }\n }\n else if (contentKey) {\n operation.consumes = mediaTypes;\n param.in = \"body\";\n param.schema = content[contentKey].schema;\n operation.parameters.push(param);\n }\n else if (mediaRanges) {\n operation.consumes = mediaTypes || [\"application/octet-stream\"];\n param.in = \"body\";\n param.name = param.name || \"file\";\n delete param.type;\n param.schema = content[mediaRanges[0]].schema || {\n type: \"string\",\n format: \"binary\"\n };\n operation.parameters.push(param);\n }\n if (param.schema) {\n this.convertSchema(param.schema, \"request\");\n }\n }\n delete operation.requestBody;\n }\n this.convertParameters(operation);\n }\n convertParameters(obj) {\n if (obj.parameters === undefined) {\n return;\n }\n obj.parameters = obj.parameters || [];\n (obj.parameters || []).forEach((param, i) => {\n param = obj.parameters[i] = this.resolveReference(this.spec, param, false);\n if (param.in !== \"body\") {\n this.copySchemaProperties(param, SCHEMA_PROPERTIES);\n this.copySchemaProperties(param, ARRAY_PROPERTIES);\n this.copySchemaXProperties(param);\n if (!param.description) {\n const schema = this.resolveReference(this.spec, param.schema, false);\n if (!!schema && schema.description) {\n param.description = schema.description;\n }\n }\n if (param.example !== undefined) {\n param[\"x-example\"] = param.example;\n }\n delete param.schema;\n delete param.allowReserved;\n delete param.example;\n }\n if (param.type === \"array\") {\n let style = param.style || (param.in === \"query\" || param.in === \"cookie\" ? \"form\" : \"simple\");\n switch (style) {\n case \"matrix\":\n param.collectionFormat = param.explode ? undefined : \"csv\";\n break;\n case \"label\":\n param.collectionFormat = undefined;\n break;\n case \"simple\":\n param.collectionFormat = \"csv\";\n break;\n case \"spaceDelimited\":\n param.collectionFormat = \"ssv\";\n break;\n case \"pipeDelimited\":\n param.collectionFormat = \"pipes\";\n break;\n case \"deepOpbject\":\n param.collectionFormat = \"multi\";\n break;\n case \"form\":\n param.collectionFormat = param.explode === false ? \"csv\" : \"multi\";\n break;\n }\n }\n delete param.style;\n delete param.explode;\n });\n }\n copySchemaProperties(obj, props) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n props.forEach((prop) => {\n const value = schema[prop];\n if (prop === \"additionalProperties\" && typeof value === \"boolean\") {\n return;\n }\n if (value !== undefined) {\n obj[prop] = value;\n }\n });\n }\n copySchemaXProperties(obj) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n Object.keys(schema).forEach((propName) => {\n if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith(\"x-\")) {\n obj[propName] = schema[propName];\n }\n });\n }\n convertResponses(operation) {\n // var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers\n Object.keys(operation.responses || {}).forEach((code) => {\n const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));\n if (response.content) {\n let anySchema = null;\n let jsonSchema = null;\n Object.keys(response.content).forEach((mediaRange) => {\n // produces and examples only allow media types, not ranges\n // use application/octet-stream as a catch-all type\n const mediaType = mediaRange.indexOf(\"*\") < 0 ? mediaRange : \"application/octet-stream\";\n if (!operation.produces) {\n operation.produces = [mediaType];\n }\n else if (operation.produces.indexOf(mediaType) < 0) {\n operation.produces.push(mediaType);\n }\n const content = response.content[mediaRange];\n anySchema = anySchema || content.schema;\n if (!jsonSchema && isJsonMimeType(mediaType)) {\n jsonSchema = content.schema;\n }\n if (content.example) {\n response.examples = response.examples || {};\n response.examples[mediaType] = content.example;\n }\n });\n if (anySchema) {\n response.schema = jsonSchema || anySchema;\n const resolved = this.resolveReference(this.spec, response.schema, true);\n if (resolved && response.schema.$ref && !response.schema.$ref.startsWith(\"#\")) {\n response.schema = resolved;\n }\n this.convertSchema(response.schema, \"response\");\n }\n }\n Object.keys(response.headers || {}).forEach((header) => {\n // Always resolve headers when converting to v2.\n const resolved = this.resolveReference(this.spec, response.headers[header], true);\n // Headers should be converted like parameters.\n if (resolved.schema) {\n resolved.type = resolved.schema.type;\n resolved.format = resolved.schema.format;\n delete resolved.schema;\n }\n response.headers[header] = resolved;\n });\n delete response.content;\n });\n }\n convertSchema(def, operationDirection) {\n if (def.oneOf) {\n delete def.oneOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.anyOf) {\n delete def.anyOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.allOf) {\n for (const i in def.allOf) {\n this.convertSchema(def.allOf[i], operationDirection);\n }\n }\n if (def.discriminator) {\n if (def.discriminator.mapping) {\n this.convertDiscriminatorMapping(def.discriminator.mapping);\n }\n def.discriminator = def.discriminator.propertyName;\n }\n switch (def.type) {\n case \"object\":\n if (def.properties) {\n Object.keys(def.properties).forEach((propName) => {\n if (def.properties[propName].writeOnly === true && operationDirection === \"response\") {\n delete def.properties[propName];\n }\n else {\n this.convertSchema(def.properties[propName], operationDirection);\n delete def.properties[propName].writeOnly;\n }\n });\n }\n break;\n case \"array\":\n if (def.items) {\n this.convertSchema(def.items, operationDirection);\n }\n }\n if (def.nullable) {\n def[\"x-nullable\"] = true;\n delete def.nullable;\n }\n // OpenAPI 3 has boolean \"deprecated\" on Schema, OpenAPI 2 does not\n // Convert to x-deprecated for Autorest (and perhaps others)\n if (def[\"deprecated\"] !== undefined) {\n // Move to x-deprecated, unless it is already defined\n if (def[\"x-deprecated\"] === undefined) {\n def[\"x-deprecated\"] = def.deprecated;\n }\n delete def.deprecated;\n }\n }\n convertSchemas() {\n this.spec.definitions = this.spec.components.schemas;\n Object.keys(this.spec.definitions || {}).forEach((defName) => {\n this.convertSchema(this.spec.definitions[defName]);\n });\n delete this.spec.components.schemas;\n }\n convertDiscriminatorMapping(mapping) {\n Object.keys(mapping).forEach((payload) => {\n const schemaNameOrRef = mapping[payload];\n if (typeof schemaNameOrRef !== \"string\") {\n console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n return;\n }\n // payload may be a schema name or JSON Reference string.\n // OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$\n // Note: Valid schema name could be JSON file name without extension.\n // Prefer schema name, with file name as fallback.\n let schema;\n if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {\n try {\n schema = this.resolveReference(this.spec, { $ref: `#/components/schemas/${schemaNameOrRef}` }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);\n }\n }\n // schemaNameRef is not a schema name. Try to resolve as JSON Ref.\n if (!schema) {\n try {\n schema = this.resolveReference(this.spec, { $ref: schemaNameOrRef }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);\n }\n }\n if (schema) {\n // Swagger Codegen + OpenAPI Generator extension\n // https://github.com/swagger-api/swagger-codegen/pull/4252\n schema[\"x-discriminator-value\"] = payload;\n // AutoRest extension\n // https://github.com/Azure/autorest/pull/474\n schema[\"x-ms-discriminator-value\"] = payload;\n }\n else {\n console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n }\n });\n }\n convertSecurityDefinitions() {\n if (this.spec.components.securitySchemes) {\n this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);\n delete this.spec.components.securitySchemes;\n }\n }\n}\nexport function transformToOS2(spec) {\n return new Converter(spec).convert();\n}\n","import { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { getSpec } from \"./getSpec\";\nimport { getSpecTypeFromSpec } from \"./getSpecType\";\nimport { mapOpenSpec } from \"./mapOpenSpec\";\nimport { mergeSpec } from \"./mergeSpec\";\nimport { transformToOS2 } from \"./transformToOS2\";\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport async function generateSpec({ tokens, ...options }) {\n const { version = \"1.0.0\", acceptMimes, specPath, specVersion } = options;\n const fileSpec = {};\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n const specType = getSpecTypeFromSpec(defaultSpec);\n let controllersSpec = getSpec(tokens, options);\n const spec = mergeSpec(defaultSpec, controllersSpec);\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec);\n }\n return spec;\n}\n","import \"../components/anyMapper\";\nimport \"../components/classMapper\";\nimport \"../components/genericsMapper\";\nimport \"../components/inheritedClassMapper\";\nimport \"../components/itemMapper\";\nimport \"../components/lazyRefMapper\";\nimport \"../components/mapMapper\";\nimport \"../components/objectMapper\";\nimport \"../components/ofMapper\";\nimport \"../components/propertiesMapper\";\nimport \"../components/schemaMapper\";\nimport { SpecTypes } from \"../domain/SpecTypes\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n/**\n * @ignore\n */\nfunction getKey(options) {\n return JSON.stringify(options);\n}\n/**\n * @ignore\n */\nfunction get(entity, options) {\n const cache = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", entity.schema, options);\n if (Object.keys(options.schemas).length) {\n schema.definitions = options.schemas;\n }\n cache.set(key, schema);\n }\n entity.store.set(CACHE_KEY, cache);\n return cache.get(key);\n}\nexport function getJsonSchema(model, options = {}) {\n const entity = getJsonEntityStore(model);\n options = {\n endpoint: true,\n groups: [],\n ...options,\n specType: options.specType || SpecTypes.JSON,\n schemas: {}\n };\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n return get(entity, options);\n}\n","import { getOperationsStores } from \"./getOperationsStores\";\nimport { JsonOperationRoute } from \"../domain/JsonOperationRoute\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\nimport { concatPath } from \"./concatPath\";\nexport function getOperationsRoutes(token, options = {}) {\n const store = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes = [];\n if (options.withChildren) {\n const children = store.get(\"childrenControllers\", []);\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(getOperationsRoutes(token, {\n ...options,\n basePath\n }));\n }, operationsRoutes);\n }\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const { operation } = endpoint;\n if (operation) {\n operation.operationPaths.forEach((operationPath) => {\n routes.push(new JsonOperationRoute({\n basePath,\n token,\n endpoint,\n operationPath\n }));\n });\n }\n return routes;\n }, operationsRoutes);\n}\n","import { alterIgnore } from \"../hooks/alterIgnore\";\nimport { getInheritedStores } from \"./getInheritedStores\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore\";\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n return store.$properties;\n}\n/**\n * @ignore\n */\nexport function getProperties(target, options = {}) {\n const stores = getPropertiesStores(target);\n const map = new Map();\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n map.set(key, store);\n });\n return map;\n}\n"],"names":["root","factory","exports","module","define","amd","self","stringify","compile","expand","parse","braces","input","options","output","Array","isArray","pattern","result","create","push","concat","nodupes","Set","noempty","filter","Boolean","length","fill","utils","ast","walk","node","parent","invalidBlock","isInvalidBrace","invalidNode","invalid","escapeInvalid","prefix","isOpen","value","isClose","type","prev","nodes","ranges","args","reduce","range","wrap","toRegex","child","MAX_LENGTH","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKSLASH","CHAR_BACKTICK","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOLLAR","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","append","queue","stash","enclose","flatten","map","ele","item","rangeLimit","p","q","dollar","pop","exceedsLimit","step","RangeError","encloseBrace","block","i","TypeError","opts","max","maxLength","Math","min","SyntaxError","stack","brackets","index","depth","advance","open","shift","commas","siblings","before","close","slice","next","keepQuotes","keepEscaping","forEach","indexOf","splice","isOpenOrClose","isInteger","num","Number","trim","find","limit","escapeNode","n","escaped","acc","flat","arr","util","toRegexRange","isObject","val","isValidValue","isNumber","zeros","pad","toNumber","dash","padStart","String","toMaxLen","negative","toRange","a","b","isNumbers","start","fromCharCode","end","capture","join","rangeError","inspect","invalidRange","strictRanges","transform","descending","startString","endString","stepString","abs","padded","maxLen","format","parts","negatives","positives","sort","toSequence","fillNumbers","charCodeAt","fillLetters","invalidStep","picomatch","isEmptyString","micromatch","list","patterns","omit","keep","items","onResult","state","add","isMatch","negated","negatedExtglob","matched","delete","matches","has","failglob","Error","nonull","nullglob","unescape","replace","match","matcher","any","str","not","contains","some","includes","startsWith","matchKeys","obj","keys","Object","res","key","every","all","glob","posix","isWindows","makeRe","exec","toPosixSlashes","v","scan","nobrace","test","braceExpand","process","platform","normalizeArray","allowAboveRoot","trimArray","lastIndex","splitDeviceRe","splitTailRe","win32","win32SplitPath","filename","device","tail","result2","win32StatPath","path","isUnc","isAbsolute","normalizeUNCRoot","resolve","resolvedDevice","resolvedTail","resolvedAbsolute","arguments","env","substr","toLowerCase","cwd","isString","split","normalize","trailingSlash","paths","arg","joined","relative","from","to","lowerFrom","lowerTo","toParts","lowerFromParts","lowerToParts","samePartsLength","outputParts","_makeLong","resolvedPath","substring","dirname","dir","basename","ext","f","extname","pathObject","base","sep","pathString","allParts","name","delimiter","splitPathRe","posixSplitPath","charAt","segment","fromParts","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","SLASH_LITERAL","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","POSIX_CHARS","PLUS_LITERAL","QMARK_LITERAL","ONE_CHAR","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","WINDOWS_CHARS","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_BACKWARD_SLASH","CHAR_GRAVE_ACCENT","SEP","extglobChars","chars","globChars","constants","expandRange","RegExp","ex","escapeRegex","syntaxError","char","len","bos","prepend","tokens","PLATFORM_CHARS","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","consumed","backtrack","parens","quotes","removePrefix","extglobs","eos","peek","remaining","consume","token","negate","count","increment","decrement","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","rest","extglobStar","expression","fastpaths","backslashes","m","esc","first","repeat","wrapOutput","slashes","idx","lastIndexOf","pre","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","outputIndex","tokensIndex","brace","dots","unshift","comma","out","toks","t","supportsLookbehinds","nonegate","regex","noglobstar","prior","isStart","afterStar","after","strictSlashes","escapeLast","suffix","slashDot","source","returnState","fns","arrayMatcher","isState","compileRe","isIgnored","ignore","ignoreOpts","onMatch","returnObject","onIgnore","matchBase","returnOutput","parsed","flags","nocase","err","debug","isPathSeparator","code","isPrefix","isGlobstar","Infinity","scanToEnd","isBracket","isGlob","braceEscaped","finished","noparen","removeBackslashes","maxDepth","prevIndex","isRegexChar","segs","version","windows","lastIdx","Reflect","g","this","Function","exporter","makeExporter","target","previous","defineProperty","configurable","writable","hasOwn","prototype","hasOwnProperty","supportsSymbol","Symbol","toPrimitiveSymbol","toPrimitive","iteratorSymbol","iterator","supportsCreate","supportsProto","__proto__","downLevel","HashMap","MakeDictionary","call","get","undefined","functionPrototype","getPrototypeOf","usePolyfill","_Map","Map","entries","cacheSentinel","arraySentinel","MapIterator","values","selector","_index","_keys","_values","_selector","done","throw","error","return","_cacheKey","_cacheIndex","enumerable","_find","set","size","clear","getKey","getValue","getEntry","insert","_","CreateMapPolyfill","_Set","_map","Metadata","WeakMap","rootKey","CreateUniqueKey","_key","table","GetOrCreateWeakMapTable","CreateUUID","FillRandomBytes","buffer","random","data","Uint8Array","crypto","getRandomValues","msCrypto","offset","byte","toString","CreateWeakMapPolyfill","GetOrCreateMetadataMap","O","P","Create","targetMetadata","IsUndefined","metadataMap","OrdinaryHasMetadata","MetadataKey","OrdinaryHasOwnMetadata","OrdinaryGetPrototypeOf","IsNull","OrdinaryGetMetadata","OrdinaryGetOwnMetadata","OrdinaryDefineOwnMetadata","MetadataValue","OrdinaryMetadataKeys","ownKeys","OrdinaryOwnMetadataKeys","parentKeys","_i","ownKeys_1","_a","parentKeys_1","method","GetMethod","IsCallable","IsObject","GetIterator","k","IteratorStep","nextValue","e","IteratorClose","Type","x","ToPrimitive","PreferredType","hint","exoticToPrim","toString_1","valueOf","toString_2","OrdinaryToPrimitive","ToPropertyKey","argument","ToString","IsArray","IsConstructor","V","func","proto","prototypeProto","constructor","__","decorators","propertyKey","attributes","decorated","decorator","DecorateConstructor","descriptor","DecorateProperty","metadataKey","metadataValue","IsPropertyKey","codes","getStatusMessage","status","message","parseInt","isNaN","msg","getStatusCode","createMessageToStatusCodeMap","createStatusCodeList","redirect","empty","retry","relaxZeros","strictZeros","cacheKey","shorthand","cache","isPadded","hasPadding","splitToPatterns","neg","pos","onlyNegative","filterPatterns","onlyPositive","intersected","collatePatterns","rangeToPattern","stop","digits","zipped","zip","startDigit","stopDigit","nines","countNines","stops","countZeros","compare","splitToRanges","padZeros","string","toQuantifier","comparison","intersection","integer","pow","diff","relax","clearCache","isFinite","ctor","superCtor","super_","TempCtor","copy","readUInt8","formatRegExp","objects","JSON","isNull","deprecate","fn","isUndefined","apply","noDeprecation","warned","throwDeprecation","traceDeprecation","console","trace","debugEnviron","debugs","ctx","seen","stylize","stylizeNoColor","colors","isBoolean","showHidden","_extend","customInspect","stylizeWithColor","formatValue","styleType","style","styles","recurseTimes","isFunction","ret","primitive","simple","formatPrimitive","visibleKeys","array","hash","arrayToHash","getOwnPropertyNames","isError","formatError","isRegExp","isDate","Date","toUTCString","l","formatProperty","formatArray","cur","reduceToSingleString","desc","getOwnPropertyDescriptor","line","ar","re","objectToString","d","o","debuglog","NODE_DEBUG","toUpperCase","pid","isNullOrUndefined","isSymbol","isPrimitive","isBuffer","months","timestamp","time","getHours","getMinutes","getSeconds","getDate","getMonth","prop","log","inherits","origin","webpackEmptyAsyncContext","req","Promise","then","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","globalThis","window","r","toStringTag","DecoratorTypes","classOf","getClass","decoratorTypeOf","staticType","CLASS","isArrayOrArrayClass","isBooleanOrBooleanClass","isNumberOrNumberClass","isStringOrStringClass","isPrimitiveOrPrimitiveClass","isPrimitiveClass","Buffer","deepClone","dest","isBasicType","alloc","stacked","setPrototypeOf","isProtectedKey","objectKeys","mergeReducerBuilder","cb","collection","findIndex","deepMerge","defaultReducer","shouldReturnSource","shouldReturnObj","reducer","reducers","parentKey","getReducer","cleanUndefinedProps","createInstance","nameOf","targetClass","DESIGN_PARAM_TYPES","DESIGN_TYPE","DESIGN_RETURN_TYPE","PROPERTIES","static","getMetadata","getOwnMetadata","hasMetadata","er","hasOwnMetadata","deleteMetadata","targets","classConstructor","defineMetadata","targetPrototype","stores","storeGet","Store","registry","getOwn","_entries","PARAM_CTOR","PARAM_STC","PARAM","store","PROP","PROP_STC","METHOD","METHOD_STC","defineStore","merge","mergeStoreFrom","defaultValue","metadata","inverse","_value_","toJson","StoreSet","parameters","AnyToPromiseStatus","AnyToPromiseResponseTypes","Env","Hooks","on","event","off","emit","callThis","listeners","alter","async","promises","destroy","UnsupportedDecoratorType","super","buildMessage","bindingType","shortBinding","param","uniq","uniqBy","getInheritedClass","ancestorOf","ancestorsOf","classes","currentTarget","prototypeOf","decorateMethodsOf","klass","methods","methodsOf","mergeStoreMethodFrom","newDescriptor","useDecorators","cleanObject","scope","separator","mapOptions","isArrowFn","isClassObject","isPlainObject","subscribe","isClass","isCollection","WeakSet","setValue","createIdentityFn","keyOrFn","JsonSchemaMappersContainer","registerJsonSchemaMapper","mapper","getJsonSchemaMapper","execMapper","schema","hasMapper","JsonEntitiesContainer","JsonEntityStore","propertyName","decoratorType","collectionType","isStore","_type","_schema","targetName","discriminatorAncestor","ancestor","isDiscriminator","computedType","nestedGenerics","build","itemSchema","getComputedType","parentSchema","isDiscriminatorChild","discriminator","entityStore","jsonSchemaStore","isGetterOnly","buildType","__assign","assign","s","__decorate","c","decorate","__metadata","JSON_TYPES","getJsonType","serializeEnum","enumValue","serializeEnumValues","enumValues","types","toJsonRegex","Discriminator","getType","discriminatorValue","getValues","getDefaultValue","children","mapProperties","properties","JsonSchema","mapToJsonSchema","isJsonSchema","isLazyRef","$hooks","$required","$allow","$selfRequired","$forwardGroups","isDiscriminatorKey","alias","genericLabels","class","isGeneric","hasGenerics","genericType","canRef","isNullable","isReadOnly","isWriteOnly","nullable","getAliasOf","property","addAlias","removeAlias","$id","$ref","$schema","label","bool","default","const","description","discriminatorKey","examples","enum","additionalItems","example","maxItems","minItems","uniqueItems","maxProperties","minProperties","allow","required","clone","addRequired","removeRequired","isRequired","addProperty","patternProperties","additionalProperties","unknown","dependencies","propertyNames","definitions","allOf","anyOf","oneOf","resolvedOneOf","jsonSchema","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","minLength","jsonType","title","readOnly","writeOnly","customKey","toObject","toJSON","addDef","schemas","getComputedItemType","getTarget","getName","JsonEntityComponent","JsonClassStore","JsonPropertyStore","allowedRequiredValues","PropertyMetadata","getGenericsMap","genericTypes","mapGenericsOptions","ops","generics","popGenerics","JsonMap","JsonParameterTypes","formatParameterType","isParameterType","lowerCase","SpecTypes","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","noCase","splitRegexp","_b","stripRegexp","_c","_d","pascalCaseTransform","firstChar","lowerChars","pascalCase","createRefName","groups","createRef","host","specType","getHost","ref","OPENAPI","toRef","JsonParameter","in","inType","schemasContainer","identity","toMap","parameter","PATH","FILES","getFileSchema","QUERY","refToParameters","params","JsonParameterStore","paramType","dataPath","pipes","fromMethod","reverse","isMethodDescriptor","getSchema","getParamTypes","operation","addParameter","ParamMetadata","upperCase","HTTP_STATUS_MESSAGES","getStatusConstant","isSuccessStatus","isRedirectionStatus","toJsonMapCollection","content","JsonRequestBody","addContent","mediaType","mediaContent","mapHeaders","headers","newHeaders","JsonMedia","allowedGroups","JsonResponse","getContent","getMedia","addMedia","response","props","JsonOperation","operationPaths","responses","getResponses","getStatus","tags","addTags","summary","operationId","defaultStatus","setRedirection","isRedirection","addResponse","statusCode","getResponseOf","currentCode","currentResponse","ensureResponseOf","getHeadersOf","getContentTypeOf","security","addSecurityScopes","scopes","deprecated","consumes","produces","addProduce","produce","addOperationPath","bodyParameters","BODY","refs","propsLength","jsonParameter","buildSchemaFromBodyParameters","requestBody","toRequestBody","JsonMethodStore","middlewares","beforeMiddlewares","afterMiddlewares","use","view","acceptMimes","mimes","getResponseOptions","contentType","media","include","getReturnType","EndpointMetadata","getJsonEntityStore","JsonLazyRef","anyMapper","classMapper","genericsMapper","model","getInheritedStores","$inherited","context","inheritedClassMapper","itemMapper","lazyRefMapper","$refs","mapMapper","alterIgnore","mapNullableType","hasNullable","objectMapper","operationIdFormatter","useAlias","withIgnoredProps","ofMapper","propertiesMapper","mapAliasedProperties","alterRequiredGroups","getRequiredProperties","extractRequiredProps","aliasedKey","propSchema","serializeSchema","applyStringRule","mapRequiredProps","alterOneOf","IGNORES","SWAGGER","IGNORES_OPENSPEC","schemaMapper","customKeys","shouldSkipKey","isExample","isEmptyProperties","shouldMapAlias","HTTP_METHODS","OperationMethods","JsonFormatTypes","JsonEntityFn","Children","childToken","DiscriminatorValue","dotCase","CollectionOf","MinItems","MaxItems","MinProperties","MaxProperties","Contains","UniqueItems","ArrayOf","MapOf","CollectionContains","storedJson","AdditionalProperties","entity","AllOf","Property","Allow","Any","AnyOf","Const","constValue","CustomKey","CustomKeys","Default","Description","DiscriminatorKey","Enum","Example","Examples","Maximum","exclusive","Max","ExclusiveMaximum","Minimum","Min","ExclusiveMinimum","Format","Email","EMAIL","DateTime","DATE_TIME","DateFormat","DATE","TimeFormat","TIME","Uri","URI","Url","URL","ForwardGroups","matchGroups","compareWith","groupsExcludes","group","groupsIncludes","Groups","propEntity","groupsClass","givenGroups","Hidden","defaultCB","mongoose","Ignore","Integer","MaxLength","MinLength","MultipleOf","Name","Nullable","OneOf","Optional","Pattern","ReadOnly","Schema","partialSchema","For","RecordOf","initial","Required","RequiredGroups","Title","WriteOnly","number","date","datetime","email","uri","url","object","lazyRef","GenericOf","isEnum","Nested","Generics","Produces","AcceptMime","Consumes","DecoratorContext","actions","addAction","bind","wrapKey","getMergedKey","beforeInit","onInit","afterInit","onMapKey","runActions","action","statusesModel","defineStatusModel","getStatusModel","mapGenerics","ReturnDecoratorContext","header","location","meta","Location","nested","checkPrimitive","checkCollection","of","ofInteger","manyOf","partial","getContentType","currentStatus","mapMedia","kind","Returns","ContentType","Header","Headers","In","InFile","multiple","useMethodDecorators","OperationId","OperationPath","Partial","Path","Redirect","mapRouteOptions","handlers","toLocaleUpperCase","RouteDecoratorContext","CUSTOM","Route","routeOptions","All","ALL","Get","GET","Post","POST","Put","PUT","Delete","DELETE","Head","HEAD","Patch","PATCH","Options","OPTIONS","Security","Status","Summary","Tags","tag","mapTags","View","JsonOperationPathsMap","setOperationPath","operationPath","concatPath","basePath","r1","r2","global","ignoreCase","multiline","endsWith","JsonOperationRoute","endpoint","paramsTypes","fullPath","methodClassName","className","buildPath","concatParameters","getOperationsStores","$operations","currentStore","propStore","getJsonPathParameters","isOptional","current","inCapture","parseUrl","subpath","optional","postfix","right","splited","getVariable","mergeOperation","rootPath","defaultTags","pathParameters","operationTags","camelCaseTransform","camelCase","OPERATION_IDS","operationKey","schemesReducer","tagsReducer","SPEC_REDUCERS","mergeSpec","spec","caches","getSpec","operationIdPattern","finalSpec","ctrlPath","specJson","operationStore","components","generate","getSpecType","getSpecTypeFromSpec","mapOpenSpecInfo","info","termsOfService","contact","license","mapOpenSpec2","specVersion","schemes","securityDefinitions","externalDocs","swagger","mapOpenSpec3","servers","openapi","mapOpenSpec","fileSpec","SCHEMA_PROPERTIES","ARRAY_PROPERTIES","APPLICATION_JSON_REGEX","SUPPORTED_MIME_TYPES","APPLICATION_X_WWW_URLENCODED","MULTIPART_FORM_DATA","fixRefs","isJsonMimeType","getSupportedMimeTypes","MIME_VALUES","transformSecurity","securitySchemes","scheme","bearerFormat","flows","flowName","flow","flowType","authorizationUrl","tokenUrl","transformInformation","server","serverUrl","variables","variable","variableObject","pathname","protocol","Converter","convertInfos","resolveReference","shouldClone","convert","convertOperations","convertSchemas","convertSecurityDefinitions","convertParameters","convertOperationParameters","convertResponses","contentKey","mediaRanges","mediaTypes","structuredObj","mediaRange","formDataParam","convertSchema","copySchemaProperties","copySchemaXProperties","allowReserved","collectionFormat","explode","propName","anySchema","resolved","def","operationDirection","mapping","convertDiscriminatorMapping","defName","payload","schemaNameOrRef","warn","transformToOS2","generateSpec","specPath","defaultSpec","CACHE_KEY","getJsonSchema","getOperationsRoutes","operationsRoutes","withChildren","routes","getPropertiesStores","$properties","getProperties"],"sourceRoot":""}