@decaf-ts/decorator-validation 1.5.8 → 1.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/decorator-validation.bundle.min.js +2 -0
  2. package/dist/esm/decorator-validation.bundle.min.esm.js +2 -0
  3. package/lib/esm/index.d.ts +1 -1
  4. package/lib/esm/index.js +1 -1
  5. package/lib/esm/model/Model.d.ts +1 -0
  6. package/lib/esm/model/Model.js +6 -1
  7. package/lib/esm/model/index.d.ts +0 -1
  8. package/lib/esm/model/index.js +0 -1
  9. package/lib/esm/utils/hashing.d.ts +0 -14
  10. package/lib/esm/utils/hashing.js +0 -17
  11. package/lib/esm/utils/index.d.ts +1 -0
  12. package/lib/esm/utils/index.js +1 -0
  13. package/lib/esm/utils/serialization.d.ts +4 -30
  14. package/lib/esm/utils/serialization.js +2 -1
  15. package/lib/esm/utils/types.d.ts +29 -0
  16. package/lib/esm/validation/Validation.d.ts +1 -1
  17. package/lib/esm/validation/Validators/DateValidator.d.ts +1 -1
  18. package/lib/esm/validation/Validators/EmailValidator.d.ts +1 -1
  19. package/lib/esm/validation/Validators/ListValidator.d.ts +1 -1
  20. package/lib/esm/validation/Validators/MaxLengthValidator.d.ts +1 -1
  21. package/lib/esm/validation/Validators/MaxValidator.d.ts +1 -1
  22. package/lib/esm/validation/Validators/MinLengthValidator.d.ts +1 -1
  23. package/lib/esm/validation/Validators/MinValidator.d.ts +1 -1
  24. package/lib/esm/validation/Validators/PasswordValidator.d.ts +1 -1
  25. package/lib/esm/validation/Validators/PatternValidator.d.ts +1 -1
  26. package/lib/esm/validation/Validators/RequiredValidator.d.ts +1 -1
  27. package/lib/esm/validation/Validators/StepValidator.d.ts +1 -1
  28. package/lib/esm/validation/Validators/TypeValidator.d.ts +1 -1
  29. package/lib/esm/validation/Validators/URLValidator.d.ts +1 -1
  30. package/lib/esm/validation/Validators/Validator.d.ts +1 -1
  31. package/lib/esm/validation/Validators/ValidatorRegistry.d.ts +2 -2
  32. package/lib/esm/validation/Validators/index.d.ts +0 -1
  33. package/lib/esm/validation/Validators/index.js +0 -1
  34. package/lib/esm/validation/types.d.ts +88 -0
  35. package/lib/{index.js → index.cjs} +4 -4
  36. package/lib/index.d.ts +1 -1
  37. package/lib/model/{Model.js → Model.cjs} +15 -9
  38. package/lib/model/Model.d.ts +1 -0
  39. package/lib/model/{construction.js → construction.cjs} +1 -1
  40. package/lib/model/{decorators.js → decorators.cjs} +3 -3
  41. package/lib/{utils/index.js → model/index.cjs} +7 -7
  42. package/lib/model/index.d.ts +0 -1
  43. package/lib/model/{validation.js → validation.cjs} +7 -7
  44. package/lib/utils/{dates.js → dates.cjs} +2 -2
  45. package/lib/utils/{decorators.js → decorators.cjs} +1 -1
  46. package/lib/utils/{hashing.js → hashing.cjs} +0 -18
  47. package/lib/utils/hashing.d.ts +0 -14
  48. package/lib/{model/index.js → utils/index.cjs} +8 -8
  49. package/lib/utils/index.d.ts +1 -0
  50. package/lib/utils/{serialization.js → serialization.cjs} +5 -4
  51. package/lib/utils/serialization.d.ts +4 -30
  52. package/lib/utils/types.d.ts +29 -0
  53. package/lib/validation/{Validation.js → Validation.cjs} +2 -2
  54. package/lib/validation/Validation.d.ts +1 -1
  55. package/lib/validation/Validators/{DateValidator.js → DateValidator.cjs} +3 -3
  56. package/lib/validation/Validators/DateValidator.d.ts +1 -1
  57. package/lib/validation/Validators/{EmailValidator.js → EmailValidator.cjs} +3 -3
  58. package/lib/validation/Validators/EmailValidator.d.ts +1 -1
  59. package/lib/validation/Validators/{ListValidator.js → ListValidator.cjs} +3 -3
  60. package/lib/validation/Validators/ListValidator.d.ts +1 -1
  61. package/lib/validation/Validators/{MaxLengthValidator.js → MaxLengthValidator.cjs} +3 -3
  62. package/lib/validation/Validators/MaxLengthValidator.d.ts +1 -1
  63. package/lib/validation/Validators/{MaxValidator.js → MaxValidator.cjs} +3 -3
  64. package/lib/validation/Validators/MaxValidator.d.ts +1 -1
  65. package/lib/validation/Validators/{MinLengthValidator.js → MinLengthValidator.cjs} +3 -3
  66. package/lib/validation/Validators/MinLengthValidator.d.ts +1 -1
  67. package/lib/validation/Validators/{MinValidator.js → MinValidator.cjs} +3 -3
  68. package/lib/validation/Validators/MinValidator.d.ts +1 -1
  69. package/lib/validation/Validators/{PasswordValidator.js → PasswordValidator.cjs} +3 -3
  70. package/lib/validation/Validators/PasswordValidator.d.ts +1 -1
  71. package/lib/validation/Validators/{PatternValidator.js → PatternValidator.cjs} +3 -3
  72. package/lib/validation/Validators/PatternValidator.d.ts +1 -1
  73. package/lib/validation/Validators/{RequiredValidator.js → RequiredValidator.cjs} +3 -3
  74. package/lib/validation/Validators/RequiredValidator.d.ts +1 -1
  75. package/lib/validation/Validators/{StepValidator.js → StepValidator.cjs} +3 -3
  76. package/lib/validation/Validators/StepValidator.d.ts +1 -1
  77. package/lib/validation/Validators/{TypeValidator.js → TypeValidator.cjs} +5 -5
  78. package/lib/validation/Validators/TypeValidator.d.ts +1 -1
  79. package/lib/validation/Validators/{URLValidator.js → URLValidator.cjs} +3 -3
  80. package/lib/validation/Validators/URLValidator.d.ts +1 -1
  81. package/lib/validation/Validators/{Validator.js → Validator.cjs} +2 -2
  82. package/lib/validation/Validators/Validator.d.ts +1 -1
  83. package/lib/validation/Validators/ValidatorRegistry.d.ts +2 -2
  84. package/lib/validation/Validators/{constants.js → constants.cjs} +1 -1
  85. package/lib/validation/Validators/{decorators.js → decorators.cjs} +2 -2
  86. package/lib/validation/Validators/index.cjs +68 -0
  87. package/lib/validation/{decorators.js → decorators.cjs} +5 -5
  88. package/lib/validation/{index.js → index.cjs} +4 -4
  89. package/lib/validation/types.d.ts +88 -0
  90. package/package.json +1 -1
  91. package/dist/decorator-validation.js +0 -2
  92. package/dist/esm/decorator-validation.js +0 -2
  93. package/lib/esm/model/utils.d.ts +0 -2
  94. package/lib/esm/model/utils.js +0 -8
  95. package/lib/model/utils.d.ts +0 -2
  96. package/lib/model/utils.js +0 -11
  97. package/lib/validation/Validators/decorators.d.ts +0 -12
  98. package/lib/validation/Validators/index.d.ts +0 -52
  99. package/lib/validation/Validators/index.js +0 -69
  100. package/lib/validation/Validators/types.d.ts +0 -88
  101. /package/dist/{decorator-validation.js.LICENSE.txt → decorator-validation.bundle.min.js.LICENSE.txt} +0 -0
  102. /package/dist/esm/{decorator-validation.js.LICENSE.txt → decorator-validation.bundle.min.esm.js.LICENSE.txt} +0 -0
  103. /package/lib/esm/{validation/Validators → utils}/types.js +0 -0
  104. /package/lib/model/{ModelErrorDefinition.js → ModelErrorDefinition.cjs} +0 -0
  105. /package/lib/model/{constants.js → constants.cjs} +0 -0
  106. /package/lib/model/{types.js → types.cjs} +0 -0
  107. /package/lib/utils/{constants.js → constants.cjs} +0 -0
  108. /package/lib/utils/{registry.js → registry.cjs} +0 -0
  109. /package/lib/utils/{strings.js → strings.cjs} +0 -0
  110. /package/lib/{validation/Validators/types.js → utils/types.cjs} +0 -0
  111. /package/lib/validation/Validators/{ValidatorRegistry.js → ValidatorRegistry.cjs} +0 -0
  112. /package/lib/validation/{types.js → types.cjs} +0 -0
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MaxValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Max Validator
18
18
  *
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { MaxValidatorOptions } from "./types";
2
+ import { MaxValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Max Validator
5
5
  *
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MinLengthValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Minimum Length Validator
18
18
  * @description Validates strings and Arrays on their minimum length
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { MinLengthValidatorOptions } from "./types";
2
+ import { MinLengthValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Minimum Length Validator
5
5
  * @description Validates strings and Arrays on their minimum length
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MinValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Min Validator
18
18
  *
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { MinValidatorOptions } from "./types";
2
+ import { MinValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Min Validator
5
5
  *
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PasswordValidator = void 0;
13
- const PatternValidator_1 = require("./PatternValidator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const PatternValidator_1 = require("./PatternValidator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Handles Password Validation
18
18
  *
@@ -1,5 +1,5 @@
1
1
  import { PatternValidator } from "./PatternValidator";
2
- import { PatternValidatorOptions } from "./types";
2
+ import { PatternValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Handles Password Validation
5
5
  *
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PatternValidator = exports.regexpParser = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  exports.regexpParser = new RegExp("^/(.+)/([gimus]*)$");
17
17
  /**
18
18
  * @summary Pattern Validator
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { PatternValidatorOptions } from "./types";
2
+ import { PatternValidatorOptions } from "../types";
3
3
  export declare const regexpParser: RegExp;
4
4
  /**
5
5
  * @summary Pattern Validator
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequiredValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Required Validator
18
18
  *
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { ValidatorOptions } from "./types";
2
+ import { ValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Required Validator
5
5
  *
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.StepValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary Step Validator
18
18
  *
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { StepValidatorOptions } from "./types";
2
+ import { StepValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Step Validator
5
5
  *
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TypeValidator = void 0;
13
- const Validator_1 = require("./Validator");
14
- const constants_1 = require("./constants");
15
- const decorators_1 = require("./decorators");
16
- const Validation_1 = require("../Validation");
17
- const constants_2 = require("../../utils/constants");
13
+ const Validator_1 = require("./Validator.cjs");
14
+ const constants_1 = require("./constants.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
+ const Validation_1 = require("../Validation.cjs");
17
+ const constants_2 = require("../../utils/constants.cjs");
18
18
  const reflection_1 = require("@decaf-ts/reflection");
19
19
  /**
20
20
  * @summary Required Validator
@@ -1,5 +1,5 @@
1
1
  import { Validator } from "./Validator";
2
- import { TypeValidatorOptions } from "./types";
2
+ import { TypeValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary Required Validator
5
5
  *
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.URLValidator = void 0;
13
- const constants_1 = require("./constants");
14
- const PatternValidator_1 = require("./PatternValidator");
15
- const decorators_1 = require("./decorators");
13
+ const constants_1 = require("./constants.cjs");
14
+ const PatternValidator_1 = require("./PatternValidator.cjs");
15
+ const decorators_1 = require("./decorators.cjs");
16
16
  /**
17
17
  * @summary URL Validator
18
18
  * @description Pattern from {@link https://gist.github.com/dperini/729294}
@@ -1,5 +1,5 @@
1
1
  import { PatternValidator } from "./PatternValidator";
2
- import { PatternValidatorOptions } from "./types";
2
+ import { PatternValidatorOptions } from "../types";
3
3
  /**
4
4
  * @summary URL Validator
5
5
  * @description Pattern from {@link https://gist.github.com/dperini/729294}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Validator = void 0;
4
- const constants_1 = require("./constants");
5
- const strings_1 = require("../../utils/strings");
4
+ const constants_1 = require("./constants.cjs");
5
+ const strings_1 = require("../../utils/strings.cjs");
6
6
  const reflection_1 = require("@decaf-ts/reflection");
7
7
  /**
8
8
  * @summary Base Implementation for Validators
@@ -1,4 +1,4 @@
1
- import { ValidatorOptions } from "./types";
1
+ import { ValidatorOptions } from "../types";
2
2
  /**
3
3
  * @summary Base Implementation for Validators
4
4
  * @description Provides the underlying functionality for {@link Validator}s
@@ -1,5 +1,5 @@
1
- import { ValidatorDefinition } from "./types";
2
- import { IValidatorRegistry } from "./types";
1
+ import { ValidatorDefinition } from "../types";
2
+ import { IValidatorRegistry } from "../types";
3
3
  import type { Validator } from "./Validator";
4
4
  /**
5
5
  * @summary Duck typing for Validators
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_PATTERNS = exports.DEFAULT_ERROR_MESSAGES = exports.DAYS_OF_WEEK_NAMES = exports.MONTH_NAMES = exports.ValidationKeys = void 0;
4
- const constants_1 = require("../../utils/constants");
4
+ const constants_1 = require("../../utils/constants.cjs");
5
5
  /**
6
6
  * @summary The keys used for validation
7
7
  *
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validator = validator;
4
- const Validation_1 = require("../Validation");
5
- const constants_1 = require("./constants");
4
+ const Validation_1 = require("../Validation.cjs");
5
+ const constants_1 = require("./constants.cjs");
6
6
  const reflection_1 = require("@decaf-ts/reflection");
7
7
  /**
8
8
  * @summary Marks the class as a validator for a certain key.
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Validators = void 0;
18
+ const DateValidator_1 = require("./DateValidator.cjs");
19
+ const TypeValidator_1 = require("./TypeValidator.cjs");
20
+ const PasswordValidator_1 = require("./PasswordValidator.cjs");
21
+ const StepValidator_1 = require("./StepValidator.cjs");
22
+ const URLValidator_1 = require("./URLValidator.cjs");
23
+ const PatternValidator_1 = require("./PatternValidator.cjs");
24
+ const MinValidator_1 = require("./MinValidator.cjs");
25
+ const MinLengthValidator_1 = require("./MinLengthValidator.cjs");
26
+ const MaxValidator_1 = require("./MaxValidator.cjs");
27
+ const MaxLengthValidator_1 = require("./MaxLengthValidator.cjs");
28
+ const RequiredValidator_1 = require("./RequiredValidator.cjs");
29
+ const EmailValidator_1 = require("./EmailValidator.cjs");
30
+ const ListValidator_1 = require("./ListValidator.cjs");
31
+ __exportStar(require("./constants.cjs"), exports);
32
+ __exportStar(require("./DateValidator.cjs"), exports);
33
+ __exportStar(require("./decorators.cjs"), exports);
34
+ __exportStar(require("./EmailValidator.cjs"), exports);
35
+ __exportStar(require("./ListValidator.cjs"), exports);
36
+ __exportStar(require("./MaxLengthValidator.cjs"), exports);
37
+ __exportStar(require("./MaxValidator.cjs"), exports);
38
+ __exportStar(require("./MinLengthValidator.cjs"), exports);
39
+ __exportStar(require("./MinValidator.cjs"), exports);
40
+ __exportStar(require("./PasswordValidator.cjs"), exports);
41
+ __exportStar(require("./PatternValidator.cjs"), exports);
42
+ __exportStar(require("./RequiredValidator.cjs"), exports);
43
+ __exportStar(require("./StepValidator.cjs"), exports);
44
+ __exportStar(require("./TypeValidator.cjs"), exports);
45
+ __exportStar(require("./URLValidator.cjs"), exports);
46
+ __exportStar(require("./Validator.cjs"), exports);
47
+ __exportStar(require("./ValidatorRegistry.cjs"), exports);
48
+ /**
49
+ * @summary constant holding all {@link Validator}s
50
+ * @constant Validators
51
+ * @memberOf module:decorator-validation.Validation.Validators
52
+ * @category Validation
53
+ */
54
+ exports.Validators = {
55
+ DateValidator: DateValidator_1.DateValidator,
56
+ EmailValidator: EmailValidator_1.EmailValidator,
57
+ ListValidator: ListValidator_1.ListValidator,
58
+ MaxLengthValidator: MaxLengthValidator_1.MaxLengthValidator,
59
+ MaxValidator: MaxValidator_1.MaxValidator,
60
+ MinLengthValidator: MinLengthValidator_1.MinLengthValidator,
61
+ MinValidator: MinValidator_1.MinValidator,
62
+ PasswordValidator: PasswordValidator_1.PasswordValidator,
63
+ PatternValidator: PatternValidator_1.PatternValidator,
64
+ RequiredValidator: RequiredValidator_1.RequiredValidator,
65
+ StepValidator: StepValidator_1.StepValidator,
66
+ TypeValidator: TypeValidator_1.TypeValidator,
67
+ URLValidator: URLValidator_1.URLValidator,
68
+ };
@@ -15,11 +15,11 @@ exports.password = password;
15
15
  exports.list = list;
16
16
  exports.set = set;
17
17
  require("reflect-metadata");
18
- const constants_1 = require("./Validators/constants");
19
- const strings_1 = require("../utils/strings");
20
- const dates_1 = require("../utils/dates");
21
- const decorators_1 = require("../utils/decorators");
22
- const Validation_1 = require("./Validation");
18
+ const constants_1 = require("./Validators/constants.cjs");
19
+ const strings_1 = require("../utils/strings.cjs");
20
+ const dates_1 = require("../utils/dates.cjs");
21
+ const decorators_1 = require("../utils/decorators.cjs");
22
+ const Validation_1 = require("./Validation.cjs");
23
23
  /**
24
24
  * @summary Marks the property as required.
25
25
  * @description Validators to validate a decorated property must use key {@link ValidationKeys#REQUIRED}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Validators"), exports);
18
- __exportStar(require("./decorators"), exports);
19
- __exportStar(require("./types"), exports);
20
- __exportStar(require("./Validation"), exports);
17
+ __exportStar(require("./Validators/index.cjs"), exports);
18
+ __exportStar(require("./decorators.cjs"), exports);
19
+ __exportStar(require("./types.cjs"), exports);
20
+ __exportStar(require("./Validation.cjs"), exports);
@@ -1,4 +1,7 @@
1
1
  import { DecoratorMetadata } from "@decaf-ts/reflection";
2
+ import { Constructor } from "../model";
3
+ import { Validator } from "./Validators";
4
+ import { IRegistry } from "../utils";
2
5
  /**
3
6
  * @summary Type for validation decorator metadata
4
7
  * @memberOf module:decorator-validation.Reflection
@@ -44,3 +47,88 @@ export type ValidationElementDefinition = {
44
47
  * @category Validation
45
48
  */
46
49
  export type ModelErrors = Record<string, Record<string, string | undefined>>;
50
+ /**
51
+ * @summary Util type for {@link Validator} configuration
52
+ * @memberOf module:decorator-validation.Validation
53
+ * @category Validation
54
+ */
55
+ export type ValidatorDefinition = {
56
+ validator: Constructor<Validator>;
57
+ validationKey: string;
58
+ save: boolean;
59
+ };
60
+ /**
61
+ * @summary Base API for a {@link Validator} registry
62
+ *
63
+ * @interface ValidatorRegistry
64
+ * @extends IRegistry
65
+ *
66
+ * @category Validation
67
+ */
68
+ export interface IValidatorRegistry<T extends Validator> extends IRegistry<T> {
69
+ /**
70
+ * @summary retrieves the custom keys
71
+ * @method
72
+ */
73
+ getCustomKeys(): Record<string, string>;
74
+ /**
75
+ * @summary Retrieves the Registered validator keys
76
+ * @return {string[]} the registered validators keys
77
+ * @method
78
+ */
79
+ getKeys(): string[];
80
+ /**
81
+ * @summary Registers the provided validators onto the registry
82
+ *
83
+ * @typedef T extends Validator
84
+ * @param {T[] | ValidatorDefinition[]} validator
85
+ * @method
86
+ */
87
+ register<T extends Validator>(...validator: (T | ValidatorDefinition)[]): void;
88
+ /**
89
+ * @summary Retrieves the Validator constructor if registered
90
+ *
91
+ * @typedef T extends Validator
92
+ * @param {string} key one of the {@link ValidationKeys}
93
+ * @return {Validator | undefined} the registered Validator or undefined if there is nono matching the provided key
94
+ * @method
95
+ */
96
+ get<T extends Validator>(key: string): T | undefined;
97
+ }
98
+ export type ValidatorOptions = {
99
+ message?: string;
100
+ };
101
+ export interface URLValidatorOptions extends ValidatorOptions {
102
+ types: string | string[] | {
103
+ name: string;
104
+ };
105
+ }
106
+ export interface TypeValidatorOptions extends ValidatorOptions {
107
+ types: string | string[] | {
108
+ name: string;
109
+ };
110
+ }
111
+ export interface StepValidatorOptions extends ValidatorOptions {
112
+ step: number | string;
113
+ }
114
+ export interface PatternValidatorOptions extends ValidatorOptions {
115
+ pattern?: RegExp | string;
116
+ }
117
+ export interface MinValidatorOptions extends ValidatorOptions {
118
+ min: number | Date | string;
119
+ }
120
+ export interface MinLengthValidatorOptions extends ValidatorOptions {
121
+ minLength: number;
122
+ }
123
+ export interface MaxValidatorOptions extends ValidatorOptions {
124
+ max: number | Date | string;
125
+ }
126
+ export interface MaxLengthValidatorOptions extends ValidatorOptions {
127
+ maxLength: number;
128
+ }
129
+ export interface ListValidatorOptions extends ValidatorOptions {
130
+ clazz: string[];
131
+ }
132
+ export interface DateValidatorOptions extends ValidatorOptions {
133
+ format?: string;
134
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/decorator-validation",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "simple decorator based validation engine",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- /*! For license information please see decorator-validation.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("decorator-validation",[],t):"object"==typeof exports?exports["decorator-validation"]=t():e["decorator-validation"]=t()}(this,(()=>{return e={6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.ModelRegistryManager=void 0,t.isModel=y,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;g.register(t,e.name)}))};const n=r(735),o=r(32),a=r(192),i=r(523),s=r(710),c=r(154),u=r(772),l=r(593),f=r(402);let d,p;function y(e){try{return e instanceof g||!!g.getMetadata(e)}catch(e){return!1}}class h{constructor(e=y){this.cache={},this.testFunction=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||g.getMetadata(e);if(!(r in this.cache))throw new Error((0,l.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}t.ModelRegistryManager=h;class g{constructor(e){}hasErrors(...e){return(0,a.validate)(this,...e)}equals(e,...t){return(0,o.isEqual)(this,e,...t)}serialize(){return g.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}hash(){return g.hash(this)}static deserialize(e){const t=Reflect.getMetadata(g.key(c.ModelKeys.SERIALIZATION),this.constructor);return t&&t.serializer?n.Serialization.deserialize(e,t.serializer,...t.args||[]):n.Serialization.deserialize(e)}static fromObject(e,t){t||(t={});for(const r of g.getAttributes(e))e[r]=t[r]||void 0;return e}static fromModel(e,t){let r,n;t||(t={});const a=g.getAttributes(e);for(const i of a){if(e[i]=t[i]||void 0,"object"!=typeof e[i])continue;const a=(0,s.isPropertyModel)(e,i);if(a){try{e[i]=g.build(e[i],"string"==typeof a?a:void 0)}catch(e){console.log(e)}continue}const d=o.Reflection.getPropertyDecorators(u.ValidationKeys.REFLECT,e,i).decorators;if(r=d.filter((e=>-1!==[c.ModelKeys.TYPE,u.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,l.sf)("failed to find decorators for property {0}",i));n=r.pop();const p=n.props.name?[n.props.name]:Array.isArray(n.props.customTypes)?n.props.customTypes:[n.props.customTypes],y=Object.values(f.ReservedModels).map((e=>e.toLowerCase()));p.forEach((t=>{if(-1===y.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===u.ValidationKeys.LIST));if(r){const n=r.props.clazz.find((e=>!f.jsTypes.includes(e.toLowerCase())));if("Array"===t&&(e[i]=e[i].map((e=>["object","function"].includes(typeof e)&&n?g.build(e,n):e))),"Set"===t){const t=new Set;for(const r of e[i])["object","function"].includes(typeof r)&&n?t.add(g.build(r,n)):t.add(r);e[i]=t}}}break;default:e[i]&&(e[i]=g.build(e[i],t))}}catch(e){console.log(e)}}))}return e}static setBuilder(e){d=e}static getBuilder(){return d}static getRegistry(){return p||(p=new h),p}static setRegistry(e){p=e}static register(e,t){return g.getRegistry().register(e,t)}static get(e){return g.getRegistry().get(e)}static build(e={},t){return g.getRegistry().build(e,t)}static getMetadata(e){const t=Reflect.getMetadata(g.key(c.ModelKeys.MODEL),e.constructor);if(!t)throw new Error("could not find metadata for provided "+e.constructor.name);return t}static getAttributes(e){const t=[];let r=e instanceof g?Object.getPrototypeOf(e):e.prototype;for(;null!=r;){const e=r[c.ModelKeys.ATTRIBUTE];e&&t.push(...e),r=Object.getPrototypeOf(r)}return t}static equals(e,t,...r){return(0,o.isEqual)(e,t,...r)}static hasErrors(e,...t){return(0,a.validate)(e,...t)}static serialize(e){const t=Reflect.getMetadata(g.key(c.ModelKeys.SERIALIZATION),e.constructor);return t&&t.serializer?n.Serialization.serialize(this,t.serializer,...t.args||[]):n.Serialization.serialize(e)}static hash(e){const t=Reflect.getMetadata(g.key(c.ModelKeys.HASHING),e.constructor);return t&&t.algorithm?i.Hashing.hash(e,t.algorithm,...t.args||[]):i.Hashing.hash(e)}static key(e){return c.ModelKeys.REFLECT+e}}t.Model=g},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>Object.prototype.hasOwnProperty.call(e,t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},32:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,o(r(267),t),o(r(530),t),o(r(651),t),o(r(163),t),o(r(199),t),t.VERSION="0.3.25"},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)},t.findLastProtoBeforeObject=function(e){let t=Object.getPrototypeOf(e);if(t===Object.prototype)return e;for(;t!==Object.prototype;){if(t=Object.getPrototypeOf(t),t===Object.prototype)return t;if(Object.getPrototypeOf(t)===Object.prototype)return t}throw new Error("Could not find proper prototype")},t.bindModelPrototype=function(e){if(e instanceof n.Model)return;function t(e,t){Object.setPrototypeOf(e,t)}const r=Object.getPrototypeOf(e);if(r===Object.prototype)return t(e,n.Model.prototype);for(;r!==Object.prototype;){const e=Object.getPrototypeOf(r);if(e===Object.prototype||Object.getPrototypeOf(e)===Object.prototype)return t(r,n.Model.prototype)}throw new Error("Could not find proper prototype to bind")};const n=r(6)},46:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=a,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=a(u(t,e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=a(t,e);else if("number"==typeof t)r=a(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=a(u(new Date(t),e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),o=r(593);function a(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const o=new RegExp(r,"g").exec(e);if(!o||!o.groups)return new Date(e);const a=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=a(o.groups.year),s=a(o.groups.day),c=o.groups.ampm;let u=a(o.groups.hour);c&&(u="PM"===c?u+12:u);const l=a(o.groups.minutes),f=a(o.groups.seconds),d=a(o.groups.milis),p=o.groups.monthname,y=o.groups.monthnamesmall;let h=o.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=a(`${h}`);return new Date(i,h-1,s,u,l,f,d)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),o=e.getMonth(),a=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),f=i%12,d=c(f),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),_=c(r),m=o+1,b=c(m),M=n.MONTH_NAMES[o],O=M.substr(0,3),R=a+"",S=R.substr(2,2);return(t=t.replace("hh",d).replace("h",f.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",_).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",M).replace("MMM",O):t.replace("MM",b).replace("M",m.toString())}},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),a=r(32);t.Validator=class{constructor(e=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...t){this.message=e,t.length&&(this.acceptedTypes=t),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,o.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?a.Reflection.checkTypes(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="decaf.model.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__model",e.CONSTRUCTION="constructed-by",e.ATTRIBUTE="__attributes",e.HASHING="hashing",e.SERIALIZATION="serialization"}(r||(t.ModelKeys=r={}))},163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reflection=void 0;const n=r(267),o=r(651);class a{constructor(){}static checkType(e,t){return typeof e===t.toLowerCase()||void 0!==e&&"object"==typeof e&&e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}static checkTypes(e,t){return!t.every((t=>!this.checkType(e,t)))}static evaluateDesignTypes(e,t){switch(typeof t){case"string":return this.checkType(e,t);case"object":return!Array.isArray(t)||a.checkTypes(e,t);case"function":return!t.name||"Object"===t.name||this.checkType(e,t.name);default:return!0}}static getAllProperties(e,t=!0,r="Object"){const n=new Set;let o=e;const a=function(){if(!t)return;const e=Object.getPrototypeOf(o);return e&&e.constructor.name!==r?(o=e,o):void 0};do{Object.getOwnPropertyNames(o).forEach((e=>n.add(e)))}while(a());return Array.from(n)}static getClassDecorators(e,t){const r=Reflect.getOwnMetadataKeys(t.constructor),n=[];for(const o of r)o.startsWith(e)&&n.push({key:o.slice(e.length),props:Reflect.getMetadata(o,t.constructor)});return n}static getAllPropertyDecorators(e,...t){if(!t||0===t.length)return;const r={},n=Object.getOwnPropertyNames(e);for(const o of n)for(let n=0;n<t.length;n++){const i=a.getPropertyDecorators(t[n],e,o,0!==n);i.decorators.length>0&&(r[o]||(r[o]=[]),r[o].push(...i.decorators))}return Object.keys(r).length>0?r:void 0}static getTypeFromDecorator(e,t){const r=a.getPropertyDecorators(n.ReflectionKeys.TYPE,e,t,!1);if(!r||!r.decorators)return;const o=r.decorators.shift(),i=o.props?o.props.name:void 0;return"Function"!==i?i:void 0}static getPropertyDecorators(e,t,r,i=!1,s=!0,c){const u=function(e,t,r,o=!1,a){const i=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ReflectionKeys.TYPE||t.toString().startsWith(e))).reduce(((o,a)=>{const i={key:a!==n.ReflectionKeys.TYPE?a.substring(e.length):a,props:Reflect.getMetadata(a,t,r)};return o.concat(i)}),a||[]);return{prop:r.toString(),decorators:i}}(e,t,r,i,c);return s&&Object.getPrototypeOf(t)!==Object.prototype?a.getPropertyDecorators(e,Object.getPrototypeOf(t.constructor),r,!0,s,u.decorators):{prop:u.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log(`Found a similar decorator for the ${e.key} propertyof a ${t.constructor.name} model but with different attributes.The original one will be kept`),!1):(r[e.key.toString()]=e.props,!0)))}(u.decorators)}}}t.Reflection=a},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},169:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t){if(void 0!==e)return e.length>t.maxLength?this.getMessage(t.message||this.message,t.maxLength):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),o("design:paramtypes",[String])],c)},192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,...t){const r=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&r.push(o.Reflection.getPropertyDecorators(l.ValidationKeys.REFLECT,e,n));let f;for(const t of r){const{prop:r,decorators:n}=t;if(!n||!n.length)continue;const o=n[0];let i;n.find((e=>e.key===l.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===o.props.name))))&&n.shift();for(const t of n){const n=u.Validation.get(t.key);if(!n)throw new Error(`Missing validator for ${t.key}`);const o=t.key===a.ModelKeys.TYPE?[t.props]:t.props||{},s=n.hasErrors(e[r.toString()],o);s&&(i=i||{},i[t.key]=s)}i&&(f=f||{},f[t.prop.toString()]=i)}for(const t of Object.keys(e).filter((e=>!f||!f[e]))){let r;const n=o.Reflection.getPropertyDecorators(l.ValidationKeys.REFLECT,e,t).decorators,u=o.Reflection.getPropertyDecorators(l.ValidationKeys.REFLECT,e,t).decorators.filter((e=>-1!==[a.ModelKeys.TYPE,l.ValidationKeys.TYPE].indexOf(e.key)));if(!u||!u.length)continue;const d=u.pop(),p=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],y=Object.values(s.ReservedModels).map((e=>e.toLowerCase()));for(const o of p){if(-1===y.indexOf(o.toLowerCase())){const a=Array.isArray(e[t])?l.ValidationKeys.LIST:l.ValidationKeys.TYPE,s=n.find((e=>e.key===a))||{};let u=[];if(s&&s.props){const r=Array.isArray(e[t])?s.props.class:s.props.customTypes;r&&(u=Array.isArray(r)?r.map((e=>`${e}`.toLowerCase())):[r.toLowerCase()])}const f=(e,t)=>{if("object"==typeof t||"function"==typeof t)return(0,c.isModel)(t)?t.hasErrors():u.includes(typeof t)?void 0:"Value has no validatable type"};switch(o){case Array.name:case Set.name:n.length&&n.find((e=>e.key===l.ValidationKeys.LIST))&&(r=(o===Array.name?e[t]:e[t].values()).map((e=>f(t,e))).filter((e=>!!e)),r?.length||(r=void 0));break;default:try{e[t]&&(r=f(t,e[t]))}catch(e){console.warn((0,i.sf)("Model should be validatable but its not: "+e))}}}r&&(f=f||{},f[t]=r)}}return f?new n.ModelErrorDefinition(f):void 0};const n=r(19),o=r(32),a=r(154),i=r(593),s=r(402),c=r(6),u=r(770),l=r(772)},199:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prop=a,t.propMetadata=function(e,t){return(0,n.apply)(a(),(0,n.metadata)(e,t))};const n=r(32),o=r(154);function a(e=o.ModelKeys.ATTRIBUTE){return(t,r)=>{let n;n=Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=[],n.includes(r)||n.push(r)}}},267:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReflectionKeys=void 0,function(e){e.TYPE="design:type"}(r||(t.ReflectionKeys=r={}))},273:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const a=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t){if(!e)return;let{pattern:r}=t;if(!r)throw new Error("Missing Pattern");return r="string"==typeof r?this.getPattern(r):r,r.lastIndex=0,r.test(e)?void 0:this.getMessage(t.message||this.message)}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),o("design:paramtypes",[String])],c)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},335:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.EMAIL){super(e)}hasErrors(e,t={}){return super.hasErrors(e,{...t,pattern:t?.pattern||a.DEFAULT_PATTERNS.EMAIL})}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(a.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},354:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const a=r(273),i=r(772),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD){super(e)}hasErrors(e,t={}){return super.hasErrors(e,{...t,message:t.message||this.message})}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),o("design:paramtypes",[Object])],c)},375:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const a=r(116),i=r(772),s=r(787),c=r(770),u=r(154),l=r(32);let f=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(e)}hasErrors(e,t){if(void 0===e)return;const{types:r,message:n}=t;return l.Reflection.evaluateDesignTypes(e,r)?void 0:this.getMessage(n||this.message,"string"==typeof r?r:Array.isArray(r)?r.join(", "):r.name,typeof e)}};t.TypeValidator=f,t.TypeValidator=f=n([(0,s.validator)(i.ValidationKeys.TYPE),o("design:paramtypes",[String])],f),c.Validation.register({validator:f,validationKey:u.ModelKeys.TYPE,save:!1})},395:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(e,Number.name,Date.name,String.name)}hasErrors(e,t={}){if(void 0!==e&&("string"==typeof e&&(e=new Date(e)),Number.isNaN(e.getDate()))){const{message:e=""}=t;return this.getMessage(e||this.message)}}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),o("design:paramtypes",[String])],c)},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.jsTypes=t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={})),t.jsTypes=["string","array","number","boolean","symbol","function","object","undefined","null","bigint"]},407:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(e,Array.name,Set.name)}hasErrors(e,t){if(!e||(Array.isArray(e)?!e.length:!e.size))return;const r=Array.isArray(t.clazz)?t.clazz:[t.clazz];let n,o=!0;for(let t=0;t<(Array.isArray(e)?e.length:e.size);t++)switch(n=e[t],typeof n){case"object":case"function":o=r.includes(n.constructor?.name);break;default:o=r.some((e=>typeof n===e.toLowerCase()))}return o?void 0:this.getMessage(t.message||this.message,r)}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),o("design:paramtypes",[String])],c)},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyCache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyCache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const o={};o[t.toUpperCase()]=t,this.customKeyCache=Object.assign({},this.customKeyCache,o)}}))}}},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MIN),{min:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MAX),{max:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.STEP),{step:e,message:t,types:[Number.name]})},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MIN_LENGTH),{minLength:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MAX_LENGTH),{maxLength:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.PATTERN),{pattern:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.EMAIL),{pattern:n.DEFAULT_PATTERNS.EMAIL,message:e,types:[String.name]})},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.URL),{pattern:n.DEFAULT_PATTERNS.URL,message:e,types:[String.name]})},t.type=function(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.TYPE),{customTypes:e,message:t})},t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE){return(r,c)=>{(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]})(r,c);const u=new WeakMap;Object.defineProperty(r,c,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,c);r&&!r.configurable||Object.defineProperty(this,c,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=(0,a.parseDate)(e,t),u.set(this,r)}catch(e){console.error((0,o.sf)("Failed to parse date: {0}",e.message||e))}}}),this[c]=t},get(){console.log("here")}})}},t.password=function(e=n.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]})},t.list=c,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST){return c(e,"Set",t)},r(630);const n=r(772),o=r(593),a=r(46),i=r(253),s=r(770);function c(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.LIST),{clazz:Array.isArray(e)?e.map((e=>e.name)):[e.name],type:t,message:r})}},493:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const a=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),f=r(889),d=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);o(r(772),t),o(r(395),t),o(r(787),t),o(r(335),t),o(r(407),t),o(r(169),t),o(r(909),t),o(r(519),t),o(r(889),t),o(r(354),t),o(r(273),t),o(r(812),t),o(r(553),t),o(r(168),t),o(r(375),t),o(r(964),t),o(r(116),t),o(r(436),t),t.Validators={DateValidator:a.DateValidator,EmailValidator:g.EmailValidator,ListValidator:v.ListValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:d.MinLengthValidator,MinValidator:f.MinValidator,PasswordValidator:s.PasswordValidator,PatternValidator:l.PatternValidator,RequiredValidator:h.RequiredValidator,StepValidator:c.StepValidator,TypeValidator:i.TypeValidator,URLValidator:u.URLValidator}},519:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t){if(void 0!==e)return e.length<t.minLength?this.getMessage(t.message||this.message,t.minLength):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),o("design:paramtypes",[String])],c)},523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hashing=t.DefaultHashingMethod=void 0,t.hashCode=o,t.hashSerialization=function(e){return o(n.Serialization.serialize(e))},t.hashObj=a;const n=r(735);function o(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t.toString()}function a(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=o,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return("number"==typeof a?Math.abs(a):a).toString()}t.DefaultHashingMethod="default";class i{static{this.current=t.DefaultHashingMethod}static{this.cache={default:a}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No hashing method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Hashing method ${e} already registered`);this.cache[e]=t,r&&(this.current=e)}static hash(e,t,...r){return t?this.get(t)(e,...r):this.get(this.current)(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Hashing=i},530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,o)=>{o?Reflect.defineMetadata(e,t,o.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},t.apply=function(...e){return(t,r,n)=>{for(const o of e)t instanceof Function&&!n?o(t):o(t,r,n)}},r(630)},553:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(e,"number","string")}hasErrors(e,t){if(void 0!==e)return Number(e)%Number(t.step)!=0?this.getMessage(t.message||this.message,t.step):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),o("design:paramtypes",[String])],c)},593:(e,t)=>{"use strict";function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r].toString():"undefined"}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},630:()=>{var e;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),r=n(e);function n(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(r=n(t.Reflect,r)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),f="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,N(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!N(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(N(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}(),d="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new f}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function o(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):a(t,e),t}return a(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,o;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,o=e.getOwnMetadataKeys,a=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!o(e,t).length&&(S(r)&&(r=new d,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:a}}(t.Reflect));var a=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===o&&(o=new d),o.add(t)}}function c(t,a){if(!S(r)){if(r.isProviderFor(t,a))return r;if(!S(n)){if(n.isProviderFor(t,a))return r;if(!S(o))for(var i=K(o);;){var s=I(i);if(!s)return;var c=x(s);if(c.isProviderFor(t,a))return z(i),c}}}if(!S(e)&&e.isProviderFor(t,a))return e}function u(e,t){var r,n=a.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new f,a.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(o)&&o.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var o=a.get(e);S(o)&&(o=new f,a.set(e,o)),o.set(t,r)}return!0}}()),!S(y)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,o){n(r,o,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var o=n(t,r,!1);return!S(o)&&A(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(S(o))return r;for(var a=K(o.keys()),i=0;;){var s=I(a);if(!s)return r.length=i,r;var c=x(s);try{r[i]=c}catch(e){try{z(a)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,o){var a=n(r,o,!1);if(S(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var i=t.get(r);S(i)||(i.delete(o),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,o,a){var i=t.get(n),s=!1;if(S(i)){if(!a)return;i=new f,t.set(n,i),s=!0}var c=i.get(o);if(S(c)){if(!a)return;if(c=new f,i.set(o,c),!e.setProvider(n,o,r))throw i.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=F(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=U(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function _(e,t,r){if(E(e,t,r))return m(e,t,r);var n=F(t);return w(n)?void 0:_(e,n,r)}function m(e,t,r){var n=U(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function b(e,t,r,n){U(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function M(e,t){var r=O(e,t),n=F(e);if(null===n)return r;var o=M(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new d,i=[],s=0,c=r;s<c.length;s++){var u=c[s];a.has(u)||(a.add(u),i.push(u))}for(var l=0,f=o;l<f.length;l++)u=f[l],a.has(u)||(a.add(u),i.push(u));return i}function O(e,t){var r=U(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function P(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=k(e,o);if(void 0!==n){var a=n.call(e,r);if(T(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!T(o=r.call(e)))return o;if(D(n=e.valueOf)&&!T(o=n.call(e)))return o}else{var n;if(D(n=e.valueOf)&&!T(o=n.call(e)))return o;var o,a=e.toString;if(D(a)&&!T(o=a.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=P(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function N(e,t){return e===t||e!=e&&t!=t}function k(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function K(e){var t=k(e,a);if(!D(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function x(e){return e.value}function I(e){var t=e.next();return!t.done&&t}function z(e){var t=e.return;t&&t.call(e)}function F(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var o=n.constructor;return"function"!=typeof o||o===e?t:o}function U(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!T(t))throw new TypeError;if(!T(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var a=(0,e[o])(t,r,n);if(!S(a)&&!w(a)){if(!T(a))throw new TypeError;n=a}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;b(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return S(n)||(n=j(n)),b(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),m(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return S(t)||(t=j(t)),M(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return S(t)||(t=j(t)),O(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(S(r)||(r=j(r)),!T(t))throw new TypeError;S(r)||(r=j(r));var n=U(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(r,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))},651:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return 0!==t||1/t==1/r;if(null==t||null==r)return t===r;if(typeof t!=typeof r)return!1;if(Number.isNaN(t)&&Number.isNaN(r))return!0;if("object"!=typeof t)return t===r;if(t instanceof Date&&r instanceof Date)return!(!isNaN(t.getTime())||!isNaN(r.getTime()))||t.getTime()===r.getTime();if(t instanceof RegExp&&r instanceof RegExp)return t.toString()===r.toString();if(t instanceof Error&&r instanceof Error)return t.name===r.name&&t.message===r.message;if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(!e(t[o],r[o],...n))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(const[o,a]of t)if(!r.has(o)||!e(a,r.get(o),...n))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const e of t)if(!r.has(e))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(t.byteLength!==r.byteLength)return!1;if(t.byteOffset!==r.byteOffset)return!1;if(t.buffer.byteLength!==r.buffer.byteLength)return!1;const e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}const o=Object.keys(t).filter((e=>!n.includes(e))),a=Object.keys(r).filter((e=>!n.includes(e)));if(o.length!==a.length)return!1;for(const i of o){if(!a.includes(i))return!1;if(!e(t[i],r[i],...n))return!1}const i=Object.getOwnPropertySymbols(t).filter((e=>!n.includes(e.toString()))),s=Object.getOwnPropertySymbols(r).filter((e=>!n.includes(e.toString())));if(i.length!==s.length)return!1;for(const o of i){if(!s.includes(o))return!1;if(!e(t[o],r[o],...n))return!1}return Object.getPrototypeOf(t)===Object.getPrototypeOf(r)}},710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPropertyModel=function(e,t){if((0,o.isModel)(e[t]))return!0;const r=Reflect.getMetadata(n.ModelKeys.TYPE,e,t);return o.Model.get(r.name)?r.name:void 0};const n=r(154),o=r(6)},729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,o(r(935),t),o(r(965),t),o(r(847),t),t.VERSION="1.5.7"},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Serialization=t.DefaultSerializationMethod=t.JSONSerializer=void 0;const n=r(6),o=r(154);class a{preSerialize(e){const t=Object.assign({},e),r=n.Model.getMetadata(e);return t[o.ModelKeys.ANCHOR]=r||e.constructor.name,t}deserialize(e){const t=JSON.parse(e),r=t[o.ModelKeys.ANCHOR];if(!r)throw new Error("Could not find class reference in serialized model");return n.Model.build(t,r)}serialize(e){return JSON.stringify(this.preSerialize(e))}}t.JSONSerializer=a,t.DefaultSerializationMethod="json";class i{static{this.current=t.DefaultSerializationMethod}static{this.cache={json:new a}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No serialization method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Serialization method ${e} already registered`);this.cache[e]=new t,r&&(this.current=e)}static serialize(e,t,...r){return t?this.get(t).serialize(e,...r):this.get(this.current).serialize(e,...r)}static deserialize(e,t,...r){return t?this.get(t).deserialize(e,...r):this.get(this.current).deserialize(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Serialization=i},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(436),o=r(772);class a{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&a.actingValidatorRegistry&&a.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),a.actingValidatorRegistry=e}static getRegistry(){return a.actingValidatorRegistry||(a.actingValidatorRegistry=new n.ValidatorRegistry),a.actingValidatorRegistry}static get(e){return a.getRegistry().get(e)}static register(...e){return a.getRegistry().register(...e)}static key(e){return o.ValidationKeys.REFLECT+e}static keys(){return this.getRegistry().getKeys()}}t.Validation=a},772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0;const n=r(154);t.ValidationKeys={REFLECT:`${n.ModelKeys.REFLECT}validation.`,VALIDATOR:"validator",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(...e){return(0,a.apply)((t=>(e.forEach((e=>{n.Validation.register({validator:t,validationKey:e,save:!0})})),t)),(0,a.metadata)(n.Validation.key(o.ValidationKeys.VALIDATOR),e))};const n=r(770),o=r(772),a=r(32)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},812:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(e)}hasErrors(e,t={}){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t.message||this.message):void 0;default:return e?void 0:this.getMessage(t.message||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),o("design:paramtypes",[String])],c)},847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(402),t),o(r(38),t),o(r(893),t),o(r(6),t),o(r(19),t),o(r(282),t),o(r(710),t),o(r(192),t)},889:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(e,"number","Date","string")}hasErrors(e,t){if(void 0===e)return;let{min:r}=t;if(e instanceof Date&&!(r instanceof Date)&&(r=new Date(r),Number.isNaN(r.getDate())))throw new Error("Invalid Min param defined");return e<r?this.getMessage(t.message||this.message,r):void 0}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),o("design:paramtypes",[String])],c)},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.model=function(e){return t=>{const r=function(...r){const s=(0,n.construct)(t,...r);(0,n.bindModelPrototype)(s);const c=a.Model.getBuilder();return c&&c(s,r.length?r[0]:void 0),(0,i.metadata)(a.Model.key(o.ModelKeys.MODEL),t.name)(s.constructor),e&&e(s,...r),s};return r.prototype=t.prototype,Object.defineProperty(r,"name",{writable:!1,enumerable:!0,configurable:!1,value:t.prototype.constructor.name}),(0,i.metadata)(a.Model.key(o.ModelKeys.MODEL),t.name)(t),a.Model.register(r,t.name),r}},t.hashedBy=function(e,...t){return(0,i.metadata)(a.Model.key(o.ModelKeys.HASHING),{algorithm:e,args:t})},t.serializedBy=function(e,...t){return(0,i.metadata)(a.Model.key(o.ModelKeys.SERIALIZATION),{serializer:e,args:t})};const n=r(38),o=r(154),a=r(6),i=r(32)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(e,"number","Date","string")}hasErrors(e,t){if(void 0===e)return;let{max:r}=t;if(e instanceof Date&&!(r instanceof Date)&&(r=new Date(r),Number.isNaN(r.getDate())))throw new Error("Invalid Max param defined");return e>r?this.getMessage(t.message||this.message,r):void 0}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),o("design:paramtypes",[String])],c)},935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(154),t),o(r(46),t),o(r(253),t),o(r(523),t),o(r(904),t),o(r(735),t),o(r(593),t)},964:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.URL){super(e)}hasErrors(e,t={}){return super.hasErrors(e,{...t,pattern:t.pattern||a.DEFAULT_PATTERNS.URL})}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(a.ValidationKeys.URL),o("design:paramtypes",[String])],c)},965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(493),t),o(r(475),t),o(r(792),t),o(r(770),t)}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(729);var e,t}));