@decaf-ts/decorator-validation 1.0.7

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 (151) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +302 -0
  3. package/dist/decorator-validation.bundle.min.js +2 -0
  4. package/dist/decorator-validation.bundle.min.js.LICENSE.txt +14 -0
  5. package/dist/esm/decorator-validation.bundle.min.esm.js +2 -0
  6. package/dist/esm/decorator-validation.bundle.min.esm.js.LICENSE.txt +14 -0
  7. package/lib/esm/index.d.ts +61 -0
  8. package/lib/esm/index.js +1 -0
  9. package/lib/esm/model/Model.d.ts +160 -0
  10. package/lib/esm/model/Model.js +1 -0
  11. package/lib/esm/model/ModelErrorDefinition.d.ts +22 -0
  12. package/lib/esm/model/ModelErrorDefinition.js +3 -0
  13. package/lib/esm/model/Registry.d.ts +61 -0
  14. package/lib/esm/model/Registry.js +1 -0
  15. package/lib/esm/model/constants.d.ts +40 -0
  16. package/lib/esm/model/constants.js +1 -0
  17. package/lib/esm/model/construction.d.ts +45 -0
  18. package/lib/esm/model/construction.js +1 -0
  19. package/lib/esm/model/decorators.d.ts +33 -0
  20. package/lib/esm/model/decorators.js +1 -0
  21. package/lib/esm/model/index.d.ts +7 -0
  22. package/lib/esm/model/index.js +1 -0
  23. package/lib/esm/model/types.d.ts +67 -0
  24. package/lib/esm/model/types.js +0 -0
  25. package/lib/esm/utils/constants.d.ts +22 -0
  26. package/lib/esm/utils/constants.js +1 -0
  27. package/lib/esm/utils/general.d.ts +193 -0
  28. package/lib/esm/utils/general.js +1 -0
  29. package/lib/esm/utils/index.d.ts +4 -0
  30. package/lib/esm/utils/index.js +1 -0
  31. package/lib/esm/utils/registry.d.ts +68 -0
  32. package/lib/esm/utils/registry.js +0 -0
  33. package/lib/esm/utils/serialization.d.ts +65 -0
  34. package/lib/esm/utils/serialization.js +1 -0
  35. package/lib/esm/validation/Validation.d.ts +39 -0
  36. package/lib/esm/validation/Validation.js +1 -0
  37. package/lib/esm/validation/Validators/DateValidator.d.ts +29 -0
  38. package/lib/esm/validation/Validators/DateValidator.js +1 -0
  39. package/lib/esm/validation/Validators/EmailValidator.d.ts +29 -0
  40. package/lib/esm/validation/Validators/EmailValidator.js +1 -0
  41. package/lib/esm/validation/Validators/ListValidator.d.ts +29 -0
  42. package/lib/esm/validation/Validators/ListValidator.js +1 -0
  43. package/lib/esm/validation/Validators/MaxLengthValidator.d.ts +30 -0
  44. package/lib/esm/validation/Validators/MaxLengthValidator.js +1 -0
  45. package/lib/esm/validation/Validators/MaxValidator.d.ts +29 -0
  46. package/lib/esm/validation/Validators/MaxValidator.js +1 -0
  47. package/lib/esm/validation/Validators/MinLengthValidator.d.ts +30 -0
  48. package/lib/esm/validation/Validators/MinLengthValidator.js +1 -0
  49. package/lib/esm/validation/Validators/MinValidator.d.ts +29 -0
  50. package/lib/esm/validation/Validators/MinValidator.js +1 -0
  51. package/lib/esm/validation/Validators/PasswordValidator.d.ts +31 -0
  52. package/lib/esm/validation/Validators/PasswordValidator.js +1 -0
  53. package/lib/esm/validation/Validators/PatternValidator.d.ts +38 -0
  54. package/lib/esm/validation/Validators/PatternValidator.js +1 -0
  55. package/lib/esm/validation/Validators/RequiredValidator.d.ts +28 -0
  56. package/lib/esm/validation/Validators/RequiredValidator.js +1 -0
  57. package/lib/esm/validation/Validators/StepValidator.d.ts +29 -0
  58. package/lib/esm/validation/Validators/StepValidator.js +1 -0
  59. package/lib/esm/validation/Validators/TypeValidator.d.ts +28 -0
  60. package/lib/esm/validation/Validators/TypeValidator.js +1 -0
  61. package/lib/esm/validation/Validators/URLValidator.d.ts +28 -0
  62. package/lib/esm/validation/Validators/URLValidator.js +1 -0
  63. package/lib/esm/validation/Validators/Validator.d.ts +42 -0
  64. package/lib/esm/validation/Validators/Validator.js +1 -0
  65. package/lib/esm/validation/Validators/ValidatorRegistry.d.ts +47 -0
  66. package/lib/esm/validation/Validators/ValidatorRegistry.js +1 -0
  67. package/lib/esm/validation/Validators/constants.d.ts +91 -0
  68. package/lib/esm/validation/Validators/constants.js +1 -0
  69. package/lib/esm/validation/Validators/index.d.ts +50 -0
  70. package/lib/esm/validation/Validators/index.js +1 -0
  71. package/lib/esm/validation/Validators/types.d.ts +51 -0
  72. package/lib/esm/validation/Validators/types.js +0 -0
  73. package/lib/esm/validation/decorators.d.ts +263 -0
  74. package/lib/esm/validation/decorators.js +1 -0
  75. package/lib/esm/validation/index.d.ts +13 -0
  76. package/lib/esm/validation/index.js +1 -0
  77. package/lib/esm/validation/types.d.ts +53 -0
  78. package/lib/esm/validation/types.js +0 -0
  79. package/lib/index.cjs +1 -0
  80. package/lib/index.d.ts +61 -0
  81. package/lib/model/Model.cjs +1 -0
  82. package/lib/model/Model.d.ts +160 -0
  83. package/lib/model/ModelErrorDefinition.cjs +3 -0
  84. package/lib/model/ModelErrorDefinition.d.ts +22 -0
  85. package/lib/model/Registry.cjs +1 -0
  86. package/lib/model/Registry.d.ts +61 -0
  87. package/lib/model/constants.cjs +1 -0
  88. package/lib/model/constants.d.ts +40 -0
  89. package/lib/model/construction.cjs +1 -0
  90. package/lib/model/construction.d.ts +45 -0
  91. package/lib/model/decorators.cjs +1 -0
  92. package/lib/model/decorators.d.ts +33 -0
  93. package/lib/model/index.cjs +1 -0
  94. package/lib/model/index.d.ts +7 -0
  95. package/lib/model/types.cjs +1 -0
  96. package/lib/model/types.d.ts +67 -0
  97. package/lib/utils/constants.cjs +1 -0
  98. package/lib/utils/constants.d.ts +22 -0
  99. package/lib/utils/general.cjs +1 -0
  100. package/lib/utils/general.d.ts +193 -0
  101. package/lib/utils/index.cjs +1 -0
  102. package/lib/utils/index.d.ts +4 -0
  103. package/lib/utils/registry.cjs +1 -0
  104. package/lib/utils/registry.d.ts +68 -0
  105. package/lib/utils/serialization.cjs +1 -0
  106. package/lib/utils/serialization.d.ts +65 -0
  107. package/lib/validation/Validation.cjs +1 -0
  108. package/lib/validation/Validation.d.ts +39 -0
  109. package/lib/validation/Validators/DateValidator.cjs +1 -0
  110. package/lib/validation/Validators/DateValidator.d.ts +29 -0
  111. package/lib/validation/Validators/EmailValidator.cjs +1 -0
  112. package/lib/validation/Validators/EmailValidator.d.ts +29 -0
  113. package/lib/validation/Validators/ListValidator.cjs +1 -0
  114. package/lib/validation/Validators/ListValidator.d.ts +29 -0
  115. package/lib/validation/Validators/MaxLengthValidator.cjs +1 -0
  116. package/lib/validation/Validators/MaxLengthValidator.d.ts +30 -0
  117. package/lib/validation/Validators/MaxValidator.cjs +1 -0
  118. package/lib/validation/Validators/MaxValidator.d.ts +29 -0
  119. package/lib/validation/Validators/MinLengthValidator.cjs +1 -0
  120. package/lib/validation/Validators/MinLengthValidator.d.ts +30 -0
  121. package/lib/validation/Validators/MinValidator.cjs +1 -0
  122. package/lib/validation/Validators/MinValidator.d.ts +29 -0
  123. package/lib/validation/Validators/PasswordValidator.cjs +1 -0
  124. package/lib/validation/Validators/PasswordValidator.d.ts +31 -0
  125. package/lib/validation/Validators/PatternValidator.cjs +1 -0
  126. package/lib/validation/Validators/PatternValidator.d.ts +38 -0
  127. package/lib/validation/Validators/RequiredValidator.cjs +1 -0
  128. package/lib/validation/Validators/RequiredValidator.d.ts +28 -0
  129. package/lib/validation/Validators/StepValidator.cjs +1 -0
  130. package/lib/validation/Validators/StepValidator.d.ts +29 -0
  131. package/lib/validation/Validators/TypeValidator.cjs +1 -0
  132. package/lib/validation/Validators/TypeValidator.d.ts +28 -0
  133. package/lib/validation/Validators/URLValidator.cjs +1 -0
  134. package/lib/validation/Validators/URLValidator.d.ts +28 -0
  135. package/lib/validation/Validators/Validator.cjs +1 -0
  136. package/lib/validation/Validators/Validator.d.ts +42 -0
  137. package/lib/validation/Validators/ValidatorRegistry.cjs +1 -0
  138. package/lib/validation/Validators/ValidatorRegistry.d.ts +47 -0
  139. package/lib/validation/Validators/constants.cjs +1 -0
  140. package/lib/validation/Validators/constants.d.ts +91 -0
  141. package/lib/validation/Validators/index.cjs +1 -0
  142. package/lib/validation/Validators/index.d.ts +50 -0
  143. package/lib/validation/Validators/types.cjs +1 -0
  144. package/lib/validation/Validators/types.d.ts +51 -0
  145. package/lib/validation/decorators.cjs +1 -0
  146. package/lib/validation/decorators.d.ts +263 -0
  147. package/lib/validation/index.cjs +1 -0
  148. package/lib/validation/index.d.ts +13 -0
  149. package/lib/validation/types.cjs +1 -0
  150. package/lib/validation/types.d.ts +53 -0
  151. package/package.json +96 -0
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Tiago Venceslau
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,302 @@
1
+ ![Banner](./workdocs/assets/Banner.png)
2
+ ## Simple Model Validation Engine
3
+
4
+ ![Licence](https://img.shields.io/github/license/decaf-ts/decorator-validation.svg?style=plastic)
5
+ ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/decorator-validation?style=plastic)
6
+ ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/decorator-validation?style=plastic)
7
+ [![Tests](https://github.com/decaf-ts/decorator-validation/actions/workflows/jest-test.yaml/badge.svg)](http://www.pdmfc.com)
8
+ [![CodeQL](https://github.com/starnowski/posmulten/workflows/CodeQL/badge.svg)](https://github.com/decaf-ts/decorator-validation/actions?query=workflow%3ACodeQL)
9
+
10
+ ![Open Issues](https://img.shields.io/github/issues/decaf-ts/decorator-validation.svg)
11
+ ![Closed Issues](https://img.shields.io/github/issues-closed/decaf-ts/decorator-validation.svg)
12
+ ![Pull Requests](https://img.shields.io/github/issues-pr-closed/decaf-ts/decorator-validation.svg)
13
+ ![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
14
+
15
+ ![Line Coverage](workdocs/badges/badge-lines.svg)
16
+ ![Function Coverage](workdocs/badges/badge-functions.svg)
17
+ ![Statement Coverage](workdocs/badges/badge-statements.svg)
18
+ ![Branch Coverage](workdocs/badges/badge-branches.svg)
19
+
20
+
21
+ ![Forks](https://img.shields.io/github/forks/decaf-ts/decorator-validation.svg)
22
+ ![Stars](https://img.shields.io/github/stars/decaf-ts/decorator-validation.svg)
23
+ ![Watchers](https://img.shields.io/github/watchers/decaf-ts/decorator-validation.svg)
24
+
25
+ ![Node Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=Node&query=$.engines.node&colorB=blue)
26
+ ![NPM Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=NPM&query=$.engines.npm&colorB=purple)
27
+
28
+ ### Decorator based
29
+
30
+ Simple implementation of a Typescript decorator based validation system.
31
+
32
+ Meant to be easily extended, customized and integrated with the browser's input validation mechanisms
33
+
34
+ Provides access to common features in other languages:
35
+ - Model serialization/deserialization;
36
+ - Model Hashing;
37
+ - Model Equality;
38
+ - TODO: Model Deep Cloning
39
+ ### ***Initial Setup***
40
+
41
+ #### if you use github
42
+
43
+ create a new project using this one as a template.
44
+
45
+ clone it `git clone <project>` and navigate to the root folder `cd <project>`
46
+
47
+ #### If your project has private dependencies or publishes to private npm registries, create an `.npmrc` containing:
48
+
49
+ ```text
50
+ @<scope1>:registry=https://<ADDRESS>.com/api/v4/packages/npm/
51
+ @<scope2>:registry=https://<ADDRESS>.<DOMAIN>.com/api/v4/packages/npm/
52
+ //<ADDRESS>.<DOMAIN>.com/:_authToken=${TOKEN}
53
+ //<ADDRESS>.<DOMAIN>.com/api/v4/groups/<GROUP_ID>/packages/npm/:_authToken=${TOKEN}
54
+ //<ADDRESS>.<DOMAIN>.com/api/v4/projects/<PROJECT_ID>/packages/npm/:_authToken=${TOKEN}
55
+ ```
56
+
57
+ Changing:
58
+ - <ADDRESS> to `gitlab` or `github` (or other);
59
+ - <DOMAIN> to your domain if any (if you are using plain gitlab or github use empty and take care to remove the extra `.`);
60
+ - <GROUP_ID> to your project's group id (if any). otherwise remove this line
61
+ - <PROJECT_ID> to your project's id
62
+
63
+ and adding a `.token` file containing your access token to the private registries na repositories.
64
+
65
+ ### Installation
66
+
67
+ Run `npm install` (or `npm run do-install` if you have private dependencies and a `.token` file) to install the dependencies:
68
+
69
+ If this is the first time you are running this command it will also:
70
+ - update this repository's dependencies to their latest version;
71
+ - creates a `.token` file which you can leave empty unless you have private dependencies or publish to private registries
72
+ - delete this 'first run script' file and npm call from the `package.json`;
73
+ - try to commit the updated `package.json` and deleted files (having ssh access helps here);
74
+ ## Linting
75
+
76
+ This repo comes with eslint + prettier preconfigured to the default standards
77
+ ## Testing
78
+
79
+ Preconfigured Jest based testing:
80
+
81
+ - unit tests under the `tests/unit` folder;
82
+ - include a default bundle test (helps with circular dependencies and such);
83
+ - integration tests under the `tests/integration` folder;
84
+ - stores converage results under `workdocs/coverage`;
85
+ - publishes coverage result to docs;
86
+ - ignores `cli.ts` from coverage since that is an executable file;
87
+ - defines the coverage threshold in `jest.config.ts`;
88
+ ### Releases
89
+
90
+ This repository automates releases in the following manner:
91
+
92
+ - run `npm run release -- <major|minor|patch|version> <message>`:
93
+ - if arguments are missing you will be prompted for them;
94
+ - it will run `npm run prepare-release` npm script;
95
+ - it will commit all changes;
96
+ - it will push the new tag;
97
+
98
+ If publishing to a private repo's npm registry, make sure you add to your `package.json`:
99
+
100
+ ```json
101
+ {
102
+ "publishConfig": {
103
+ "<SCOPE>:registry": " https://<REGISTRY>/api/v4/projects/<PROJECT_ID>/packages/npm/"
104
+ }
105
+ }
106
+ ```
107
+
108
+ Where:
109
+
110
+ - `<SCOPE>` - Is the scope of your package;
111
+ - `<REGISTRY>` - your registry host;
112
+ - `<PROJECT_ID>` - you project ID number (easy to grab via UI in gitlab or by
113
+ running `$("meta[name=octolytics-dimension-repository_id]").getAttribute('content')` in the repository page in github)
114
+ ;
115
+
116
+ ### Publishing
117
+
118
+ Unless the `-no-ci` flag is passed in the commit message to the `npm run release` command, publishing will be handled
119
+ automatically by github/gitlab (triggered by the tag).
120
+
121
+ When the `-no-ci` flag is passed then you can:
122
+
123
+ - run `npm run publish`. This command assumes :
124
+ - you have previously run the `npm run release`;
125
+ - you have you publishing properly configured in `npmrc` and `package.json`;
126
+ - The token for any special access required is stored in the `.token` file;
127
+
128
+ ## Continuous Integration/Deployment
129
+
130
+ While the implementationfor gitlab and github are not perfectly matched, they are perfectly usable.
131
+
132
+ The template comes with ci/cd for :
133
+ - gitlab (with caching for performance):
134
+ - stages:
135
+ - dependencies: Installs dependencies (on `package-lock.json` changes, caches node modules);
136
+ - build: builds the code (on `src/*` changes, caches `lib` and `dist`);
137
+ - test: tests the code (on `src/*`, `test/*` changes, caches `workdocs/{resources, badges, coverage}`);
138
+ - deploy:
139
+ - deploys to package registry on a tag (public|private);
140
+ - deploys docker image to docker registry (private);
141
+ - Deploys the documentation to the repository pages;
142
+ - github:
143
+ - jest-test: standard `install -> build -> test` loop;
144
+ - jest-coverage: extracts coverage from the tests;
145
+ - codeql-analysis: Code quality analisys;
146
+ - pages: builds the documentation and deploys to github pages
147
+ - release-on-tag: issues a release when the tag does not contain `-no-ci` string
148
+ - publish-on-release: publishes to package registry when the tag does not contain the `-no-ci` string
149
+ - Requires Variables:
150
+ - CONSECUTIVE_ACTION_TRIGGER: secret to enable actions to trigger other actions;
151
+ - NPM_TOKEN: npm/docker registry token
152
+ ## Considerations
153
+
154
+ #### Typescript Compilation options
155
+
156
+ Even though all code is exported in both CommonJS and ESM format, and the default is ES2022
157
+ in order to take advantage to all the latest Typescript and JS features,
158
+ when importing these libraries the following flag in `tsconfig.compilerOptions` is mandatory:
159
+ ```json
160
+ {
161
+ "experimentalDecorators": true,
162
+ "emitDecoratorMetadata": true,
163
+ "useDefineForClassFields": false
164
+ }
165
+ ```
166
+ ## Documentation
167
+
168
+ The repository proposes a way to generate documentation that while still not ideal, produces verys consitest results.
169
+
170
+ In the code you see an example on how to properly document each code object, but the overall structure is:
171
+ - each package is a `@module`;
172
+ - Classes and Interfaces are categorized into `@category` and `@subcategory`;
173
+ - All other objects are categorized by `@namespace` and `@memberOf`;
174
+ - Enums and const are declared as `@const` and both must describe their properties as `@property` (when constants are objects);
175
+ - Interfaces must declare their methods `@method`;
176
+
177
+ There is one smple step to generating the documentation (automated in CI):
178
+ - `npm run docs` - this has several stages, defined under the `gulp docs` (gulpfile.js):
179
+ - compiles the Readme file via md compile:
180
+ - enables keeping separate files for sections that are then joined into a single file;
181
+ - Allows keeping specific files in the jsdocs tutorial folder so they show up on their own menu;
182
+ - compiles the documentation from the source code using jsdocs:
183
+ - uses the better docs template with the category and component plugins
184
+ - uses the mermaid jsdoc plugin to embue uml diagrams in the docs
185
+ - includes a nav link to the test coverage results;
186
+ - copies the jsdoc and mds to `/docs`;
187
+ - copies the `./workdocs/{drawings, uml, assets, resources}` to `./docs`;
188
+
189
+ The produced `docs` folder contains the resulting documentation;
190
+ ### Related
191
+
192
+ [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decorator-validation)](https://github.com/decaf-ts/decorator-validation)
193
+ ### Social
194
+
195
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/decaf-ts/)
196
+ ### Scripts
197
+
198
+ The following npm scripts are available for development:
199
+
200
+ - `preinstall` - will run only on the first install to trigger the dep update. will self delete;
201
+ - `do-install` - sets a `TOKEN` environment variable to the contents of `.token` and runs npm install (useful when you
202
+ have private dependencies);
203
+ - `flash-forward` - updates all dependencies. Take care, This may not be desirable is some cases;
204
+ - `reset` - updates all dependencies. Take care, This may not be desirable is some cases;
205
+ - `build` - builds the code (via gulp `gulpfile.js`) in development mode (generates `lib` and `dist` folder);
206
+ - `build:prod` - builds the code (via gulp `gulpfile.js`) in production mode (generates `lib` and `dist` folder);
207
+ - `test` - runs unit tests;
208
+ - `test:integration` - runs it tests;
209
+ - `test:all` - runs all tests;
210
+ - `lint` - runs es lint on the code folder;
211
+ - `lint-fix` - tries to auto-fix the code folder;
212
+ - `prepare-release` - defines the commands to run prior to a new tag (defaults to linting, building production code,
213
+ running tests and documentation generation);
214
+ - `release` - triggers a new tag being pushed to master (via `./bin/tag_release.sh`);
215
+ - `clean-publish` - cleans the package.json for publishing;
216
+ - `coverage` - runs all test, calculates coverage and generates badges for readme;
217
+ - `drawings` - compiles all DrawIO `*.drawio` files in the `workdocs/drawings` folder to png and moves them to
218
+ the `workdocs/resources` folder;
219
+ - `uml` - compiles all PlantUML `*.puml` files in the `workdocs/uml` folder to png and moves them to
220
+ the `workdocs/resources` folder;
221
+ - `docs` - compiles all the coverage, drawings, uml, jsdocs and md docs into a readable web page under `./docs`;
222
+
223
+ ### Repository Structure
224
+
225
+ ```
226
+ decorator-validation
227
+
228
+ │ .gitignore <-- Defines files ignored to git
229
+ │ .npmignore <-- Defines files ignored by npm
230
+ │ .nmprc <-- Defines the Npm registry for this package
231
+ │ .eslintrc.cjs <-- linting for the project
232
+ │ .prettier.config.cjs <-- Code style for the project
233
+ │ .gitlab-ci.yml <-- Gillab CI/CD file
234
+ │ gulpfile.js <-- Gulp build scripts. used for building na other features (eg docs)
235
+ │ jest.config.ts <-- Tests Configuration file
236
+ │ mdCompile.json <-- md Documentation generation configuration file
237
+ │ jsdocs.json <-- jsdoc Documentation generation configuration file
238
+ │ Dockerfile <-- minimal example of a node service Dockerfile
239
+ │ LICENCE.md <-- Licence disclamer
240
+ │ package.json
241
+ │ package-lock.json
242
+ │ README.md <-- Readme File dynamically compiled from 'workdocs' via the 'docs' npm script
243
+ │ tsconfig.json <-- Typescript config file. Is overriden in 'gulpfile.js'
244
+
245
+ └───bin
246
+ │ │ tag_release.sh <-- Script to help with releases
247
+
248
+ └───docs
249
+ │ │ ... <-- Dinamically generated folder, containing the compiled documentation for this repository. generated via the 'docs' npm script
250
+
251
+ └───src
252
+ │ │ ... <-- Source code for this repository
253
+
254
+ └───tests
255
+ │ │───unit <-- Unit tests
256
+ │ └───integration <-- Integration tests
257
+
258
+ └───workdocs <-- Folder with all pre-compiled documentation
259
+ │ │───assets <-- Documentation asset folder
260
+ │ │───badges <-- Auto generated coverage badges folder
261
+ │ │───coverage <-- Auto generated coverage results
262
+ │ │───drawings <-- DrawIO folder. Drawings (*.drawio) here will be processed to generate documentation (requires docker)
263
+ │ │───uml <-- PlantUML folder. Diagrams (*.puml) here will be processed to generate documentation (requires docker)
264
+ │ │───tutorials <-- Tutorial folder
265
+ │ │ ... <-- Categorized *.md files that are merged to generate the final readme (via md compile)
266
+ │ │ Readme.md <-- Entry point to the README.md
267
+
268
+ └───dist
269
+ │ │ ... <-- Dinamically generated folder containing the bundles for distribution
270
+
271
+ └───lib
272
+ | ... <-- Dinamically generated folder containing the compiled code
273
+ ```
274
+
275
+ ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
276
+ ![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)
277
+ ![NodeJS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
278
+ ![ShellScript](https://img.shields.io/badge/Shell_Script-121011?style=for-the-badge&logo=gnu-bash&logoColor=white)
279
+
280
+ ## Getting help
281
+
282
+ If you have bug reports, questions or suggestions please [create a new issue](https://github.com/decaf-ts/decorator-validation/issues/new/choose).
283
+
284
+ ## Contributing
285
+
286
+ I am grateful for any contributions made to this project. Please read [this](./workdocs/98-Contributing.md) to get started.
287
+
288
+ ## Supporting
289
+
290
+ The first and easiest way you can support it is by [Contributing](./workdocs/98-Contributing.md). Even just finding a typo in the documentation is important.
291
+
292
+ Financial support is always welcome and helps keep the both me and the project alive and healthy.
293
+
294
+ So if you can, if this project in any way. either by learning something or simply by helping you save precious time, please consider donating.
295
+
296
+ ## License
297
+
298
+ This project is released under the [MIT License](LICENSE.md).
299
+
300
+ #### Disclaimer:
301
+
302
+ badges found [here](https://dev.to/envoy_/150-badges-for-github-pnk), [here](https://github.com/alexandresanlim/Badges4-README.md-Profile#-social-) and [here](https://github.com/Ileriayo/markdown-badges)
@@ -0,0 +1,2 @@
1
+ /*! For license information please see decorator-validation.bundle.min.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,(()=>(()=>{var e={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 a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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,a(r(935),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.validate=void 0;const n=r(965),a=r(935),i=r(19),o=r(402),s=r(154),c=r(38),u=r(936),d=r(770);function l(e,...t){const r=[];for(const i in e)e.hasOwnProperty(i)&&-1===t.indexOf(i)&&r.push((0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,i));const c=r.reduce(((t,r)=>{const{prop:i,decorators:c}=r;if(!c||!c.length)return t;const u=c[0];c.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===u.props.name))))&&c.shift();let l=c.reduce(((t,r)=>{const n=d.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[i.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return l=l||Object.keys(e).filter((e=>!l||!l[e])).reduce(((t,r)=>{let i;const c=(0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,u=c.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!u||!u.length)return t;const d=u.pop(),l=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(c.length&&c.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(i=(0,a.stringFormat)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(i=e[r].hasErrors())}catch(e){console.warn((0,a.stringFormat)("Model should be validatable but its not"))}}})),i&&((t=t||{})[r]=i),t}),void 0),l&&((t=t||{})[r.prop.toString()]=l),t}),void 0);return c?new i.ModelErrorDefinition(c):void 0}let f,y,p,h;t.validate=l;class g{constructor(e){}hasErrors(...e){return l(this,...e)}equals(e,...t){return(0,a.isEqual)(this,e,...t)}serialize(){return g.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return g.getHashingFunction()(this).toString()}static deserialize(e){return g.getSerializer().deserialize(e)}static serialize(e){return g.getSerializer().serialize(e)}static hash(e){return g.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){f=e}static getBuilder(){return f}static getRegistry(){return y||(y=new u.ModelRegistryManager),y}static setRegistry(e){y=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 setSerializer(e){p=e}static getSerializer(){return p||(p=new a.JSONSerializer),p}static setHashingFunction(e){h=e}static getHashingFunction(){return h||(h=a.hashObj),h}}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)e.hasOwnProperty(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=>e.hasOwnProperty(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}),"")}}},936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bulkModelRegister=t.ModelRegistryManager=void 0;const n=r(6),a=r(935),i=r(154);t.ModelRegistryManager=class{constructor(e=i.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=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||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,a.stringFormat)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}},t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))}},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),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={}))},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.construct=t.constructFromModel=t.constructFromObject=void 0;const n=r(6),a=r(935),i=r(965),o=r(402),s=r(154);t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,c;for(const u in t)if(t.hasOwnProperty(u)&&(e.hasOwnProperty(u)||e.prototype&&e.prototype.hasOwnProperty(u))){if(e[u]=t[u],"object"!=typeof e[u])continue;if((0,a.isModel)(e[u])){try{e[u]=n.Model.build(e[u])}catch(e){console.log(e)}continue}const d=(0,a.getPropertyDecorators)(i.ValidationKeys.REFLECT,e,u).decorators;if(r=d.filter((e=>-1!==[s.ModelKeys.TYPE,i.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,a.stringFormat)("failed to find decorators for property {0}",u));c=r.pop();const l=c.props.name?[c.props.name]:Array.isArray(c.props.customTypes)?c.props.customTypes:[c.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===i.ValidationKeys.LIST));if(r&&("Array"===t&&(e[u]=e[u].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[u])t.add(n.Model.build(a,r.props.class));e[u]=t}}break;default:e[u]&&(e[u]=n.Model.build(e[u],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)}},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.model=t.getModelKey=void 0;const n=r(38),a=r(154),i=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e,t.model=function(e,r){return o=>{const s=function(...s){const c=(0,n.construct)(o,...s),u=i.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const d=Object.assign({},{class:o.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:d}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(d,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=o.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:o.prototype.constructor.name}),i.Model.register(s),s}}},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 a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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}),a(r(38),t),a(r(936),t),a(r(893),t),a(r(19),t),a(r(282),t),a(r(6),t),a(r(402),t)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},75:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=t.evaluateDesignTypes=t.checkTypes=t.checkType=t.getClassDecorators=t.isModel=t.hashObj=t.hashSerialization=t.hashCode=t.isEqual=t.stringFormat=t.getAllProperties=t.getAllPropertyDecorators=t.getTypeFromDecorator=t.getPropertyDecorators=void 0,r(630);const n=r(965),a=r(154),i=r(847);function o(e,t,r,n=!1,i=!0,u){const d=function(e,t,r,n=!1,i){const o=Reflect.getMetadataKeys(t,r).filter((t=>n?t.toString().startsWith(e):t===a.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((n,i)=>{const o={key:i!==a.ModelKeys.TYPE?i.substring(e.length):i,props:Reflect.getMetadata(i,t,r)};return n.concat(o)}),i||[]);return{prop:r.toString(),decorators:o}}(e,t,r,n,u);return i&&Object.getPrototypeOf(t)!==Object.prototype?o(e,Object.getPrototypeOf(t.constructor),r,!0,i,d.decorators):{prop:d.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?(c(e.props,r[e.key])||console.log(s("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(d.decorators)}}function s(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}function c(e,t,...r){if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e).filter((e=>-1===r.indexOf(e)));return n.length===Object.keys(t).filter((e=>-1===r.indexOf(e))).length&&n.every((n=>-1!==r.indexOf(n)||c(e[n],t[n],...r)))}function u(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function d(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function l(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function f(e,t){return!t.every((t=>!l(e,t)))}t.getPropertyDecorators=o,t.getTypeFromDecorator=function(e,t){const r=o(a.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const n=r.decorators.shift(),i=n.props?n.props.name:void 0;return"Function"!==i?i:void 0},t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const i=o(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,i.decorators)})),r)),void 0)},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const i=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(i());return n},t.stringFormat=s,t.isEqual=c,t.hashCode=u,t.hashSerialization=function(e){return u(i.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):(e=((e=e||0)<<5)-e+r)&e},r=u,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},t.isModel=function(e){return!!e[a.ModelKeys.ANCHOR]||!!d(a.ModelKeys.REFLECT,e).find((e=>e.key===a.ModelKeys.MODEL&&e.props&&e.props.class))},t.getClassDecorators=d,t.checkType=l,t.checkTypes=f,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return l(e,t);case"object":return!Array.isArray(t)||f(e,t);case"function":return!t.name||"Object"===t.name||l(e,t.name);default:return!0}},t.dateFromFormat=function(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 a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const i=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},o=i(a.groups.year),s=i(a.groups.day),c=a.groups.ampm;let u=i(a.groups.hour);c&&(u="PM"===c?u+12:u);const d=i(a.groups.minutes),l=i(a.groups.seconds),f=i(a.groups.milis),y=a.groups.monthname,p=a.groups.monthnamesmall;let h=a.groups.month;if(y)h=n.MONTH_NAMES.indexOf(y);else if(p){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(p.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=i(`${h}`);return new Date(o,h-1,s,u,d,l,f)}},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 a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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}),a(r(75),t),a(r(904),t),a(r(973),t),a(r(154),t)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(493),a=r(935);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new n.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.DATE){super(a.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}}t.DateValidator=i},335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.emailPat=/[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])?/}constructor(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){super(n.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,i.emailPat,t)}}t.EmailValidator=i},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.LIST){super(a.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}}t.ListValidator=i},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(a.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}}t.MaxLengthValidator=i},909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX){super(a.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}}t.MaxValidator=i},519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(a.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}}t.MinLengthValidator=i},651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN){super(a.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}}t.MinValidator=i},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const n=r(273),a=r(772);class i extends n.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PASSWORD,t=a.PasswordPatterns.CHAR8_ONE_OF_EACH){super(a.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}}t.PasswordValidator=i},273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{static{this.regexpParser=new RegExp("^/(.+)/([gimus]*)$")}constructor(e=a.ValidationKeys.PATTERN,t=a.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}static getPattern(e){if(!i.regexpParser.test(e))return new RegExp(e);const t=e.match(i.regexpParser);return new RegExp(t[1],t[2])}hasErrors(e,t,r){if(e)return(t="string"==typeof t?i.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}t.PatternValidator=i},812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.REQUIRED){super(a.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}}t.RequiredValidator=i},553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.STEP){super(a.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}}t.StepValidator=i},375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(735),a=r(935),i=r(772),o=r(154);class s extends n.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,a.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.urlPattern=/^(?:(?:(?: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}constructor(e=n.DEFAULT_ERROR_MESSAGES.URL){super(n.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,i.urlPattern,t)}}t.URLValidator=i},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(935),a=r(772);t.Validator=class{constructor(e,t=a.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,n.stringFormat)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,n.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(a.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=t.isValidator=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}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 a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPatterns=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",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}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.PasswordPatterns={CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}},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 a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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 i=r(395),o=r(375),s=r(116),c=r(553),u=r(964),d=r(273),l=r(651),f=r(519),y=r(909),p=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(735),t),a(r(168),t),a(r(436),t),a(r(335),t),a(r(812),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(273),t),a(r(964),t),a(r(553),t),a(r(395),t),a(r(375),t),a(r(116),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:p.MaxLengthValidator,MaxValidator:y.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:l.MinValidator,PatternValidator:d.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:i.DateValidator,TypeValidator:o.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.set=t.list=t.password=t.date=t.parseDate=t.formatDate=t.twoDigitPad=t.isValidDate=t.bindDateToString=t.type=t.url=t.email=t.pattern=t.maxlength=t.minlength=t.step=t.max=t.min=t.required=t.getValidationKey=void 0,r(630);const n=r(493),a=r(493),i=r(935),o=r(407),s=r(770);function c(e){return n.ValidationKeys.REFLECT+e}function u(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE,r=a.TypeValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.TYPE),{customTypes:e,message:t},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.TYPE,save:!0})}}function d(e,t){if(!e)return;const r=()=>y(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 l(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function f(e){return e<10?"0"+e:e.toString()}function y(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),i=e.getFullYear(),o=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=o%12,l=f(d),y=f(o),p=f(s),h=f(c),g=o<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),M=f(r),_=a+1,m=f(_),O=n.MONTH_NAMES[a],b=O.substr(0,3),S=i+"",R=S.substr(2,2);return(t=t.replace("hh",l).replace("h",d.toString()).replace("HH",y).replace("H",o.toString()).replace("mm",p).replace("m",s.toString()).replace("ss",h).replace("s",c.toString()).replace("S",u.toString()).replace("dd",M).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",S).replace("yy",R).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",_.toString())}function p(e,t){let r;if(t){if(t instanceof Date)try{r=(0,i.dateFromFormat)(y(t,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=(0,i.dateFromFormat)(t,e);else if("number"==typeof t){const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}else{if(!l(t))throw new Error(`Invalid value provided ${t}`);try{const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t,e))}}return d(r,e)}}function h(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST,a=o.ListValidator){return(i,o)=>{u(t)(i,o),Reflect.defineMetadata(c(n.ValidationKeys.LIST),{class:e.name,type:t,message:r},i,o),s.Validation.register({validator:a,validationKey:n.ValidationKeys.LIST,save:!0})}}t.getValidationKey=c,t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED,t=a.RequiredValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.REQUIRED),{message:e},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.REQUIRED,save:!0})}},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN,r=a.MinValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN,save:!0})}},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX,r=a.MaxValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX,save:!0})}},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP,r=a.StepValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.STEP,save:!0})}},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH,r=a.MinLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN_LENGTH,save:!0})}},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH,r=a.MaxLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX_LENGTH,save:!0})}},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN,r=a.PatternValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PATTERN,save:!0})}},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL,t=a.EmailValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.EMAIL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.EMAIL,save:!0})}},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL,t=a.URLValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.URL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.URL,save:!0})}},t.type=u,t.bindDateToString=d,t.isValidDate=l,t.twoDigitPad=f,t.formatDate=y,t.parseDate=p,t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE,r=a.DateValidator){return(a,o)=>{Reflect.defineMetadata(c(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},a,o),s.Validation.register({validator:r,validationKey:n.ValidationKeys.DATE,save:!0});const u=new WeakMap;Object.defineProperty(a,o,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,o);r&&!r.configurable||Object.defineProperty(this,o,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=p(e,t),u.set(this,r)}catch(e){console.error((0,i.stringFormat)("Failed to parse date: {0}",e.message||e))}}}),this[o]=t},get(){console.log("here")}})}},t.password=function(e=n.PasswordPatterns.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD,r=a.PasswordValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PASSWORD,save:!0})}},t.list=h,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{h(e,"Set",t,r)(n,a)}}},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 a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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.Decorators=t.ValidatorRegistryImp=void 0,a(r(792),t),a(r(493),t);const i=r(493);t.ValidatorRegistryImp=i.ValidatorRegistry,t.Decorators=r(475),a(r(475),t),a(r(770),t)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"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){}}(),a=i(e);function i(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==n.Reflect&&(a=i(n.Reflect,a)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!o&&!s,u={create:o?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]}},d=Object.getPrototypeOf(Function),l="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[i]=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,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,K(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,a)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(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 a(e,t){return t}function o(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}(),y="function"==typeof WeakMap?WeakMap:function(){var e=16,t=u.create(),n=a();return function(){function e(){this._key=a()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=a()},e}();function a(){var e;do{e="@@WeakMap@@"+s()}while(u.has(t,e));return t[e]=!0,e}function i(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:u.create()})}return e[n]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function s(){var t,r=(t=e,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));r[6]=79&r[6]|64,r[8]=191&r[8]|128;for(var n="",a=0;a<e;++a){var i=r[a];4!==a&&6!==a&&8!==a||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[p]),R(e)&&(e=function(){var e,r,n,a;R(p)||void 0===t.Reflect||p in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,i=e.deleteMetadata,o=new y;return{isProviderFor:function(e,t){var r=o.get(e);return R(r)?!!a(e,t).length&&(R(r)&&(r=new f,o.set(e,r)),r.add(t),!0):r.has(t)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new y,o={registerProvider:s,getProvider:u,setProvider:h};return o;function s(t){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case R(r):r=t;break;case r===t:break;case R(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,i){if(!R(r)){if(r.isProviderFor(t,i))return r;if(!R(n)){if(n.isProviderFor(t,i))return r;if(!R(a))for(var o=F(a);;){var s=k(o);if(!s)return;var c=x(s);if(c.isProviderFor(t,i))return I(o),c}}}if(!R(e)&&e.isProviderFor(t,i))return e}function u(e,t){var r,n=i.get(e);return R(n)||(r=n.get(t)),R(r)?(R(r=c(e,t))||(R(n)&&(n=new l,i.set(e,n)),n.set(t,r)),r):r}function d(e){if(R(e))throw new TypeError;return r===e||n===e||!R(a)&&a.has(e)}function h(e,t,r){if(!d(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var a=i.get(e);R(a)&&(a=new l,i.set(e,a)),a.set(t,r)}return!0}}()),!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new y,r={isProviderFor:function(e,r){var n=t.get(e);return!R(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!R(a)&&P(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!R(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(R(a))return r;for(var i=F(a.keys()),o=0;;){var s=k(i);if(!s)return r.length=o,r;var c=x(s);try{r[o]=c}catch(e){try{I(i)}finally{throw e}}o++}},OrdinaryDeleteMetadata:function(e,r,a){var i=n(r,a,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var o=t.get(r);R(o)||(o.delete(a),0===o.size&&t.delete(o))}return!0}};return h.registerProvider(r),r;function n(n,a,i){var o=t.get(n),s=!1;if(R(o)){if(!i)return;o=new l,t.set(n,o),s=!0}var c=o.get(a);if(R(c)){if(!i)return;if(c=new l,o.set(a,c),!e.setProvider(n,a,r))throw o.delete(a),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=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!R(n)&&P(n.OrdinaryHasOwnMetadata(e,t,r))}function M(e,t,r){if(E(e,t,r))return _(e,t,r);var n=U(t);return w(n)?void 0:M(e,n,r)}function _(e,t,r){var n=G(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var i=new f,o=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),o.push(u))}for(var d=0,l=a;d<l.length;d++)u=l[d],i.has(u)||(i.add(u),o.push(u));return o}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function S(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 R(e){return void 0===e}function w(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function A(e,t){switch(S(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=N(e,a);if(void 0!==n){var i=n.call(e,r);if(T(i))throw new TypeError;return i}return function(e,t){if("string"===t){var r=e.toString;if(j(r)&&!T(a=r.call(e)))return a;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a}else{var n;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a;var a,i=e.toString;if(j(i)&&!T(a=i.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function P(e){return!!e}function V(e){var t=A(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function D(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function j(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!j(r))throw new TypeError;return r}}function F(e){var t=N(e,i);if(!j(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function x(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!R(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(R(r)){if(!D(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(!R(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!D(e))throw new TypeError;if(!T(t))throw new TypeError;if(!T(n)&&!R(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var i=(0,e[a])(t,r,n);if(!R(i)&&!w(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=V(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(S(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=V(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),M(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),_(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=V(r)),!T(t))throw new TypeError;R(r)||(r=V(r));var n=G(t,r,!1);return!R(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(a,n),void 0===n.Reflect&&(n.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729)})()));
@@ -0,0 +1,14 @@
1
+ /*! *****************************************************************************
2
+ Copyright (C) Microsoft. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see decorator-validation.bundle.min.esm.js.LICENSE.txt */
2
+ var e={729:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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,a(r(935),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.validate=void 0;const n=r(965),a=r(935),i=r(19),o=r(402),s=r(154),c=r(38),u=r(936),d=r(770);function l(e,...t){const r=[];for(const i in e)e.hasOwnProperty(i)&&-1===t.indexOf(i)&&r.push((0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,i));const c=r.reduce(((t,r)=>{const{prop:i,decorators:c}=r;if(!c||!c.length)return t;const u=c[0];c.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===u.props.name))))&&c.shift();let l=c.reduce(((t,r)=>{const n=d.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[i.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return l=l||Object.keys(e).filter((e=>!l||!l[e])).reduce(((t,r)=>{let i;const c=(0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,u=c.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!u||!u.length)return t;const d=u.pop(),l=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(c.length&&c.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(i=(0,a.stringFormat)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(i=e[r].hasErrors())}catch(e){console.warn((0,a.stringFormat)("Model should be validatable but its not"))}}})),i&&((t=t||{})[r]=i),t}),void 0),l&&((t=t||{})[r.prop.toString()]=l),t}),void 0);return c?new i.ModelErrorDefinition(c):void 0}let f,y,p,h;t.validate=l;class g{constructor(e){}hasErrors(...e){return l(this,...e)}equals(e,...t){return(0,a.isEqual)(this,e,...t)}serialize(){return g.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return g.getHashingFunction()(this).toString()}static deserialize(e){return g.getSerializer().deserialize(e)}static serialize(e){return g.getSerializer().serialize(e)}static hash(e){return g.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){f=e}static getBuilder(){return f}static getRegistry(){return y||(y=new u.ModelRegistryManager),y}static setRegistry(e){y=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 setSerializer(e){p=e}static getSerializer(){return p||(p=new a.JSONSerializer),p}static setHashingFunction(e){h=e}static getHashingFunction(){return h||(h=a.hashObj),h}}t.Model=g},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(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=>e.hasOwnProperty(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}),"")}}},936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bulkModelRegister=t.ModelRegistryManager=void 0;const n=r(6),a=r(935),i=r(154);t.ModelRegistryManager=class{constructor(e=i.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=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||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,a.stringFormat)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}},t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))}},402:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),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={}))},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.construct=t.constructFromModel=t.constructFromObject=void 0;const n=r(6),a=r(935),i=r(965),o=r(402),s=r(154);t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,c;for(const u in t)if(t.hasOwnProperty(u)&&(e.hasOwnProperty(u)||e.prototype&&e.prototype.hasOwnProperty(u))){if(e[u]=t[u],"object"!=typeof e[u])continue;if((0,a.isModel)(e[u])){try{e[u]=n.Model.build(e[u])}catch(e){console.log(e)}continue}const d=(0,a.getPropertyDecorators)(i.ValidationKeys.REFLECT,e,u).decorators;if(r=d.filter((e=>-1!==[s.ModelKeys.TYPE,i.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,a.stringFormat)("failed to find decorators for property {0}",u));c=r.pop();const l=c.props.name?[c.props.name]:Array.isArray(c.props.customTypes)?c.props.customTypes:[c.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===i.ValidationKeys.LIST));if(r&&("Array"===t&&(e[u]=e[u].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[u])t.add(n.Model.build(a,r.props.class));e[u]=t}}break;default:e[u]&&(e[u]=n.Model.build(e[u],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)}},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.model=t.getModelKey=void 0;const n=r(38),a=r(154),i=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e,t.model=function(e,r){return o=>{const s=function(...s){const c=(0,n.construct)(o,...s),u=i.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const d=Object.assign({},{class:o.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:d}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(d,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=o.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:o.prototype.constructor.name}),i.Model.register(s),s}}},847:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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}),a(r(38),t),a(r(936),t),a(r(893),t),a(r(19),t),a(r(282),t),a(r(6),t),a(r(402),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},75:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=t.evaluateDesignTypes=t.checkTypes=t.checkType=t.getClassDecorators=t.isModel=t.hashObj=t.hashSerialization=t.hashCode=t.isEqual=t.stringFormat=t.getAllProperties=t.getAllPropertyDecorators=t.getTypeFromDecorator=t.getPropertyDecorators=void 0,r(630);const n=r(965),a=r(154),i=r(847);function o(e,t,r,n=!1,i=!0,u){const d=function(e,t,r,n=!1,i){const o=Reflect.getMetadataKeys(t,r).filter((t=>n?t.toString().startsWith(e):t===a.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((n,i)=>{const o={key:i!==a.ModelKeys.TYPE?i.substring(e.length):i,props:Reflect.getMetadata(i,t,r)};return n.concat(o)}),i||[]);return{prop:r.toString(),decorators:o}}(e,t,r,n,u);return i&&Object.getPrototypeOf(t)!==Object.prototype?o(e,Object.getPrototypeOf(t.constructor),r,!0,i,d.decorators):{prop:d.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?(c(e.props,r[e.key])||console.log(s("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(d.decorators)}}function s(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}function c(e,t,...r){if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e).filter((e=>-1===r.indexOf(e)));return n.length===Object.keys(t).filter((e=>-1===r.indexOf(e))).length&&n.every((n=>-1!==r.indexOf(n)||c(e[n],t[n],...r)))}function u(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function d(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function l(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function f(e,t){return!t.every((t=>!l(e,t)))}t.getPropertyDecorators=o,t.getTypeFromDecorator=function(e,t){const r=o(a.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const n=r.decorators.shift(),i=n.props?n.props.name:void 0;return"Function"!==i?i:void 0},t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const i=o(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,i.decorators)})),r)),void 0)},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const i=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(i());return n},t.stringFormat=s,t.isEqual=c,t.hashCode=u,t.hashSerialization=function(e){return u(i.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):(e=((e=e||0)<<5)-e+r)&e},r=u,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},t.isModel=function(e){return!!e[a.ModelKeys.ANCHOR]||!!d(a.ModelKeys.REFLECT,e).find((e=>e.key===a.ModelKeys.MODEL&&e.props&&e.props.class))},t.getClassDecorators=d,t.checkType=l,t.checkTypes=f,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return l(e,t);case"object":return!Array.isArray(t)||f(e,t);case"function":return!t.name||"Object"===t.name||l(e,t.name);default:return!0}},t.dateFromFormat=function(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 a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const i=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},o=i(a.groups.year),s=i(a.groups.day),c=a.groups.ampm;let u=i(a.groups.hour);c&&(u="PM"===c?u+12:u);const d=i(a.groups.minutes),l=i(a.groups.seconds),f=i(a.groups.milis),y=a.groups.monthname,p=a.groups.monthnamesmall;let h=a.groups.month;if(y)h=n.MONTH_NAMES.indexOf(y);else if(p){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(p.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=i(`${h}`);return new Date(o,h-1,s,u,d,l,f)}},935:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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}),a(r(75),t),a(r(904),t),a(r(973),t),a(r(154),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},973:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},770:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(493),a=r(935);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new n.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.DATE){super(a.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}}t.DateValidator=i},335:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.emailPat=/[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])?/}constructor(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){super(n.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,i.emailPat,t)}}t.EmailValidator=i},407:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.LIST){super(a.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}}t.ListValidator=i},169:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(a.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}}t.MaxLengthValidator=i},909:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX){super(a.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}}t.MaxValidator=i},519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(a.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}}t.MinLengthValidator=i},651:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN){super(a.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}}t.MinValidator=i},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const n=r(273),a=r(772);class i extends n.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PASSWORD,t=a.PasswordPatterns.CHAR8_ONE_OF_EACH){super(a.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}}t.PasswordValidator=i},273:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{static{this.regexpParser=new RegExp("^/(.+)/([gimus]*)$")}constructor(e=a.ValidationKeys.PATTERN,t=a.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}static getPattern(e){if(!i.regexpParser.test(e))return new RegExp(e);const t=e.match(i.regexpParser);return new RegExp(t[1],t[2])}hasErrors(e,t,r){if(e)return(t="string"==typeof t?i.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}t.PatternValidator=i},812:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.REQUIRED){super(a.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}}t.RequiredValidator=i},553:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.STEP){super(a.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}}t.StepValidator=i},375:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(735),a=r(935),i=r(772),o=r(154);class s extends n.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,a.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.urlPattern=/^(?:(?:(?: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}constructor(e=n.DEFAULT_ERROR_MESSAGES.URL){super(n.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,i.urlPattern,t)}}t.URLValidator=i},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(935),a=r(772);t.Validator=class{constructor(e,t=a.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,n.stringFormat)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,n.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(a.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=t.isValidator=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}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 a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPatterns=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",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}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.PasswordPatterns={CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}},493:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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 i=r(395),o=r(375),s=r(116),c=r(553),u=r(964),d=r(273),l=r(651),f=r(519),y=r(909),p=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(735),t),a(r(168),t),a(r(436),t),a(r(335),t),a(r(812),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(273),t),a(r(964),t),a(r(553),t),a(r(395),t),a(r(375),t),a(r(116),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:p.MaxLengthValidator,MaxValidator:y.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:l.MinValidator,PatternValidator:d.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:i.DateValidator,TypeValidator:o.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.set=t.list=t.password=t.date=t.parseDate=t.formatDate=t.twoDigitPad=t.isValidDate=t.bindDateToString=t.type=t.url=t.email=t.pattern=t.maxlength=t.minlength=t.step=t.max=t.min=t.required=t.getValidationKey=void 0,r(630);const n=r(493),a=r(493),i=r(935),o=r(407),s=r(770);function c(e){return n.ValidationKeys.REFLECT+e}function u(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE,r=a.TypeValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.TYPE),{customTypes:e,message:t},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.TYPE,save:!0})}}function d(e,t){if(!e)return;const r=()=>y(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 l(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function f(e){return e<10?"0"+e:e.toString()}function y(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),i=e.getFullYear(),o=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=o%12,l=f(d),y=f(o),p=f(s),h=f(c),g=o<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),M=f(r),_=a+1,m=f(_),O=n.MONTH_NAMES[a],b=O.substr(0,3),S=i+"",R=S.substr(2,2);return(t=t.replace("hh",l).replace("h",d.toString()).replace("HH",y).replace("H",o.toString()).replace("mm",p).replace("m",s.toString()).replace("ss",h).replace("s",c.toString()).replace("S",u.toString()).replace("dd",M).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",S).replace("yy",R).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",_.toString())}function p(e,t){let r;if(t){if(t instanceof Date)try{r=(0,i.dateFromFormat)(y(t,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=(0,i.dateFromFormat)(t,e);else if("number"==typeof t){const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}else{if(!l(t))throw new Error(`Invalid value provided ${t}`);try{const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t,e))}}return d(r,e)}}function h(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST,a=o.ListValidator){return(i,o)=>{u(t)(i,o),Reflect.defineMetadata(c(n.ValidationKeys.LIST),{class:e.name,type:t,message:r},i,o),s.Validation.register({validator:a,validationKey:n.ValidationKeys.LIST,save:!0})}}t.getValidationKey=c,t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED,t=a.RequiredValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.REQUIRED),{message:e},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.REQUIRED,save:!0})}},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN,r=a.MinValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN,save:!0})}},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX,r=a.MaxValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX,save:!0})}},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP,r=a.StepValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.STEP,save:!0})}},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH,r=a.MinLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN_LENGTH,save:!0})}},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH,r=a.MaxLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX_LENGTH,save:!0})}},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN,r=a.PatternValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PATTERN,save:!0})}},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL,t=a.EmailValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.EMAIL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.EMAIL,save:!0})}},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL,t=a.URLValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.URL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.URL,save:!0})}},t.type=u,t.bindDateToString=d,t.isValidDate=l,t.twoDigitPad=f,t.formatDate=y,t.parseDate=p,t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE,r=a.DateValidator){return(a,o)=>{Reflect.defineMetadata(c(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},a,o),s.Validation.register({validator:r,validationKey:n.ValidationKeys.DATE,save:!0});const u=new WeakMap;Object.defineProperty(a,o,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,o);r&&!r.configurable||Object.defineProperty(this,o,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=p(e,t),u.set(this,r)}catch(e){console.error((0,i.stringFormat)("Failed to parse date: {0}",e.message||e))}}}),this[o]=t},get(){console.log("here")}})}},t.password=function(e=n.PasswordPatterns.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD,r=a.PasswordValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PASSWORD,save:!0})}},t.list=h,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{h(e,"Set",t,r)(n,a)}}},965:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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.Decorators=t.ValidatorRegistryImp=void 0,a(r(792),t),a(r(493),t);const i=r(493);t.ValidatorRegistryImp=i.ValidatorRegistry,t.Decorators=r(475),a(r(475),t),a(r(770),t)},792:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"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){}}(),a=i(e);function i(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==n.Reflect&&(a=i(n.Reflect,a)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!o&&!s,u={create:o?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]}},d=Object.getPrototypeOf(Function),l="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[i]=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,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,K(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,a)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(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 a(e,t){return t}function o(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}(),y="function"==typeof WeakMap?WeakMap:function(){var e=16,t=u.create(),n=a();return function(){function e(){this._key=a()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=a()},e}();function a(){var e;do{e="@@WeakMap@@"+s()}while(u.has(t,e));return t[e]=!0,e}function i(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:u.create()})}return e[n]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function s(){var t,r=(t=e,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));r[6]=79&r[6]|64,r[8]=191&r[8]|128;for(var n="",a=0;a<e;++a){var i=r[a];4!==a&&6!==a&&8!==a||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[p]),R(e)&&(e=function(){var e,r,n,a;R(p)||void 0===t.Reflect||p in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,i=e.deleteMetadata,o=new y;return{isProviderFor:function(e,t){var r=o.get(e);return R(r)?!!a(e,t).length&&(R(r)&&(r=new f,o.set(e,r)),r.add(t),!0):r.has(t)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new y,o={registerProvider:s,getProvider:u,setProvider:h};return o;function s(t){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case R(r):r=t;break;case r===t:break;case R(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,i){if(!R(r)){if(r.isProviderFor(t,i))return r;if(!R(n)){if(n.isProviderFor(t,i))return r;if(!R(a))for(var o=F(a);;){var s=k(o);if(!s)return;var c=x(s);if(c.isProviderFor(t,i))return I(o),c}}}if(!R(e)&&e.isProviderFor(t,i))return e}function u(e,t){var r,n=i.get(e);return R(n)||(r=n.get(t)),R(r)?(R(r=c(e,t))||(R(n)&&(n=new l,i.set(e,n)),n.set(t,r)),r):r}function d(e){if(R(e))throw new TypeError;return r===e||n===e||!R(a)&&a.has(e)}function h(e,t,r){if(!d(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var a=i.get(e);R(a)&&(a=new l,i.set(e,a)),a.set(t,r)}return!0}}()),!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new y,r={isProviderFor:function(e,r){var n=t.get(e);return!R(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!R(a)&&P(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!R(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(R(a))return r;for(var i=F(a.keys()),o=0;;){var s=k(i);if(!s)return r.length=o,r;var c=x(s);try{r[o]=c}catch(e){try{I(i)}finally{throw e}}o++}},OrdinaryDeleteMetadata:function(e,r,a){var i=n(r,a,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var o=t.get(r);R(o)||(o.delete(a),0===o.size&&t.delete(o))}return!0}};return h.registerProvider(r),r;function n(n,a,i){var o=t.get(n),s=!1;if(R(o)){if(!i)return;o=new l,t.set(n,o),s=!0}var c=o.get(a);if(R(c)){if(!i)return;if(c=new l,o.set(a,c),!e.setProvider(n,a,r))throw o.delete(a),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=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!R(n)&&P(n.OrdinaryHasOwnMetadata(e,t,r))}function M(e,t,r){if(E(e,t,r))return _(e,t,r);var n=U(t);return w(n)?void 0:M(e,n,r)}function _(e,t,r){var n=G(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var i=new f,o=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),o.push(u))}for(var d=0,l=a;d<l.length;d++)u=l[d],i.has(u)||(i.add(u),o.push(u));return o}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function S(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 R(e){return void 0===e}function w(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function A(e,t){switch(S(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=N(e,a);if(void 0!==n){var i=n.call(e,r);if(T(i))throw new TypeError;return i}return function(e,t){if("string"===t){var r=e.toString;if(j(r)&&!T(a=r.call(e)))return a;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a}else{var n;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a;var a,i=e.toString;if(j(i)&&!T(a=i.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function P(e){return!!e}function V(e){var t=A(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function D(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function j(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!j(r))throw new TypeError;return r}}function F(e){var t=N(e,i);if(!j(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function x(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!R(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(R(r)){if(!D(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(!R(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!D(e))throw new TypeError;if(!T(t))throw new TypeError;if(!T(n)&&!R(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var i=(0,e[a])(t,r,n);if(!R(i)&&!w(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=V(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(S(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=V(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),M(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),_(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=V(r)),!T(t))throw new TypeError;R(r)||(r=V(r));var n=G(t,r,!1);return!R(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(a,n),void 0===n.Reflect&&(n.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729);
@@ -0,0 +1,14 @@
1
+ /*! *****************************************************************************
2
+ Copyright (C) Microsoft. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */