{"version":3,"sources":["webpack:///./node_modules/class-validator-multi-lang/esm5/utils/get-global.util.js","webpack:///./node_modules/class-validator-multi-lang/esm5/multi-lang/get-text.util.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/IsEmail.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/IsUUID.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/common/ValidateBy.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/typechecker/IsEnum.js","webpack:///./node_modules/class-validator-multi-lang/esm5/metadata/ValidationMetadata.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/typechecker/IsArray.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation/ValidationTypes.js","webpack:///./node_modules/class-validator-multi-lang/esm5/metadata/ConstraintMetadata.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/Matches.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/MaxLength.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/common/ValidateIf.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/Length.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/number/Min.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation/ValidationError.js","webpack:///./node_modules/class-validator-multi-lang/esm5/multi-lang/titles.storage.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation/ValidationUtils.js","webpack:///./node_modules/class-validator-multi-lang/esm5/utils/is-promise.util.js","webpack:///./node_modules/class-validator-multi-lang/esm5/utils/convert-to-array.util.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation/ValidationExecutor.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation/Validator.js","webpack:///./node_modules/class-validator-multi-lang/esm5/index.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/MinLength.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/common/Validate.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/IsNumberString.js","webpack:///./node_modules/class-validator-multi-lang/esm5/register-decorator.js","webpack:///./node_modules/class-validator-multi-lang/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js","webpack:///./node_modules/class-validator-multi-lang/esm5/metadata/MetadataStorage.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/common/IsNotEmpty.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/string/IsISO8601.js","webpack:///./node_modules/class-validator-multi-lang/esm5/multi-lang/messages.storage.js","webpack:///./node_modules/class-validator-multi-lang/esm5/container.js","webpack:///./node_modules/class-validator-multi-lang/esm5/decorator/typechecker/IsNumber.js"],"names":["getGlobal","globalThis","global","window","self","CLASS_VALIDATOR_MESSAGE_MARKER","getText","s","join","IS_EMAIL","isEmail","value","options","IsEmail","validationOptions","name","constraints","validator","validate","args","defaultMessage","eachPrefix","IS_UUID","isUUID","version","IsUUID","buildMessage","impl","validationArguments","each","ValidateBy","object","propertyName","target","constructor","IS_ENUM","isEnum","entity","enumValues","Object","keys","map","k","indexOf","IsEnum","ValidationMetadata","this","groups","context","undefined","type","constraintCls","validationTypeOptions","message","always","IS_ARRAY","isArray","Array","IsArray","ValidationTypes","isValid","_this","key","CUSTOM_VALIDATION","NESTED_VALIDATION","PROMISE_VALIDATION","CONDITIONAL_VALIDATION","WHITELIST","IS_DEFINED","ConstraintMetadata","async","defineProperty","prototype","get","enumerable","configurable","MATCHES","matches","pattern","modifiers","Matches","modifiersOrAnnotationOptions","MAX_LENGTH","maxLength","max","min","MaxLength","ValidateIf","condition","addValidationMetadata","IS_LENGTH","length","Length","isMinLength","isMaxLength","MIN","num","Min","minValue","ValidationError","toString","shouldDecorate","hasParent","parentPath","boldStart","boldEnd","propConstraintFailed","concat","formattedProperty_1","Number","isInteger","property","children","childError","CLASS_VALIDATOR_PROPERTY_TITLES","CLASS_VALIDATOR_TITLES","CLASS_VALIDATOR_ROOT_TITLE","getClassValidatorPropertyTitlesStorage","getClassValidatorPropertyTitles","storagePropertyTitle","obj","find","o","titles","Map","getClassValidatorPropertyTitle","getClassValidatorTitlesStorage","getClassValidatorTitles","storageTitle","getClassValidatorTitle","constraintToString","constraint","ValidationUtils","replaceMessageSpecialTokens","checkTitle","messageString","Function","forEach","index","replace","RegExp","targetName","isPromise","p","then","convertToArray","val","from","values","ValidationExecutor","validatorOptions","awaitingPromises","ignoreAsyncValidations","metadataStorage","execute","targetSchema","validationErrors","_a","hasValidationMetaData","enableDebugMessages","console","warn","strictGroups","targetMetadatas","getTargetValidationMetadatas","groupedMetadatas","groupByPropertyName","forbidUnknownValues","validationError","unknownValue","push","whitelist","definedMetadatas","filter","metadata","metadatas","Promise","resolvedValue","performValidations","notAllowedProperties","forbidNonWhitelisted","generateValidationError","stripEmptyErrors","errors","error","customValidationMetadatas","nestedValidationMetadatas","conditionalValidationMetadatas","canValidate","conditionalValidations","customValidations","mapContexts","skipUndefinedProperties","skipNullProperties","skipMissingProperties","nestedValidations","reduce","resultA","resultB","getTargetValidatorConstraints","customConstraintMetadata","stopAtFirstError","Set","arrayValue","validatedSubValues","subValue","instance","validationIsAsync","some","validatedSubValue","asyncValidatedSubValues","resolve","asyncValidationIsFinishedPromise","all","flatValidatedValues","validationResult","every","createValidationError","contexts","assign","_b","validatedValue","promise","arrayLikeValue","customConstraint","customConstraints","getConstraintType","customValidatorMetadata","dismissDefaultMessages","messages_1","messages","messageKey","split","__awaiter","thisArg","_arguments","P","generator","adopt","reject","fulfilled","step","next","e","rejected","result","done","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","v","op","TypeError","call","pop","Validator","objectOrSchemaName","objectOrValidationOptions","maybeValidatorOptions","coreValidate","validateOrReject","validateSync","schema","executor","schemaNameOrObject","MIN_LENGTH","minLength","MinLength","ValidatorConstraint","isAsync","x","toLowerCase","addConstraintMetadata","Validate","constraintClass","constraintsOrValidationOptions","maybeValidationOptions","IS_NUMBER_STRING","isNumberString","IsNumberString","registerDecorator","constraintClasses","validator_1","CustomConstraint","validationMetadataArgs","ValidationSchemaToMetadataTransformer","transform","properties","validation","MetadataStorage","validationMetadatas","constraintMetadatas","addValidationSchema","validationMetadata","grouped","targetConstructor","includeMetadataBecauseOfAlwaysOption","excludeMetadataBecauseOfStrictGroupsOption","originalMetadatas","group","inheritedMetadatas","uniqueInheritedMetadatas","inheritedMetadata","originalMetadata","getMetadataStorage","classValidatorMetadataStorage","IS_NOT_EMPTY","isNotEmpty","IsNotEmpty","IS_ISO8601","isISO8601","IsISO8601","CLASS_VALIDATOR_MESSAGES","getClassValidatorMessagesStorage","setClassValidatorMessages","storageMessages","getClassValidatorMessages","getClassValidatorMessage","userContainer","userContainerOptions","defaultContainer","class_1","instances","someClass","getFromContainer","fallback","fallbackOnErrors","IS_NUMBER","isNumber","Infinity","allowInfinity","isNaN","allowNaN","maxDecimalPlaces","decimalPlaces","isFinite","IsNumber"],"mappings":"mIAAA,YAMO,SAASA,IACZ,MAA0B,qBAAfC,WACAA,WAEW,qBAAXC,EACAA,EAIW,qBAAXC,OAGAA,OAIS,qBAATC,KAGAA,UAHX,EAtBJ,oC,knhBCAA,kDACIC,EAAiC,WAC9B,SAASC,EAAQC,GACpB,OAAO,eAAyBA,GAAK,CAACF,EAAgCE,EAAGF,GAAgCG,KAAK,IAAMD,I,oCCHxH,mFAGWE,EAAW,UAKf,SAASC,EAAQC,EAAOC,GAC3B,MAAwB,kBAAVD,GAAsB,IAAiBA,EAAOC,GAMzD,SAASC,EAAQD,EAASE,GAC7B,OAAO,eAAW,CACdC,KAAMN,EACNO,YAAa,CAACJ,GACdK,UAAW,CACPC,SAAU,SAAUP,EAAOQ,GAAQ,OAAOT,EAAQC,EAAOQ,EAAKH,YAAY,KAC1EI,eAAgB,gBAAa,SAAUC,GAAc,OAAOA,EAAa,eAAQ,gCAAkCP,KAExHA,K,kCCvBP,mFAGWQ,EAAU,SAKd,SAASC,EAAOZ,EAAOa,GAC1B,MAAwB,kBAAVb,GAAsB,IAAgBA,EAAOa,GAMxD,SAAS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Y,OAAOA,EAAS5J,OAAS8R,KAKlF,OAJKlI,IACDA,EAAW,CAAE5J,KAAM8R,EAAWjT,OAAQ,IAAIiT,GAC1ClS,KAAKiS,UAAUrK,KAAKoC,IAEjBA,EAAS/K,QAEb+S,EAZgB,IA0BpB,SAASG,EAAiBD,GAC7B,GAAIL,EACA,IACI,IAAI7H,EAAW6H,EAAclQ,IAAIuQ,GACjC,GAAIlI,EACA,OAAOA,EACX,IAAK8H,IAAyBA,EAAqBM,SAC/C,OAAOpI,EAEf,MAAOtB,GACH,IAAKoJ,IAAyBA,EAAqBO,iBAC/C,MAAM3J,EAGlB,OAAOqJ,EAAiBpQ,IAAIuQ,K,kCC5ChC,8DAEWI,EAAY,WAIhB,SAASC,EAAS1U,EAAOC,GAE5B,QADgB,IAAZA,IAAsBA,EAAU,IACf,kBAAVD,EACP,OAAO,EAEX,GAAIA,IAAU2U,KAAY3U,KAAW2U,IACjC,OAAO1U,EAAQ2U,cAEnB,GAAI1O,OAAO2O,MAAM7U,GACb,OAAOC,EAAQ6U,SAEnB,QAAiCxS,IAA7BrC,EAAQ8U,iBAAgC,CACxC,IAAIC,EAAgB,EAIpB,GAHIhV,EAAQ,IAAM,IACdgV,EAAgBhV,EAAMyF,WAAWoI,MAAM,KAAK,GAAG7I,QAE/CgQ,EAAgB/U,EAAQ8U,iBACxB,OAAO,EAGf,OAAO7O,OAAO+O,SAASjV,GAKpB,SAASkV,EAASjV,EAASE,GAE9B,YADgB,IAAZF,IAAsBA,EAAU,IAC7B,eAAW,CACdG,KAAMqU,EACNpU,YAAa,CAACJ,GACdK,UAAW,CACPC,SAAU,SAAUP,EAAOQ,GAAQ,OAAOkU,EAAS1U,EAAOQ,EAAKH,YAAY,KAC3EI,eAAgB,gBAAa,SAAUC,GAAc,OAAOA,EAAa,eAAQ,wEAA0EP,KAEhKA","file":"js/npm.class-validator-multi-lang.0ea9edff.js","sourcesContent":["/**\n * This function returns the global object across Node and browsers.\n *\n * Note: `globalThis` is the standardized approach however it has been added to\n * Node.js in version 12. We need to include this snippet until Node 12 EOL.\n */\nexport function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}\n//# sourceMappingURL=get-global.util.js.map","import { getClassValidatorMessage } from './messages.storage';\nvar CLASS_VALIDATOR_MESSAGE_MARKER = '__I18N__';\nexport function getText(s) {\n return getClassValidatorMessage(s) ? [CLASS_VALIDATOR_MESSAGE_MARKER, s, CLASS_VALIDATOR_MESSAGE_MARKER].join('') : s;\n}\n//# sourceMappingURL=get-text.util.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isEmailValidator from 'validator/lib/isEmail';\nimport { getText } from '../../multi-lang';\nexport var IS_EMAIL = 'isEmail';\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function isEmail(value, options) {\n return typeof value === 'string' && isEmailValidator(value, options);\n}\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function IsEmail(options, validationOptions) {\n return ValidateBy({\n name: IS_EMAIL,\n constraints: [options],\n validator: {\n validate: function (value, args) { return isEmail(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be an email'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsEmail.js.map","import isUuidValidator from 'validator/lib/isUUID';\nimport { getText } from '../../multi-lang';\nimport { buildMessage, ValidateBy } from '../common/ValidateBy';\nexport var IS_UUID = 'isUuid';\n/**\n * Checks if the string is a UUID (version 3, 4 or 5).\n * If given value is not a string, then it returns false.\n */\nexport function isUUID(value, version) {\n return typeof value === 'string' && isUuidValidator(value, version);\n}\n/**\n * Checks if the string is a UUID (version 3, 4 or 5).\n * If given value is not a string, then it returns false.\n */\nexport function IsUUID(version, validationOptions) {\n return ValidateBy({\n name: IS_UUID,\n constraints: [version],\n validator: {\n validate: function (value, args) { return isUUID(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be a UUID'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsUUID.js.map","import { registerDecorator } from '../../register-decorator';\nexport function buildMessage(impl, validationOptions) {\n return function (validationArguments) {\n var eachPrefix = validationOptions && validationOptions.each ? 'each value in ' : '';\n return impl(eachPrefix, validationArguments);\n };\n}\nexport function ValidateBy(options, validationOptions) {\n return function (object, propertyName) {\n registerDecorator({\n name: options.name,\n target: object.constructor,\n propertyName: propertyName,\n options: validationOptions,\n constraints: options.constraints,\n validator: options.validator,\n });\n };\n}\n//# sourceMappingURL=ValidateBy.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport { getText } from '../../multi-lang';\nexport var IS_ENUM = 'isEnum';\n/**\n * Checks if a given value is an enum\n */\nexport function isEnum(value, entity) {\n var enumValues = Object.keys(entity).map(function (k) { return entity[k]; });\n return enumValues.indexOf(value) >= 0;\n}\n/**\n * Checks if a given value is an enum\n */\nexport function IsEnum(entity, validationOptions) {\n return ValidateBy({\n name: IS_ENUM,\n constraints: [entity],\n validator: {\n validate: function (value, args) { return isEnum(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be a valid enum value'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsEnum.js.map","/**\n * This metadata contains validation rules.\n */\nvar ValidationMetadata = /** @class */ (function () {\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n function ValidationMetadata(args) {\n /**\n * Validation groups used for this validation.\n */\n this.groups = [];\n /**\n * Specifies if validated value is an array and each of its item must be validated.\n */\n this.each = false;\n /*\n * A transient set of data passed through to the validation result for response mapping\n */\n this.context = undefined;\n this.type = args.type;\n this.target = args.target;\n this.propertyName = args.propertyName;\n this.constraints = args.constraints;\n this.constraintCls = args.constraintCls;\n this.validationTypeOptions = args.validationTypeOptions;\n if (args.validationOptions) {\n this.message = args.validationOptions.message;\n this.groups = args.validationOptions.groups;\n this.always = args.validationOptions.always;\n this.each = args.validationOptions.each;\n this.context = args.validationOptions.context;\n }\n }\n return ValidationMetadata;\n}());\nexport { ValidationMetadata };\n//# sourceMappingURL=ValidationMetadata.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport { getText } from '../../multi-lang';\nexport var IS_ARRAY = 'isArray';\n/**\n * Checks if a given value is an array\n */\nexport function isArray(value) {\n return Array.isArray(value);\n}\n/**\n * Checks if a given value is an array\n */\nexport function IsArray(validationOptions) {\n return ValidateBy({\n name: IS_ARRAY,\n validator: {\n validate: function (value, args) { return isArray(value); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be an array'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsArray.js.map","/**\n * Validation types.\n */\nvar ValidationTypes = /** @class */ (function () {\n function ValidationTypes() {\n }\n /**\n * Checks if validation type is valid.\n */\n ValidationTypes.isValid = function (type) {\n var _this = this;\n return (type !== 'isValid' &&\n type !== 'getMessage' &&\n Object.keys(this)\n .map(function (key) { return _this[key]; })\n .indexOf(type) !== -1);\n };\n /* system */\n ValidationTypes.CUSTOM_VALIDATION = 'customValidation'; // done\n ValidationTypes.NESTED_VALIDATION = 'nestedValidation'; // done\n ValidationTypes.PROMISE_VALIDATION = 'promiseValidation'; // done\n ValidationTypes.CONDITIONAL_VALIDATION = 'conditionalValidation'; // done\n ValidationTypes.WHITELIST = 'whitelistValidation'; // done\n ValidationTypes.IS_DEFINED = 'isDefined'; // done\n return ValidationTypes;\n}());\nexport { ValidationTypes };\n//# sourceMappingURL=ValidationTypes.js.map","import { getFromContainer } from '../container';\n/**\n * This metadata interface contains information for custom validators.\n */\nvar ConstraintMetadata = /** @class */ (function () {\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n function ConstraintMetadata(target, name, async) {\n if (async === void 0) { async = false; }\n this.target = target;\n this.name = name;\n this.async = async;\n }\n Object.defineProperty(ConstraintMetadata.prototype, \"instance\", {\n // -------------------------------------------------------------------------\n // Accessors\n // -------------------------------------------------------------------------\n /**\n * Instance of the target custom validation class which performs validation.\n */\n get: function () {\n return getFromContainer(this.target);\n },\n enumerable: false,\n configurable: true\n });\n return ConstraintMetadata;\n}());\nexport { ConstraintMetadata };\n//# sourceMappingURL=ConstraintMetadata.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport matchesValidator from 'validator/lib/matches';\nimport { getText } from '../../multi-lang';\nexport var MATCHES = 'matches';\nexport function matches(value, pattern, modifiers) {\n return typeof value === 'string' && matchesValidator(value, pattern, modifiers);\n}\nexport function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) {\n var modifiers;\n if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) {\n validationOptions = modifiersOrAnnotationOptions;\n }\n else {\n modifiers = modifiersOrAnnotationOptions;\n }\n return ValidateBy({\n name: MATCHES,\n constraints: [pattern, modifiers],\n validator: {\n validate: function (value, args) { return matches(value, args.constraints[0], args.constraints[1]); },\n defaultMessage: buildMessage(function (eachPrefix, args) { return eachPrefix + getText('$property must match $constraint1 regular expression'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=Matches.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isLengthValidator from 'validator/lib/isLength';\nimport { getText } from '../../multi-lang';\nexport var MAX_LENGTH = 'maxLength';\n/**\n * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function maxLength(value, max) {\n return typeof value === 'string' && isLengthValidator(value, { min: 0, max: max });\n}\n/**\n * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function MaxLength(max, validationOptions) {\n return ValidateBy({\n name: MAX_LENGTH,\n constraints: [max],\n validator: {\n validate: function (value, args) { return maxLength(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be shorter than or equal to $constraint1 characters'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=MaxLength.js.map","import { ValidationTypes } from '../../validation/ValidationTypes';\nimport { ValidationMetadata } from '../../metadata/ValidationMetadata';\nimport { getMetadataStorage } from '../../metadata/MetadataStorage';\n/**\n * Ignores the other validators on a property when the provided condition function returns false.\n */\nexport function ValidateIf(condition, validationOptions) {\n return function (object, propertyName) {\n var args = {\n type: ValidationTypes.CONDITIONAL_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n constraints: [condition],\n validationOptions: validationOptions,\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n//# sourceMappingURL=ValidateIf.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isLengthValidator from 'validator/lib/isLength';\nimport { getText } from '../../multi-lang';\nexport var IS_LENGTH = 'isLength';\n/**\n * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function length(value, min, max) {\n return typeof value === 'string' && isLengthValidator(value, { min: min, max: max });\n}\n/**\n * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function Length(min, max, validationOptions) {\n return ValidateBy({\n name: IS_LENGTH,\n constraints: [min, max],\n validator: {\n validate: function (value, args) { return length(value, args.constraints[0], args.constraints[1]); },\n defaultMessage: buildMessage(function (eachPrefix, args) {\n var isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined;\n var isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined;\n if (isMinLength && (!args.value || args.value.length < args.constraints[0])) {\n return eachPrefix + getText('$property must be longer than or equal to $constraint1 characters');\n }\n else if (isMaxLength && args.value.length > args.constraints[1]) {\n return eachPrefix + getText('$property must be shorter than or equal to $constraint2 characters');\n }\n return (eachPrefix +\n getText('$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters'));\n }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=Length.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport { getText } from '../../multi-lang';\nexport var MIN = 'min';\n/**\n * Checks if the first number is greater than or equal to the second.\n */\nexport function min(num, min) {\n return typeof num === 'number' && typeof min === 'number' && num >= min;\n}\n/**\n * Checks if the first number is greater than or equal to the second.\n */\nexport function Min(minValue, validationOptions) {\n return ValidateBy({\n name: MIN,\n constraints: [minValue],\n validator: {\n validate: function (value, args) { return min(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must not be less than $constraint1'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=Min.js.map","/**\n * Validation error description.\n */\nvar ValidationError = /** @class */ (function () {\n function ValidationError() {\n }\n /**\n *\n * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability\n * @param hasParent true when the error is a child of an another one\n * @param parentPath path as string to the parent of this property\n */\n ValidationError.prototype.toString = function (shouldDecorate, hasParent, parentPath) {\n var _this = this;\n if (shouldDecorate === void 0) { shouldDecorate = false; }\n if (hasParent === void 0) { hasParent = false; }\n if (parentPath === void 0) { parentPath = \"\"; }\n var boldStart = shouldDecorate ? \"\\u001B[1m\" : \"\";\n var boldEnd = shouldDecorate ? \"\\u001B[22m\" : \"\";\n var propConstraintFailed = function (propertyName) {\n return \" - property \".concat(boldStart).concat(parentPath).concat(propertyName).concat(boldEnd, \" has failed the following constraints: \").concat(boldStart).concat(Object.keys(_this.constraints).join(\", \")).concat(boldEnd, \" \\n\");\n };\n if (!hasParent) {\n return (\"An instance of \".concat(boldStart).concat(this.target ? this.target.constructor.name : 'an object').concat(boldEnd, \" has failed the validation:\\n\") +\n (this.constraints ? propConstraintFailed(this.property) : \"\") +\n (this.children\n ? this.children.map(function (childError) { return childError.toString(shouldDecorate, true, _this.property); }).join(\"\")\n : \"\"));\n }\n else {\n // we format numbers as array indexes for better readability.\n var formattedProperty_1 = Number.isInteger(+this.property)\n ? \"[\".concat(this.property, \"]\")\n : \"\".concat(parentPath ? \".\" : \"\").concat(this.property);\n if (this.constraints) {\n return propConstraintFailed(formattedProperty_1);\n }\n else {\n return this.children\n ? this.children\n .map(function (childError) { return childError.toString(shouldDecorate, true, \"\".concat(parentPath).concat(formattedProperty_1)); })\n .join(\"\")\n : \"\";\n }\n }\n };\n return ValidationError;\n}());\nexport { ValidationError };\n//# sourceMappingURL=ValidationError.js.map","import { getGlobal } from '../utils/get-global.util';\nvar CLASS_VALIDATOR_PROPERTY_TITLES = 'CLASS_VALIDATOR_PROPERTY_TITLES';\nvar CLASS_VALIDATOR_TITLES = 'CLASS_VALIDATOR_TITLES';\nvar CLASS_VALIDATOR_ROOT_TITLE = 'CLASS_VALIDATOR_ROOT_TITLE';\n// PROPERTY\nexport function getClassValidatorPropertyTitlesStorage() {\n var global = getGlobal();\n if (!global[CLASS_VALIDATOR_PROPERTY_TITLES]) {\n global[CLASS_VALIDATOR_PROPERTY_TITLES] = [];\n }\n return global[CLASS_VALIDATOR_PROPERTY_TITLES];\n}\nexport function setClassValidatorPropertyTitle(object, propertyName, title) {\n var storagePropertyTitle = getClassValidatorPropertyTitlesStorage();\n var obj = storagePropertyTitle.find(function (o) { return o.target === object.constructor; });\n if (!obj) {\n obj = { target: object.constructor, titles: new Map() };\n storagePropertyTitle.push(obj);\n }\n obj.titles.set(propertyName, title);\n}\nexport function getClassValidatorPropertyTitles(object) {\n var storagePropertyTitle = getClassValidatorPropertyTitlesStorage();\n var obj = storagePropertyTitle.find(function (o) { return o.target === object.constructor; });\n if (!obj) {\n return new Map();\n }\n return obj.titles;\n}\nexport function getClassValidatorPropertyTitle(object, propertyName) {\n var titles = getClassValidatorPropertyTitles(object);\n return titles.get(propertyName);\n}\n// CLASS\nexport function getClassValidatorTitlesStorage() {\n var global = getGlobal();\n if (!global[CLASS_VALIDATOR_TITLES]) {\n global[CLASS_VALIDATOR_TITLES] = [];\n }\n return global[CLASS_VALIDATOR_TITLES];\n}\nexport function setClassValidatorTitle(object, propertyName, title) {\n var storageTitle = getClassValidatorTitlesStorage();\n var obj = storageTitle.find(function (o) { return o.target === object; });\n if (!obj) {\n obj = { target: object, titles: new Map() };\n storageTitle.push(obj);\n }\n obj.titles.set(propertyName || CLASS_VALIDATOR_ROOT_TITLE, title);\n}\nexport function getClassValidatorTitles(object) {\n var storageTitle = getClassValidatorTitlesStorage();\n var obj = storageTitle.find(function (o) { return o.target === object.constructor; });\n if (!obj) {\n return new Map();\n }\n return obj.titles;\n}\nexport function getClassValidatorTitle(object, propertyName) {\n var titles = getClassValidatorTitles(object);\n return titles.get(propertyName || CLASS_VALIDATOR_ROOT_TITLE);\n}\n//# sourceMappingURL=titles.storage.js.map","import { getClassValidatorPropertyTitle, getClassValidatorTitle } from '../multi-lang';\n/**\n * Convert the constraint to a string to be shown in an error\n */\nexport function constraintToString(constraint) {\n if (Array.isArray(constraint)) {\n return constraint.join(', ');\n }\n return \"\".concat(constraint);\n}\nvar ValidationUtils = /** @class */ (function () {\n function ValidationUtils() {\n }\n ValidationUtils.replaceMessageSpecialTokens = function (message, validationArguments, titles) {\n var checkTitle = Object.keys(titles).length > 0;\n var messageString = '';\n if (message instanceof Function) {\n messageString = message(validationArguments);\n }\n else if (typeof message === 'string') {\n messageString = message;\n }\n if (messageString && Array.isArray(validationArguments.constraints)) {\n validationArguments.constraints.forEach(function (constraint, index) {\n messageString = messageString.replace(new RegExp(\"\\\\$constraint\".concat(index + 1), 'g'), (checkTitle &&\n titles[getClassValidatorTitle(validationArguments.object, constraintToString(constraint)) ||\n constraintToString(constraint)]) ||\n constraintToString(constraint));\n });\n }\n if (messageString &&\n validationArguments.value !== undefined &&\n validationArguments.value !== null &&\n typeof validationArguments.value === 'string')\n messageString = messageString.replace(/\\$value/g, (checkTitle &&\n titles[getClassValidatorTitle(validationArguments.object, validationArguments.value) || validationArguments.value]) ||\n validationArguments.value);\n if (messageString) {\n messageString = messageString.replace(/\\$property/g, (checkTitle &&\n titles[getClassValidatorPropertyTitle(validationArguments.object, validationArguments.property) ||\n validationArguments.property]) ||\n validationArguments.property);\n }\n if (messageString) {\n messageString = messageString.replace(/\\$target/g, (checkTitle &&\n titles[getClassValidatorTitle(validationArguments.object, '') || validationArguments.targetName]) ||\n validationArguments.targetName);\n }\n return messageString;\n };\n return ValidationUtils;\n}());\nexport { ValidationUtils };\n//# sourceMappingURL=ValidationUtils.js.map","// https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts\nexport function isPromise(p) {\n return p !== null && typeof p === 'object' && typeof p.then === 'function';\n}\n//# sourceMappingURL=is-promise.util.js.map","/**\n * Convert Map, Set to Array\n */\nexport function convertToArray(val) {\n if (val instanceof Map) {\n return Array.from(val.values());\n }\n return Array.isArray(val) ? val : Array.from(val);\n}\n//# sourceMappingURL=convert-to-array.util.js.map","import { ValidationError } from './ValidationError';\nimport { ValidationTypes } from './ValidationTypes';\nimport { ValidationUtils } from './ValidationUtils';\nimport { isPromise, convertToArray } from '../utils';\nimport { getMetadataStorage } from '../metadata/MetadataStorage';\nimport { getClassValidatorMessages, getText } from '../multi-lang';\n/**\n * Executes validation over given object.\n */\nvar ValidationExecutor = /** @class */ (function () {\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n function ValidationExecutor(validator, validatorOptions) {\n this.validator = validator;\n this.validatorOptions = validatorOptions;\n // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n this.awaitingPromises = [];\n this.ignoreAsyncValidations = false;\n // -------------------------------------------------------------------------\n // Private Properties\n // -------------------------------------------------------------------------\n this.metadataStorage = getMetadataStorage();\n }\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n ValidationExecutor.prototype.execute = function (object, targetSchema, validationErrors) {\n var _this = this;\n var _a;\n /**\n * If there is no metadata registered it means possibly the dependencies are not flatterned and\n * more than one instance is used.\n *\n * TODO: This needs proper handling, forcing to use the same container or some other proper solution.\n */\n if (!this.metadataStorage.hasValidationMetaData && ((_a = this.validatorOptions) === null || _a === void 0 ? void 0 : _a.enableDebugMessages) === true) {\n console.warn(\"No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.\");\n }\n var groups = this.validatorOptions ? this.validatorOptions.groups : undefined;\n var strictGroups = (this.validatorOptions && this.validatorOptions.strictGroups) || false;\n var always = (this.validatorOptions && this.validatorOptions.always) || false;\n var targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, always, strictGroups, groups);\n var groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas);\n if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) {\n var validationError = new ValidationError();\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.target === undefined ||\n this.validatorOptions.validationError.target === true)\n validationError.target = object;\n validationError.value = undefined;\n validationError.property = undefined;\n validationError.children = [];\n validationError.constraints = { unknownValue: 'an unknown value was passed to the validate function' };\n validationErrors.push(validationError);\n return;\n }\n if (this.validatorOptions && this.validatorOptions.whitelist)\n this.whitelist(object, groupedMetadatas, validationErrors);\n // General validation\n Object.keys(groupedMetadatas).forEach(function (propertyName) {\n var value = object[propertyName];\n var definedMetadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type === ValidationTypes.IS_DEFINED; });\n var metadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST; });\n if (value instanceof Promise &&\n metadatas.find(function (metadata) { return metadata.type === ValidationTypes.PROMISE_VALIDATION; })) {\n _this.awaitingPromises.push(value.then(function (resolvedValue) {\n _this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors);\n }));\n }\n else {\n _this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors);\n }\n });\n };\n ValidationExecutor.prototype.whitelist = function (object, groupedMetadatas, validationErrors) {\n var _this = this;\n var notAllowedProperties = [];\n Object.keys(object).forEach(function (propertyName) {\n // does this property have no metadata?\n if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0)\n notAllowedProperties.push(propertyName);\n });\n if (notAllowedProperties.length > 0) {\n if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) {\n // throw errors\n notAllowedProperties.forEach(function (property) {\n var _a;\n var validationError = _this.generateValidationError(object, object[property], property);\n validationError.constraints = (_a = {}, _a[ValidationTypes.WHITELIST] = \"property \".concat(property, \" should not exist\"), _a);\n validationError.children = undefined;\n validationErrors.push(validationError);\n });\n }\n else {\n // strip non allowed properties\n notAllowedProperties.forEach(function (property) { return delete object[property]; });\n }\n }\n };\n ValidationExecutor.prototype.stripEmptyErrors = function (errors) {\n var _this = this;\n return errors.filter(function (error) {\n if (error.children) {\n error.children = _this.stripEmptyErrors(error.children);\n }\n if (Object.keys(error.constraints).length === 0) {\n if (error.children.length === 0) {\n return false;\n }\n else {\n delete error.constraints;\n }\n }\n return true;\n });\n };\n // -------------------------------------------------------------------------\n // Private Methods\n // -------------------------------------------------------------------------\n ValidationExecutor.prototype.performValidations = function (object, value, propertyName, definedMetadatas, metadatas, validationErrors) {\n var customValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CUSTOM_VALIDATION; });\n var nestedValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.NESTED_VALIDATION; });\n var conditionalValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CONDITIONAL_VALIDATION; });\n var validationError = this.generateValidationError(object, value, propertyName);\n validationErrors.push(validationError);\n var canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas);\n if (!canValidate) {\n return;\n }\n // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not\n this.customValidations(object, value, definedMetadatas, validationError);\n this.mapContexts(object, value, definedMetadatas, validationError);\n if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) {\n return;\n }\n if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) {\n return;\n }\n if ((value === null || value === undefined) &&\n this.validatorOptions &&\n this.validatorOptions.skipMissingProperties === true) {\n return;\n }\n this.customValidations(object, value, customValidationMetadatas, validationError);\n this.nestedValidations(value, nestedValidationMetadatas, validationError.children);\n this.mapContexts(object, value, metadatas, validationError);\n this.mapContexts(object, value, customValidationMetadatas, validationError);\n };\n ValidationExecutor.prototype.generateValidationError = function (object, value, propertyName) {\n var validationError = new ValidationError();\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.target === undefined ||\n this.validatorOptions.validationError.target === true)\n validationError.target = object;\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.value === undefined ||\n this.validatorOptions.validationError.value === true)\n validationError.value = value;\n validationError.property = propertyName;\n validationError.children = [];\n validationError.constraints = {};\n return validationError;\n };\n ValidationExecutor.prototype.conditionalValidations = function (object, value, metadatas) {\n return metadatas\n .map(function (metadata) { return metadata.constraints[0](object, value); })\n .reduce(function (resultA, resultB) { return resultA && resultB; }, true);\n };\n ValidationExecutor.prototype.customValidations = function (object, value, metadatas, error) {\n var _this = this;\n metadatas.forEach(function (metadata) {\n _this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls).forEach(function (customConstraintMetadata) {\n if (customConstraintMetadata.async && _this.ignoreAsyncValidations)\n return;\n if (_this.validatorOptions &&\n _this.validatorOptions.stopAtFirstError &&\n Object.keys(error.constraints || {}).length > 0)\n return;\n var validationArguments = {\n targetName: object.constructor ? object.constructor.name : undefined,\n property: metadata.propertyName,\n object: object,\n value: value,\n constraints: metadata.constraints,\n };\n if (!metadata.each || !(Array.isArray(value) || value instanceof Set || value instanceof Map)) {\n var validatedValue = customConstraintMetadata.instance.validate(value, validationArguments);\n if (isPromise(validatedValue)) {\n var promise = validatedValue.then(function (isValid) {\n if (!isValid) {\n var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1];\n error.constraints[type] = message;\n if (metadata.context) {\n if (!error.contexts) {\n error.contexts = {};\n }\n error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context);\n }\n }\n });\n _this.awaitingPromises.push(promise);\n }\n else {\n if (!validatedValue) {\n var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1];\n error.constraints[type] = message;\n }\n }\n return;\n }\n // convert set and map into array\n var arrayValue = convertToArray(value);\n // Validation needs to be applied to each array item\n var validatedSubValues = arrayValue.map(function (subValue) {\n return customConstraintMetadata.instance.validate(subValue, validationArguments);\n });\n var validationIsAsync = validatedSubValues.some(function (validatedSubValue) {\n return isPromise(validatedSubValue);\n });\n if (validationIsAsync) {\n // Wrap plain values (if any) in promises, so that all are async\n var asyncValidatedSubValues = validatedSubValues.map(function (validatedSubValue) {\n return isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue);\n });\n var asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues).then(function (flatValidatedValues) {\n var validationResult = flatValidatedValues.every(function (isValid) { return isValid; });\n if (!validationResult) {\n var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1];\n error.constraints[type] = message;\n if (metadata.context) {\n if (!error.contexts) {\n error.contexts = {};\n }\n error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context);\n }\n }\n });\n _this.awaitingPromises.push(asyncValidationIsFinishedPromise);\n return;\n }\n var validationResult = validatedSubValues.every(function (isValid) { return isValid; });\n if (!validationResult) {\n var _b = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _b[0], message = _b[1];\n error.constraints[type] = message;\n }\n });\n });\n };\n ValidationExecutor.prototype.nestedValidations = function (value, metadatas, errors) {\n var _this = this;\n if (value === void 0) {\n return;\n }\n metadatas.forEach(function (metadata) {\n var _a;\n if (metadata.type !== ValidationTypes.NESTED_VALIDATION && metadata.type !== ValidationTypes.PROMISE_VALIDATION) {\n return;\n }\n if (Array.isArray(value) || value instanceof Set || value instanceof Map) {\n // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value\n var arrayLikeValue = value instanceof Set ? Array.from(value) : value;\n arrayLikeValue.forEach(function (subValue, index) {\n _this.performValidations(value, subValue, index.toString(), [], metadatas, errors);\n });\n }\n else if (value instanceof Object) {\n var targetSchema = typeof metadata.target === 'string' ? metadata.target : metadata.target.name;\n _this.execute(value, targetSchema, errors);\n }\n else {\n var error = new ValidationError();\n error.value = value;\n error.property = metadata.propertyName;\n error.target = metadata.target;\n var _b = _this.createValidationError(metadata.target, value, metadata), type = _b[0], message = _b[1];\n error.constraints = (_a = {},\n _a[type] = message,\n _a);\n errors.push(error);\n }\n });\n };\n ValidationExecutor.prototype.mapContexts = function (object, value, metadatas, error) {\n var _this = this;\n return metadatas.forEach(function (metadata) {\n if (metadata.context) {\n var customConstraint = void 0;\n if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) {\n var customConstraints = _this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls);\n customConstraint = customConstraints[0];\n }\n var type = _this.getConstraintType(metadata, customConstraint);\n if (error.constraints[type]) {\n if (!error.contexts) {\n error.contexts = {};\n }\n error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context);\n }\n }\n });\n };\n ValidationExecutor.prototype.createValidationError = function (object, value, metadata, customValidatorMetadata) {\n var targetName = object.constructor ? object.constructor.name : undefined;\n var type = this.getConstraintType(metadata, customValidatorMetadata);\n var validationArguments = {\n targetName: targetName,\n property: metadata.propertyName,\n object: object,\n value: value,\n constraints: metadata.constraints,\n };\n var titles = (this.validatorOptions && this.validatorOptions.titles) || {};\n var message = metadata.message || '';\n if (!metadata.message &&\n (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) {\n if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) {\n message = customValidatorMetadata.instance.defaultMessage(validationArguments);\n }\n }\n if (typeof message === 'string') {\n var messages_1 = (this.validatorOptions && this.validatorOptions.messages) || getClassValidatorMessages();\n Object.keys(messages_1).forEach(function (messageKey) {\n var key = getText(messageKey);\n var value = messages_1[messageKey] || messageKey;\n message = message.split(key).join(value);\n });\n }\n var messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments, titles);\n return [type, messageString];\n };\n ValidationExecutor.prototype.getConstraintType = function (metadata, customValidatorMetadata) {\n var type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type;\n return type;\n };\n return ValidationExecutor;\n}());\nexport { ValidationExecutor };\n//# sourceMappingURL=ValidationExecutor.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { ValidationExecutor } from './ValidationExecutor';\n/**\n * Validator performs validation of the given object based on its metadata.\n */\nvar Validator = /** @class */ (function () {\n function Validator() {\n }\n /**\n * Performs validation of the given object based on decorators or validation schema.\n */\n Validator.prototype.validate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) {\n return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions);\n };\n /**\n * Performs validation of the given object based on decorators or validation schema and reject on error.\n */\n Validator.prototype.validateOrReject = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var errors;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions)];\n case 1:\n errors = _a.sent();\n if (errors.length)\n return [2 /*return*/, Promise.reject(errors)];\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Performs validation of the given object based on decorators or validation schema.\n */\n Validator.prototype.validateSync = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) {\n var object = typeof objectOrSchemaName === 'string' ? objectOrValidationOptions : objectOrSchemaName;\n var options = typeof objectOrSchemaName === 'string' ? maybeValidatorOptions : objectOrValidationOptions;\n var schema = typeof objectOrSchemaName === 'string' ? objectOrSchemaName : undefined;\n var executor = new ValidationExecutor(this, options);\n executor.ignoreAsyncValidations = true;\n var validationErrors = [];\n executor.execute(object, schema, validationErrors);\n return executor.stripEmptyErrors(validationErrors);\n };\n // -------------------------------------------------------------------------\n // Private Properties\n // -------------------------------------------------------------------------\n /**\n * Performs validation of the given object based on decorators or validation schema.\n * Common method for `validateOrReject` and `validate` methods.\n */\n Validator.prototype.coreValidate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) {\n var object = typeof objectOrSchemaName === 'string' ? objectOrValidationOptions : objectOrSchemaName;\n var options = typeof objectOrSchemaName === 'string' ? maybeValidatorOptions : objectOrValidationOptions;\n var schema = typeof objectOrSchemaName === 'string' ? objectOrSchemaName : undefined;\n var executor = new ValidationExecutor(this, options);\n var validationErrors = [];\n executor.execute(object, schema, validationErrors);\n return Promise.all(executor.awaitingPromises).then(function () {\n return executor.stripEmptyErrors(validationErrors);\n });\n };\n return Validator;\n}());\nexport { Validator };\n//# sourceMappingURL=Validator.js.map","import { getFromContainer } from './container';\nimport { getMetadataStorage } from './metadata/MetadataStorage';\nimport { Validator } from './validation/Validator';\n// -------------------------------------------------------------------------\n// Export everything api users needs\n// -------------------------------------------------------------------------\nexport * from './container';\nexport * from './decorator/decorators';\nexport * from './decorator/ValidationOptions';\nexport * from './metadata/ConstraintMetadata';\nexport * from './metadata/MetadataStorage';\nexport * from './metadata/ValidationMetadata';\nexport * from './metadata/ValidationMetadataArgs';\nexport * from './multi-lang';\nexport * from './register-decorator';\nexport * from './validation-schema/ValidationSchema';\nexport * from './validation/ValidationArguments';\nexport * from './validation/ValidationError';\nexport * from './validation/ValidationTypes';\nexport * from './validation/Validator';\nexport * from './validation/ValidatorConstraintInterface';\nexport * from './validation/ValidatorOptions';\n/**\n * Validates given object by object's decorators or given validation schema.\n */\nexport function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {\n if (typeof schemaNameOrObject === 'string') {\n return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);\n }\n else {\n return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions);\n }\n}\n/**\n * Validates given object by object's decorators or given validation schema and reject on error.\n */\nexport function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {\n if (typeof schemaNameOrObject === 'string') {\n return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);\n }\n else {\n return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions);\n }\n}\n/**\n * Validates given object by object's decorators or given validation schema.\n * Note that this method completely ignores async validations.\n * If you want to properly perform validation you need to call validate method instead.\n */\nexport function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {\n if (typeof schemaNameOrObject === 'string') {\n return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);\n }\n else {\n return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions);\n }\n}\n/**\n * Registers a new validation schema.\n */\nexport function registerSchema(schema) {\n getMetadataStorage().addValidationSchema(schema);\n}\n//# sourceMappingURL=index.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isLengthValidator from 'validator/lib/isLength';\nimport { getText } from '../../multi-lang';\nexport var MIN_LENGTH = 'minLength';\n/**\n * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function minLength(value, min) {\n return typeof value === 'string' && isLengthValidator(value, { min: min });\n}\n/**\n * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function MinLength(min, validationOptions) {\n return ValidateBy({\n name: MIN_LENGTH,\n constraints: [min],\n validator: {\n validate: function (value, args) { return minLength(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be longer than or equal to $constraint1 characters'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=MinLength.js.map","import { ValidationMetadata } from '../../metadata/ValidationMetadata';\nimport { getMetadataStorage } from '../../metadata/MetadataStorage';\nimport { ValidationTypes } from '../../validation/ValidationTypes';\nimport { ConstraintMetadata } from '../../metadata/ConstraintMetadata';\n/**\n * Registers custom validator class.\n */\nexport function ValidatorConstraint(options) {\n return function (target) {\n var isAsync = options && options.async;\n var name = options && options.name ? options.name : '';\n if (!name) {\n name = target.name;\n if (!name)\n // generate name if it was not given\n name = name.replace(/\\.?([A-Z]+)/g, function (x, y) { return '_' + y.toLowerCase(); }).replace(/^_/, '');\n }\n var metadata = new ConstraintMetadata(target, name, isAsync);\n getMetadataStorage().addConstraintMetadata(metadata);\n };\n}\nexport function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) {\n return function (object, propertyName) {\n var args = {\n type: ValidationTypes.CUSTOM_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n constraintCls: constraintClass,\n constraints: Array.isArray(constraintsOrValidationOptions) ? constraintsOrValidationOptions : undefined,\n validationOptions: !Array.isArray(constraintsOrValidationOptions)\n ? constraintsOrValidationOptions\n : maybeValidationOptions,\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n//# sourceMappingURL=Validate.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isNumericValidator from 'validator/lib/isNumeric';\nimport { getText } from '../../multi-lang';\nexport var IS_NUMBER_STRING = 'isNumberString';\n/**\n * Checks if the string is numeric.\n * If given value is not a string, then it returns false.\n */\nexport function isNumberString(value, options) {\n return typeof value === 'string' && isNumericValidator(value, options);\n}\n/**\n * Checks if the string is numeric.\n * If given value is not a string, then it returns false.\n */\nexport function IsNumberString(options, validationOptions) {\n return ValidateBy({\n name: IS_NUMBER_STRING,\n constraints: [options],\n validator: {\n validate: function (value, args) { return isNumberString(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be a number string'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsNumberString.js.map","import { ConstraintMetadata } from './metadata/ConstraintMetadata';\nimport { ValidationMetadata } from './metadata/ValidationMetadata';\nimport { ValidationTypes } from './validation/ValidationTypes';\nimport { getFromContainer } from './container';\nimport { MetadataStorage, getMetadataStorage } from './metadata/MetadataStorage';\n/**\n * Registers a custom validation decorator.\n */\nexport function registerDecorator(options) {\n var constraintCls;\n if (options.validator instanceof Function) {\n constraintCls = options.validator;\n var constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator);\n if (constraintClasses.length > 1) {\n throw \"More than one implementation of ValidatorConstraintInterface found for validator on: \".concat(options.target.name, \":\").concat(options.propertyName);\n }\n }\n else {\n var validator_1 = options.validator;\n constraintCls = /** @class */ (function () {\n function CustomConstraint() {\n }\n CustomConstraint.prototype.validate = function (value, validationArguments) {\n return validator_1.validate(value, validationArguments);\n };\n CustomConstraint.prototype.defaultMessage = function (validationArguments) {\n if (validator_1.defaultMessage) {\n return validator_1.defaultMessage(validationArguments);\n }\n return '';\n };\n return CustomConstraint;\n }());\n getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async));\n }\n var validationMetadataArgs = {\n type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION,\n target: options.target,\n propertyName: options.propertyName,\n validationOptions: options.options,\n constraintCls: constraintCls,\n constraints: options.constraints,\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs));\n}\n//# sourceMappingURL=register-decorator.js.map","import { ValidationMetadata } from '../metadata/ValidationMetadata';\n/**\n * Used to transform validation schemas to validation metadatas.\n */\nvar ValidationSchemaToMetadataTransformer = /** @class */ (function () {\n function ValidationSchemaToMetadataTransformer() {\n }\n ValidationSchemaToMetadataTransformer.prototype.transform = function (schema) {\n var metadatas = [];\n Object.keys(schema.properties).forEach(function (property) {\n schema.properties[property].forEach(function (validation) {\n var validationOptions = {\n message: validation.message,\n groups: validation.groups,\n always: validation.always,\n each: validation.each,\n };\n var args = {\n type: validation.type,\n target: schema.name,\n propertyName: property,\n constraints: validation.constraints,\n validationTypeOptions: validation.options,\n validationOptions: validationOptions,\n };\n metadatas.push(new ValidationMetadata(args));\n });\n });\n return metadatas;\n };\n return ValidationSchemaToMetadataTransformer;\n}());\nexport { ValidationSchemaToMetadataTransformer };\n//# sourceMappingURL=ValidationSchemaToMetadataTransformer.js.map","import { ValidationSchemaToMetadataTransformer } from '../validation-schema/ValidationSchemaToMetadataTransformer';\nimport { getGlobal } from '../utils';\n/**\n * Storage all metadatas.\n */\nvar MetadataStorage = /** @class */ (function () {\n function MetadataStorage() {\n // -------------------------------------------------------------------------\n // Private properties\n // -------------------------------------------------------------------------\n this.validationMetadatas = [];\n this.constraintMetadatas = [];\n }\n Object.defineProperty(MetadataStorage.prototype, \"hasValidationMetaData\", {\n get: function () {\n return !!this.validationMetadatas.length;\n },\n enumerable: false,\n configurable: true\n });\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n /**\n * Adds a new validation metadata.\n */\n MetadataStorage.prototype.addValidationSchema = function (schema) {\n var _this = this;\n var validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema);\n validationMetadatas.forEach(function (validationMetadata) { return _this.addValidationMetadata(validationMetadata); });\n };\n /**\n * Adds a new validation metadata.\n */\n MetadataStorage.prototype.addValidationMetadata = function (metadata) {\n this.validationMetadatas.push(metadata);\n };\n /**\n * Adds a new constraint metadata.\n */\n MetadataStorage.prototype.addConstraintMetadata = function (metadata) {\n this.constraintMetadatas.push(metadata);\n };\n /**\n * Groups metadata by their property names.\n */\n MetadataStorage.prototype.groupByPropertyName = function (metadata) {\n var grouped = {};\n metadata.forEach(function (metadata) {\n if (!grouped[metadata.propertyName])\n grouped[metadata.propertyName] = [];\n grouped[metadata.propertyName].push(metadata);\n });\n return grouped;\n };\n /**\n * Gets all validation metadatas for the given object with the given groups.\n */\n MetadataStorage.prototype.getTargetValidationMetadatas = function (targetConstructor, targetSchema, always, strictGroups, groups) {\n var includeMetadataBecauseOfAlwaysOption = function (metadata) {\n // `metadata.always` overrides global default.\n if (typeof metadata.always !== 'undefined')\n return metadata.always;\n // `metadata.groups` overrides global default.\n if (metadata.groups && metadata.groups.length)\n return false;\n // Use global default.\n return always;\n };\n var excludeMetadataBecauseOfStrictGroupsOption = function (metadata) {\n if (strictGroups) {\n // Validation is not using groups.\n if (!groups || !groups.length) {\n // `metadata.groups` has at least one group.\n if (metadata.groups && metadata.groups.length)\n return true;\n }\n }\n return false;\n };\n // get directly related to a target metadatas\n var originalMetadatas = this.validationMetadatas.filter(function (metadata) {\n if (metadata.target !== targetConstructor && metadata.target !== targetSchema)\n return false;\n if (includeMetadataBecauseOfAlwaysOption(metadata))\n return true;\n if (excludeMetadataBecauseOfStrictGroupsOption(metadata))\n return false;\n if (groups && groups.length > 0)\n return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; });\n return true;\n });\n // get metadatas for inherited classes\n var inheritedMetadatas = this.validationMetadatas.filter(function (metadata) {\n // if target is a string it's means we validate against a schema, and there is no inheritance support for schemas\n if (typeof metadata.target === 'string')\n return false;\n if (metadata.target === targetConstructor)\n return false;\n if (metadata.target instanceof Function && !(targetConstructor.prototype instanceof metadata.target))\n return false;\n if (includeMetadataBecauseOfAlwaysOption(metadata))\n return true;\n if (excludeMetadataBecauseOfStrictGroupsOption(metadata))\n return false;\n if (groups && groups.length > 0)\n return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; });\n return true;\n });\n // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas\n var uniqueInheritedMetadatas = inheritedMetadatas.filter(function (inheritedMetadata) {\n return !originalMetadatas.find(function (originalMetadata) {\n return (originalMetadata.propertyName === inheritedMetadata.propertyName &&\n originalMetadata.type === inheritedMetadata.type);\n });\n });\n return originalMetadatas.concat(uniqueInheritedMetadatas);\n };\n /**\n * Gets all validator constraints for the given object.\n */\n MetadataStorage.prototype.getTargetValidatorConstraints = function (target) {\n return this.constraintMetadatas.filter(function (metadata) { return metadata.target === target; });\n };\n return MetadataStorage;\n}());\nexport { MetadataStorage };\n/**\n * Gets metadata storage.\n * Metadata storage follows the best practices and stores metadata in a global variable.\n */\nexport function getMetadataStorage() {\n var global = getGlobal();\n if (!global.classValidatorMetadataStorage) {\n global.classValidatorMetadataStorage = new MetadataStorage();\n }\n return global.classValidatorMetadataStorage;\n}\n//# sourceMappingURL=MetadataStorage.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport { getText } from '../../multi-lang';\nexport var IS_NOT_EMPTY = 'isNotEmpty';\n/**\n * Checks if given value is not empty (!== '', !== null, !== undefined).\n */\nexport function isNotEmpty(value) {\n return value !== '' && value !== null && value !== undefined;\n}\n/**\n * Checks if given value is not empty (!== '', !== null, !== undefined).\n */\nexport function IsNotEmpty(validationOptions) {\n return ValidateBy({\n name: IS_NOT_EMPTY,\n validator: {\n validate: function (value, args) { return isNotEmpty(value); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property should not be empty'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsNotEmpty.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isIso8601Validator from 'validator/lib/isISO8601';\nimport { getText } from '../../multi-lang';\nexport var IS_ISO8601 = 'isIso8601';\n/**\n * Checks if the string is a valid ISO 8601 date.\n * If given value is not a string, then it returns false.\n * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.\n */\nexport function isISO8601(value, options) {\n return typeof value === 'string' && isIso8601Validator(value, options);\n}\n/**\n * Checks if the string is a valid ISO 8601 date.\n * If given value is not a string, then it returns false.\n * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.\n */\nexport function IsISO8601(options, validationOptions) {\n return ValidateBy({\n name: IS_ISO8601,\n constraints: [options],\n validator: {\n validate: function (value, args) { return isISO8601(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be a valid ISO 8601 date string'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsISO8601.js.map","import { getGlobal } from '../utils/get-global.util';\nvar CLASS_VALIDATOR_MESSAGES = 'CLASS_VALIDATOR_MESSAGES';\nexport function getClassValidatorMessagesStorage() {\n var global = getGlobal();\n if (!global[CLASS_VALIDATOR_MESSAGES]) {\n global[CLASS_VALIDATOR_MESSAGES] = {};\n }\n return global[CLASS_VALIDATOR_MESSAGES];\n}\nexport function setClassValidatorMessages(messages) {\n var storageMessages = getClassValidatorMessagesStorage();\n Object.keys(storageMessages).forEach(function (key) { return delete storageMessages[key]; });\n Object.assign(storageMessages, messages);\n}\nexport function getClassValidatorMessages() {\n return getClassValidatorMessagesStorage();\n}\nexport function getClassValidatorMessage(key) {\n var messages = getClassValidatorMessagesStorage();\n return messages[key];\n}\n//# sourceMappingURL=messages.storage.js.map","/**\n * Container to be used by this library for inversion control. If container was not implicitly set then by default\n * container simply creates a new instance of the given class.\n */\nvar defaultContainer = new (/** @class */ (function () {\n function class_1() {\n this.instances = [];\n }\n class_1.prototype.get = function (someClass) {\n var instance = this.instances.find(function (instance) { return instance.type === someClass; });\n if (!instance) {\n instance = { type: someClass, object: new someClass() };\n this.instances.push(instance);\n }\n return instance.object;\n };\n return class_1;\n}()))();\nvar userContainer;\nvar userContainerOptions;\n/**\n * Sets container to be used by this library.\n */\nexport function useContainer(iocContainer, options) {\n userContainer = iocContainer;\n userContainerOptions = options;\n}\n/**\n * Gets the IOC container used by this library.\n */\nexport function getFromContainer(someClass) {\n if (userContainer) {\n try {\n var instance = userContainer.get(someClass);\n if (instance)\n return instance;\n if (!userContainerOptions || !userContainerOptions.fallback)\n return instance;\n }\n catch (error) {\n if (!userContainerOptions || !userContainerOptions.fallbackOnErrors)\n throw error;\n }\n }\n return defaultContainer.get(someClass);\n}\n//# sourceMappingURL=container.js.map","import { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport { getText } from '../../multi-lang';\nexport var IS_NUMBER = 'isNumber';\n/**\n * Checks if a given value is a number.\n */\nexport function isNumber(value, options) {\n if (options === void 0) { options = {}; }\n if (typeof value !== 'number') {\n return false;\n }\n if (value === Infinity || value === -Infinity) {\n return options.allowInfinity;\n }\n if (Number.isNaN(value)) {\n return options.allowNaN;\n }\n if (options.maxDecimalPlaces !== undefined) {\n var decimalPlaces = 0;\n if (value % 1 !== 0) {\n decimalPlaces = value.toString().split('.')[1].length;\n }\n if (decimalPlaces > options.maxDecimalPlaces) {\n return false;\n }\n }\n return Number.isFinite(value);\n}\n/**\n * Checks if a value is a number.\n */\nexport function IsNumber(options, validationOptions) {\n if (options === void 0) { options = {}; }\n return ValidateBy({\n name: IS_NUMBER,\n constraints: [options],\n validator: {\n validate: function (value, args) { return isNumber(value, args.constraints[0]); },\n defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + getText('$property must be a number conforming to the specified constraints'); }, validationOptions),\n },\n }, validationOptions);\n}\n//# sourceMappingURL=IsNumber.js.map"],"sourceRoot":""}