@formio/js 5.0.0-rc.57 → 5.0.0-rc.59

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/dist/formio.builder.css +0 -4
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +0 -4
  7. package/dist/formio.form.js +27 -38
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +11 -3
  11. package/dist/formio.full.css +0 -4
  12. package/dist/formio.full.js +31 -42
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +11 -3
  16. package/dist/formio.js +4 -4
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +15 -36
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +2 -4
  22. package/lib/cjs/CDN.d.ts +1 -0
  23. package/lib/cjs/CDN.js +6 -3
  24. package/lib/cjs/Embed.d.ts +1 -1
  25. package/lib/cjs/Embed.js +41 -7
  26. package/lib/cjs/Formio.js +11 -0
  27. package/lib/cjs/InlineEmbed.js +3 -1
  28. package/lib/cjs/Webform.d.ts +1 -1
  29. package/lib/cjs/Webform.js +11 -9
  30. package/lib/cjs/WebformBuilder.d.ts +1 -1
  31. package/lib/cjs/WebformBuilder.js +12 -17
  32. package/lib/cjs/components/_classes/component/Component.js +2 -2
  33. package/lib/cjs/components/button/Button.d.ts +1 -1
  34. package/lib/cjs/components/button/Button.js +7 -7
  35. package/lib/cjs/components/radio/Radio.d.ts +1 -1
  36. package/lib/cjs/components/radio/Radio.js +5 -3
  37. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -8
  38. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +2 -1
  39. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +3 -2
  40. package/lib/cjs/components/recaptcha/ReCaptcha.js +1 -8
  41. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +33 -2
  42. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +13 -2
  43. package/lib/cjs/components/select/Select.js +6 -1
  44. package/lib/cjs/components/select/editForm/Select.edit.data.js +16 -2
  45. package/lib/cjs/components/select/fixtures/comp22.js +1 -1
  46. package/lib/cjs/components/select/fixtures/comp23.d.ts +58 -0
  47. package/lib/cjs/components/select/fixtures/comp23.js +49 -0
  48. package/lib/cjs/components/select/fixtures/comp24.d.ts +47 -0
  49. package/lib/cjs/components/select/fixtures/comp24.js +40 -0
  50. package/lib/cjs/components/select/fixtures/index.d.ts +3 -1
  51. package/lib/cjs/components/select/fixtures/index.js +5 -1
  52. package/lib/cjs/components/selectboxes/SelectBoxes.js +4 -1
  53. package/lib/cjs/translations/en.d.ts +1 -0
  54. package/lib/cjs/translations/en.js +1 -0
  55. package/lib/cjs/utils/utils.d.ts +6 -0
  56. package/lib/cjs/utils/utils.js +16 -2
  57. package/lib/mjs/CDN.d.ts +1 -0
  58. package/lib/mjs/CDN.js +6 -3
  59. package/lib/mjs/Embed.d.ts +1 -1
  60. package/lib/mjs/Embed.js +41 -7
  61. package/lib/mjs/Formio.js +11 -0
  62. package/lib/mjs/InlineEmbed.js +3 -1
  63. package/lib/mjs/Webform.d.ts +1 -1
  64. package/lib/mjs/Webform.js +12 -10
  65. package/lib/mjs/WebformBuilder.d.ts +1 -1
  66. package/lib/mjs/WebformBuilder.js +12 -16
  67. package/lib/mjs/components/_classes/component/Component.js +3 -3
  68. package/lib/mjs/components/button/Button.d.ts +1 -1
  69. package/lib/mjs/components/button/Button.js +7 -7
  70. package/lib/mjs/components/radio/Radio.d.ts +1 -1
  71. package/lib/mjs/components/radio/Radio.js +5 -3
  72. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -8
  73. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +2 -1
  74. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +3 -2
  75. package/lib/mjs/components/recaptcha/ReCaptcha.js +1 -8
  76. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +33 -2
  77. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +13 -2
  78. package/lib/mjs/components/select/Select.js +6 -1
  79. package/lib/mjs/components/select/editForm/Select.edit.data.js +16 -2
  80. package/lib/mjs/components/select/fixtures/comp22.js +1 -1
  81. package/lib/mjs/components/select/fixtures/comp23.d.ts +58 -0
  82. package/lib/mjs/components/select/fixtures/comp23.js +47 -0
  83. package/lib/mjs/components/select/fixtures/comp24.d.ts +47 -0
  84. package/lib/mjs/components/select/fixtures/comp24.js +38 -0
  85. package/lib/mjs/components/select/fixtures/index.d.ts +3 -1
  86. package/lib/mjs/components/select/fixtures/index.js +3 -1
  87. package/lib/mjs/components/selectboxes/SelectBoxes.js +4 -1
  88. package/lib/mjs/translations/en.d.ts +1 -0
  89. package/lib/mjs/translations/en.js +1 -0
  90. package/lib/mjs/utils/utils.d.ts +6 -0
  91. package/lib/mjs/utils/utils.js +13 -0
  92. package/package.json +4 -4
@@ -59,7 +59,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
59
59
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
60
60
 
61
61
  "use strict";
62
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./modules */ \"./node_modules/@formio/core/lib/modules/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./utils */ \"./node_modules/@formio/core/lib/utils/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process/validation */ \"./node_modules/@formio/core/lib/process/validation/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process */ \"./node_modules/@formio/core/lib/process/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./types */ \"./node_modules/@formio/core/lib/types/index.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/index.js?");
62
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./modules */ \"./node_modules/@formio/core/lib/modules/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./utils */ \"./node_modules/@formio/core/lib/utils/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process/validation */ \"./node_modules/@formio/core/lib/process/validation/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process/validation/rules */ \"./node_modules/@formio/core/lib/process/validation/rules/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process */ \"./node_modules/@formio/core/lib/process/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./types */ \"./node_modules/@formio/core/lib/types/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./error */ \"./node_modules/@formio/core/lib/error/index.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/index.js?");
63
63
 
64
64
  /***/ }),
65
65
 
@@ -257,7 +257,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
257
257
  /***/ (function(__unused_webpack_module, exports) {
258
258
 
259
259
  "use strict";
260
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EN_ERRORS = void 0;\nexports.EN_ERRORS = {\n unsavedRowsError: 'Please save all rows before proceeding.',\n invalidRowsError: 'Please correct invalid rows before proceeding.',\n invalidRowError: 'Invalid row. Please correct it or delete.',\n invalidOption: '{{field}} is an invalid value.',\n invalidDay: '{{field}} is not a valid day.',\n required: '{{field}} is required',\n unique: '{{field}} must be unique',\n array: '{{field}} must be an array',\n array_nonempty: '{{field}} must be a non-empty array', // eslint-disable-line camelcase\n nonarray: '{{field}} must not be an array',\n select: '{{field}} contains an invalid selection',\n pattern: '{{field}} does not match the pattern {{pattern}}',\n minLength: '{{field}} must have at least {{length}} characters.',\n maxLength: '{{field}} must have no more than {{length}} characters.',\n minWords: '{{field}} must have at least {{length}} words.',\n maxWords: '{{field}} must have no more than {{length}} words.',\n min: '{{field}} cannot be less than {{min}}.',\n max: '{{field}} cannot be greater than {{max}}.',\n maxDate: '{{field}} should not contain date after {{- maxDate}}',\n minDate: '{{field}} should not contain date before {{- minDate}}',\n maxYear: '{{field}} should not contain year greater than {{maxYear}}',\n minSelectedCount: 'You must select at least {{minCount}} items',\n maxSelectedCount: 'You may only select up to {{maxCount}} items',\n minYear: '{{field}} should not contain year less than {{minYear}}',\n invalid_email: '{{field}} must be a valid email.', // eslint-disable-line camelcase\n invalid_url: '{{field}} must be a valid url.', // eslint-disable-line camelcase\n invalid_regex: '{{field}} does not match the pattern {{regex}}.', // eslint-disable-line camelcase\n invalid_date: '{{field}} is not a valid date.', // eslint-disable-line camelcase\n invalid_day: '{{field}} is not a valid day.', // eslint-disable-line camelcase\n invalidValueProperty: 'Invalid Value Property',\n mask: '{{field}} does not match the mask.',\n valueIsNotAvailable: '{{ field }} is an invalid value.',\n captchaTokenValidation: 'ReCAPTCHA: Token validation error',\n captchaTokenNotSpecified: 'ReCAPTCHA: Token is not specified in submission',\n captchaFailure: 'ReCaptcha: Response token not found',\n time: '{{field}} is not a valid time.',\n invalidDate: '{{field}} is not a valid date',\n number: '{{field}} is not a valid number.'\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/i18n/en.js?");
260
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EN_ERRORS = void 0;\nexports.EN_ERRORS = {\n unsavedRowsError: 'Please save all rows before proceeding.',\n invalidRowsError: 'Please correct invalid rows before proceeding.',\n invalidRowError: 'Invalid row. Please correct it or delete.',\n invalidOption: '{{field}} is an invalid value.',\n invalidDay: '{{field}} is not a valid day.',\n required: '{{field}} is required',\n unique: '{{field}} must be unique',\n array: '{{field}} must be an array',\n array_nonempty: '{{field}} must be a non-empty array', // eslint-disable-line camelcase\n nonarray: '{{field}} must not be an array',\n select: '{{field}} contains an invalid selection',\n pattern: '{{field}} does not match the pattern {{pattern}}',\n minLength: '{{field}} must have at least {{length}} characters.',\n maxLength: '{{field}} must have no more than {{length}} characters.',\n minWords: '{{field}} must have at least {{length}} words.',\n maxWords: '{{field}} must have no more than {{length}} words.',\n min: '{{field}} cannot be less than {{min}}.',\n max: '{{field}} cannot be greater than {{max}}.',\n maxDate: '{{field}} should not contain date after {{- maxDate}}',\n minDate: '{{field}} should not contain date before {{- minDate}}',\n maxYear: '{{field}} should not contain year greater than {{maxYear}}',\n minSelectedCount: 'You must select at least {{minCount}} items',\n maxSelectedCount: 'You may only select up to {{maxCount}} items',\n minYear: '{{field}} should not contain year less than {{minYear}}',\n invalid_email: '{{field}} must be a valid email.', // eslint-disable-line camelcase\n invalid_url: '{{field}} must be a valid url.', // eslint-disable-line camelcase\n invalid_regex: '{{field}} does not match the pattern {{regex}}.', // eslint-disable-line camelcase\n invalid_date: '{{field}} is not a valid date.', // eslint-disable-line camelcase\n invalid_day: '{{field}} is not a valid day.', // eslint-disable-line camelcase\n invalidValueProperty: 'Invalid Value Property',\n mask: '{{field}} does not match the mask.',\n valueIsNotAvailable: '{{ field }} is an invalid value.',\n time: '{{field}} is not a valid time.',\n invalidDate: '{{field}} is not a valid date',\n number: '{{field}} is not a valid number.'\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/i18n/en.js?");
261
261
 
262
262
  /***/ }),
263
263
 
@@ -312,7 +312,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
312
312
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
313
313
 
314
314
  "use strict";
315
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.databaseRules = void 0;\nconst validateUnique_1 = __webpack_require__(/*! ./validateUnique */ \"./node_modules/@formio/core/lib/process/validation/rules/validateUnique.js\");\nconst validateCaptcha_1 = __webpack_require__(/*! ./validateCaptcha */ \"./node_modules/@formio/core/lib/process/validation/rules/validateCaptcha.js\");\nconst validateResourceSelectValue_1 = __webpack_require__(/*! ./validateResourceSelectValue */ \"./node_modules/@formio/core/lib/process/validation/rules/validateResourceSelectValue.js\");\n// These are the validations that require a database connection.\nexports.databaseRules = [\n validateUnique_1.validateUniqueInfo,\n validateCaptcha_1.validateCaptchaInfo,\n validateResourceSelectValue_1.validateResourceSelectValueInfo\n];\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/databaseRules.js?");
315
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.databaseRules = void 0;\nconst validateUnique_1 = __webpack_require__(/*! ./validateUnique */ \"./node_modules/@formio/core/lib/process/validation/rules/validateUnique.js\");\nconst validateResourceSelectValue_1 = __webpack_require__(/*! ./validateResourceSelectValue */ \"./node_modules/@formio/core/lib/process/validation/rules/validateResourceSelectValue.js\");\n// These are the validations that require a database connection.\nexports.databaseRules = [\n validateUnique_1.validateUniqueInfo,\n validateResourceSelectValue_1.validateResourceSelectValueInfo\n];\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/databaseRules.js?");
316
316
 
317
317
  /***/ }),
318
318
 
@@ -345,18 +345,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
345
345
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
346
346
 
347
347
  "use strict";
348
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateAvailableItemsInfo = exports.validateAvailableItemsSync = exports.shouldValidate = exports.validateAvailableItems = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nfunction isValidatableRadioComponent(component) {\n var _a;\n return (component &&\n component.type === 'radio' &&\n !!((_a = component.validate) === null || _a === void 0 ? void 0 : _a.onlyAvailableItems) &&\n component.dataSrc === 'values');\n}\nfunction isValidateableSelectComponent(component) {\n var _a;\n return (component &&\n !!((_a = component.validate) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('onlyAvailableItems')) &&\n component.type === 'select' &&\n component.dataSrc !== 'resource');\n}\nfunction mapDynamicValues(component, values) {\n return values.map((value) => {\n if (component.valueProperty) {\n return value[component.valueProperty];\n }\n return value;\n });\n}\nfunction mapStaticValues(values) {\n return values.map((obj) => obj.value);\n}\nfunction getAvailableSelectValues(component, context) {\n return __awaiter(this, void 0, void 0, function* () {\n switch (component.dataSrc) {\n case 'values':\n if (Array.isArray(component.data.values)) {\n return mapStaticValues(component.data.values);\n }\n throw new error_1.ProcessorError(`Failed to validate available values in static values select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n case 'json': {\n if (typeof component.data.json === 'string') {\n try {\n return mapDynamicValues(component, JSON.parse(component.data.json));\n }\n catch (err) {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': ${err}`, context, 'validate:validateAvailableItems');\n }\n }\n else if (Array.isArray(component.data.json)) {\n // TODO: need to retype this\n return mapDynamicValues(component, component.data.json);\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n }\n case 'custom':\n const customItems = utils_1.Evaluator.evaluate(component.data.custom, {\n values: [],\n }, 'values');\n if ((0, util_1.isPromise)(customItems)) {\n const resolvedCustomItems = yield customItems;\n if (Array.isArray(resolvedCustomItems)) {\n return resolvedCustomItems;\n }\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n if (Array.isArray(customItems)) {\n return customItems;\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n default:\n throw new error_1.ProcessorError(`Failed to validate available values in select component '${component.key}': data source ${component.dataSrc} is not valid}`, context, 'validate:validateAvailableItems');\n }\n });\n}\nfunction getAvailableSelectValuesSync(component, context) {\n var _a;\n switch (component.dataSrc) {\n case 'values':\n if (Array.isArray((_a = component.data) === null || _a === void 0 ? void 0 : _a.values)) {\n return mapStaticValues(component.data.values);\n }\n throw new error_1.ProcessorError(`Failed to validate available values in static values select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n case 'json': {\n if (typeof component.data.json === 'string') {\n try {\n return mapDynamicValues(component, JSON.parse(component.data.json));\n }\n catch (err) {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': ${err}`, context, 'validate:validateAvailableItems');\n }\n }\n else if (Array.isArray(component.data.json)) {\n // TODO: need to retype this\n return mapDynamicValues(component, component.data.json);\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n }\n case 'custom':\n const customItems = utils_1.Evaluator.evaluate(component.data.custom, {\n values: [],\n }, 'values');\n if (Array.isArray(customItems)) {\n return customItems;\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n default:\n throw new error_1.ProcessorError(`Failed to validate available values in select component '${component.key}': data source ${component.dataSrc} is not valid}`, context, 'validate:validateAvailableItems');\n }\n}\nfunction compareComplexValues(valueA, valueB, context) {\n if (!(0, util_1.isObject)(valueA) || !(0, util_1.isObject)(valueB)) {\n return false;\n }\n try {\n // TODO: we need to have normalized values here at this moment, otherwise\n // this won't work\n return JSON.stringify(valueA) === JSON.stringify(valueB);\n }\n catch (err) {\n throw new error_1.ProcessorError(`Error while comparing available values: ${err}`, context, 'validate:validateAvailableItems');\n }\n}\nconst validateAvailableItems = (context) => __awaiter(void 0, void 0, void 0, function* () {\n const { component, value } = context;\n const error = new error_1.FieldError('invalidOption', context, 'onlyAvailableItems');\n try {\n if (isValidatableRadioComponent(component)) {\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return null;\n }\n const values = component.values;\n if (values) {\n return values.findIndex(({ value: optionValue }) => optionValue === value) !== -1\n ? null\n : error;\n }\n return null;\n }\n else if (isValidateableSelectComponent(component)) {\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return null;\n }\n const values = yield getAvailableSelectValues(component, context);\n if (values) {\n if ((0, util_1.isObject)(value)) {\n return values.find((optionValue) => compareComplexValues(optionValue, value, context)) !==\n undefined\n ? null\n : error;\n }\n return values.find((optionValue) => optionValue === value) !== undefined ? null : error;\n }\n }\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateAvailableItems');\n }\n return null;\n});\nexports.validateAvailableItems = validateAvailableItems;\nconst shouldValidate = (context) => {\n const { component, value } = context;\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return false;\n }\n if (isValidatableRadioComponent(component)) {\n return true;\n }\n if (isValidateableSelectComponent(component)) {\n return true;\n }\n return false;\n};\nexports.shouldValidate = shouldValidate;\nconst validateAvailableItemsSync = (context) => {\n const { component, value } = context;\n const error = new error_1.FieldError('invalidOption', context, 'onlyAvailableItems');\n try {\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (isValidatableRadioComponent(component)) {\n const values = component.values;\n if (values) {\n return values.findIndex(({ value: optionValue }) => optionValue === value) !== -1\n ? null\n : error;\n }\n return null;\n }\n else if (isValidateableSelectComponent(component)) {\n const values = getAvailableSelectValuesSync(component, context);\n if (values) {\n if ((0, util_1.isObject)(value)) {\n return values.find((optionValue) => compareComplexValues(optionValue, value, context)) !==\n undefined\n ? null\n : error;\n }\n return values.find((optionValue) => optionValue === value) !== undefined ? null : error;\n }\n }\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateAvailableItems');\n }\n return null;\n};\nexports.validateAvailableItemsSync = validateAvailableItemsSync;\nexports.validateAvailableItemsInfo = {\n name: 'validateAvailableItems',\n process: exports.validateAvailableItems,\n processSync: exports.validateAvailableItemsSync,\n shouldProcess: exports.shouldValidate\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateAvailableItems.js?");
349
-
350
- /***/ }),
351
-
352
- /***/ "./node_modules/@formio/core/lib/process/validation/rules/validateCaptcha.js":
353
- /*!***********************************************************************************!*\
354
- !*** ./node_modules/@formio/core/lib/process/validation/rules/validateCaptcha.js ***!
355
- \***********************************************************************************/
356
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
357
-
358
- "use strict";
359
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateCaptchaInfo = exports.validateCaptcha = exports.shouldValidate = void 0;\nconst FieldError_1 = __webpack_require__(/*! ../../../error/FieldError */ \"./node_modules/@formio/core/lib/error/FieldError.js\");\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst shouldValidate = (context) => {\n const { component } = context;\n if (component.type === 'recaptcha') {\n return true;\n }\n return false;\n};\nexports.shouldValidate = shouldValidate;\nconst validateCaptcha = (context) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const { value, config, component } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (!config || !config.database) {\n throw new error_1.ProcessorError(\"Can't test for recaptcha success without a database config object\", context, 'validate:validateCaptcha');\n }\n try {\n if (!value || !value.token) {\n return new FieldError_1.FieldError('captchaTokenNotSpecified', context, 'catpcha');\n }\n if (!value.success) {\n return new FieldError_1.FieldError('captchaTokenValidation', context, 'captcha');\n }\n const captchaResult = yield ((_a = config.database) === null || _a === void 0 ? void 0 : _a.validateCaptcha(value.token));\n return (captchaResult === true) ? null : new FieldError_1.FieldError('captchaFailure', context, 'captcha');\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateCaptcha');\n }\n});\nexports.validateCaptcha = validateCaptcha;\nexports.validateCaptchaInfo = {\n name: 'validateCaptcha',\n process: exports.validateCaptcha,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateCaptcha.js?");
348
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateAvailableItemsInfo = exports.validateAvailableItemsSync = exports.shouldValidate = exports.validateAvailableItems = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nfunction isValidatableRadioComponent(component) {\n var _a;\n return (component &&\n component.type === 'radio' &&\n !!((_a = component.validate) === null || _a === void 0 ? void 0 : _a.onlyAvailableItems) &&\n component.dataSrc === 'values');\n}\nfunction isValidateableSelectComponent(component) {\n var _a;\n return (component &&\n !!((_a = component.validate) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('onlyAvailableItems')) &&\n component.type === 'select' &&\n component.dataSrc !== 'resource');\n}\nfunction mapDynamicValues(component, values) {\n return values.map((value) => {\n if (component.valueProperty) {\n return value[component.valueProperty];\n }\n return value;\n });\n}\nfunction mapStaticValues(values) {\n return values.map((obj) => obj.value);\n}\nfunction getAvailableSelectValues(component, context) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((0, lodash_1.isUndefined)(component.dataSrc) && component.data.hasOwnProperty('values')) {\n component.dataSrc = 'values';\n }\n ;\n switch (component.dataSrc) {\n case 'values':\n if (Array.isArray(component.data.values)) {\n return mapStaticValues(component.data.values);\n }\n throw new error_1.ProcessorError(`Failed to validate available values in static values select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n case 'json': {\n if (typeof component.data.json === 'string') {\n try {\n return mapDynamicValues(component, JSON.parse(component.data.json));\n }\n catch (err) {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': ${err}`, context, 'validate:validateAvailableItems');\n }\n }\n else if (Array.isArray(component.data.json)) {\n // TODO: need to retype this\n return mapDynamicValues(component, component.data.json);\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n }\n case 'custom':\n const customItems = utils_1.Evaluator.evaluate(component.data.custom, {\n values: [],\n }, 'values');\n if ((0, util_1.isPromise)(customItems)) {\n const resolvedCustomItems = yield customItems;\n if (Array.isArray(resolvedCustomItems)) {\n return resolvedCustomItems;\n }\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n if (Array.isArray(customItems)) {\n return customItems;\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n default:\n throw new error_1.ProcessorError(`Failed to validate available values in select component '${component.key}': data source ${component.dataSrc} is not valid}`, context, 'validate:validateAvailableItems');\n }\n });\n}\nfunction getAvailableSelectValuesSync(component, context) {\n var _a;\n if ((0, lodash_1.isUndefined)(component.dataSrc) && component.data.hasOwnProperty('values')) {\n component.dataSrc = 'values';\n }\n ;\n switch (component.dataSrc) {\n case 'values':\n if (Array.isArray((_a = component.data) === null || _a === void 0 ? void 0 : _a.values)) {\n return mapStaticValues(component.data.values);\n }\n throw new error_1.ProcessorError(`Failed to validate available values in static values select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n case 'json': {\n if (typeof component.data.json === 'string') {\n try {\n return mapDynamicValues(component, JSON.parse(component.data.json));\n }\n catch (err) {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': ${err}`, context, 'validate:validateAvailableItems');\n }\n }\n else if (Array.isArray(component.data.json)) {\n // TODO: need to retype this\n return mapDynamicValues(component, component.data.json);\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n }\n case 'custom':\n const customItems = utils_1.Evaluator.evaluate(component.data.custom, {\n values: [],\n }, 'values');\n if (Array.isArray(customItems)) {\n return customItems;\n }\n else {\n throw new error_1.ProcessorError(`Failed to validate available values in JSON select component '${component.key}': the values are not an array`, context, 'validate:validateAvailableItems');\n }\n case 'url':\n return null;\n default:\n throw new error_1.ProcessorError(`Failed to validate available values in select component '${component.key}': data source ${component.dataSrc} is not valid}`, context, 'validate:validateAvailableItems');\n }\n}\nfunction compareComplexValues(valueA, valueB, context) {\n if (!(0, util_1.isObject)(valueA) || !(0, util_1.isObject)(valueB)) {\n return false;\n }\n try {\n // TODO: we need to have normalized values here at this moment, otherwise\n // this won't work\n return JSON.stringify(valueA) === JSON.stringify(valueB);\n }\n catch (err) {\n throw new error_1.ProcessorError(`Error while comparing available values: ${err}`, context, 'validate:validateAvailableItems');\n }\n}\nconst validateAvailableItems = (context) => __awaiter(void 0, void 0, void 0, function* () {\n const { component, value } = context;\n const error = new error_1.FieldError('invalidOption', context, 'onlyAvailableItems');\n try {\n if (isValidatableRadioComponent(component)) {\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return null;\n }\n const values = component.values;\n if (values) {\n return values.findIndex(({ value: optionValue }) => optionValue === value) !== -1\n ? null\n : error;\n }\n return null;\n }\n else if (isValidateableSelectComponent(component)) {\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return null;\n }\n const values = yield getAvailableSelectValues(component, context);\n if (values) {\n if ((0, util_1.isObject)(value)) {\n return values.find((optionValue) => compareComplexValues(optionValue, value, context)) !==\n undefined\n ? null\n : error;\n }\n return values.find((optionValue) => optionValue === value) !== undefined ? null : error;\n }\n }\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateAvailableItems');\n }\n return null;\n});\nexports.validateAvailableItems = validateAvailableItems;\nconst shouldValidate = (context) => {\n const { component, value } = context;\n if (value == null || (0, lodash_1.isEmpty)(value)) {\n return false;\n }\n if (isValidatableRadioComponent(component)) {\n return true;\n }\n if (isValidateableSelectComponent(component)) {\n return true;\n }\n return false;\n};\nexports.shouldValidate = shouldValidate;\nconst validateAvailableItemsSync = (context) => {\n const { component, value } = context;\n const error = new error_1.FieldError('invalidOption', context, 'onlyAvailableItems');\n try {\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (isValidatableRadioComponent(component)) {\n const values = component.values;\n if (values) {\n return values.findIndex(({ value: optionValue }) => optionValue === value) !== -1\n ? null\n : error;\n }\n return null;\n }\n else if (isValidateableSelectComponent(component)) {\n const values = getAvailableSelectValuesSync(component, context);\n if (values) {\n if ((0, util_1.isObject)(value)) {\n return values.find((optionValue) => compareComplexValues(optionValue, value, context)) !==\n undefined\n ? null\n : error;\n }\n return values.find((optionValue) => optionValue === value) !== undefined ? null : error;\n }\n }\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateAvailableItems');\n }\n return null;\n};\nexports.validateAvailableItemsSync = validateAvailableItemsSync;\nexports.validateAvailableItemsInfo = {\n name: 'validateAvailableItems',\n process: exports.validateAvailableItems,\n processSync: exports.validateAvailableItemsSync,\n shouldProcess: exports.shouldValidate\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateAvailableItems.js?");
360
349
 
361
350
  /***/ }),
362
351
 
@@ -422,7 +411,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
422
411
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
423
412
 
424
413
  "use strict";
425
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateMaskInfo = exports.validateMaskSync = exports.validateMask = exports.shouldValidate = exports.matchInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst inputmask_1 = __importDefault(__webpack_require__(/*! inputmask */ \"./node_modules/inputmask/dist/inputmask.js\"));\nconst isMaskType = (obj) => {\n return ((obj === null || obj === void 0 ? void 0 : obj.maskName) &&\n typeof (obj === null || obj === void 0 ? void 0 : obj.maskName) === 'string' &&\n (obj === null || obj === void 0 ? void 0 : obj.value) &&\n typeof (obj === null || obj === void 0 ? void 0 : obj.value) === 'string');\n};\nconst isValidatableComponent = (component) => {\n // For some reason we skip mask validation for time components\n return ((component && component.type && component.type !== 'time') &&\n (component && component.hasOwnProperty('inputMask') && !!component.inputMask) ||\n (component && component.hasOwnProperty('inputMasks') && !(0, lodash_1.isEmpty)(component.inputMasks)));\n};\nfunction getMaskByLabel(component, maskName) {\n var _a;\n if (maskName) {\n const inputMask = (_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.find((inputMask) => {\n return inputMask.label === maskName;\n });\n return inputMask ? inputMask.mask : undefined;\n }\n return;\n}\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.push(' ');\n break;\n default:\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i];\n const charPart = inputMask[i];\n if (charPart instanceof RegExp) {\n if (!charPart.test(char)) {\n return false;\n }\n continue;\n }\n else if (charPart !== char) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nconst shouldValidate = (context) => {\n var _a;\n const { component, value } = context;\n if (!isValidatableComponent(component) || !value) {\n return false;\n }\n if (value == null) {\n return false;\n }\n if (component.allowMultipleMasks && ((_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.length)) {\n const mask = value && isMaskType(value) ? value : undefined;\n const formioInputMask = getMaskByLabel(component, mask === null || mask === void 0 ? void 0 : mask.maskName);\n if (formioInputMask && !getInputMask(formioInputMask)) {\n return false;\n }\n }\n else if (!getInputMask(component.inputMask || '')) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateMask = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateMaskSync)(context);\n});\nexports.validateMask = validateMask;\n// TODO: this function has side effects\nconst validateMaskSync = (context) => {\n var _a;\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n let inputMask;\n let maskValue;\n if (component.allowMultipleMasks && ((_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.length)) {\n const mask = value && isMaskType(value) ? value : undefined;\n const formioInputMask = getMaskByLabel(component, mask === null || mask === void 0 ? void 0 : mask.maskName);\n if (formioInputMask) {\n inputMask = formioInputMask;\n }\n maskValue = mask === null || mask === void 0 ? void 0 : mask.value;\n }\n else {\n inputMask = component.inputMask || '';\n }\n if (!inputMask) {\n return null;\n }\n if (value && inputMask && typeof value === 'string' && component.type === 'textfield') {\n return inputmask_1.default.isValid(value, { mask: inputMask.toString() }) ? null : new error_1.FieldError('mask', context);\n }\n let inputMaskArr = getInputMask(inputMask);\n if (value != null && inputMaskArr) {\n const error = new error_1.FieldError('mask', context);\n return matchInputMask(maskValue || value, inputMaskArr) ? null : error;\n }\n return null;\n};\nexports.validateMaskSync = validateMaskSync;\nexports.validateMaskInfo = {\n name: 'validateMask',\n process: exports.validateMask,\n processSync: exports.validateMaskSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateMask.js?");
414
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateMaskInfo = exports.validateMaskSync = exports.validateMask = exports.shouldValidate = exports.matchInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst inputmask_1 = __importDefault(__webpack_require__(/*! inputmask */ \"./node_modules/@formio/core/node_modules/inputmask/dist/inputmask.js\"));\nconst isMaskType = (obj) => {\n return ((obj === null || obj === void 0 ? void 0 : obj.maskName) &&\n typeof (obj === null || obj === void 0 ? void 0 : obj.maskName) === 'string' &&\n (obj === null || obj === void 0 ? void 0 : obj.value) &&\n typeof (obj === null || obj === void 0 ? void 0 : obj.value) === 'string');\n};\nconst isValidatableComponent = (component) => {\n // For some reason we skip mask validation for time components\n return ((component && component.type && component.type !== 'time') &&\n (component && component.hasOwnProperty('inputMask') && !!component.inputMask) ||\n (component && component.hasOwnProperty('inputMasks') && !(0, lodash_1.isEmpty)(component.inputMasks)));\n};\nfunction getMaskByLabel(component, maskName) {\n var _a;\n if (maskName) {\n const inputMask = (_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.find((inputMask) => {\n return inputMask.label === maskName;\n });\n return inputMask ? inputMask.mask : undefined;\n }\n return;\n}\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.push(' ');\n break;\n default:\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i];\n const charPart = inputMask[i];\n if (charPart instanceof RegExp) {\n if (!charPart.test(char)) {\n return false;\n }\n continue;\n }\n else if (charPart !== char) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nconst shouldValidate = (context) => {\n var _a;\n const { component, value } = context;\n if (!isValidatableComponent(component) || !value) {\n return false;\n }\n if (value == null) {\n return false;\n }\n if (component.allowMultipleMasks && ((_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.length)) {\n const mask = value && isMaskType(value) ? value : undefined;\n const formioInputMask = getMaskByLabel(component, mask === null || mask === void 0 ? void 0 : mask.maskName);\n if (formioInputMask && !getInputMask(formioInputMask)) {\n return false;\n }\n }\n else if (!getInputMask(component.inputMask || '')) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateMask = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateMaskSync)(context);\n});\nexports.validateMask = validateMask;\n// TODO: this function has side effects\nconst validateMaskSync = (context) => {\n var _a;\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n let inputMask;\n let maskValue;\n if (component.allowMultipleMasks && ((_a = component.inputMasks) === null || _a === void 0 ? void 0 : _a.length)) {\n const mask = value && isMaskType(value) ? value : undefined;\n const formioInputMask = getMaskByLabel(component, mask === null || mask === void 0 ? void 0 : mask.maskName);\n if (formioInputMask) {\n inputMask = formioInputMask;\n }\n maskValue = mask === null || mask === void 0 ? void 0 : mask.value;\n }\n else {\n inputMask = component.inputMask || '';\n }\n if (!inputMask) {\n return null;\n }\n if (value && inputMask && typeof value === 'string' && component.type === 'textfield') {\n return inputmask_1.default.isValid(value, { mask: inputMask.toString() }) ? null : new error_1.FieldError('mask', context);\n }\n let inputMaskArr = getInputMask(inputMask);\n if (value != null && inputMaskArr) {\n const error = new error_1.FieldError('mask', context);\n return matchInputMask(maskValue || value, inputMaskArr) ? null : error;\n }\n return null;\n};\nexports.validateMaskSync = validateMaskSync;\nexports.validateMaskInfo = {\n name: 'validateMask',\n process: exports.validateMask,\n processSync: exports.validateMaskSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateMask.js?");
426
415
 
427
416
  /***/ }),
428
417
 
@@ -598,7 +587,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
598
587
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
599
588
 
600
589
  "use strict";
601
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateRequiredInfo = exports.validateRequiredSync = exports.validateRequired = exports.shouldValidate = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil.js\");\nconst isAddressComponent = (component) => {\n return component.type === 'address';\n};\nconst isDayComponent = (component) => {\n return component.type === 'day';\n};\nconst isAddressComponentDataObject = (value) => {\n return value !== null && typeof value === 'object' && value.mode && value.address && typeof value.address === 'object';\n};\n// Checkboxes and selectboxes consider false to be falsy, whereas other components with\n// settable values (e.g. radio, select, datamap, container, etc.) consider it truthy\nconst isComponentThatCannotHaveFalseValue = (component) => {\n return component.type === 'checkbox' || component.type === 'selectboxes';\n};\nconst valueIsPresent = (value, considerFalseTruthy, isNestedDataType) => {\n // Evaluate for 3 out of 6 falsy values (\"\", null, undefined), don't check for 0\n // and only check for false under certain conditions\n if (value === null || value === undefined || value === \"\" || (!considerFalseTruthy && value === false)) {\n return false;\n }\n // Evaluate for empty object\n else if ((0, util_1.isEmptyObject)(value)) {\n return false;\n }\n // Evaluate for empty array\n else if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n // Recursively evaluate\n else if (typeof value === 'object' && !isNestedDataType) {\n return Object.values(value).some((val) => valueIsPresent(val, considerFalseTruthy, isNestedDataType));\n }\n return true;\n};\nconst shouldValidate = (context) => {\n var _a;\n const { component } = context;\n if (((_a = component.validate) === null || _a === void 0 ? void 0 : _a.required) && !component.hidden) {\n return true;\n }\n return false;\n};\nexports.shouldValidate = shouldValidate;\nconst validateRequired = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateRequiredSync)(context);\n});\nexports.validateRequired = validateRequired;\nconst validateRequiredSync = (context) => {\n const error = new error_1.FieldError('required', Object.assign(Object.assign({}, context), { setting: true }));\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (isAddressComponent(component) && isAddressComponentDataObject(value)) {\n return (0, util_1.isEmptyObject)(value.address) ? error : Object.values(value.address).every((val) => !!val) ? null : error;\n }\n else if (isDayComponent(component) && value === '00/00/0000') {\n return error;\n }\n else if (isComponentThatCannotHaveFalseValue(component)) {\n return !valueIsPresent(value, false, (0, formUtil_1.isComponentNestedDataType)(component)) ? error : null;\n }\n return !valueIsPresent(value, true, (0, formUtil_1.isComponentNestedDataType)(component)) ? error : null;\n};\nexports.validateRequiredSync = validateRequiredSync;\nexports.validateRequiredInfo = {\n name: 'validateRequired',\n process: exports.validateRequired,\n processSync: exports.validateRequiredSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateRequired.js?");
590
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateRequiredInfo = exports.validateRequiredSync = exports.validateRequired = exports.shouldValidate = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil.js\");\nconst isAddressComponent = (component) => {\n return component.type === 'address';\n};\nconst isDayComponent = (component) => {\n return component.type === 'day';\n};\nconst isAddressComponentDataObject = (value) => {\n return value !== null && typeof value === 'object' && value.mode && value.address && typeof value.address === 'object';\n};\n// Checkboxes and selectboxes consider false to be falsy, whereas other components with\n// settable values (e.g. radio, select, datamap, container, etc.) consider it truthy\nconst isComponentThatCannotHaveFalseValue = (component) => {\n return component.type === 'checkbox' || component.type === 'selectboxes';\n};\nconst valueIsPresent = (value, considerFalseTruthy, isNestedDatatype) => {\n // Evaluate for 3 out of 6 falsy values (\"\", null, undefined), don't check for 0\n // and only check for false under certain conditions\n if (value === null || value === undefined || value === \"\" || (!considerFalseTruthy && value === false)) {\n return false;\n }\n // Evaluate for empty object\n else if ((0, util_1.isEmptyObject)(value)) {\n return false;\n }\n // Evaluate for empty array\n else if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n // Recursively evaluate\n else if (typeof value === 'object' && !isNestedDatatype) {\n return Object.values(value).some((val) => valueIsPresent(val, considerFalseTruthy, isNestedDatatype));\n }\n return true;\n};\nconst shouldValidate = (context) => {\n var _a;\n const { component } = context;\n if (((_a = component.validate) === null || _a === void 0 ? void 0 : _a.required) && !component.hidden) {\n return true;\n }\n return false;\n};\nexports.shouldValidate = shouldValidate;\nconst validateRequired = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateRequiredSync)(context);\n});\nexports.validateRequired = validateRequired;\nconst validateRequiredSync = (context) => {\n const error = new error_1.FieldError('required', Object.assign(Object.assign({}, context), { setting: true }));\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (isAddressComponent(component) && isAddressComponentDataObject(value)) {\n return (0, util_1.isEmptyObject)(value.address) ? error : Object.values(value.address).every((val) => !!val) ? null : error;\n }\n else if (isDayComponent(component) && value === '00/00/0000') {\n return error;\n }\n else if (isComponentThatCannotHaveFalseValue(component)) {\n return !valueIsPresent(value, false, (0, formUtil_1.isComponentNestedDataType)(component)) ? error : null;\n }\n return !valueIsPresent(value, true, (0, formUtil_1.isComponentNestedDataType)(component)) ? error : null;\n};\nexports.validateRequiredSync = validateRequiredSync;\nexports.validateRequiredInfo = {\n name: 'validateRequired',\n process: exports.validateRequired,\n processSync: exports.validateRequiredSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateRequired.js?");
602
591
 
603
592
  /***/ }),
604
593
 
@@ -1621,7 +1610,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
1621
1610
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1622
1611
 
1623
1612
  "use strict";
1624
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sanitize = void 0;\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/@formio/core/node_modules/dompurify/dist/purify.js\"));\nlet DOMPurify = null;\nconst getDOMPurify = () => {\n if (DOMPurify) {\n return DOMPurify;\n }\n if (window) {\n DOMPurify = (0, dompurify_1.default)(window);\n return DOMPurify;\n }\n return null;\n};\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n const dompurify = getDOMPurify();\n if (!dompurify) {\n console.log('DOMPurify unable to sanitize the contents.');\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target', 'within'],\n USE_PROFILES: { html: true }\n };\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/sanitize.js?");
1613
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sanitize = void 0;\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nlet DOMPurify = null;\nconst getDOMPurify = () => {\n if (DOMPurify) {\n return DOMPurify;\n }\n if (window) {\n DOMPurify = (0, dompurify_1.default)(window);\n return DOMPurify;\n }\n return null;\n};\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n const dompurify = getDOMPurify();\n if (!dompurify) {\n console.log('DOMPurify unable to sanitize the contents.');\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target', 'within'],\n USE_PROFILES: { html: true }\n };\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/sanitize.js?");
1625
1614
 
1626
1615
  /***/ }),
1627
1616
 
@@ -1647,13 +1636,13 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
1647
1636
 
1648
1637
  /***/ }),
1649
1638
 
1650
- /***/ "./node_modules/@formio/core/node_modules/dompurify/dist/purify.js":
1651
- /*!*************************************************************************!*\
1652
- !*** ./node_modules/@formio/core/node_modules/dompurify/dist/purify.js ***!
1653
- \*************************************************************************/
1639
+ /***/ "./node_modules/@formio/core/node_modules/inputmask/dist/inputmask.js":
1640
+ /*!****************************************************************************!*\
1641
+ !*** ./node_modules/@formio/core/node_modules/inputmask/dist/inputmask.js ***!
1642
+ \****************************************************************************/
1654
1643
  /***/ (function(module) {
1655
1644
 
1656
- eval("/*! @license DOMPurify 3.1.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.4/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n function numberIsNaN(x) {\n // eslint-disable-next-line unicorn/prefer-number-properties\n return typeof x === 'number' && isNaN(x);\n }\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.4';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Specify the maximum element nesting depth to prevent mXSS */\n const MAX_NESTING_DEPTH = 255;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (\n // eslint-disable-next-line unicorn/no-typeof-undefined\n typeof elm.__depth !== 'undefined' && typeof elm.__depth !== 'number' ||\n // eslint-disable-next-line unicorn/no-typeof-undefined\n typeof elm.__removalCount !== 'undefined' && typeof elm.__removalCount !== 'number' || typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement || value === '__depth' || value === '__removalCount')) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n const parentNode = getParentNode(shadowNode);\n\n /* Set the nesting depth of an element */\n if (shadowNode.nodeType === NODE_TYPE.element) {\n if (parentNode && parentNode.__depth) {\n /*\n We want the depth of the node in the original tree, which can\n change when it's removed from its parent.\n */\n shadowNode.__depth = (shadowNode.__removalCount || 0) + parentNode.__depth + 1;\n } else {\n shadowNode.__depth = 1;\n }\n }\n\n /*\n * Remove an element if nested too deeply to avoid mXSS\n * or if the __depth might have been tampered with\n */\n if (shadowNode.__depth >= MAX_NESTING_DEPTH || shadowNode.__depth < 0 || numberIsNaN(shadowNode.__depth)) {\n _forceRemove(shadowNode);\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n shadowNode.content.__depth = shadowNode.__depth;\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n const parentNode = getParentNode(currentNode);\n\n /* Set the nesting depth of an element */\n if (currentNode.nodeType === NODE_TYPE.element) {\n if (parentNode && parentNode.__depth) {\n /*\n We want the depth of the node in the original tree, which can\n change when it's removed from its parent.\n */\n currentNode.__depth = (currentNode.__removalCount || 0) + parentNode.__depth + 1;\n } else {\n currentNode.__depth = 1;\n }\n }\n\n /*\n * Remove an element if nested too deeply to avoid mXSS\n * or if the __depth might have been tampered with\n */\n if (currentNode.__depth >= MAX_NESTING_DEPTH || currentNode.__depth < 0 || numberIsNaN(currentNode.__depth)) {\n _forceRemove(currentNode);\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n currentNode.content.__depth = currentNode.__depth;\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/node_modules/dompurify/dist/purify.js?");
1645
+ eval("/*!\n * dist/inputmask\n * https://github.com/RobinHerbots/Inputmask\n * Copyright (c) 2010 - 2023 Robin Herbots\n * Licensed under the MIT license\n * Version: 5.0.8\n */\n!function(e, t) {\n if (true) module.exports = t(); else { var n, i; }\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function() {\n \"use strict\";\n var e = {\n 8741: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var i = !(\"undefined\" == typeof window || !window.document || !window.document.createElement);\n t.default = i;\n },\n 3976: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = i(2839), a = {\n _maxTestPos: 500,\n placeholder: \"_\",\n optionalmarker: [ \"[\", \"]\" ],\n quantifiermarker: [ \"{\", \"}\" ],\n groupmarker: [ \"(\", \")\" ],\n alternatormarker: \"|\",\n escapeChar: \"\\\\\",\n mask: null,\n regex: null,\n oncomplete: function() {},\n onincomplete: function() {},\n oncleared: function() {},\n repeat: 0,\n greedy: !1,\n autoUnmask: !1,\n removeMaskOnSubmit: !1,\n clearMaskOnLostFocus: !0,\n insertMode: !0,\n insertModeVisual: !0,\n clearIncomplete: !1,\n alias: null,\n onKeyDown: function() {},\n onBeforeMask: null,\n onBeforePaste: function(e, t) {\n return \"function\" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;\n },\n onBeforeWrite: null,\n onUnMask: null,\n showMaskOnFocus: !0,\n showMaskOnHover: !0,\n onKeyValidation: function() {},\n skipOptionalPartCharacter: \" \",\n numericInput: !1,\n rightAlign: !1,\n undoOnEscape: !0,\n radixPoint: \"\",\n _radixDance: !1,\n groupSeparator: \"\",\n keepStatic: null,\n positionCaretOnTab: !0,\n tabThrough: !1,\n supportsInputType: [ \"text\", \"tel\", \"url\", \"password\", \"search\" ],\n ignorables: [ n.keys.Backspace, n.keys.Tab, n.keys.Pause, n.keys.Escape, n.keys.PageUp, n.keys.PageDown, n.keys.End, n.keys.Home, n.keys.ArrowLeft, n.keys.ArrowUp, n.keys.ArrowRight, n.keys.ArrowDown, n.keys.Insert, n.keys.Delete, n.keys.ContextMenu, n.keys.F1, n.keys.F2, n.keys.F3, n.keys.F4, n.keys.F5, n.keys.F6, n.keys.F7, n.keys.F8, n.keys.F9, n.keys.F10, n.keys.F11, n.keys.F12, n.keys.Process, n.keys.Unidentified, n.keys.Shift, n.keys.Control, n.keys.Alt, n.keys.Tab, n.keys.AltGraph, n.keys.CapsLock ],\n isComplete: null,\n preValidation: null,\n postValidation: null,\n staticDefinitionSymbol: void 0,\n jitMasking: !1,\n nullable: !0,\n inputEventOnly: !1,\n noValuePatching: !1,\n positionCaretOnClick: \"lvp\",\n casing: null,\n inputmode: \"text\",\n importDataAttributes: !0,\n shiftPositions: !0,\n usePrototypeDefinitions: !0,\n validationEventTimeOut: 3e3,\n substitutes: {}\n };\n t.default = a;\n },\n 7392: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n t.default = {\n 9: {\n validator: \"[0-9\\uff10-\\uff19]\",\n definitionSymbol: \"*\"\n },\n a: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n definitionSymbol: \"*\"\n },\n \"*\": {\n validator: \"[0-9\\uff10-\\uff19A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\"\n }\n };\n },\n 253: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e, t, i) {\n if (void 0 === i) return e.__data ? e.__data[t] : null;\n e.__data = e.__data || {}, e.__data[t] = i;\n };\n },\n 3776: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.Event = void 0, t.off = function(e, t) {\n var i, n;\n f(this[0]) && e && (i = this[0].eventRegistry, n = this[0], e.split(\" \").forEach((function(e) {\n var a = l(e.split(\".\"), 2);\n (function(e, n) {\n var a, r, o = [];\n if (e.length > 0) if (void 0 === t) for (a = 0, r = i[e][n].length; a < r; a++) o.push({\n ev: e,\n namespace: n && n.length > 0 ? n : \"global\",\n handler: i[e][n][a]\n }); else o.push({\n ev: e,\n namespace: n && n.length > 0 ? n : \"global\",\n handler: t\n }); else if (n.length > 0) for (var s in i) for (var l in i[s]) if (l === n) if (void 0 === t) for (a = 0, \n r = i[s][l].length; a < r; a++) o.push({\n ev: s,\n namespace: l,\n handler: i[s][l][a]\n }); else o.push({\n ev: s,\n namespace: l,\n handler: t\n });\n return o;\n })(a[0], a[1]).forEach((function(e) {\n var t = e.ev, a = e.handler;\n !function(e, t, a) {\n if (e in i == 1) if (n.removeEventListener ? n.removeEventListener(e, a, !1) : n.detachEvent && n.detachEvent(\"on\".concat(e), a), \n \"global\" === t) for (var r in i[e]) i[e][r].splice(i[e][r].indexOf(a), 1); else i[e][t].splice(i[e][t].indexOf(a), 1);\n }(t, e.namespace, a);\n }));\n })));\n return this;\n }, t.on = function(e, t) {\n if (f(this[0])) {\n var i = this[0].eventRegistry, n = this[0];\n e.split(\" \").forEach((function(e) {\n var a = l(e.split(\".\"), 2), r = a[0], o = a[1];\n !function(e, a) {\n n.addEventListener ? n.addEventListener(e, t, !1) : n.attachEvent && n.attachEvent(\"on\".concat(e), t), \n i[e] = i[e] || {}, i[e][a] = i[e][a] || [], i[e][a].push(t);\n }(r, void 0 === o ? \"global\" : o);\n }));\n }\n return this;\n }, t.trigger = function(e) {\n var t = arguments;\n if (f(this[0])) for (var i = this[0].eventRegistry, n = this[0], r = \"string\" == typeof e ? e.split(\" \") : [ e.type ], s = 0; s < r.length; s++) {\n var l = r[s].split(\".\"), c = l[0], u = l[1] || \"global\";\n if (void 0 !== document && \"global\" === u) {\n var d, p = {\n bubbles: !0,\n cancelable: !0,\n composed: !0,\n detail: arguments[1]\n };\n if (document.createEvent) {\n try {\n if (\"input\" === c) p.inputType = \"insertText\", d = new InputEvent(c, p); else d = new CustomEvent(c, p);\n } catch (e) {\n (d = document.createEvent(\"CustomEvent\")).initCustomEvent(c, p.bubbles, p.cancelable, p.detail);\n }\n e.type && (0, a.default)(d, e), n.dispatchEvent(d);\n } else (d = document.createEventObject()).eventType = c, d.detail = arguments[1], \n e.type && (0, a.default)(d, e), n.fireEvent(\"on\" + d.eventType, d);\n } else if (void 0 !== i[c]) {\n arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]), \n arguments[0].detail = arguments.slice(1);\n var h = i[c];\n (\"global\" === u ? Object.values(h).flat() : h[u]).forEach((function(e) {\n return e.apply(n, t);\n }));\n }\n }\n return this;\n };\n var n, a = u(i(600)), r = u(i(9380)), o = u(i(4963)), s = u(i(8741));\n function l(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return c(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function c(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function u(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n function f(e) {\n return e instanceof Element;\n }\n t.Event = n, \"function\" == typeof r.default.CustomEvent ? t.Event = n = r.default.CustomEvent : s.default && (t.Event = n = function(e, t) {\n t = t || {\n bubbles: !1,\n cancelable: !1,\n composed: !0,\n detail: void 0\n };\n var i = document.createEvent(\"CustomEvent\");\n return i.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), i;\n }, n.prototype = r.default.Event.prototype);\n },\n 600: function(e, t) {\n function i(e) {\n return i = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, i(e);\n }\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function e() {\n var t, n, a, r, o, s, l = arguments[0] || {}, c = 1, u = arguments.length, f = !1;\n \"boolean\" == typeof l && (f = l, l = arguments[c] || {}, c++);\n \"object\" !== i(l) && \"function\" != typeof l && (l = {});\n for (;c < u; c++) if (null != (t = arguments[c])) for (n in t) a = l[n], l !== (r = t[n]) && (f && r && (\"[object Object]\" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = !1, \n s = a && Array.isArray(a) ? a : []) : s = a && \"[object Object]\" === Object.prototype.toString.call(a) ? a : {}, \n l[n] = e(f, s, r)) : void 0 !== r && (l[n] = r));\n return l;\n };\n },\n 4963: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = s(i(600)), a = s(i(9380)), r = s(i(253)), o = i(3776);\n function s(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var l = a.default.document;\n function c(e) {\n return e instanceof c ? e : this instanceof c ? void (null != e && e !== a.default && (this[0] = e.nodeName ? e : void 0 !== e[0] && e[0].nodeName ? e[0] : l.querySelector(e), \n void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new c(e);\n }\n c.prototype = {\n on: o.on,\n off: o.off,\n trigger: o.trigger\n }, c.extend = n.default, c.data = r.default, c.Event = o.Event;\n var u = c;\n t.default = u;\n },\n 9845: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.mobile = t.iphone = t.ie = void 0;\n var n, a = (n = i(9380)) && n.__esModule ? n : {\n default: n\n };\n var r = a.default.navigator && a.default.navigator.userAgent || \"\", o = r.indexOf(\"MSIE \") > 0 || r.indexOf(\"Trident/\") > 0, s = navigator.userAgentData && navigator.userAgentData.mobile || a.default.navigator && a.default.navigator.maxTouchPoints || \"ontouchstart\" in a.default, l = /iphone/i.test(r);\n t.iphone = l, t.mobile = s, t.ie = o;\n },\n 7184: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e) {\n return e.replace(i, \"\\\\$1\");\n };\n var i = new RegExp(\"(\\\\\" + [ \"/\", \".\", \"*\", \"+\", \"?\", \"|\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", \"\\\\\", \"$\", \"^\" ].join(\"|\\\\\") + \")\", \"gim\");\n },\n 6030: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.EventHandlers = void 0;\n var n = i(8711), a = i(2839), r = i(9845), o = i(7215), s = i(7760), l = i(4713);\n function c(e, t) {\n var i = \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (!i) {\n if (Array.isArray(e) || (i = function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return u(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return u(e, t);\n }(e)) || t && e && \"number\" == typeof e.length) {\n i && (e = i);\n var n = 0, a = function() {};\n return {\n s: a,\n n: function() {\n return n >= e.length ? {\n done: !0\n } : {\n done: !1,\n value: e[n++]\n };\n },\n e: function(e) {\n throw e;\n },\n f: a\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var r, o = !0, s = !1;\n return {\n s: function() {\n i = i.call(e);\n },\n n: function() {\n var e = i.next();\n return o = e.done, e;\n },\n e: function(e) {\n s = !0, r = e;\n },\n f: function() {\n try {\n o || null == i.return || i.return();\n } finally {\n if (s) throw r;\n }\n }\n };\n }\n function u(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n var f = {\n keyEvent: function(e, t, i, c, u) {\n var d = this.inputmask, p = d.opts, h = d.dependencyLib, v = d.maskset, m = this, g = h(m), y = e.key, k = n.caret.call(d, m), b = p.onKeyDown.call(this, e, n.getBuffer.call(d), k, p);\n if (void 0 !== b) return b;\n if (y === a.keys.Backspace || y === a.keys.Delete || r.iphone && y === a.keys.BACKSPACE_SAFARI || e.ctrlKey && y === a.keys.x && !(\"oncut\" in m)) e.preventDefault(), \n o.handleRemove.call(d, m, y, k), (0, s.writeBuffer)(m, n.getBuffer.call(d, !0), v.p, e, m.inputmask._valueGet() !== n.getBuffer.call(d).join(\"\")); else if (y === a.keys.End || y === a.keys.PageDown) {\n e.preventDefault();\n var x = n.seekNext.call(d, n.getLastValidPosition.call(d));\n n.caret.call(d, m, e.shiftKey ? k.begin : x, x, !0);\n } else y === a.keys.Home && !e.shiftKey || y === a.keys.PageUp ? (e.preventDefault(), \n n.caret.call(d, m, 0, e.shiftKey ? k.begin : 0, !0)) : p.undoOnEscape && y === a.keys.Escape && !0 !== e.altKey ? ((0, \n s.checkVal)(m, !0, !1, d.undoValue.split(\"\")), g.trigger(\"click\")) : y !== a.keys.Insert || e.shiftKey || e.ctrlKey || void 0 !== d.userOptions.insertMode ? !0 === p.tabThrough && y === a.keys.Tab ? !0 === e.shiftKey ? (k.end = n.seekPrevious.call(d, k.end, !0), \n !0 === l.getTest.call(d, k.end - 1).match.static && k.end--, k.begin = n.seekPrevious.call(d, k.end, !0), \n k.begin >= 0 && k.end > 0 && (e.preventDefault(), n.caret.call(d, m, k.begin, k.end))) : (k.begin = n.seekNext.call(d, k.begin, !0), \n k.end = n.seekNext.call(d, k.begin, !0), k.end < v.maskLength && k.end--, k.begin <= v.maskLength && (e.preventDefault(), \n n.caret.call(d, m, k.begin, k.end))) : e.shiftKey || p.insertModeVisual && !1 === p.insertMode && (y === a.keys.ArrowRight ? setTimeout((function() {\n var e = n.caret.call(d, m);\n n.caret.call(d, m, e.begin);\n }), 0) : y === a.keys.ArrowLeft && setTimeout((function() {\n var e = n.translatePosition.call(d, m.inputmask.caretPos.begin);\n n.translatePosition.call(d, m.inputmask.caretPos.end);\n d.isRTL ? n.caret.call(d, m, e + (e === v.maskLength ? 0 : 1)) : n.caret.call(d, m, e - (0 === e ? 0 : 1));\n }), 0)) : o.isSelection.call(d, k) ? p.insertMode = !p.insertMode : (p.insertMode = !p.insertMode, \n n.caret.call(d, m, k.begin, k.begin));\n return d.isComposing = y == a.keys.Process || y == a.keys.Unidentified, d.ignorable = p.ignorables.includes(y), \n f.keypressEvent.call(this, e, t, i, c, u);\n },\n keypressEvent: function(e, t, i, r, l) {\n var c = this.inputmask || this, u = c.opts, f = c.dependencyLib, d = c.maskset, p = c.el, h = f(p), v = e.key;\n if (!0 === t || e.ctrlKey && e.altKey || !(e.ctrlKey || e.metaKey || c.ignorable)) {\n if (v) {\n var m, g = t ? {\n begin: l,\n end: l\n } : n.caret.call(c, p);\n v = u.substitutes[v] || v, d.writeOutBuffer = !0;\n var y = o.isValid.call(c, g, v, r, void 0, void 0, void 0, t);\n if (!1 !== y && (n.resetMaskSet.call(c, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(c, y.pos.begin ? y.pos.begin : y.pos), \n d.p = m), m = u.numericInput && void 0 === y.caret ? n.seekPrevious.call(c, m) : m, \n !1 !== i && (setTimeout((function() {\n u.onKeyValidation.call(p, v, y);\n }), 0), d.writeOutBuffer && !1 !== y)) {\n var k = n.getBuffer.call(c);\n (0, s.writeBuffer)(p, k, m, e, !0 !== t);\n }\n if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y;\n }\n } else v === a.keys.Enter && c.undoValue !== c._valueGet(!0) && (c.undoValue = c._valueGet(!0), \n setTimeout((function() {\n h.trigger(\"change\");\n }), 0));\n },\n pasteEvent: function(e) {\n var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this);\n i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t));\n var l = r.substr(0, o.begin), u = r.substr(o.end, r.length);\n if (l == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join(\"\") && (l = \"\"), \n u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join(\"\") && (u = \"\"), \n window.clipboardData && window.clipboardData.getData) r = l + window.clipboardData.getData(\"Text\") + u; else {\n if (!e.clipboardData || !e.clipboardData.getData) return !0;\n r = l + e.clipboardData.getData(\"text/plain\") + u;\n }\n var f = r;\n if (i.isRTL) {\n f = f.split(\"\");\n var d, p = c(n.getBufferTemplate.call(i));\n try {\n for (p.s(); !(d = p.n()).done; ) {\n var h = d.value;\n f[0] === h && f.shift();\n }\n } catch (e) {\n p.e(e);\n } finally {\n p.f();\n }\n f = f.join(\"\");\n }\n if (\"function\" == typeof a.onBeforePaste) {\n if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1;\n f || (f = r);\n }\n (0, s.checkVal)(this, !0, !1, f.toString().split(\"\"), e), e.preventDefault();\n },\n inputFallBackEvent: function(e) {\n var t = this.inputmask, i = t.opts, o = t.dependencyLib;\n var c, u = this, d = u.inputmask._valueGet(!0), p = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(\"\"), h = n.caret.call(t, u, void 0, void 0, !0);\n if (p !== d) {\n if (c = function(e, a, r) {\n for (var o, s, c, u = e.substr(0, r.begin).split(\"\"), f = e.substr(r.begin).split(\"\"), d = a.substr(0, r.begin).split(\"\"), p = a.substr(r.begin).split(\"\"), h = u.length >= d.length ? u.length : d.length, v = f.length >= p.length ? f.length : p.length, m = \"\", g = [], y = \"~\"; u.length < h; ) u.push(y);\n for (;d.length < h; ) d.push(y);\n for (;f.length < v; ) f.unshift(y);\n for (;p.length < v; ) p.unshift(y);\n var k = u.concat(f), b = d.concat(p);\n for (s = 0, o = k.length; s < o; s++) switch (c = l.getPlaceholder.call(t, n.translatePosition.call(t, s)), \n m) {\n case \"insertText\":\n b[s - 1] === k[s] && r.begin == k.length - 1 && g.push(k[s]), s = o;\n break;\n\n case \"insertReplacementText\":\n case \"deleteContentBackward\":\n k[s] === y ? r.end++ : s = o;\n break;\n\n default:\n k[s] !== b[s] && (k[s + 1] !== y && k[s + 1] !== c && void 0 !== k[s + 1] || (b[s] !== c || b[s + 1] !== y) && b[s] !== y ? b[s + 1] === y && b[s] === k[s + 1] ? (m = \"insertText\", \n g.push(k[s]), r.begin--, r.end--) : k[s] !== c && k[s] !== y && (k[s + 1] === y || b[s] !== k[s] && b[s + 1] === k[s + 1]) ? (m = \"insertReplacementText\", \n g.push(k[s]), r.begin--) : k[s] === y ? (m = \"deleteContentBackward\", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === i.radixPoint) && r.end++) : s = o : (m = \"insertText\", \n g.push(k[s]), r.begin--, r.end--));\n }\n return {\n action: m,\n data: g,\n caret: r\n };\n }(d, p, h), (u.inputmask.shadowRoot || u.ownerDocument).activeElement !== u && u.focus(), \n (0, s.writeBuffer)(u, n.getBuffer.call(t)), n.caret.call(t, u, h.begin, h.end, !0), \n !r.mobile && t.skipNextInsert && \"insertText\" === e.inputType && \"insertText\" === c.action && t.isComposing) return !1;\n switch (\"insertCompositionText\" === e.inputType && \"insertText\" === c.action && t.isComposing ? t.skipNextInsert = !0 : t.skipNextInsert = !1, \n c.action) {\n case \"insertText\":\n case \"insertReplacementText\":\n c.data.forEach((function(e, i) {\n var n = new o.Event(\"keypress\");\n n.key = e, t.ignorable = !1, f.keypressEvent.call(u, n);\n })), setTimeout((function() {\n t.$el.trigger(\"keyup\");\n }), 0);\n break;\n\n case \"deleteContentBackward\":\n var v = new o.Event(\"keydown\");\n v.key = a.keys.Backspace, f.keyEvent.call(u, v);\n break;\n\n default:\n (0, s.applyInputValue)(u, d), n.caret.call(t, u, h.begin, h.end, !0);\n }\n e.preventDefault();\n }\n },\n setValueEvent: function(e) {\n var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1];\n void 0 === a && (a = i.inputmask._valueGet(!0)), (0, s.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]);\n },\n focusEvent: function(e) {\n var t = this.inputmask, i = t.opts, a = null == t ? void 0 : t._valueGet();\n i.showMaskOnFocus && a !== n.getBuffer.call(t).join(\"\") && (0, s.writeBuffer)(this, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))), \n !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || o.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || f.clickEvent.apply(this, [ e, !0 ]), \n t.undoValue = null == t ? void 0 : t._valueGet(!0);\n },\n invalidEvent: function(e) {\n this.inputmask.validationEvent = !0;\n },\n mouseleaveEvent: function() {\n var e = this.inputmask, t = e.opts, i = this;\n e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0, \n s.HandleNativePlaceholder)(i, e.originalPlaceholder);\n },\n clickEvent: function(e, t) {\n var i = this.inputmask;\n i.clicked++;\n var a = this;\n if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) {\n var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t);\n void 0 !== r && n.caret.call(i, a, r);\n }\n },\n cutEvent: function(e) {\n var t = this.inputmask, i = t.maskset, r = this, l = n.caret.call(t, r), c = t.isRTL ? n.getBuffer.call(t).slice(l.end, l.begin) : n.getBuffer.call(t).slice(l.begin, l.end), u = t.isRTL ? c.reverse().join(\"\") : c.join(\"\");\n window.navigator.clipboard ? window.navigator.clipboard.writeText(u) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData(\"Text\", u), \n o.handleRemove.call(t, r, a.keys.Delete, l), (0, s.writeBuffer)(r, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0));\n },\n blurEvent: function(e) {\n var t = this.inputmask, i = t.opts, a = t.dependencyLib;\n t.clicked = 0;\n var r = a(this), l = this;\n if (l.inputmask) {\n (0, s.HandleNativePlaceholder)(l, t.originalPlaceholder);\n var c = l.inputmask._valueGet(), u = n.getBuffer.call(t).slice();\n \"\" !== c && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && c === n.getBufferTemplate.call(t).join(\"\") ? u = [] : s.clearOptionalTail.call(t, u)), \n !1 === o.isComplete.call(t, u) && (setTimeout((function() {\n r.trigger(\"incomplete\");\n }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())), \n (0, s.writeBuffer)(l, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0), \n r.trigger(\"change\"));\n }\n },\n mouseenterEvent: function() {\n var e = this.inputmask, t = e.opts.showMaskOnHover, i = this;\n if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) {\n var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join(\"\");\n t && (0, s.HandleNativePlaceholder)(i, a);\n }\n },\n submitEvent: function() {\n var e = this.inputmask, t = e.opts;\n e.undoValue !== e._valueGet(!0) && e.$el.trigger(\"change\"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join(\"\") && e._valueSet(\"\"), \n t.clearIncomplete && !1 === o.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(\"\"), \n t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {\n (0, s.writeBuffer)(e.el, n.getBuffer.call(e));\n }), 0));\n },\n resetEvent: function() {\n var e = this.inputmask;\n e.refreshValue = !0, setTimeout((function() {\n (0, s.applyInputValue)(e.el, e._valueGet(!0));\n }), 0);\n }\n };\n t.EventHandlers = f;\n },\n 9716: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.EventRuler = void 0;\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n }, r = i(2839), o = i(8711), s = i(7760);\n var l = {\n on: function(e, t, i) {\n var n = e.inputmask.dependencyLib, l = function(t) {\n t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);\n var l, c = this, u = c.inputmask, f = u ? u.opts : void 0;\n if (void 0 === u && \"FORM\" !== this.nodeName) {\n var d = n.data(c, \"_inputmask_opts\");\n n(c).off(), d && new a.default(d).mask(c);\n } else {\n if ([ \"submit\", \"reset\", \"setvalue\" ].includes(t.type) || \"FORM\" === this.nodeName || !(c.disabled || c.readOnly && !(\"keydown\" === t.type && t.ctrlKey && t.key === r.keys.c || !1 === f.tabThrough && t.key === r.keys.Tab))) {\n switch (t.type) {\n case \"input\":\n if (!0 === u.skipInputEvent) return u.skipInputEvent = !1, t.preventDefault();\n break;\n\n case \"click\":\n case \"focus\":\n return u.validationEvent ? (u.validationEvent = !1, e.blur(), (0, s.HandleNativePlaceholder)(e, (u.isRTL ? o.getBufferTemplate.call(u).slice().reverse() : o.getBufferTemplate.call(u)).join(\"\")), \n setTimeout((function() {\n e.focus();\n }), f.validationEventTimeOut), !1) : (l = arguments, void setTimeout((function() {\n e.inputmask && i.apply(c, l);\n }), 0));\n }\n var p = i.apply(c, arguments);\n return !1 === p && (t.preventDefault(), t.stopPropagation()), p;\n }\n t.preventDefault();\n }\n };\n [ \"submit\", \"reset\" ].includes(t) ? (l = l.bind(e), null !== e.form && n(e.form).on(t, l)) : n(e).on(t, l), \n e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l);\n },\n off: function(e, t) {\n if (e.inputmask && e.inputmask.events) {\n var i = e.inputmask.dependencyLib, n = e.inputmask.events;\n for (var a in t && ((n = [])[t] = e.inputmask.events[t]), n) {\n for (var r = n[a]; r.length > 0; ) {\n var o = r.pop();\n [ \"submit\", \"reset\" ].includes(a) ? null !== e.form && i(e.form).off(a, o) : i(e).off(a, o);\n }\n delete e.inputmask.events[a];\n }\n }\n }\n };\n t.EventRuler = l;\n },\n 219: function(e, t, i) {\n var n = d(i(2394)), a = i(2839), r = d(i(7184)), o = i(8711), s = i(4713);\n function l(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return c(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function c(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function u(e) {\n return u = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, u(e);\n }\n function f(e, t) {\n for (var i = 0; i < t.length; i++) {\n var n = t[i];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), \n Object.defineProperty(e, (a = n.key, r = void 0, r = function(e, t) {\n if (\"object\" !== u(e) || null === e) return e;\n var i = e[Symbol.toPrimitive];\n if (void 0 !== i) {\n var n = i.call(e, t || \"default\");\n if (\"object\" !== u(n)) return n;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(a, \"string\"), \"symbol\" === u(r) ? r : String(r)), n);\n }\n var a, r;\n }\n function d(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var p = n.default.dependencyLib, h = function() {\n function e(t, i, n) {\n !function(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.mask = t, this.format = i, this.opts = n, this._date = new Date(1, 0, 1), \n this.initDateObject(t, this.opts);\n }\n var t, i, n;\n return t = e, (i = [ {\n key: \"date\",\n get: function() {\n return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)), \n this._date;\n }\n }, {\n key: \"initDateObject\",\n value: function(e, t) {\n var i;\n for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) {\n var n = new RegExp(\"\\\\d+$\").exec(i[0]), a = n ? i[0][0] + \"x\" : i[0], r = void 0;\n if (void 0 !== e) {\n if (n) {\n var o = P(t).lastIndex, s = E(i.index, t);\n P(t).lastIndex = o, r = e.slice(0, e.indexOf(s.nextMatch[0]));\n } else r = e.slice(0, g[a] && g[a][4] || a.length);\n e = e.slice(r.length);\n }\n Object.prototype.hasOwnProperty.call(g, a) && this.setValue(this, r, a, g[a][2], g[a][1]);\n }\n }\n }, {\n key: \"setValue\",\n value: function(e, t, i, n, a) {\n if (void 0 !== t && (e[n] = \"ampm\" === n ? t : t.replace(/[^0-9]/g, \"0\"), e[\"raw\" + n] = t.replace(/\\s/g, \"_\")), \n void 0 !== a) {\n var r = e[n];\n (\"day\" === n && 29 === parseInt(r) || \"month\" === n && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || \"\" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)), \n \"day\" === n && (m = !0, 0 === parseInt(r) && (r = 1)), \"month\" === n && (m = !0), \n \"year\" === n && (m = !0, r.length < 4 && (r = M(r, 4, !0))), \"\" === r || isNaN(r) || a.call(e._date, r), \n \"ampm\" === n && a.call(e._date, r);\n }\n }\n }, {\n key: \"reset\",\n value: function() {\n this._date = new Date(1, 0, 1);\n }\n }, {\n key: \"reInit\",\n value: function() {\n this._date = void 0, this.date;\n }\n } ]) && f(t.prototype, i), n && f(t, n), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e;\n }(), v = (new Date).getFullYear(), m = !1, g = {\n d: [ \"[1-9]|[12][0-9]|3[01]\", Date.prototype.setDate, \"day\", Date.prototype.getDate ],\n dd: [ \"0[1-9]|[12][0-9]|3[01]\", Date.prototype.setDate, \"day\", function() {\n return M(Date.prototype.getDate.call(this), 2);\n } ],\n ddd: [ \"\" ],\n dddd: [ \"\" ],\n m: [ \"[1-9]|1[012]\", function(e) {\n var t = e ? parseInt(e) : 0;\n return t > 0 && t--, Date.prototype.setMonth.call(this, t);\n }, \"month\", function() {\n return Date.prototype.getMonth.call(this) + 1;\n } ],\n mm: [ \"0[1-9]|1[012]\", function(e) {\n var t = e ? parseInt(e) : 0;\n return t > 0 && t--, Date.prototype.setMonth.call(this, t);\n }, \"month\", function() {\n return M(Date.prototype.getMonth.call(this) + 1, 2);\n } ],\n mmm: [ \"\" ],\n mmmm: [ \"\" ],\n yy: [ \"[0-9]{2}\", Date.prototype.setFullYear, \"year\", function() {\n return M(Date.prototype.getFullYear.call(this), 2);\n } ],\n yyyy: [ \"[0-9]{4}\", Date.prototype.setFullYear, \"year\", function() {\n return M(Date.prototype.getFullYear.call(this), 4);\n } ],\n h: [ \"[1-9]|1[0-2]\", Date.prototype.setHours, \"hours\", Date.prototype.getHours ],\n hh: [ \"0[1-9]|1[0-2]\", Date.prototype.setHours, \"hours\", function() {\n return M(Date.prototype.getHours.call(this), 2);\n } ],\n hx: [ function(e) {\n return \"[0-9]{\".concat(e, \"}\");\n }, Date.prototype.setHours, \"hours\", function(e) {\n return Date.prototype.getHours;\n } ],\n H: [ \"1?[0-9]|2[0-3]\", Date.prototype.setHours, \"hours\", Date.prototype.getHours ],\n HH: [ \"0[0-9]|1[0-9]|2[0-3]\", Date.prototype.setHours, \"hours\", function() {\n return M(Date.prototype.getHours.call(this), 2);\n } ],\n Hx: [ function(e) {\n return \"[0-9]{\".concat(e, \"}\");\n }, Date.prototype.setHours, \"hours\", function(e) {\n return function() {\n return M(Date.prototype.getHours.call(this), e);\n };\n } ],\n M: [ \"[1-5]?[0-9]\", Date.prototype.setMinutes, \"minutes\", Date.prototype.getMinutes ],\n MM: [ \"0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]\", Date.prototype.setMinutes, \"minutes\", function() {\n return M(Date.prototype.getMinutes.call(this), 2);\n } ],\n s: [ \"[1-5]?[0-9]\", Date.prototype.setSeconds, \"seconds\", Date.prototype.getSeconds ],\n ss: [ \"0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]\", Date.prototype.setSeconds, \"seconds\", function() {\n return M(Date.prototype.getSeconds.call(this), 2);\n } ],\n l: [ \"[0-9]{3}\", Date.prototype.setMilliseconds, \"milliseconds\", function() {\n return M(Date.prototype.getMilliseconds.call(this), 3);\n }, 3 ],\n L: [ \"[0-9]{2}\", Date.prototype.setMilliseconds, \"milliseconds\", function() {\n return M(Date.prototype.getMilliseconds.call(this), 2);\n }, 2 ],\n t: [ \"[ap]\", k, \"ampm\", b, 1 ],\n tt: [ \"[ap]m\", k, \"ampm\", b, 2 ],\n T: [ \"[AP]\", k, \"ampm\", b, 1 ],\n TT: [ \"[AP]M\", k, \"ampm\", b, 2 ],\n Z: [ \".*\", void 0, \"Z\", function() {\n var e = this.toString().match(/\\((.+)\\)/)[1];\n e.includes(\" \") && (e = (e = e.replace(\"-\", \" \").toUpperCase()).split(\" \").map((function(e) {\n return l(e, 1)[0];\n })).join(\"\"));\n return e;\n } ],\n o: [ \"\" ],\n S: [ \"\" ]\n }, y = {\n isoDate: \"yyyy-mm-dd\",\n isoTime: \"HH:MM:ss\",\n isoDateTime: \"yyyy-mm-dd'T'HH:MM:ss\",\n isoUtcDateTime: \"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'\"\n };\n function k(e) {\n var t = this.getHours();\n e.toLowerCase().includes(\"p\") ? this.setHours(t + 12) : e.toLowerCase().includes(\"a\") && t >= 12 && this.setHours(t - 12);\n }\n function b() {\n var e = this.getHours();\n return (e = e || 12) >= 12 ? \"PM\" : \"AM\";\n }\n function x(e) {\n var t = new RegExp(\"\\\\d+$\").exec(e[0]);\n if (t && void 0 !== t[0]) {\n var i = g[e[0][0] + \"x\"].slice(\"\");\n return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i;\n }\n if (g[e[0]]) return g[e[0]];\n }\n function P(e) {\n if (!e.tokenizer) {\n var t = [], i = [];\n for (var n in g) if (/\\.*x$/.test(n)) {\n var a = n[0] + \"\\\\d+\";\n -1 === i.indexOf(a) && i.push(a);\n } else -1 === t.indexOf(n[0]) && t.push(n[0]);\n e.tokenizer = \"(\" + (i.length > 0 ? i.join(\"|\") + \"|\" : \"\") + t.join(\"+|\") + \")+?|.\", \n e.tokenizer = new RegExp(e.tokenizer, \"g\");\n }\n return e.tokenizer;\n }\n function w(e, t, i) {\n if (!m) return !0;\n if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || \"29\" == e.day && (!isFinite(e.rawyear) || void 0 === e.rawyear || \"\" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;\n if (\"29\" == e.day) {\n var n = E(t.pos, i);\n if (\"yyyy\" === n.targetMatch[0] && t.pos - n.targetMatchIndex == 2) return t.remove = t.pos + 1, \n t;\n } else if (\"02\" == e.month && \"30\" == e.day && void 0 !== t.c) return e.day = \"03\", \n e.date.setDate(3), e.date.setMonth(1), t.insert = [ {\n pos: t.pos,\n c: \"0\"\n }, {\n pos: t.pos + 1,\n c: t.c\n } ], t.caret = o.seekNext.call(this, t.pos + 1), t;\n return !1;\n }\n function S(e, t, i, n) {\n var a, o, s = \"\";\n for (P(i).lastIndex = 0; a = P(i).exec(e); ) {\n if (void 0 === t) if (o = x(a)) s += \"(\" + o[0] + \")\"; else switch (a[0]) {\n case \"[\":\n s += \"(\";\n break;\n\n case \"]\":\n s += \")?\";\n break;\n\n default:\n s += (0, r.default)(a[0]);\n } else if (o = x(a)) if (!0 !== n && o[3]) s += o[3].call(t.date); else o[2] ? s += t[\"raw\" + o[2]] : s += a[0]; else s += a[0];\n }\n return s;\n }\n function M(e, t, i) {\n for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + \"0\" : \"0\" + e;\n return e;\n }\n function _(e, t, i) {\n return \"string\" == typeof e ? new h(e, t, i) : e && \"object\" === u(e) && Object.prototype.hasOwnProperty.call(e, \"date\") ? e : void 0;\n }\n function O(e, t) {\n return S(t.inputFormat, {\n date: e\n }, t);\n }\n function E(e, t) {\n var i, n, a = 0, r = 0;\n for (P(t).lastIndex = 0; n = P(t).exec(t.inputFormat); ) {\n var o = new RegExp(\"\\\\d+$\").exec(n[0]);\n if ((a += r = o ? parseInt(o[0]) : n[0].length) >= e + 1) {\n i = n, n = P(t).exec(t.inputFormat);\n break;\n }\n }\n return {\n targetMatchIndex: a - r,\n nextMatch: n,\n targetMatch: i\n };\n }\n n.default.extendAliases({\n datetime: {\n mask: function(e) {\n return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join(\"|\"), e.inputFormat = y[e.inputFormat] || e.inputFormat, \n e.displayFormat = y[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = y[e.outputFormat] || e.outputFormat || e.inputFormat, \n e.placeholder = \"\" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\\]]/, \"\"), \n e.regex = S(e.inputFormat, void 0, e), e.min = _(e.min, e.inputFormat, e), e.max = _(e.max, e.inputFormat, e), \n null;\n },\n placeholder: \"\",\n inputFormat: \"isoDateTime\",\n displayFormat: null,\n outputFormat: null,\n min: null,\n max: null,\n skipOptionalPartCharacter: \"\",\n i18n: {\n dayNames: [ \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\" ],\n monthNames: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ],\n ordinalSuffix: [ \"st\", \"nd\", \"rd\", \"th\" ]\n },\n preValidation: function(e, t, i, n, a, r, o, s) {\n if (s) return !0;\n if (isNaN(i) && e[t] !== i) {\n var l = E(t, a);\n if (l.nextMatch && l.nextMatch[0] === i && l.targetMatch[0].length > 1) {\n var c = g[l.targetMatch[0]][0];\n if (new RegExp(c).test(\"0\" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = \"0\", \n {\n fuzzy: !0,\n buffer: e,\n refreshFromBuffer: {\n start: t - 1,\n end: t + 1\n },\n pos: t + 1\n };\n }\n }\n return !0;\n },\n postValidation: function(e, t, i, n, a, r, o, l) {\n var c, u;\n if (o) return !0;\n if (!1 === n && (((c = E(t + 1, a)).targetMatch && c.targetMatchIndex === t && c.targetMatch[0].length > 1 && void 0 !== g[c.targetMatch[0]] || (c = E(t + 2, a)).targetMatch && c.targetMatchIndex === t + 1 && c.targetMatch[0].length > 1 && void 0 !== g[c.targetMatch[0]]) && (u = g[c.targetMatch[0]][0]), \n void 0 !== u && (void 0 !== r.validPositions[t + 1] && new RegExp(u).test(i + \"0\") ? (e[t] = i, \n e[t + 1] = \"0\", n = {\n pos: t + 2,\n caret: t\n }) : new RegExp(u).test(\"0\" + i) && (e[t] = \"0\", e[t + 1] = i, n = {\n pos: t + 2\n })), !1 === n)) return n;\n if (n.fuzzy && (e = n.buffer, t = n.pos), (c = E(t, a)).targetMatch && c.targetMatch[0] && void 0 !== g[c.targetMatch[0]]) {\n var f = g[c.targetMatch[0]];\n u = f[0];\n var d = e.slice(c.targetMatchIndex, c.targetMatchIndex + c.targetMatch[0].length);\n if (!1 === new RegExp(u).test(d.join(\"\")) && 2 === c.targetMatch[0].length && r.validPositions[c.targetMatchIndex] && r.validPositions[c.targetMatchIndex + 1] && (r.validPositions[c.targetMatchIndex + 1].input = \"0\"), \n \"year\" == f[2]) for (var p = s.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h], \n delete r.validPositions[h];\n }\n var m = n, y = _(e.join(\"\"), a.inputFormat, a);\n return m && !isNaN(y.date.getTime()) && (a.prefillYear && (m = function(e, t, i) {\n if (e.year !== e.rawyear) {\n var n = v.toString(), a = e.rawyear.replace(/[^0-9]/g, \"\"), r = n.slice(0, a.length), o = n.slice(a.length);\n if (2 === a.length && a === r) {\n var s = new Date(v, e.month - 1, e.day);\n e.day == s.getDate() && (!i.max || i.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(v), \n e.year = n, t.insert = [ {\n pos: t.pos + 1,\n c: o[0]\n }, {\n pos: t.pos + 2,\n c: o[1]\n } ]);\n }\n }\n return t;\n }(y, m, a)), m = function(e, t, i, n, a) {\n if (!t) return t;\n if (t && i.min && !isNaN(i.min.date.getTime())) {\n var r;\n for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) {\n var o;\n if ((o = x(r)) && o[3]) {\n for (var s = o[1], l = e[o[2]], c = i.min[o[2]], u = i.max ? i.max[o[2]] : c, f = [], d = !1, p = 0; p < c.length; p++) void 0 !== n.validPositions[p + r.index] || d ? (f[p] = l[p], \n d = d || l[p] > c[p]) : (f[p] = c[p], \"year\" === o[2] && l.length - 1 == p && c != u && (f = (parseInt(f.join(\"\")) + 1).toString().split(\"\")), \n \"ampm\" === o[2] && c != u && i.min.date.getTime() > e.date.getTime() && (f[p] = u[p]));\n s.call(e._date, f.join(\"\"));\n }\n }\n t = i.min.date.getTime() <= e.date.getTime(), e.reInit();\n }\n return t && i.max && (isNaN(i.max.date.getTime()) || (t = i.max.date.getTime() >= e.date.getTime())), \n t;\n }(y, m = w.call(this, y, m, a), a, r)), void 0 !== t && m && n.pos !== t ? {\n buffer: S(a.inputFormat, y, a).split(\"\"),\n refreshFromBuffer: {\n start: t,\n end: n.pos\n },\n pos: n.caret || n.pos\n } : m;\n },\n onKeyDown: function(e, t, i, n) {\n e.ctrlKey && e.key === a.keys.ArrowRight && (this.inputmask._valueSet(O(new Date, n)), \n p(this).trigger(\"setvalue\"));\n },\n onUnMask: function(e, t, i) {\n return t ? S(i.outputFormat, _(e, i.inputFormat, i), i, !0) : t;\n },\n casing: function(e, t, i, n) {\n return 0 == t.nativeDef.indexOf(\"[ap]\") ? e.toLowerCase() : 0 == t.nativeDef.indexOf(\"[AP]\") ? e.toUpperCase() : e;\n },\n onBeforeMask: function(e, t) {\n return \"[object Date]\" === Object.prototype.toString.call(e) && (e = O(e, t)), e;\n },\n insertMode: !1,\n insertModeVisual: !1,\n shiftPositions: !1,\n keepStatic: !1,\n inputmode: \"numeric\",\n prefillYear: !0\n }\n });\n },\n 3851: function(e, t, i) {\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n }, r = i(8711), o = i(4713);\n a.default.extendDefinitions({\n A: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n casing: \"upper\"\n },\n \"&\": {\n validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n casing: \"upper\"\n },\n \"#\": {\n validator: \"[0-9A-Fa-f]\",\n casing: \"upper\"\n }\n });\n var s = new RegExp(\"25[0-5]|2[0-4][0-9]|[01][0-9][0-9]\");\n function l(e, t, i, n, a) {\n return i - 1 > -1 && \".\" !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && \".\" !== t.buffer[i - 2] ? t.buffer[i - 2] + e : \"0\" + e) : e = \"00\" + e, \n s.test(e);\n }\n a.default.extendAliases({\n cssunit: {\n regex: \"[+-]?[0-9]+\\\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)\"\n },\n url: {\n regex: \"(https?|ftp)://.*\",\n autoUnmask: !1,\n keepStatic: !1,\n tabThrough: !0\n },\n ip: {\n mask: \"i{1,3}.j{1,3}.k{1,3}.l{1,3}\",\n definitions: {\n i: {\n validator: l\n },\n j: {\n validator: l\n },\n k: {\n validator: l\n },\n l: {\n validator: l\n }\n },\n onUnMask: function(e, t, i) {\n return e;\n },\n inputmode: \"decimal\",\n substitutes: {\n \",\": \".\"\n }\n },\n email: {\n mask: function(e) {\n var t = e.separator, i = e.quantifier, n = \"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]\", a = n;\n if (t) for (var r = 0; r < i; r++) a += \"[\".concat(t).concat(n, \"]\");\n return a;\n },\n greedy: !1,\n casing: \"lower\",\n separator: null,\n quantifier: 5,\n skipOptionalPartCharacter: \"\",\n onBeforePaste: function(e, t) {\n return (e = e.toLowerCase()).replace(\"mailto:\", \"\");\n },\n definitions: {\n \"*\": {\n validator: \"[0-9\\uff11-\\uff19A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5!#$%&'*+/=?^_`{|}~-]\"\n },\n \"-\": {\n validator: \"[0-9A-Za-z-]\"\n }\n },\n onUnMask: function(e, t, i) {\n return e;\n },\n inputmode: \"email\"\n },\n mac: {\n mask: \"##:##:##:##:##:##\"\n },\n vin: {\n mask: \"V{13}9{4}\",\n definitions: {\n V: {\n validator: \"[A-HJ-NPR-Za-hj-npr-z\\\\d]\",\n casing: \"upper\"\n }\n },\n clearIncomplete: !0,\n autoUnmask: !0\n },\n ssn: {\n mask: \"999-99-9999\",\n postValidation: function(e, t, i, n, a, s, l) {\n var c = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0);\n return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(c.join(\"\"));\n }\n }\n });\n },\n 207: function(e, t, i) {\n var n = s(i(2394)), a = s(i(7184)), r = i(8711), o = i(2839);\n function s(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var l = n.default.dependencyLib;\n function c(e, t) {\n for (var i = \"\", a = 0; a < e.length; a++) n.default.prototype.definitions[e.charAt(a)] || t.definitions[e.charAt(a)] || t.optionalmarker[0] === e.charAt(a) || t.optionalmarker[1] === e.charAt(a) || t.quantifiermarker[0] === e.charAt(a) || t.quantifiermarker[1] === e.charAt(a) || t.groupmarker[0] === e.charAt(a) || t.groupmarker[1] === e.charAt(a) || t.alternatormarker === e.charAt(a) ? i += \"\\\\\" + e.charAt(a) : i += e.charAt(a);\n return i;\n }\n function u(e, t, i, n) {\n if (e.length > 0 && t > 0 && (!i.digitsOptional || n)) {\n var a = e.indexOf(i.radixPoint), r = !1;\n i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === a && (e.push(i.radixPoint), \n a = e.length - 1);\n for (var o = 1; o <= t; o++) isFinite(e[a + o]) || (e[a + o] = \"0\");\n }\n return r && e.push(i.negationSymbol.back), e;\n }\n function f(e, t) {\n var i = 0;\n for (var n in \"+\" === e && (i = r.seekNext.call(this, t.validPositions.length - 1)), \n t.tests) if ((n = parseInt(n)) >= i) for (var a = 0, o = t.tests[n].length; a < o; a++) if ((void 0 === t.validPositions[n] || \"-\" === e) && t.tests[n][a].match.def === e) return n + (void 0 !== t.validPositions[n] && \"-\" !== e ? 1 : 0);\n return i;\n }\n function d(e, t) {\n for (var i = -1, n = 0, a = t.validPositions.length; n < a; n++) {\n var r = t.validPositions[n];\n if (r && r.match.def === e) {\n i = n;\n break;\n }\n }\n return i;\n }\n function p(e, t, i, n, a) {\n var r = t.buffer ? t.buffer.indexOf(a.radixPoint) : -1, o = (-1 !== r || n && a.jitMasking) && new RegExp(a.definitions[9].validator).test(e);\n return a._radixDance && -1 !== r && o && null == t.validPositions[r] ? {\n insert: {\n pos: r === i ? r + 1 : r,\n c: a.radixPoint\n },\n pos: i\n } : o;\n }\n n.default.extendAliases({\n numeric: {\n mask: function(e) {\n e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && \"0\" !== e.digits && (\".\" === e.radixPoint ? e.groupSeparator = \",\" : \",\" === e.radixPoint ? e.groupSeparator = \".\" : e.groupSeparator = \"\"), \n \" \" === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)), \n \"radixFocus\" === e.positionCaretOnClick && \"\" === e.placeholder && (e.positionCaretOnClick = \"lvp\");\n var t = \"0\", i = e.radixPoint;\n !0 === e.numericInput && void 0 === e.__financeInput ? (t = \"1\", e.positionCaretOnClick = \"radixFocus\" === e.positionCaretOnClick ? \"lvp\" : e.positionCaretOnClick, \n e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = \",\" === e.radixPoint ? \"?\" : \"!\", \n \"\" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = \"[\" + e.radixPoint + \"]\", \n e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1, \n e.numericInput = !0);\n var n, r = \"[+]\";\n if (r += c(e.prefix, e), \"\" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {}, \n e.definitions[e.groupSeparator].validator = \"[\" + e.groupSeparator + \"]\", e.definitions[e.groupSeparator].placeholder = e.groupSeparator, \n e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0), \n r += e._mask(e)) : r += \"9{+}\", void 0 !== e.digits && 0 !== e.digits) {\n var o = e.digits.toString().split(\",\");\n isFinite(o[0]) && o[1] && isFinite(o[1]) ? r += i + t + \"{\" + e.digits + \"}\" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (n = r + i + t + \"{0,\" + e.digits + \"}\", \n e.keepStatic = !0) : r += i + t + \"{\" + e.digits + \"}\");\n } else e.inputmode = \"numeric\";\n return r += c(e.suffix, e), r += \"[-]\", n && (r = [ n + c(e.suffix, e) + \"[-]\", r ]), \n e.greedy = !1, function(e) {\n void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0, \n a.default)(e.groupSeparator), \"g\"), \"\"), \",\" === e.radixPoint && (e.min = e.min.replace(e.radixPoint, \".\")), \n e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)), \n null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, a.default)(e.groupSeparator), \"g\"), \"\"), \n \",\" === e.radixPoint && (e.max = e.max.replace(e.radixPoint, \".\")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN, \n isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = \"done\");\n }(e), \"\" !== e.radixPoint && e.substituteRadixPoint && (e.substitutes[\".\" == e.radixPoint ? \",\" : \".\"] = e.radixPoint), \n r;\n },\n _mask: function(e) {\n return \"(\" + e.groupSeparator + \"999){+|1}\";\n },\n digits: \"*\",\n digitsOptional: !0,\n enforceDigitsOnBlur: !1,\n radixPoint: \".\",\n positionCaretOnClick: \"radixFocus\",\n _radixDance: !0,\n groupSeparator: \"\",\n allowMinus: !0,\n negationSymbol: {\n front: \"-\",\n back: \"\"\n },\n prefix: \"\",\n suffix: \"\",\n min: null,\n max: null,\n SetMaxOnOverflow: !1,\n step: 1,\n inputType: \"text\",\n unmaskAsNumber: !1,\n roundingFN: Math.round,\n inputmode: \"decimal\",\n shortcuts: {\n k: \"1000\",\n m: \"1000000\"\n },\n placeholder: \"0\",\n greedy: !1,\n rightAlign: !0,\n insertMode: !0,\n autoUnmask: !1,\n skipOptionalPartCharacter: \"\",\n usePrototypeDefinitions: !1,\n stripLeadingZeroes: !0,\n substituteRadixPoint: !0,\n definitions: {\n 0: {\n validator: p\n },\n 1: {\n validator: p,\n definitionSymbol: \"9\"\n },\n 9: {\n validator: \"[0-9\\uff10-\\uff19\\u0660-\\u0669\\u06f0-\\u06f9]\",\n definitionSymbol: \"*\"\n },\n \"+\": {\n validator: function(e, t, i, n, a) {\n return a.allowMinus && (\"-\" === e || e === a.negationSymbol.front);\n }\n },\n \"-\": {\n validator: function(e, t, i, n, a) {\n return a.allowMinus && e === a.negationSymbol.back;\n }\n }\n },\n preValidation: function(e, t, i, n, a, r, o, s) {\n if (!1 !== a.__financeInput && i === a.radixPoint) return !1;\n var l = e.indexOf(a.radixPoint), c = t;\n if (t = function(e, t, i, n, a) {\n return a._radixDance && a.numericInput && t !== a.negationSymbol.back && e <= i && (i > 0 || t == a.radixPoint) && (void 0 === n.validPositions[e - 1] || n.validPositions[e - 1].input !== a.negationSymbol.back) && (e -= 1), \n e;\n }(t, i, l, r, a), \"-\" === i || i === a.negationSymbol.front) {\n if (!0 !== a.allowMinus) return !1;\n var u = !1, p = d(\"+\", r), h = d(\"-\", r);\n return -1 !== p && (u = [ p, h ]), !1 !== u ? {\n remove: u,\n caret: c - a.negationSymbol.back.length\n } : {\n insert: [ {\n pos: f.call(this, \"+\", r),\n c: a.negationSymbol.front,\n fromIsValid: !0\n }, {\n pos: f.call(this, \"-\", r),\n c: a.negationSymbol.back,\n fromIsValid: void 0\n } ],\n caret: c + a.negationSymbol.back.length\n };\n }\n if (i === a.groupSeparator) return {\n caret: c\n };\n if (s) return !0;\n if (-1 !== l && !0 === a._radixDance && !1 === n && i === a.radixPoint && void 0 !== a.digits && (isNaN(a.digits) || parseInt(a.digits) > 0) && l !== t) return {\n caret: a._radixDance && t === l - 1 ? l + 1 : l\n };\n if (!1 === a.__financeInput) if (n) {\n if (a.digitsOptional) return {\n rewritePosition: o.end\n };\n if (!a.digitsOptional) {\n if (o.begin > l && o.end <= l) return i === a.radixPoint ? {\n insert: {\n pos: l + 1,\n c: \"0\",\n fromIsValid: !0\n },\n rewritePosition: l\n } : {\n rewritePosition: l + 1\n };\n if (o.begin < l) return {\n rewritePosition: o.begin - 1\n };\n }\n } else if (!a.showMaskOnHover && !a.showMaskOnFocus && !a.digitsOptional && a.digits > 0 && \"\" === this.__valueGet.call(this.el)) return {\n rewritePosition: l\n };\n return {\n rewritePosition: t\n };\n },\n postValidation: function(e, t, i, n, a, r, o) {\n if (!1 === n) return n;\n if (o) return !0;\n if (null !== a.min || null !== a.max) {\n var s = a.onUnMask(e.slice().reverse().join(\"\"), void 0, l.extend({}, a, {\n unmaskAsNumber: !0\n }));\n if (null !== a.min && s < a.min && (s.toString().length > a.min.toString().length || s < 0)) return !1;\n if (null !== a.max && s > a.max) return !!a.SetMaxOnOverflow && {\n refreshFromBuffer: !0,\n buffer: u(a.max.toString().replace(\".\", a.radixPoint).split(\"\"), a.digits, a).reverse()\n };\n }\n return n;\n },\n onUnMask: function(e, t, i) {\n if (\"\" === t && !0 === i.nullable) return t;\n var n = e.replace(i.prefix, \"\");\n return n = (n = n.replace(i.suffix, \"\")).replace(new RegExp((0, a.default)(i.groupSeparator), \"g\"), \"\"), \n \"\" !== i.placeholder.charAt(0) && (n = n.replace(new RegExp(i.placeholder.charAt(0), \"g\"), \"0\")), \n i.unmaskAsNumber ? (\"\" !== i.radixPoint && -1 !== n.indexOf(i.radixPoint) && (n = n.replace(a.default.call(this, i.radixPoint), \".\")), \n n = (n = n.replace(new RegExp(\"^\" + (0, a.default)(i.negationSymbol.front)), \"-\")).replace(new RegExp((0, \n a.default)(i.negationSymbol.back) + \"$\"), \"\"), Number(n)) : n;\n },\n isComplete: function(e, t) {\n var i = (t.numericInput ? e.slice().reverse() : e).join(\"\");\n return i = (i = (i = (i = (i = i.replace(new RegExp(\"^\" + (0, a.default)(t.negationSymbol.front)), \"-\")).replace(new RegExp((0, \n a.default)(t.negationSymbol.back) + \"$\"), \"\")).replace(t.prefix, \"\")).replace(t.suffix, \"\")).replace(new RegExp((0, \n a.default)(t.groupSeparator) + \"([0-9]{3})\", \"g\"), \"$1\"), \",\" === t.radixPoint && (i = i.replace((0, \n a.default)(t.radixPoint), \".\")), isFinite(i);\n },\n onBeforeMask: function(e, t) {\n var i = t.radixPoint || \",\";\n isFinite(t.digits) && (t.digits = parseInt(t.digits)), \"number\" != typeof e && \"number\" !== t.inputType || \"\" === i || (e = e.toString().replace(\".\", i));\n var n = \"-\" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, r = e.split(i), o = r[0].replace(/[^\\-0-9]/g, \"\"), s = r.length > 1 ? r[1].replace(/[^0-9]/g, \"\") : \"\", l = r.length > 1;\n e = o + (\"\" !== s ? i + s : s);\n var c = 0;\n if (\"\" !== i && (c = t.digitsOptional ? t.digits < s.length ? t.digits : s.length : t.digits, \n \"\" !== s || !t.digitsOptional)) {\n var f = Math.pow(10, c || 1);\n e = e.replace((0, a.default)(i), \".\"), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(c)), \n e = e.toString().replace(\".\", i);\n }\n if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))), \n null !== t.min || null !== t.max) {\n var d = e.toString().replace(i, \".\");\n null !== t.min && d < t.min ? e = t.min.toString().replace(\".\", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(\".\", i));\n }\n return n && \"-\" !== e.charAt(0) && (e = \"-\" + e), u(e.toString().split(\"\"), c, t, l).join(\"\");\n },\n onBeforeWrite: function(e, t, i, n) {\n function r(e, t) {\n if (!1 !== n.__financeInput || t) {\n var i = e.indexOf(n.radixPoint);\n -1 !== i && e.splice(i, 1);\n }\n if (\"\" !== n.groupSeparator) for (;-1 !== (i = e.indexOf(n.groupSeparator)); ) e.splice(i, 1);\n return e;\n }\n var o, s;\n if (n.stripLeadingZeroes && (s = function(e, t) {\n var i = new RegExp(\"(^\" + (\"\" !== t.negationSymbol.front ? (0, a.default)(t.negationSymbol.front) + \"?\" : \"\") + (0, \n a.default)(t.prefix) + \")(.*)(\" + (0, a.default)(t.suffix) + (\"\" != t.negationSymbol.back ? (0, \n a.default)(t.negationSymbol.back) + \"?\" : \"\") + \"$)\").exec(e.slice().reverse().join(\"\")), n = i ? i[2] : \"\", r = !1;\n return n && (n = n.split(t.radixPoint.charAt(0))[0], r = new RegExp(\"^[0\" + t.groupSeparator + \"]*\").exec(n)), \n !(!r || !(r[0].length > 1 || r[0].length > 0 && r[0].length < n.length)) && r;\n }(t, n))) for (var c = t.join(\"\").lastIndexOf(s[0].split(\"\").reverse().join(\"\")) - (s[0] == s.input ? 0 : 1), f = s[0] == s.input ? 1 : 0, d = s[0].length - f; d > 0; d--) delete this.maskset.validPositions[c + d], \n delete t[c + d];\n if (e) switch (e.type) {\n case \"blur\":\n case \"checkval\":\n if (null !== n.min) {\n var p = n.onUnMask(t.slice().reverse().join(\"\"), void 0, l.extend({}, n, {\n unmaskAsNumber: !0\n }));\n if (null !== n.min && p < n.min) return {\n refreshFromBuffer: !0,\n buffer: u(n.min.toString().replace(\".\", n.radixPoint).split(\"\"), n.digits, n).reverse()\n };\n }\n if (t[t.length - 1] === n.negationSymbol.front) {\n var h = new RegExp(\"(^\" + (\"\" != n.negationSymbol.front ? (0, a.default)(n.negationSymbol.front) + \"?\" : \"\") + (0, \n a.default)(n.prefix) + \")(.*)(\" + (0, a.default)(n.suffix) + (\"\" != n.negationSymbol.back ? (0, \n a.default)(n.negationSymbol.back) + \"?\" : \"\") + \"$)\").exec(r(t.slice(), !0).reverse().join(\"\"));\n 0 == (h ? h[2] : \"\") && (o = {\n refreshFromBuffer: !0,\n buffer: [ 0 ]\n });\n } else if (\"\" !== n.radixPoint) {\n t.indexOf(n.radixPoint) === n.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + n.suffix.length) : (t.splice(0, 1 + n.suffix.length), \n o = {\n refreshFromBuffer: !0,\n buffer: r(t)\n }));\n }\n if (n.enforceDigitsOnBlur) {\n var v = (o = o || {}) && o.buffer || t.slice().reverse();\n o.refreshFromBuffer = !0, o.buffer = u(v, n.digits, n, !0).reverse();\n }\n }\n return o;\n },\n onKeyDown: function(e, t, i, n) {\n var a, r = l(this);\n if (3 != e.location) {\n var s, c = e.key;\n if ((s = n.shortcuts && n.shortcuts[c]) && s.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(s)), \n r.trigger(\"setvalue\"), !1;\n }\n if (e.ctrlKey) switch (e.key) {\n case o.keys.ArrowUp:\n return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(n.step)), \n r.trigger(\"setvalue\"), !1;\n\n case o.keys.ArrowDown:\n return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(n.step)), \n r.trigger(\"setvalue\"), !1;\n }\n if (!e.shiftKey && (e.key === o.keys.Delete || e.key === o.keys.Backspace || e.key === o.keys.BACKSPACE_SAFARI) && i.begin !== t.length) {\n if (t[e.key === o.keys.Delete ? i.begin - 1 : i.end] === n.negationSymbol.front) return a = t.slice().reverse(), \n \"\" !== n.negationSymbol.front && a.shift(), \"\" !== n.negationSymbol.back && a.pop(), \n r.trigger(\"setvalue\", [ a.join(\"\"), i.begin ]), !1;\n if (!0 === n._radixDance) {\n var f = t.indexOf(n.radixPoint);\n if (n.digitsOptional) {\n if (0 === f) return (a = t.slice().reverse()).pop(), r.trigger(\"setvalue\", [ a.join(\"\"), i.begin >= a.length ? a.length : i.begin ]), \n !1;\n } else if (-1 !== f && (i.begin < f || i.end < f || e.key === o.keys.Delete && (i.begin === f || i.begin - 1 === f))) {\n var d = void 0;\n return i.begin === i.end && (e.key === o.keys.Backspace || e.key === o.keys.BACKSPACE_SAFARI ? i.begin++ : e.key === o.keys.Delete && i.begin - 1 === f && (d = l.extend({}, i), \n i.begin--, i.end--)), (a = t.slice().reverse()).splice(a.length - i.begin, i.begin - i.end + 1), \n a = u(a, n.digits, n).join(\"\"), d && (i = d), r.trigger(\"setvalue\", [ a, i.begin >= a.length ? f + 1 : i.begin ]), \n !1;\n }\n }\n }\n }\n },\n currency: {\n prefix: \"\",\n groupSeparator: \",\",\n alias: \"numeric\",\n digits: 2,\n digitsOptional: !1\n },\n decimal: {\n alias: \"numeric\"\n },\n integer: {\n alias: \"numeric\",\n inputmode: \"numeric\",\n digits: 0\n },\n percentage: {\n alias: \"numeric\",\n min: 0,\n max: 100,\n suffix: \" %\",\n digits: 0,\n allowMinus: !1\n },\n indianns: {\n alias: \"numeric\",\n _mask: function(e) {\n return \"(\" + e.groupSeparator + \"99){*|1}(\" + e.groupSeparator + \"999){1|1}\";\n },\n groupSeparator: \",\",\n radixPoint: \".\",\n placeholder: \"0\",\n digits: 2,\n digitsOptional: !1\n }\n });\n },\n 9380: function(e, t, i) {\n var n;\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var a = ((n = i(8741)) && n.__esModule ? n : {\n default: n\n }).default ? window : {};\n t.default = a;\n },\n 7760: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.HandleNativePlaceholder = function(e, t) {\n var i = e ? e.inputmask : this;\n if (s.ie) {\n if (e.inputmask._valueGet() !== t && (e.placeholder !== t || \"\" === e.placeholder)) {\n var n = r.getBuffer.call(i).slice(), a = e.inputmask._valueGet();\n if (a !== t) {\n var o = r.getLastValidPosition.call(i);\n -1 === o && a === r.getBufferTemplate.call(i).join(\"\") ? n = [] : -1 !== o && u.call(i, n), \n d(e, n);\n }\n }\n } else e.placeholder !== t && (e.placeholder = t, \"\" === e.placeholder && e.removeAttribute(\"placeholder\"));\n }, t.applyInputValue = c, t.checkVal = f, t.clearOptionalTail = u, t.unmaskedvalue = function(e) {\n var t = e ? e.inputmask : this, i = t.opts, n = t.maskset;\n if (e) {\n if (void 0 === e.inputmask) return e.value;\n e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0));\n }\n for (var a = [], o = n.validPositions, s = 0, l = o.length; s < l; s++) o[s] && o[s].match && (1 != o[s].match.static || Array.isArray(n.metadata) && !0 !== o[s].generatedInput) && a.push(o[s].input);\n var u = 0 === a.length ? \"\" : (t.isRTL ? a.reverse() : a).join(\"\");\n if (\"function\" == typeof i.onUnMask) {\n var f = (t.isRTL ? r.getBuffer.call(t).slice().reverse() : r.getBuffer.call(t)).join(\"\");\n u = i.onUnMask.call(t, f, u, i);\n }\n return u;\n }, t.writeBuffer = d;\n var n = i(2839), a = i(4713), r = i(8711), o = i(7215), s = i(9845), l = i(6030);\n function c(e, t) {\n var i = e ? e.inputmask : this, n = i.opts;\n e.inputmask.refreshValue = !1, \"function\" == typeof n.onBeforeMask && (t = n.onBeforeMask.call(i, t, n) || t), \n f(e, !0, !1, t = (t || \"\").toString().split(\"\")), i.undoValue = i._valueGet(!0), \n (n.clearMaskOnLostFocus || n.clearIncomplete) && e.inputmask._valueGet() === r.getBufferTemplate.call(i).join(\"\") && -1 === r.getLastValidPosition.call(i) && e.inputmask._valueSet(\"\");\n }\n function u(e) {\n e.length = 0;\n for (var t, i = a.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t);\n return e;\n }\n function f(e, t, i, n, s) {\n var c = e ? e.inputmask : this, u = c.maskset, f = c.opts, p = c.dependencyLib, h = n.slice(), v = \"\", m = -1, g = void 0, y = f.skipOptionalPartCharacter;\n f.skipOptionalPartCharacter = \"\", r.resetMaskSet.call(c), u.tests = {}, m = f.radixPoint ? r.determineNewCaretPosition.call(c, {\n begin: 0,\n end: 0\n }, !1, !1 === f.__financeInput ? \"radixFocus\" : void 0).begin : 0, u.p = m, c.caretPos = {\n begin: m\n };\n var k = [], b = c.caretPos;\n if (h.forEach((function(e, t) {\n if (void 0 !== e) {\n var n = new p.Event(\"_checkval\");\n n.key = e, v += e;\n var o = r.getLastValidPosition.call(c, void 0, !0);\n !function(e, t) {\n for (var i = a.getMaskTemplate.call(c, !0, 0).slice(e, r.seekNext.call(c, e, !1, !1)).join(\"\").replace(/'/g, \"\"), n = i.indexOf(t); n > 0 && \" \" === i[n - 1]; ) n--;\n var o = 0 === n && !r.isMask.call(c, e) && (a.getTest.call(c, e).match.nativeDef === t.charAt(0) || !0 === a.getTest.call(c, e).match.static && a.getTest.call(c, e).match.nativeDef === \"'\" + t.charAt(0) || \" \" === a.getTest.call(c, e).match.nativeDef && (a.getTest.call(c, e + 1).match.nativeDef === t.charAt(0) || !0 === a.getTest.call(c, e + 1).match.static && a.getTest.call(c, e + 1).match.nativeDef === \"'\" + t.charAt(0)));\n if (!o && n > 0 && !r.isMask.call(c, e, !1, !0)) {\n var s = r.seekNext.call(c, e);\n c.caretPos.begin < s && (c.caretPos = {\n begin: s\n });\n }\n return o;\n }(m, v) ? (g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, c.caretPos.begin)) && (m = c.caretPos.begin + 1, \n v = \"\") : g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, o + 1), g ? (void 0 !== g.pos && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static && void 0 === u.validPositions[g.pos].alternation && (k.push(g.pos), \n c.isRTL || (g.forwardPosition = g.pos + 1)), d.call(c, void 0, r.getBuffer.call(c), g.forwardPosition, n, !1), \n c.caretPos = {\n begin: g.forwardPosition,\n end: g.forwardPosition\n }, b = c.caretPos) : void 0 === u.validPositions[t] && h[t] === a.getPlaceholder.call(c, t) && r.isMask.call(c, t, !0) ? c.caretPos.begin++ : c.caretPos = b;\n }\n })), k.length > 0) {\n var x, P, w = r.seekNext.call(c, -1, void 0, !1);\n if (!o.isComplete.call(c, r.getBuffer.call(c)) && k.length <= w || o.isComplete.call(c, r.getBuffer.call(c)) && k.length > 0 && k.length !== w && 0 === k[0]) for (var S = w; void 0 !== (x = k.shift()); ) {\n var M = new p.Event(\"_checkval\");\n if ((P = u.validPositions[x]).generatedInput = !0, M.key = P.input, (g = l.EventHandlers.keypressEvent.call(c, M, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static) k.push(g.pos); else if (!g) break;\n S++;\n }\n }\n t && d.call(c, e, r.getBuffer.call(c), g ? g.forwardPosition : c.caretPos.begin, s || new p.Event(\"checkval\"), s && (\"input\" === s.type && c.undoValue !== r.getBuffer.call(c).join(\"\") || \"paste\" === s.type)), \n f.skipOptionalPartCharacter = y;\n }\n function d(e, t, i, a, s) {\n var l = e ? e.inputmask : this, c = l.opts, u = l.dependencyLib;\n if (a && \"function\" == typeof c.onBeforeWrite) {\n var f = c.onBeforeWrite.call(l, a, t, i, c);\n if (f) {\n if (f.refreshFromBuffer) {\n var d = f.refreshFromBuffer;\n o.refreshFromBuffer.call(l, !0 === d ? d : d.start, d.end, f.buffer || t), t = r.getBuffer.call(l, !0);\n }\n void 0 !== i && (i = void 0 !== f.caret ? f.caret : i);\n }\n }\n if (void 0 !== e && (e.inputmask._valueSet(t.join(\"\")), void 0 === i || void 0 !== a && \"blur\" === a.type || r.caret.call(l, e, i, void 0, void 0, void 0 !== a && \"keydown\" === a.type && (a.key === n.keys.Delete || a.key === n.keys.Backspace)), \n !0 === s)) {\n var p = u(e), h = e.inputmask._valueGet();\n e.inputmask.skipInputEvent = !0, p.trigger(\"input\"), setTimeout((function() {\n h === r.getBufferTemplate.call(l).join(\"\") ? p.trigger(\"cleared\") : !0 === o.isComplete.call(l, t) && p.trigger(\"complete\");\n }), 0);\n }\n }\n },\n 2394: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = i(157), a = m(i(4963)), r = m(i(9380)), o = i(2391), s = i(4713), l = i(8711), c = i(7215), u = i(7760), f = i(9716), d = m(i(7392)), p = m(i(3976)), h = m(i(8741));\n function v(e) {\n return v = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, v(e);\n }\n function m(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var g = r.default.document, y = \"_inputmask_opts\";\n function k(e, t, i) {\n if (h.default) {\n if (!(this instanceof k)) return new k(e, t, i);\n this.dependencyLib = a.default, this.el = void 0, this.events = {}, this.maskset = void 0, \n !0 !== i && (\"[object Object]\" === Object.prototype.toString.call(e) ? t = e : (t = t || {}, \n e && (t.alias = e)), this.opts = a.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions, \n this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1, \n this.undoValue = void 0, this.$el = void 0, this.skipInputEvent = !1, this.validationEvent = !1, \n this.ignorable = !1, this.maxLength, this.mouseEnter = !1, this.clicked = 0, this.originalPlaceholder = void 0, \n this.isComposing = !1, this.hasAlternator = !1;\n }\n }\n function b(e, t, i) {\n var n = k.prototype.aliases[e];\n return n ? (n.alias && b(n.alias, void 0, i), a.default.extend(!0, i, n), a.default.extend(!0, i, t), \n !0) : (null === i.mask && (i.mask = e), !1);\n }\n k.prototype = {\n dataAttribute: \"data-inputmask\",\n defaults: p.default,\n definitions: d.default,\n aliases: {},\n masksCache: {},\n get isRTL() {\n return this.opts.isRTL || this.opts.numericInput;\n },\n mask: function(e) {\n var t = this;\n return \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), \n (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : [].slice.call(e)).forEach((function(e, i) {\n var s = a.default.extend(!0, {}, t.opts);\n if (function(e, t, i, n) {\n function o(t, a) {\n var o = \"\" === n ? t : n + \"-\" + t;\n null !== (a = void 0 !== a ? a : e.getAttribute(o)) && (\"string\" == typeof a && (0 === t.indexOf(\"on\") ? a = r.default[a] : \"false\" === a ? a = !1 : \"true\" === a && (a = !0)), \n i[t] = a);\n }\n if (!0 === t.importDataAttributes) {\n var s, l, c, u, f = e.getAttribute(n);\n if (f && \"\" !== f && (f = f.replace(/'/g, '\"'), l = JSON.parse(\"{\" + f + \"}\")), \n l) for (u in c = void 0, l) if (\"alias\" === u.toLowerCase()) {\n c = l[u];\n break;\n }\n for (s in o(\"alias\", c), i.alias && b(i.alias, i, t), t) {\n if (l) for (u in c = void 0, l) if (u.toLowerCase() === s.toLowerCase()) {\n c = l[u];\n break;\n }\n o(s, c);\n }\n }\n a.default.extend(!0, t, i), (\"rtl\" === e.dir || t.rightAlign) && (e.style.textAlign = \"right\");\n (\"rtl\" === e.dir || t.numericInput) && (e.dir = \"ltr\", e.removeAttribute(\"dir\"), \n t.isRTL = !0);\n return Object.keys(i).length;\n }(e, s, a.default.extend(!0, {}, t.userOptions), t.dataAttribute)) {\n var l = (0, o.generateMaskSet)(s, t.noMasksCache);\n void 0 !== l && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()), \n e.inputmask = new k(void 0, void 0, !0), e.inputmask.opts = s, e.inputmask.noMasksCache = t.noMasksCache, \n e.inputmask.userOptions = a.default.extend(!0, {}, t.userOptions), e.inputmask.el = e, \n e.inputmask.$el = (0, a.default)(e), e.inputmask.maskset = l, a.default.data(e, y, t.userOptions), \n n.mask.call(e.inputmask));\n }\n })), e && e[0] && e[0].inputmask || this;\n },\n option: function(e, t) {\n return \"string\" == typeof e ? this.opts[e] : \"object\" === v(e) ? (a.default.extend(this.userOptions, e), \n this.el && !0 !== t && this.mask(this.el), this) : void 0;\n },\n unmaskedvalue: function(e) {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n void 0 === this.el || void 0 !== e) {\n var t = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !1, !1, t), \"function\" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, l.getBuffer.call(this), 0, this.opts);\n }\n return u.unmaskedvalue.call(this, this.el);\n },\n remove: function() {\n if (this.el) {\n a.default.data(this.el, y, null);\n var e = this.opts.autoUnmask ? (0, u.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);\n e !== l.getBufferTemplate.call(this).join(\"\") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(\"\"), \n f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), \"value\") && this.__valueGet && Object.defineProperty(this.el, \"value\", {\n get: this.__valueGet,\n set: this.__valueSet,\n configurable: !0\n }) : g.__lookupGetter__ && this.el.__lookupGetter__(\"value\") && this.__valueGet && (this.el.__defineGetter__(\"value\", this.__valueGet), \n this.el.__defineSetter__(\"value\", this.__valueSet)), this.el.inputmask = void 0;\n }\n return this.el;\n },\n getemptymask: function() {\n return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n (this.isRTL ? l.getBufferTemplate.call(this).reverse() : l.getBufferTemplate.call(this)).join(\"\");\n },\n hasMaskedValue: function() {\n return !this.opts.autoUnmask;\n },\n isComplete: function() {\n return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n c.isComplete.call(this, l.getBuffer.call(this));\n },\n getmetadata: function() {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n Array.isArray(this.maskset.metadata)) {\n var e = s.getMaskTemplate.call(this, !0, 0, !1).join(\"\");\n return this.maskset.metadata.forEach((function(t) {\n return t.mask !== e || (e = t, !1);\n })), e;\n }\n return this.maskset.metadata;\n },\n isValid: function(e) {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n e) {\n var t = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !0, !1, t);\n } else e = this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\");\n for (var i = l.getBuffer.call(this), n = l.determineLastRequiredPosition.call(this), a = i.length - 1; a > n && !l.isMask.call(this, a); a--) ;\n return i.splice(n, a + 1 - n), c.isComplete.call(this, i) && e === (this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\"));\n },\n format: function(e, t) {\n this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache);\n var i = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !0, !1, i);\n var n = this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\");\n return t ? {\n value: n,\n metadata: this.getmetadata()\n } : n;\n },\n setValue: function(e) {\n this.el && (0, a.default)(this.el).trigger(\"setvalue\", [ e ]);\n },\n analyseMask: o.analyseMask\n }, k.extendDefaults = function(e) {\n a.default.extend(!0, k.prototype.defaults, e);\n }, k.extendDefinitions = function(e) {\n a.default.extend(!0, k.prototype.definitions, e);\n }, k.extendAliases = function(e) {\n a.default.extend(!0, k.prototype.aliases, e);\n }, k.format = function(e, t, i) {\n return k(t).format(e, i);\n }, k.unmask = function(e, t) {\n return k(t).unmaskedvalue(e);\n }, k.isValid = function(e, t) {\n return k(t).isValid(e);\n }, k.remove = function(e) {\n \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {\n e.inputmask && e.inputmask.remove();\n }));\n }, k.setValue = function(e, t) {\n \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {\n e.inputmask ? e.inputmask.setValue(t) : (0, a.default)(e).trigger(\"setvalue\", [ t ]);\n }));\n }, k.dependencyLib = a.default, r.default.Inputmask = k;\n var x = k;\n t.default = x;\n },\n 5296: function(e, t, i) {\n function n(e) {\n return n = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, n(e);\n }\n var a = h(i(9380)), r = h(i(2394)), o = h(i(8741));\n function s(e, t) {\n for (var i = 0; i < t.length; i++) {\n var a = t[i];\n a.enumerable = a.enumerable || !1, a.configurable = !0, \"value\" in a && (a.writable = !0), \n Object.defineProperty(e, (r = a.key, o = void 0, o = function(e, t) {\n if (\"object\" !== n(e) || null === e) return e;\n var i = e[Symbol.toPrimitive];\n if (void 0 !== i) {\n var a = i.call(e, t || \"default\");\n if (\"object\" !== n(a)) return a;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(r, \"string\"), \"symbol\" === n(o) ? o : String(o)), a);\n }\n var r, o;\n }\n function l(e) {\n var t = f();\n return function() {\n var i, a = p(e);\n if (t) {\n var r = p(this).constructor;\n i = Reflect.construct(a, arguments, r);\n } else i = a.apply(this, arguments);\n return function(e, t) {\n if (t && (\"object\" === n(t) || \"function\" == typeof t)) return t;\n if (void 0 !== t) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return function(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e);\n }(this, i);\n };\n }\n function c(e) {\n var t = \"function\" == typeof Map ? new Map : void 0;\n return c = function(e) {\n if (null === e || (i = e, -1 === Function.toString.call(i).indexOf(\"[native code]\"))) return e;\n var i;\n if (\"function\" != typeof e) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== t) {\n if (t.has(e)) return t.get(e);\n t.set(e, n);\n }\n function n() {\n return u(e, arguments, p(this).constructor);\n }\n return n.prototype = Object.create(e.prototype, {\n constructor: {\n value: n,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), d(n, e);\n }, c(e);\n }\n function u(e, t, i) {\n return u = f() ? Reflect.construct.bind() : function(e, t, i) {\n var n = [ null ];\n n.push.apply(n, t);\n var a = new (Function.bind.apply(e, n));\n return i && d(a, i.prototype), a;\n }, u.apply(null, arguments);\n }\n function f() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), \n !0;\n } catch (e) {\n return !1;\n }\n }\n function d(e, t) {\n return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {\n return e.__proto__ = t, e;\n }, d(e, t);\n }\n function p(e) {\n return p = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n }, p(e);\n }\n function h(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var v = a.default.document;\n if (o.default && v && v.head && v.head.attachShadow && a.default.customElements && void 0 === a.default.customElements.get(\"input-mask\")) {\n var m = function(e) {\n !function(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), t && d(e, t);\n }(o, e);\n var t, i, n, a = l(o);\n function o() {\n var e;\n !function(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, o);\n var t = (e = a.call(this)).getAttributeNames(), i = e.attachShadow({\n mode: \"closed\"\n }), n = v.createElement(\"input\");\n for (var s in n.type = \"text\", i.appendChild(n), t) Object.prototype.hasOwnProperty.call(t, s) && n.setAttribute(t[s], e.getAttribute(t[s]));\n var l = new r.default;\n return l.dataAttribute = \"\", l.mask(n), n.inputmask.shadowRoot = i, e;\n }\n return t = o, i && s(t.prototype, i), n && s(t, n), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), t;\n }(c(HTMLElement));\n a.default.customElements.define(\"input-mask\", m);\n }\n },\n 2839: function(e, t) {\n function i(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return n(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return n(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function n(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.keys = t.keyCode = void 0, t.toKey = function(e, t) {\n return r[e] || (t ? String.fromCharCode(e) : String.fromCharCode(e).toLowerCase());\n }, t.toKeyCode = function(e) {\n return a[e];\n };\n var a = {\n AltGraph: 18,\n ArrowDown: 40,\n ArrowLeft: 37,\n ArrowRight: 39,\n ArrowUp: 38,\n Backspace: 8,\n BACKSPACE_SAFARI: 127,\n CapsLock: 20,\n Delete: 46,\n End: 35,\n Enter: 13,\n Escape: 27,\n Home: 36,\n Insert: 45,\n PageDown: 34,\n PageUp: 33,\n Space: 32,\n Tab: 9,\n c: 67,\n x: 88,\n z: 90,\n Shift: 16,\n Control: 17,\n Alt: 18,\n Pause: 19,\n Meta_LEFT: 91,\n Meta_RIGHT: 92,\n ContextMenu: 93,\n Process: 229,\n Unidentified: 229,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123\n };\n t.keyCode = a;\n var r = Object.entries(a).reduce((function(e, t) {\n var n = i(t, 2), a = n[0], r = n[1];\n return e[r] = void 0 === e[r] ? a : e[r], e;\n }), {}), o = Object.entries(a).reduce((function(e, t) {\n var n = i(t, 2), a = n[0];\n n[1];\n return e[a] = \"Space\" === a ? \" \" : a, e;\n }), {});\n t.keys = o;\n },\n 2391: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.analyseMask = function(e, t, i) {\n var n, o, s, l, c, u, f = /(?:[?*+]|\\{[0-9+*]+(?:,[0-9+*]*)?(?:\\|[0-9+*]*)?\\})|[^.?*+^${[]()|\\\\]+|./g, d = /\\[\\^?]?(?:[^\\\\\\]]+|\\\\[\\S\\s]?)*]?|\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\\S\\s]?)|\\((?:\\?[:=!]?)?|(?:[?*+]|\\{[0-9]+(?:,[0-9]*)?\\})\\??|[^.?*+^${[()|\\\\]+|./g, p = !1, h = new a.default, v = [], m = [], g = !1;\n function y(e, n, a) {\n a = void 0 !== a ? a : e.matches.length;\n var o = e.matches[a - 1];\n if (t) {\n if (0 === n.indexOf(\"[\") || p && /\\\\d|\\\\s|\\\\w|\\\\p/i.test(n) || \".\" === n) {\n var s = i.casing ? \"i\" : \"\";\n /^\\\\p\\{.*}$/i.test(n) && (s += \"u\"), e.matches.splice(a++, 0, {\n fn: new RegExp(n, s),\n static: !1,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== n,\n casing: null,\n def: n,\n placeholder: void 0,\n nativeDef: n\n });\n } else p && (n = n[n.length - 1]), n.split(\"\").forEach((function(t, n) {\n o = e.matches[a - 1], e.matches.splice(a++, 0, {\n fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp(\"[\" + (i.staticDefinitionSymbol || t) + \"]\", i.casing ? \"i\" : \"\") : null,\n static: !0,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== t && !0 !== o.static,\n casing: null,\n def: i.staticDefinitionSymbol || t,\n placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0,\n nativeDef: (p ? \"'\" : \"\") + t\n });\n }));\n p = !1;\n } else {\n var l = i.definitions && i.definitions[n] || i.usePrototypeDefinitions && r.default.prototype.definitions[n];\n l && !p ? e.matches.splice(a++, 0, {\n fn: l.validator ? \"string\" == typeof l.validator ? new RegExp(l.validator, i.casing ? \"i\" : \"\") : new function() {\n this.test = l.validator;\n } : new RegExp(\".\"),\n static: l.static || !1,\n optionality: l.optional || !1,\n defOptionality: l.optional || !1,\n newBlockMarker: void 0 === o || l.optional ? \"master\" : o.def !== (l.definitionSymbol || n),\n casing: l.casing,\n def: l.definitionSymbol || n,\n placeholder: l.placeholder,\n nativeDef: n,\n generated: l.generated\n }) : (e.matches.splice(a++, 0, {\n fn: /[a-z]/i.test(i.staticDefinitionSymbol || n) ? new RegExp(\"[\" + (i.staticDefinitionSymbol || n) + \"]\", i.casing ? \"i\" : \"\") : null,\n static: !0,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== n && !0 !== o.static,\n casing: null,\n def: i.staticDefinitionSymbol || n,\n placeholder: void 0 !== i.staticDefinitionSymbol ? n : void 0,\n nativeDef: (p ? \"'\" : \"\") + n\n }), p = !1);\n }\n }\n function k() {\n if (v.length > 0) {\n if (y(l = v[v.length - 1], o), l.isAlternator) {\n c = v.pop();\n for (var e = 0; e < c.matches.length; e++) c.matches[e].isGroup && (c.matches[e].isGroup = !1);\n v.length > 0 ? (l = v[v.length - 1]).matches.push(c) : h.matches.push(c);\n }\n } else y(h, o);\n }\n function b(e) {\n var t = new a.default(!0);\n return t.openGroup = !1, t.matches = e, t;\n }\n function x() {\n if ((s = v.pop()).openGroup = !1, void 0 !== s) if (v.length > 0) {\n if ((l = v[v.length - 1]).matches.push(s), l.isAlternator) {\n for (var e = (c = v.pop()).matches[0].matches ? c.matches[0].matches.length : 1, t = 0; t < c.matches.length; t++) c.matches[t].isGroup = !1, \n c.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (c.matches[t].matches ? c.matches[t].matches.length : 1) && (i.keepStatic = !0), \n e = c.matches[t].matches ? c.matches[t].matches.length : 1;\n v.length > 0 ? (l = v[v.length - 1]).matches.push(c) : h.matches.push(c);\n }\n } else h.matches.push(s); else k();\n }\n function P(e) {\n var t = e.pop();\n return t.isQuantifier && (t = b([ e.pop(), t ])), t;\n }\n t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0);\n for (;n = t ? d.exec(e) : f.exec(e); ) {\n if (o = n[0], t) {\n switch (o.charAt(0)) {\n case \"?\":\n o = \"{0,1}\";\n break;\n\n case \"+\":\n case \"*\":\n o = \"{\" + o + \"}\";\n break;\n\n case \"|\":\n if (0 === v.length) {\n var w = b(h.matches);\n w.openGroup = !0, v.push(w), h.matches = [], g = !0;\n }\n }\n switch (o) {\n case \"\\\\d\":\n o = \"[0-9]\";\n break;\n\n case \"\\\\p\":\n o += d.exec(e)[0], o += d.exec(e)[0];\n }\n }\n if (p) k(); else switch (o.charAt(0)) {\n case \"$\":\n case \"^\":\n t || k();\n break;\n\n case i.escapeChar:\n p = !0, t && k();\n break;\n\n case i.optionalmarker[1]:\n case i.groupmarker[1]:\n x();\n break;\n\n case i.optionalmarker[0]:\n v.push(new a.default(!1, !0));\n break;\n\n case i.groupmarker[0]:\n v.push(new a.default(!0));\n break;\n\n case i.quantifiermarker[0]:\n var S = new a.default(!1, !1, !0), M = (o = o.replace(/[{}?]/g, \"\")).split(\"|\"), _ = M[0].split(\",\"), O = isNaN(_[0]) ? _[0] : parseInt(_[0]), E = 1 === _.length ? O : isNaN(_[1]) ? _[1] : parseInt(_[1]), T = isNaN(M[1]) ? M[1] : parseInt(M[1]);\n \"*\" !== O && \"+\" !== O || (O = \"*\" === E ? 0 : 1), S.quantifier = {\n min: O,\n max: E,\n jit: T\n };\n var j = v.length > 0 ? v[v.length - 1].matches : h.matches;\n (n = j.pop()).isGroup || (n = b([ n ])), j.push(n), j.push(S);\n break;\n\n case i.alternatormarker:\n if (v.length > 0) {\n var A = (l = v[v.length - 1]).matches[l.matches.length - 1];\n u = l.openGroup && (void 0 === A.matches || !1 === A.isGroup && !1 === A.isAlternator) ? v.pop() : P(l.matches);\n } else u = P(h.matches);\n if (u.isAlternator) v.push(u); else if (u.alternatorGroup ? (c = v.pop(), u.alternatorGroup = !1) : c = new a.default(!1, !1, !1, !0), \n c.matches.push(u), v.push(c), u.openGroup) {\n u.openGroup = !1;\n var D = new a.default(!0);\n D.alternatorGroup = !0, v.push(D);\n }\n break;\n\n default:\n k();\n }\n }\n g && x();\n for (;v.length > 0; ) s = v.pop(), h.matches.push(s);\n h.matches.length > 0 && (!function e(n) {\n n && n.matches && n.matches.forEach((function(a, r) {\n var o = n.matches[r + 1];\n (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && a && a.isGroup && (a.isGroup = !1, \n t || (y(a, i.groupmarker[0], 0), !0 !== a.openGroup && y(a, i.groupmarker[1]))), \n e(a);\n }));\n }(h), m.push(h));\n (i.numericInput || i.isRTL) && function e(t) {\n for (var n in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, n)) {\n var a = parseInt(n);\n if (t.matches[n].isQuantifier && t.matches[a + 1] && t.matches[a + 1].isGroup) {\n var r = t.matches[n];\n t.matches.splice(n, 1), t.matches.splice(a + 1, 0, r);\n }\n void 0 !== t.matches[n].matches ? t.matches[n] = e(t.matches[n]) : t.matches[n] = ((o = t.matches[n]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]), \n o);\n }\n var o;\n return t;\n }(m[0]);\n return m;\n }, t.generateMaskSet = function(e, t) {\n var i;\n function a(e, t) {\n var i = t.repeat, n = t.groupmarker, a = t.quantifiermarker, r = t.keepStatic;\n if (i > 0 || \"*\" === i || \"+\" === i) {\n var l = \"*\" === i ? 0 : \"+\" === i ? 1 : i;\n e = n[0] + e + n[1] + a[0] + l + \",\" + i + a[1];\n }\n if (!0 === r) {\n var c = e.match(new RegExp(\"(.)\\\\[([^\\\\]]*)\\\\]\", \"g\"));\n c && c.forEach((function(t, i) {\n var n = function(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return s(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return s(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }(t.split(\"[\"), 2), a = n[0], r = n[1];\n r = r.replace(\"]\", \"\"), e = e.replace(new RegExp(\"\".concat((0, o.default)(a), \"\\\\[\").concat((0, \n o.default)(r), \"\\\\]\")), a.charAt(0) === r.charAt(0) ? \"(\".concat(a, \"|\").concat(a).concat(r, \")\") : \"\".concat(a, \"[\").concat(r, \"]\"));\n }));\n }\n return e;\n }\n function l(e, i, o) {\n var s, l, c = !1;\n return null !== e && \"\" !== e || ((c = null !== o.regex) ? e = (e = o.regex).replace(/^(\\^)(.*)(\\$)$/, \"$2\") : (c = !0, \n e = \".*\")), 1 === e.length && !1 === o.greedy && 0 !== o.repeat && (o.placeholder = \"\"), \n e = a(e, o), l = c ? \"regex_\" + o.regex : o.numericInput ? e.split(\"\").reverse().join(\"\") : e, \n null !== o.keepStatic && (l = \"ks_\" + o.keepStatic + l), void 0 === r.default.prototype.masksCache[l] || !0 === t ? (s = {\n mask: e,\n maskToken: r.default.prototype.analyseMask(e, c, o),\n validPositions: [],\n _buffer: void 0,\n buffer: void 0,\n tests: {},\n excludes: {},\n metadata: i,\n maskLength: void 0,\n jitOffset: {}\n }, !0 !== t && (r.default.prototype.masksCache[l] = s, s = n.default.extend(!0, {}, r.default.prototype.masksCache[l]))) : s = n.default.extend(!0, {}, r.default.prototype.masksCache[l]), \n s;\n }\n \"function\" == typeof e.mask && (e.mask = e.mask(e));\n if (Array.isArray(e.mask)) {\n if (e.mask.length > 1) {\n null === e.keepStatic && (e.keepStatic = !0);\n var c = e.groupmarker[0];\n return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) {\n c.length > 1 && (c += e.alternatormarker), void 0 !== t.mask && \"function\" != typeof t.mask ? c += t.mask : c += t;\n })), l(c += e.groupmarker[1], e.mask, e);\n }\n e.mask = e.mask.pop();\n }\n i = e.mask && void 0 !== e.mask.mask && \"function\" != typeof e.mask.mask ? l(e.mask.mask, e.mask, e) : l(e.mask, e.mask, e);\n null === e.keepStatic && (e.keepStatic = !1);\n return i;\n };\n var n = l(i(4963)), a = l(i(9695)), r = l(i(2394)), o = l(i(7184));\n function s(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function l(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n },\n 157: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.mask = function() {\n var e = this, t = this.opts, i = this.el, u = this.dependencyLib;\n o.EventRuler.off(i);\n var f = function(t, i) {\n \"textarea\" !== t.tagName.toLowerCase() && i.ignorables.push(n.keys.Enter);\n var s = t.getAttribute(\"type\"), l = \"input\" === t.tagName.toLowerCase() && i.supportsInputType.includes(s) || t.isContentEditable || \"textarea\" === t.tagName.toLowerCase();\n if (!l) if (\"input\" === t.tagName.toLowerCase()) {\n var c = document.createElement(\"input\");\n c.setAttribute(\"type\", s), l = \"text\" === c.type, c = null;\n } else l = \"partial\";\n return !1 !== l ? function(t) {\n var n, s;\n function l() {\n return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== a.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? r.clearOptionalTail.call(e, a.getBuffer.call(e).slice()).reverse() : r.clearOptionalTail.call(e, a.getBuffer.call(e).slice())).join(\"\") : n.call(this) : \"\" : n.call(this);\n }\n function c(e) {\n s.call(this, e), this.inputmask && (0, r.applyInputValue)(this, e);\n }\n if (!t.inputmask.__valueGet) {\n if (!0 !== i.noValuePatching) {\n if (Object.getOwnPropertyDescriptor) {\n var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), \"value\") : void 0;\n f && f.get && f.set ? (n = f.get, s = f.set, Object.defineProperty(t, \"value\", {\n get: l,\n set: c,\n configurable: !0\n })) : \"input\" !== t.tagName.toLowerCase() && (n = function() {\n return this.textContent;\n }, s = function(e) {\n this.textContent = e;\n }, Object.defineProperty(t, \"value\", {\n get: l,\n set: c,\n configurable: !0\n }));\n } else document.__lookupGetter__ && t.__lookupGetter__(\"value\") && (n = t.__lookupGetter__(\"value\"), \n s = t.__lookupSetter__(\"value\"), t.__defineGetter__(\"value\", l), t.__defineSetter__(\"value\", c));\n t.inputmask.__valueGet = n, t.inputmask.__valueSet = s;\n }\n t.inputmask._valueGet = function(t) {\n return e.isRTL && !0 !== t ? n.call(this.el).split(\"\").reverse().join(\"\") : n.call(this.el);\n }, t.inputmask._valueSet = function(t, i) {\n s.call(this.el, null == t ? \"\" : !0 !== i && e.isRTL ? t.split(\"\").reverse().join(\"\") : t);\n }, void 0 === n && (n = function() {\n return this.value;\n }, s = function(e) {\n this.value = e;\n }, function(t) {\n if (u.valHooks && (void 0 === u.valHooks[t] || !0 !== u.valHooks[t].inputmaskpatch)) {\n var n = u.valHooks[t] && u.valHooks[t].get ? u.valHooks[t].get : function(e) {\n return e.value;\n }, o = u.valHooks[t] && u.valHooks[t].set ? u.valHooks[t].set : function(e, t) {\n return e.value = t, e;\n };\n u.valHooks[t] = {\n get: function(t) {\n if (t.inputmask) {\n if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue();\n var r = n(t);\n return -1 !== a.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? r : \"\";\n }\n return n(t);\n },\n set: function(e, t) {\n var i = o(e, t);\n return e.inputmask && (0, r.applyInputValue)(e, t), i;\n },\n inputmaskpatch: !0\n };\n }\n }(t.type), function(e) {\n o.EventRuler.on(e, \"mouseenter\", (function() {\n var e = this, t = e.inputmask._valueGet(!0);\n t != (e.inputmask.isRTL ? a.getBuffer.call(e.inputmask).slice().reverse() : a.getBuffer.call(e.inputmask)).join(\"\") && (0, \n r.applyInputValue)(e, t);\n }));\n }(t));\n }\n }(t) : t.inputmask = void 0, l;\n }(i, t);\n if (!1 !== f) {\n e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0, \n -1 === e.maxLength && (e.maxLength = void 0), \"inputMode\" in i && null === i.getAttribute(\"inputmode\") && (i.inputMode = t.inputmode, \n i.setAttribute(\"inputmode\", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ \"cc-number\", \"cc-exp\" ].indexOf(i.autocomplete), \n s.iphone && (t.insertModeVisual = !1, i.setAttribute(\"autocorrect\", \"off\")), o.EventRuler.on(i, \"submit\", c.EventHandlers.submitEvent), \n o.EventRuler.on(i, \"reset\", c.EventHandlers.resetEvent), o.EventRuler.on(i, \"blur\", c.EventHandlers.blurEvent), \n o.EventRuler.on(i, \"focus\", c.EventHandlers.focusEvent), o.EventRuler.on(i, \"invalid\", c.EventHandlers.invalidEvent), \n o.EventRuler.on(i, \"click\", c.EventHandlers.clickEvent), o.EventRuler.on(i, \"mouseleave\", c.EventHandlers.mouseleaveEvent), \n o.EventRuler.on(i, \"mouseenter\", c.EventHandlers.mouseenterEvent), o.EventRuler.on(i, \"paste\", c.EventHandlers.pasteEvent), \n o.EventRuler.on(i, \"cut\", c.EventHandlers.cutEvent), o.EventRuler.on(i, \"complete\", t.oncomplete), \n o.EventRuler.on(i, \"incomplete\", t.onincomplete), o.EventRuler.on(i, \"cleared\", t.oncleared), \n !0 !== t.inputEventOnly && o.EventRuler.on(i, \"keydown\", c.EventHandlers.keyEvent), \n (s.mobile || t.inputEventOnly) && i.removeAttribute(\"maxLength\"), o.EventRuler.on(i, \"input\", c.EventHandlers.inputFallBackEvent)), \n o.EventRuler.on(i, \"setvalue\", c.EventHandlers.setValueEvent), a.getBufferTemplate.call(e).join(\"\"), \n e.undoValue = e._valueGet(!0);\n var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement;\n if (\"\" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) {\n (0, r.applyInputValue)(i, i.inputmask._valueGet(!0), t);\n var p = a.getBuffer.call(e).slice();\n !1 === l.isComplete.call(e, p) && t.clearIncomplete && a.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === a.getLastValidPosition.call(e) ? p = [] : r.clearOptionalTail.call(e, p)), \n (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || \"\" !== i.inputmask._valueGet(!0)) && (0, \n r.writeBuffer)(i, p), d === i && a.caret.call(e, i, a.seekNext.call(e, a.getLastValidPosition.call(e)));\n }\n }\n };\n var n = i(2839), a = i(8711), r = i(7760), o = i(9716), s = i(9845), l = i(7215), c = i(6030);\n },\n 9695: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e, t, i, n) {\n this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1, \n this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = n || !1, \n this.quantifier = {\n min: 1,\n max: 1\n };\n };\n },\n 3194: function() {\n Array.prototype.includes || Object.defineProperty(Array.prototype, \"includes\", {\n value: function(e, t) {\n if (null == this) throw new TypeError('\"this\" is null or not defined');\n var i = Object(this), n = i.length >>> 0;\n if (0 === n) return !1;\n for (var a = 0 | t, r = Math.max(a >= 0 ? a : n - Math.abs(a), 0); r < n; ) {\n if (i[r] === e) return !0;\n r++;\n }\n return !1;\n }\n });\n },\n 9302: function() {\n var e = Function.bind.call(Function.call, Array.prototype.reduce), t = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable), i = Function.bind.call(Function.call, Array.prototype.concat), n = Object.keys;\n Object.entries || (Object.entries = function(a) {\n return e(n(a), (function(e, n) {\n return i(e, \"string\" == typeof n && t(a, n) ? [ [ n, a[n] ] ] : []);\n }), []);\n });\n },\n 7149: function() {\n function e(t) {\n return e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, e(t);\n }\n \"function\" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = \"object\" === e(\"test\".__proto__) ? function(e) {\n return e.__proto__;\n } : function(e) {\n return e.constructor.prototype;\n });\n },\n 4013: function() {\n String.prototype.includes || (String.prototype.includes = function(e, t) {\n return \"number\" != typeof t && (t = 0), !(t + e.length > this.length) && -1 !== this.indexOf(e, t);\n });\n },\n 8711: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.caret = function(e, t, i, n, a) {\n var r, o = this, s = this.opts;\n if (void 0 === t) return \"selectionStart\" in e && \"selectionEnd\" in e ? (t = e.selectionStart, \n i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset, \n i = r.endOffset) : document.selection && document.selection.createRange && (i = (t = 0 - (r = document.selection.createRange()).duplicate().moveStart(\"character\", -e.inputmask._valueGet().length)) + r.text.length), \n {\n begin: n ? t : c.call(o, t),\n end: n ? i : c.call(o, i)\n };\n if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]), \n void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin), \n \"number\" == typeof t) {\n t = n ? t : c.call(o, t), i = \"number\" == typeof (i = n ? i : c.call(o, i)) ? i : t;\n var l = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i;\n if (e.scrollLeft = l > e.scrollWidth ? l : 0, e.inputmask.caretPos = {\n begin: t,\n end: i\n }, s.insertModeVisual && !1 === s.insertMode && t === i && (a || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if (\"setSelectionRange\" in e) e.setSelectionRange(t, i); else if (window.getSelection) {\n if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) {\n var u = document.createTextNode(\"\");\n e.appendChild(u);\n }\n r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length), \n r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length), \n r.collapse(!0);\n var f = window.getSelection();\n f.removeAllRanges(), f.addRange(r);\n } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd(\"character\", i), \n r.moveStart(\"character\", t), r.select());\n }\n }, t.determineLastRequiredPosition = function(e) {\n var t, i, r = this, s = r.maskset, l = r.dependencyLib, c = n.getMaskTemplate.call(r, !0, o.call(r), !0, !0), u = c.length, f = o.call(r), d = {}, p = s.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0;\n for (t = f + 1; t < c.length; t++) h = (i = n.getTestTemplate.call(r, t, h, t - 1)).locator.slice(), \n d[t] = l.extend(!0, {}, i);\n var v = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0;\n for (t = u - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || v && (v !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && a.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(\",\"), v.toString().split(\",\")) && \"\" !== n.getTests.call(r, t)[0].def)) && c[t] === n.getPlaceholder.call(r, t, i.match)); t--) u--;\n return e ? {\n l: u,\n def: d[u] ? d[u].match : void 0\n } : u;\n }, t.determineNewCaretPosition = function(e, t, i) {\n var a = this, c = a.maskset, u = a.opts;\n t && (a.isRTL ? e.end = e.begin : e.begin = e.end);\n if (e.begin === e.end) {\n switch (i = i || u.positionCaretOnClick) {\n case \"none\":\n break;\n\n case \"select\":\n e = {\n begin: 0,\n end: r.call(a).length\n };\n break;\n\n case \"ignore\":\n e.end = e.begin = l.call(a, o.call(a));\n break;\n\n case \"radixFocus\":\n if (a.clicked > 1 && 0 == c.validPositions.length) break;\n if (function(e) {\n if (\"\" !== u.radixPoint && 0 !== u.digits) {\n var t = c.validPositions;\n if (void 0 === t[e] || t[e].input === n.getPlaceholder.call(a, e)) {\n if (e < l.call(a, -1)) return !0;\n var i = r.call(a).indexOf(u.radixPoint);\n if (-1 !== i) {\n for (var o = 0, s = t.length; o < s; o++) if (t[o] && i < o && t[o].input !== n.getPlaceholder.call(a, o)) return !1;\n return !0;\n }\n }\n }\n return !1;\n }(e.begin)) {\n var f = r.call(a).join(\"\").indexOf(u.radixPoint);\n e.end = e.begin = u.numericInput ? l.call(a, f) : f;\n break;\n }\n\n default:\n var d = e.begin, p = o.call(a, d, !0), h = l.call(a, -1 !== p || s.call(a, 0) ? p : -1);\n if (d <= h) e.end = e.begin = s.call(a, d, !1, !0) ? d : l.call(a, d); else {\n var v = c.validPositions[p], m = n.getTestTemplate.call(a, h, v ? v.match.locator : void 0, v), g = n.getPlaceholder.call(a, h, m.match);\n if (\"\" !== g && r.call(a)[h] !== g && !0 !== m.match.optionalQuantifier && !0 !== m.match.newBlockMarker || !s.call(a, h, u.keepStatic, !0) && m.match.def === g) {\n var y = l.call(a, h);\n (d >= y || d === h) && (h = y);\n }\n e.end = e.begin = h;\n }\n }\n return e;\n }\n }, t.getBuffer = r, t.getBufferTemplate = function() {\n var e = this.maskset;\n void 0 === e._buffer && (e._buffer = n.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice()));\n return e._buffer;\n }, t.getLastValidPosition = o, t.isMask = s, t.resetMaskSet = function(e) {\n var t = this.maskset;\n t.buffer = void 0, !0 !== e && (t.validPositions = [], t.p = 0);\n }, t.seekNext = l, t.seekPrevious = function(e, t) {\n var i = this, a = e - 1;\n if (e <= 0) return 0;\n for (;a > 0 && (!0 === t && (!0 !== n.getTest.call(i, a).match.newBlockMarker || !s.call(i, a, void 0, !0)) || !0 !== t && !s.call(i, a, void 0, !0)); ) a--;\n return a;\n }, t.translatePosition = c;\n var n = i(4713), a = i(7215);\n function r(e) {\n var t = this, i = t.maskset;\n return void 0 !== i.buffer && !0 !== e || (i.buffer = n.getMaskTemplate.call(t, !0, o.call(t), !0), \n void 0 === i._buffer && (i._buffer = i.buffer.slice())), i.buffer;\n }\n function o(e, t, i) {\n var n = this.maskset, a = -1, r = -1, o = i || n.validPositions;\n void 0 === e && (e = -1);\n for (var s = 0, l = o.length; s < l; s++) o[s] && (t || !0 !== o[s].generatedInput) && (s <= e && (a = s), \n s >= e && (r = s));\n return -1 === a || a == e ? r : -1 == r || e - a < r - e ? a : r;\n }\n function s(e, t, i) {\n var a = this, r = this.maskset, o = n.getTestTemplate.call(a, e).match;\n if (\"\" === o.def && (o = n.getTest.call(a, e).match), !0 !== o.static) return o.fn;\n if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0;\n if (!0 !== t && e > -1) {\n if (i) {\n var s = n.getTests.call(a, e);\n return s.length > 1 + (\"\" === s[s.length - 1].match.def ? 1 : 0);\n }\n var l = n.determineTestTemplate.call(a, e, n.getTests.call(a, e)), c = n.getPlaceholder.call(a, e, l.match);\n return l.match.def !== c;\n }\n return !1;\n }\n function l(e, t, i) {\n var a = this;\n void 0 === i && (i = !0);\n for (var r = e + 1; \"\" !== n.getTest.call(a, r).match.def && (!0 === t && (!0 !== n.getTest.call(a, r).match.newBlockMarker || !s.call(a, r, void 0, !0)) || !0 !== t && !s.call(a, r, void 0, i)); ) r++;\n return r;\n }\n function c(e) {\n var t = this.opts, i = this.el;\n return !this.isRTL || \"number\" != typeof e || t.greedy && \"\" === t.placeholder || !i || (e = this._valueGet().length - e) < 0 && (e = 0), \n e;\n }\n },\n 4713: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.determineTestTemplate = c, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, n, a) {\n var r = this, o = this.opts, u = this.maskset, f = o.greedy;\n a && o.greedy && (o.greedy = !1, r.maskset.tests = {});\n t = t || 0;\n var p, h, v, m, g = [], y = 0;\n do {\n if (!0 === e && u.validPositions[y]) h = (v = a && u.validPositions[y].match.optionality && void 0 === u.validPositions[y + 1] && (!0 === u.validPositions[y].generatedInput || u.validPositions[y].input == o.skipOptionalPartCharacter && y > 0) ? c.call(r, y, d.call(r, y, p, y - 1)) : u.validPositions[y]).match, \n p = v.locator.slice(), g.push(!0 === i ? v.input : !1 === i ? h.nativeDef : s.call(r, y, h)); else {\n h = (v = l.call(r, y, p, y - 1)).match, p = v.locator.slice();\n var k = !0 !== n && (!1 !== o.jitMasking ? o.jitMasking : h.jit);\n (m = (m && h.static && h.def !== o.groupSeparator && null === h.fn || u.validPositions[y - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && u.tests[y]) || !1 === k || void 0 === k || \"number\" == typeof k && isFinite(k) && k > y ? g.push(!1 === i ? h.nativeDef : s.call(r, g.length, h)) : m = !1;\n }\n y++;\n } while (!0 !== h.static || \"\" !== h.def || t > y);\n \"\" === g[g.length - 1] && g.pop();\n !1 === i && void 0 !== u.maskLength || (u.maskLength = y - 1);\n return o.greedy = f, g;\n }, t.getPlaceholder = s, t.getTest = u, t.getTestTemplate = l, t.getTests = d, t.isSubsetOf = f;\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n };\n function r(e, t) {\n var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join(\"\");\n if (\"\" !== i) for (;i.length < t; ) i += \"0\";\n return i;\n }\n function o(e) {\n var t = e.locator[e.alternation];\n return \"string\" == typeof t && t.length > 0 && (t = t.split(\",\")[0]), void 0 !== t ? t.toString() : \"\";\n }\n function s(e, t, i) {\n var n = this.opts, a = this.maskset;\n if (void 0 !== (t = t || u.call(this, e).match).placeholder || !0 === i) return \"function\" == typeof t.placeholder ? t.placeholder(n) : t.placeholder;\n if (!0 === t.static) {\n if (e > -1 && void 0 === a.validPositions[e]) {\n var r, o = d.call(this, e), s = [];\n if (o.length > 1 + (\"\" === o[o.length - 1].match.def ? 1 : 0)) for (var l = 0; l < o.length; l++) if (\"\" !== o[l].match.def && !0 !== o[l].match.optionality && !0 !== o[l].match.optionalQuantifier && (!0 === o[l].match.static || void 0 === r || !1 !== o[l].match.fn.test(r.match.def, a, e, !0, n)) && (s.push(o[l]), \n !0 === o[l].match.static && (r = o[l]), s.length > 1 && /[0-9a-bA-Z]/.test(s[0].match.def))) return n.placeholder.charAt(e % n.placeholder.length);\n }\n return t.def;\n }\n return n.placeholder.charAt(e % n.placeholder.length);\n }\n function l(e, t, i) {\n return this.maskset.validPositions[e] || c.call(this, e, d.call(this, e, t ? t.slice() : t, i));\n }\n function c(e, t) {\n var i = this.opts, n = 0, a = function(e, t) {\n var i = 0, n = !1;\n t.forEach((function(e) {\n e.match.optionality && (0 !== i && i !== e.match.optionality && (n = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality));\n })), i && (0 == e || 1 == t.length ? i = 0 : n || (i = 0));\n return i;\n }(e, t);\n e = e > 0 ? e - 1 : 0;\n var o, s, l, c = r(u.call(this, e));\n i.greedy && t.length > 1 && \"\" === t[t.length - 1].match.def && (n = 1);\n for (var f = 0; f < t.length - n; f++) {\n var d = t[f];\n o = r(d, c.length);\n var p = Math.abs(o - c);\n (void 0 === s || \"\" !== o && p < s || l && !i.greedy && l.match.optionality && l.match.optionality - a > 0 && \"master\" === l.match.newBlockMarker && (!d.match.optionality || d.match.optionality - a < 1 || !d.match.newBlockMarker) || l && !i.greedy && l.match.optionalQuantifier && !d.match.optionalQuantifier) && (s = p, \n l = d);\n }\n return l;\n }\n function u(e, t) {\n var i = this.maskset;\n return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0];\n }\n function f(e, t, i) {\n function n(e) {\n for (var t, i = [], n = -1, a = 0, r = e.length; a < r; a++) if (\"-\" === e.charAt(a)) for (t = e.charCodeAt(a + 1); ++n < t; ) i.push(String.fromCharCode(n)); else n = e.charCodeAt(a), \n i.push(e.charAt(a));\n return i.join(\"\");\n }\n return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== n(t.match.fn.toString().replace(/[[\\]/]/g, \"\")).indexOf(n(e.match.fn.toString().replace(/[[\\]/]/g, \"\")));\n }\n function d(e, t, i) {\n var n, r, o = this, s = this.dependencyLib, l = this.maskset, u = this.opts, d = this.el, p = l.maskToken, h = t ? i : 0, v = t ? t.slice() : [ 0 ], m = [], g = !1, y = t ? t.join(\"\") : \"\";\n function k(t, i, r, s) {\n function c(r, s, p) {\n function v(e, t) {\n var i = 0 === t.matches.indexOf(e);\n return i || t.matches.every((function(n, a) {\n return !0 === n.isQuantifier ? i = v(e, t.matches[a - 1]) : Object.prototype.hasOwnProperty.call(n, \"matches\") && (i = v(e, n)), \n !i;\n })), i;\n }\n function x(e, t, i) {\n var n, a;\n if ((l.tests[e] || l.validPositions[e]) && (l.tests[e] || [ l.validPositions[e] ]).every((function(e, r) {\n if (e.mloc[t]) return n = e, !1;\n var o = void 0 !== i ? i : e.alternation, s = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1;\n return (void 0 === a || s < a) && -1 !== s && (n = e, a = s), !0;\n })), n) {\n var r = n.locator[n.alternation];\n return (n.mloc[t] || n.mloc[r] || n.locator).slice((void 0 !== i ? i : n.alternation) + 1);\n }\n return void 0 !== i ? x(e, t) : void 0;\n }\n function P(e, t) {\n var i = e.alternation, n = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]);\n if (!n && i > t.alternation) for (var a = t.alternation; a < i; a++) if (e.locator[a] !== t.locator[a]) {\n i = a, n = !0;\n break;\n }\n if (n) {\n e.mloc = e.mloc || {};\n var r = e.locator[i];\n if (void 0 !== r) {\n if (\"string\" == typeof r && (r = r.split(\",\")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()), \n void 0 !== t) {\n for (var o in t.mloc) \"string\" == typeof o && (o = o.split(\",\")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]);\n e.locator[i] = Object.keys(e.mloc).join(\",\");\n }\n return !0;\n }\n e.alternation = void 0;\n }\n return !1;\n }\n function w(e, t) {\n if (e.locator.length !== t.locator.length) return !1;\n for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1;\n return !0;\n }\n if (h > e + u._maxTestPos) throw \"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. \" + l.mask;\n if (h === e && void 0 === r.matches) {\n if (m.push({\n match: r,\n locator: s.reverse(),\n cd: y,\n mloc: {}\n }), !r.optionality || void 0 !== p || !(u.definitions && u.definitions[r.nativeDef] && u.definitions[r.nativeDef].optional || a.default.prototype.definitions[r.nativeDef] && a.default.prototype.definitions[r.nativeDef].optional)) return !0;\n g = !0, h = e;\n } else if (void 0 !== r.matches) {\n if (r.isGroup && p !== r) return function() {\n if (r = c(t.matches[t.matches.indexOf(r) + 1], s, p)) return !0;\n }();\n if (r.isOptional) return function() {\n var t = r, a = m.length;\n if (r = k(r, i, s, p), m.length > 0) {\n if (m.forEach((function(e, t) {\n t >= a && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1);\n })), n = m[m.length - 1].match, void 0 !== p || !v(n, t)) return r;\n g = !0, h = e;\n }\n }();\n if (r.isAlternator) return function() {\n o.hasAlternator = !0;\n var n, a, v, y = r, k = [], b = m.slice(), S = s.length, M = !1, _ = i.length > 0 ? i.shift() : -1;\n if (-1 === _ || \"string\" == typeof _) {\n var O, E = h, T = i.slice(), j = [];\n if (\"string\" == typeof _) j = _.split(\",\"); else for (O = 0; O < y.matches.length; O++) j.push(O.toString());\n if (void 0 !== l.excludes[e]) {\n for (var A = j.slice(), D = 0, B = l.excludes[e].length; D < B; D++) {\n var C = l.excludes[e][D].toString().split(\":\");\n s.length == C[1] && j.splice(j.indexOf(C[0]), 1);\n }\n 0 === j.length && (delete l.excludes[e], j = A);\n }\n (!0 === u.keepStatic || isFinite(parseInt(u.keepStatic)) && E >= u.keepStatic) && (j = j.slice(0, 1));\n for (var R = 0; R < j.length; R++) {\n O = parseInt(j[R]), m = [], i = \"string\" == typeof _ && x(h, O, S) || T.slice();\n var L = y.matches[O];\n if (L && c(L, [ O ].concat(s), p)) r = !0; else if (0 === R && (M = !0), L && L.matches && L.matches.length > y.matches[0].matches.length) break;\n n = m.slice(), h = E, m = [];\n for (var F = 0; F < n.length; F++) {\n var I = n[F], N = !1;\n I.match.jit = I.match.jit || M, I.alternation = I.alternation || S, P(I);\n for (var V = 0; V < k.length; V++) {\n var G = k[V];\n if (\"string\" != typeof _ || void 0 !== I.alternation && j.includes(I.locator[I.alternation].toString())) {\n if (I.match.nativeDef === G.match.nativeDef) {\n N = !0, P(G, I);\n break;\n }\n if (f(I, G, u)) {\n P(I, G) && (N = !0, k.splice(k.indexOf(G), 0, I));\n break;\n }\n if (f(G, I, u)) {\n P(G, I);\n break;\n }\n if (v = G, !0 === (a = I).match.static && !0 !== v.match.static && v.match.fn.test(a.match.def, l, e, !1, u, !1)) {\n w(I, G) || void 0 !== d.inputmask.userOptions.keepStatic ? P(I, G) && (N = !0, k.splice(k.indexOf(G), 0, I)) : u.keepStatic = !0;\n break;\n }\n }\n }\n N || k.push(I);\n }\n }\n m = b.concat(k), h = e, g = m.length > 0, r = k.length > 0, i = T.slice();\n } else r = c(y.matches[_] || t.matches[_], [ _ ].concat(s), p);\n if (r) return !0;\n }();\n if (r.isQuantifier && p !== t.matches[t.matches.indexOf(r) - 1]) return function() {\n for (var a = r, o = !1, f = i.length > 0 ? i.shift() : 0; f < (isNaN(a.quantifier.max) ? f + 1 : a.quantifier.max) && h <= e; f++) {\n var d = t.matches[t.matches.indexOf(a) - 1];\n if (r = c(d, [ f ].concat(s), d)) {\n if (m.forEach((function(t, i) {\n (n = b(d, t.match) ? t.match : m[m.length - 1].match).optionalQuantifier = f >= a.quantifier.min, \n n.jit = (f + 1) * (d.matches.indexOf(n) + 1) > a.quantifier.jit, n.optionalQuantifier && v(n, d) && (g = !0, \n h = e, u.greedy && null == l.validPositions[e - 1] && f > a.quantifier.min && -1 != [ \"*\", \"+\" ].indexOf(a.quantifier.max) && (m.pop(), \n y = void 0), o = !0, r = !1), !o && n.jit && (l.jitOffset[e] = d.matches.length - d.matches.indexOf(n));\n })), o) break;\n return !0;\n }\n }\n }();\n if (r = k(r, i, s, p)) return !0;\n } else h++;\n }\n for (var p = i.length > 0 ? i.shift() : 0; p < t.matches.length; p++) if (!0 !== t.matches[p].isQuantifier) {\n var v = c(t.matches[p], [ p ].concat(r), s);\n if (v && h === e) return v;\n if (h > e) break;\n }\n }\n function b(e, t) {\n var i = -1 != e.matches.indexOf(t);\n return i || e.matches.forEach((function(e, n) {\n void 0 === e.matches || i || (i = b(e, t));\n })), i;\n }\n if (e > -1) {\n if (void 0 === t) {\n for (var x, P = e - 1; void 0 === (x = l.validPositions[P] || l.tests[P]) && P > -1; ) P--;\n void 0 !== x && P > -1 && (v = function(e, t) {\n var i, n = [];\n return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === u.keepStatic ? 0 === (n = c.call(o, e, t.slice()).locator.slice()).length && (n = t[0].locator.slice()) : t.forEach((function(e) {\n \"\" !== e.def && (0 === n.length ? (i = e.alternation, n = e.locator.slice()) : e.locator[i] && -1 === n[i].toString().indexOf(e.locator[i]) && (n[i] += \",\" + e.locator[i]));\n }))), n;\n }(P, x), y = v.join(\"\"), h = P);\n }\n if (l.tests[e] && l.tests[e][0].cd === y) return l.tests[e];\n for (var w = v.shift(); w < p.length; w++) {\n if (k(p[w], v, [ w ]) && h === e || h > e) break;\n }\n }\n return (0 === m.length || g) && m.push({\n match: {\n fn: null,\n static: !0,\n optionality: !1,\n casing: null,\n def: \"\",\n placeholder: \"\"\n },\n locator: [],\n mloc: {},\n cd: y\n }), void 0 !== t && l.tests[e] ? r = s.extend(!0, [], m) : (l.tests[e] = s.extend(!0, [], m), \n r = l.tests[e]), m.forEach((function(e) {\n e.match.optionality = e.match.defOptionality || !1;\n })), r;\n }\n },\n 7215: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.alternate = s, t.checkAlternationMatch = function(e, t, i) {\n for (var n, a = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(\",\") : [], s = 0; s < o.length; s++) -1 !== (n = e.indexOf(o[s])) && e.splice(n, 1);\n for (var l = 0; l < e.length; l++) if (a.includes(e[l])) {\n r = !0;\n break;\n }\n return r;\n }, t.handleRemove = function(e, t, i, o, l) {\n var c = this, u = this.maskset, f = this.opts;\n if ((f.numericInput || c.isRTL) && (t === a.keys.Backspace ? t = a.keys.Delete : t === a.keys.Delete && (t = a.keys.Backspace), \n c.isRTL)) {\n var d = i.end;\n i.end = i.begin, i.begin = d;\n }\n var p, h = r.getLastValidPosition.call(c, void 0, !0);\n i.end >= r.getBuffer.call(c).length && h >= i.end && (i.end = h + 1);\n t === a.keys.Backspace ? i.end - i.begin < 1 && (i.begin = r.seekPrevious.call(c, i.begin)) : t === a.keys.Delete && i.begin === i.end && (i.end = r.isMask.call(c, i.end, !0, !0) ? i.end + 1 : r.seekNext.call(c, i.end) + 1);\n if (!1 !== (p = v.call(c, i))) {\n if (!0 !== o && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(c, i.begin).match.def.indexOf(\"|\")) {\n var m = s.call(c, !0);\n if (m) {\n var g = void 0 !== m.caret ? m.caret : m.pos ? r.seekNext.call(c, m.pos.begin ? m.pos.begin : m.pos) : r.getLastValidPosition.call(c, -1, !0);\n (t !== a.keys.Delete || i.begin > g) && i.begin;\n }\n }\n !0 !== o && (u.p = t === a.keys.Delete ? i.begin + p : i.begin, u.p = r.determineNewCaretPosition.call(c, {\n begin: u.p,\n end: u.p\n }, !1, !1 === f.insertMode && t === a.keys.Backspace ? \"none\" : void 0).begin);\n }\n }, t.isComplete = c, t.isSelection = u, t.isValid = f, t.refreshFromBuffer = p, \n t.revalidateMask = v;\n var n = i(4713), a = i(2839), r = i(8711), o = i(6030);\n function s(e, t, i, a, o, l) {\n var c, u, d, p, h, v, m, g, y, k, b, x = this, P = this.dependencyLib, w = this.opts, S = x.maskset, M = P.extend(!0, [], S.validPositions), _ = P.extend(!0, {}, S.tests), O = !1, E = !1, T = void 0 !== o ? o : r.getLastValidPosition.call(x);\n if (l && (k = l.begin, b = l.end, l.begin > l.end && (k = l.end, b = l.begin)), \n -1 === T && void 0 === o) c = 0, u = (p = n.getTest.call(x, c)).alternation; else for (;T >= 0; T--) if ((d = S.validPositions[T]) && void 0 !== d.alternation) {\n if (T <= (e || 0) && p && p.locator[d.alternation] !== d.locator[d.alternation]) break;\n c = T, u = S.validPositions[c].alternation, p = d;\n }\n if (void 0 !== u) {\n m = parseInt(c), S.excludes[m] = S.excludes[m] || [], !0 !== e && S.excludes[m].push((0, \n n.getDecisionTaker)(p) + \":\" + p.alternation);\n var j = [], A = -1;\n for (h = m; h < r.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === A && e <= h && void 0 !== t && (j.push(t), \n A = j.length - 1), (v = S.validPositions[h]) && !0 !== v.generatedInput && (void 0 === l || h < k || h >= b) && j.push(v.input), \n delete S.validPositions[h];\n for (-1 === A && void 0 !== t && (j.push(t), A = j.length - 1); void 0 !== S.excludes[m] && S.excludes[m].length < 10; ) {\n for (S.tests = {}, r.resetMaskSet.call(x, !0), O = !0, h = 0; h < j.length && (g = O.caret || r.getLastValidPosition.call(x, void 0, !0) + 1, \n y = j[h], O = f.call(x, g, y, !1, a, !0)); h++) h === A && (E = O), 1 == e && O && (E = {\n caretPos: h\n });\n if (O) break;\n if (r.resetMaskSet.call(x), p = n.getTest.call(x, m), S.validPositions = P.extend(!0, [], M), \n S.tests = P.extend(!0, {}, _), !S.excludes[m]) {\n E = s.call(x, e, t, i, a, m - 1, l);\n break;\n }\n var D = (0, n.getDecisionTaker)(p);\n if (-1 !== S.excludes[m].indexOf(D + \":\" + p.alternation)) {\n E = s.call(x, e, t, i, a, m - 1, l);\n break;\n }\n for (S.excludes[m].push(D + \":\" + p.alternation), h = m; h < r.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h];\n }\n }\n return E && !1 === w.keepStatic || delete S.excludes[m], E;\n }\n function l(e, t, i) {\n var n = this.opts, r = this.maskset;\n switch (n.casing || t.casing) {\n case \"upper\":\n e = e.toUpperCase();\n break;\n\n case \"lower\":\n e = e.toLowerCase();\n break;\n\n case \"title\":\n var o = r.validPositions[i - 1];\n e = 0 === i || o && o.input === String.fromCharCode(a.keyCode.Space) ? e.toUpperCase() : e.toLowerCase();\n break;\n\n default:\n if (\"function\" == typeof n.casing) {\n var s = Array.prototype.slice.call(arguments);\n s.push(r.validPositions), e = n.casing.apply(this, s);\n }\n }\n return e;\n }\n function c(e) {\n var t = this, i = this.opts, a = this.maskset;\n if (\"function\" == typeof i.isComplete) return i.isComplete(e, i);\n if (\"*\" !== i.repeat) {\n var o = !1, s = r.determineLastRequiredPosition.call(t, !0), l = r.seekPrevious.call(t, s.l);\n if (void 0 === s.def || s.def.newBlockMarker || s.def.optionality || s.def.optionalQuantifier) {\n o = !0;\n for (var c = 0; c <= l; c++) {\n var u = n.getTestTemplate.call(t, c).match;\n if (!0 !== u.static && void 0 === a.validPositions[c] && !0 !== u.optionality && !0 !== u.optionalQuantifier || !0 === u.static && e[c] !== n.getPlaceholder.call(t, c, u)) {\n o = !1;\n break;\n }\n }\n }\n return o;\n }\n }\n function u(e) {\n var t = this.opts.insertMode ? 0 : 1;\n return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t;\n }\n function f(e, t, i, a, o, d, m) {\n var g = this, y = this.dependencyLib, k = this.opts, b = g.maskset;\n i = !0 === i;\n var x = e;\n function P(e) {\n if (void 0 !== e) {\n if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]), \n e.remove.sort((function(e, t) {\n return g.isRTL ? e.pos - t.pos : t.pos - e.pos;\n })).forEach((function(e) {\n v.call(g, {\n begin: e,\n end: e + 1\n });\n })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]), \n e.insert.sort((function(e, t) {\n return g.isRTL ? t.pos - e.pos : e.pos - t.pos;\n })).forEach((function(e) {\n \"\" !== e.c && f.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a);\n })), e.insert = void 0), e.refreshFromBuffer && e.buffer) {\n var t = e.refreshFromBuffer;\n p.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0;\n }\n void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0);\n }\n return e;\n }\n function w(t, i, o) {\n var s = !1;\n return n.getTests.call(g, t).every((function(c, f) {\n var d = c.match;\n if (r.getBuffer.call(g, !0), !1 !== (s = (!d.jit || void 0 !== b.validPositions[r.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, o, k, u.call(g, e)) : (i === d.def || i === k.skipOptionalPartCharacter) && \"\" !== d.def && {\n c: n.getPlaceholder.call(g, t, d, !0) || d.def,\n pos: t\n }))) {\n var p = void 0 !== s.c ? s.c : i, h = t;\n return p = p === k.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p, \n !0 !== (s = P(s)) && void 0 !== s.pos && s.pos !== t && (h = s.pos), !0 !== s && void 0 === s.pos && void 0 === s.c ? !1 : (!1 === v.call(g, e, y.extend({}, c, {\n input: l.call(g, p, d, h)\n }), a, h) && (s = !1), !1);\n }\n return !0;\n })), s;\n }\n void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin);\n var S = !0, M = y.extend(!0, {}, b.validPositions);\n if (!1 === k.keepStatic && void 0 !== b.excludes[x] && !0 !== o && !0 !== a) for (var _ = x; _ < (g.isRTL ? e.begin : e.end); _++) void 0 !== b.excludes[_] && (b.excludes[_] = void 0, \n delete b.tests[_]);\n if (\"function\" == typeof k.preValidation && !0 !== a && !0 !== d && (S = P(S = k.preValidation.call(g, r.getBuffer.call(g), x, t, u.call(g, e), k, b, e, i || o))), \n !0 === S) {\n if (S = w(x, t, i), (!i || !0 === a) && !1 === S && !0 !== d) {\n var O = b.validPositions[x];\n if (!O || !0 !== O.match.static || O.match.def !== t && t !== k.skipOptionalPartCharacter) {\n if (k.insertMode || void 0 === b.validPositions[r.seekNext.call(g, x)] || e.end > x) {\n var E = !1;\n if (b.jitOffset[x] && void 0 === b.validPositions[r.seekNext.call(g, x)] && !1 !== (S = f.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== o && (S.caret = x), \n E = !0), e.end > x && (b.validPositions[x] = void 0), !E && !r.isMask.call(g, x, k.keepStatic && 0 === x)) for (var T = x + 1, j = r.seekNext.call(g, x, !1, 0 !== x); T <= j; T++) if (!1 !== (S = w(T, t, i))) {\n S = h.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T;\n break;\n }\n }\n } else S = {\n caret: r.seekNext.call(g, x)\n };\n }\n g.hasAlternator && !0 !== o && !i && (!1 === S && k.keepStatic && (c.call(g, r.getBuffer.call(g)) || 0 === x) ? S = s.call(g, x, t, i, a, void 0, e) : (u.call(g, e) && b.tests[x] && b.tests[x].length > 1 && k.keepStatic || 1 == S && !0 !== k.numericInput && b.tests[x] && b.tests[x].length > 1 && r.getLastValidPosition.call(g, void 0, !0) > x) && (S = s.call(g, !0))), \n !0 === S && (S = {\n pos: x\n });\n }\n if (\"function\" == typeof k.postValidation && !0 !== a && !0 !== d) {\n var A = k.postValidation.call(g, r.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, k, b, i, m);\n void 0 !== A && (S = !0 === A ? S : A);\n }\n S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === d ? (r.resetMaskSet.call(g, !0), \n b.validPositions = y.extend(!0, [], M)) : h.call(g, void 0, x, !0);\n var D = P(S);\n void 0 !== g.maxLength && (r.getBuffer.call(g).length > g.maxLength && !a && (r.resetMaskSet.call(g, !0), \n b.validPositions = y.extend(!0, [], M), D = !1));\n return D;\n }\n function d(e, t, i) {\n for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), s = 0; s < o.length; s++) {\n if (o[s].match && (o[s].match.nativeDef === t.match[i.shiftPositions ? \"def\" : \"nativeDef\"] && (!i.shiftPositions || !t.match.static) || o[s].match.nativeDef === t.match.nativeDef || i.regex && !o[s].match.static && o[s].match.fn.test(t.input, a, e, !1, i))) {\n r = !0;\n break;\n }\n if (o[s].match && o[s].match.def === t.match.nativeDef) {\n r = void 0;\n break;\n }\n }\n return !1 === r && void 0 !== a.jitOffset[e] && (r = d.call(this, e + a.jitOffset[e], t, i)), \n r;\n }\n function p(e, t, i) {\n var n, a, s = this, l = this.maskset, c = this.opts, u = this.dependencyLib, f = c.skipOptionalPartCharacter, d = s.isRTL ? i.slice().reverse() : i;\n if (c.skipOptionalPartCharacter = \"\", !0 === e) r.resetMaskSet.call(s), l.tests = {}, \n e = 0, t = i.length, a = r.determineNewCaretPosition.call(s, {\n begin: 0,\n end: 0\n }, !1).begin; else {\n for (n = e; n < t; n++) delete l.validPositions[n];\n a = e;\n }\n var p = new u.Event(\"keypress\");\n for (n = e; n < t; n++) {\n p.key = d[n].toString(), s.ignorable = !1;\n var h = o.EventHandlers.keypressEvent.call(s, p, !0, !1, !1, a);\n !1 !== h && void 0 !== h && (a = h.forwardPosition);\n }\n c.skipOptionalPartCharacter = f;\n }\n function h(e, t, i) {\n var a = this, o = this.maskset, s = this.dependencyLib;\n if (void 0 === e) for (e = t - 1; e > 0 && !o.validPositions[e]; e--) ;\n for (var l = e; l < t; l++) {\n if (void 0 === o.validPositions[l] && !r.isMask.call(a, l, !1)) if (0 == l ? n.getTest.call(a, l) : o.validPositions[l - 1]) {\n var c = n.getTests.call(a, l).slice();\n \"\" === c[c.length - 1].match.def && c.pop();\n var u, d = n.determineTestTemplate.call(a, l, c);\n if (d && (!0 !== d.match.jit || \"master\" === d.match.newBlockMarker && (u = o.validPositions[l + 1]) && !0 === u.match.optionalQuantifier) && ((d = s.extend({}, d, {\n input: n.getPlaceholder.call(a, l, d.match, !0) || d.match.def\n })).generatedInput = !0, v.call(a, l, d, !0), !0 !== i)) {\n var p = o.validPositions[t].input;\n return o.validPositions[t] = void 0, f.call(a, t, p, !0, !0);\n }\n }\n }\n }\n function v(e, t, i, a) {\n var o = this, s = this.maskset, l = this.opts, c = this.dependencyLib;\n function u(e, t, i) {\n var n = t[e];\n if (void 0 !== n && !0 === n.match.static && !0 !== n.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) {\n var a = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1];\n return a && r;\n }\n return !1;\n }\n var p = 0, h = void 0 !== e.begin ? e.begin : e, v = void 0 !== e.end ? e.end : e, m = !0;\n if (e.begin > e.end && (h = e.end, v = e.begin), a = void 0 !== a ? a : h, void 0 === i && (h !== v || l.insertMode && void 0 !== s.validPositions[a] || void 0 === t || t.match.optionalQuantifier || t.match.optionality)) {\n var g, y = c.extend(!0, {}, s.validPositions), k = r.getLastValidPosition.call(o, void 0, !0);\n for (s.p = h, g = k; g >= h; g--) delete s.validPositions[g], void 0 === t && delete s.tests[g + 1];\n var b, x, P = a, w = P;\n for (t && (s.validPositions[a] = c.extend(!0, {}, t), w++, P++), g = t ? v : v - 1; g <= k; g++) {\n if (void 0 !== (b = y[g]) && !0 !== b.generatedInput && (g >= v || g >= h && u(g, y, {\n begin: h,\n end: v\n }))) {\n for (;\"\" !== n.getTest.call(o, w).match.def; ) {\n if (!1 !== (x = d.call(o, w, b, l)) || \"+\" === b.match.def) {\n \"+\" === b.match.def && r.getBuffer.call(o, !0);\n var S = f.call(o, w, b.input, \"+\" !== b.match.def, !0);\n if (m = !1 !== S, P = (S.pos || w) + 1, !m && x) break;\n } else m = !1;\n if (m) {\n void 0 === t && b.match.static && g === e.begin && p++;\n break;\n }\n if (!m && r.getBuffer.call(o), w > s.maskLength) break;\n w++;\n }\n \"\" == n.getTest.call(o, w).match.def && (m = !1), w = P;\n }\n if (!m) break;\n }\n if (!m) return s.validPositions = c.extend(!0, [], y), r.resetMaskSet.call(o, !0), \n !1;\n } else t && n.getTest.call(o, a).match.cd === t.match.cd && (s.validPositions[a] = c.extend(!0, {}, t));\n return r.resetMaskSet.call(o, !0), p;\n }\n }\n }, t = {};\n function i(n) {\n var a = t[n];\n if (void 0 !== a) return a.exports;\n var r = t[n] = {\n exports: {}\n };\n return e[n](r, r.exports, i), r.exports;\n }\n var n = {};\n return function() {\n var e, t = n;\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0, i(7149), i(3194), i(9302), i(4013), i(3851), i(219), i(207), \n i(5296);\n var a = ((e = i(2394)) && e.__esModule ? e : {\n default: e\n }).default;\n t.default = a;\n }(), n;\n }();\n}));\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/node_modules/inputmask/dist/inputmask.js?");
1657
1646
 
1658
1647
  /***/ }),
1659
1648
 
@@ -1713,7 +1702,7 @@ eval("!function(t,i){ true?module.exports=i():0}(this,(function(){\"use strict\"
1713
1702
  \***********************************************/
1714
1703
  /***/ (function(module) {
1715
1704
 
1716
- eval("/*! @license DOMPurify 3.1.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.3/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n const numberIsNaN = unapply(Number.isNaN);\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.3';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Specify the maximum element nesting depth to prevent mXSS */\n const MAX_NESTING_DEPTH = 255;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (\n // eslint-disable-next-line unicorn/no-typeof-undefined\n typeof elm.__depth !== 'undefined' && typeof elm.__depth !== 'number' ||\n // eslint-disable-next-line unicorn/no-typeof-undefined\n typeof elm.__removalCount !== 'undefined' && typeof elm.__removalCount !== 'number' || typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement || value === '__depth' || value === '__removalCount')) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n const parentNode = getParentNode(shadowNode);\n\n /* Set the nesting depth of an element */\n if (shadowNode.nodeType === NODE_TYPE.element) {\n if (parentNode && parentNode.__depth) {\n /*\n We want the depth of the node in the original tree, which can\n change when it's removed from its parent.\n */\n shadowNode.__depth = (shadowNode.__removalCount || 0) + parentNode.__depth + 1;\n } else {\n shadowNode.__depth = 1;\n }\n }\n\n /*\n * Remove an element if nested too deeply to avoid mXSS\n * or if the __depth might have been tampered with\n */\n if (shadowNode.__depth >= MAX_NESTING_DEPTH || shadowNode.__depth < 0 || numberIsNaN(shadowNode.__depth)) {\n _forceRemove(shadowNode);\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n shadowNode.content.__depth = shadowNode.__depth;\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n const parentNode = getParentNode(currentNode);\n\n /* Set the nesting depth of an element */\n if (currentNode.nodeType === NODE_TYPE.element) {\n if (parentNode && parentNode.__depth) {\n /*\n We want the depth of the node in the original tree, which can\n change when it's removed from its parent.\n */\n currentNode.__depth = (currentNode.__removalCount || 0) + parentNode.__depth + 1;\n } else {\n currentNode.__depth = 1;\n }\n }\n\n /*\n * Remove an element if nested too deeply to avoid mXSS\n * or if the __depth might have been tampered with\n */\n if (currentNode.__depth >= MAX_NESTING_DEPTH || currentNode.__depth < 0 || numberIsNaN(currentNode.__depth)) {\n _forceRemove(currentNode);\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n currentNode.content.__depth = currentNode.__depth;\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dompurify/dist/purify.js?");
1705
+ eval("/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.5';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dompurify/dist/purify.js?");
1717
1706
 
1718
1707
  /***/ }),
1719
1708
 
@@ -1738,16 +1727,6 @@ eval("var __WEBPACK_AMD_DEFINE_RESULT__;(function (global) {\n 'use strict';\n\
1738
1727
 
1739
1728
  /***/ }),
1740
1729
 
1741
- /***/ "./node_modules/inputmask/dist/inputmask.js":
1742
- /*!**************************************************!*\
1743
- !*** ./node_modules/inputmask/dist/inputmask.js ***!
1744
- \**************************************************/
1745
- /***/ (function(module) {
1746
-
1747
- eval("/*!\n * dist/inputmask\n * https://github.com/RobinHerbots/Inputmask\n * Copyright (c) 2010 - 2023 Robin Herbots\n * Licensed under the MIT license\n * Version: 5.0.8\n */\n!function(e, t) {\n if (true) module.exports = t(); else { var n, i; }\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function() {\n \"use strict\";\n var e = {\n 8741: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var i = !(\"undefined\" == typeof window || !window.document || !window.document.createElement);\n t.default = i;\n },\n 3976: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = i(2839), a = {\n _maxTestPos: 500,\n placeholder: \"_\",\n optionalmarker: [ \"[\", \"]\" ],\n quantifiermarker: [ \"{\", \"}\" ],\n groupmarker: [ \"(\", \")\" ],\n alternatormarker: \"|\",\n escapeChar: \"\\\\\",\n mask: null,\n regex: null,\n oncomplete: function() {},\n onincomplete: function() {},\n oncleared: function() {},\n repeat: 0,\n greedy: !1,\n autoUnmask: !1,\n removeMaskOnSubmit: !1,\n clearMaskOnLostFocus: !0,\n insertMode: !0,\n insertModeVisual: !0,\n clearIncomplete: !1,\n alias: null,\n onKeyDown: function() {},\n onBeforeMask: null,\n onBeforePaste: function(e, t) {\n return \"function\" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;\n },\n onBeforeWrite: null,\n onUnMask: null,\n showMaskOnFocus: !0,\n showMaskOnHover: !0,\n onKeyValidation: function() {},\n skipOptionalPartCharacter: \" \",\n numericInput: !1,\n rightAlign: !1,\n undoOnEscape: !0,\n radixPoint: \"\",\n _radixDance: !1,\n groupSeparator: \"\",\n keepStatic: null,\n positionCaretOnTab: !0,\n tabThrough: !1,\n supportsInputType: [ \"text\", \"tel\", \"url\", \"password\", \"search\" ],\n ignorables: [ n.keys.Backspace, n.keys.Tab, n.keys.Pause, n.keys.Escape, n.keys.PageUp, n.keys.PageDown, n.keys.End, n.keys.Home, n.keys.ArrowLeft, n.keys.ArrowUp, n.keys.ArrowRight, n.keys.ArrowDown, n.keys.Insert, n.keys.Delete, n.keys.ContextMenu, n.keys.F1, n.keys.F2, n.keys.F3, n.keys.F4, n.keys.F5, n.keys.F6, n.keys.F7, n.keys.F8, n.keys.F9, n.keys.F10, n.keys.F11, n.keys.F12, n.keys.Process, n.keys.Unidentified, n.keys.Shift, n.keys.Control, n.keys.Alt, n.keys.Tab, n.keys.AltGraph, n.keys.CapsLock ],\n isComplete: null,\n preValidation: null,\n postValidation: null,\n staticDefinitionSymbol: void 0,\n jitMasking: !1,\n nullable: !0,\n inputEventOnly: !1,\n noValuePatching: !1,\n positionCaretOnClick: \"lvp\",\n casing: null,\n inputmode: \"text\",\n importDataAttributes: !0,\n shiftPositions: !0,\n usePrototypeDefinitions: !0,\n validationEventTimeOut: 3e3,\n substitutes: {}\n };\n t.default = a;\n },\n 7392: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n t.default = {\n 9: {\n validator: \"[0-9\\uff10-\\uff19]\",\n definitionSymbol: \"*\"\n },\n a: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n definitionSymbol: \"*\"\n },\n \"*\": {\n validator: \"[0-9\\uff10-\\uff19A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\"\n }\n };\n },\n 253: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e, t, i) {\n if (void 0 === i) return e.__data ? e.__data[t] : null;\n e.__data = e.__data || {}, e.__data[t] = i;\n };\n },\n 3776: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.Event = void 0, t.off = function(e, t) {\n var i, n;\n f(this[0]) && e && (i = this[0].eventRegistry, n = this[0], e.split(\" \").forEach((function(e) {\n var a = l(e.split(\".\"), 2);\n (function(e, n) {\n var a, r, o = [];\n if (e.length > 0) if (void 0 === t) for (a = 0, r = i[e][n].length; a < r; a++) o.push({\n ev: e,\n namespace: n && n.length > 0 ? n : \"global\",\n handler: i[e][n][a]\n }); else o.push({\n ev: e,\n namespace: n && n.length > 0 ? n : \"global\",\n handler: t\n }); else if (n.length > 0) for (var s in i) for (var l in i[s]) if (l === n) if (void 0 === t) for (a = 0, \n r = i[s][l].length; a < r; a++) o.push({\n ev: s,\n namespace: l,\n handler: i[s][l][a]\n }); else o.push({\n ev: s,\n namespace: l,\n handler: t\n });\n return o;\n })(a[0], a[1]).forEach((function(e) {\n var t = e.ev, a = e.handler;\n !function(e, t, a) {\n if (e in i == 1) if (n.removeEventListener ? n.removeEventListener(e, a, !1) : n.detachEvent && n.detachEvent(\"on\".concat(e), a), \n \"global\" === t) for (var r in i[e]) i[e][r].splice(i[e][r].indexOf(a), 1); else i[e][t].splice(i[e][t].indexOf(a), 1);\n }(t, e.namespace, a);\n }));\n })));\n return this;\n }, t.on = function(e, t) {\n if (f(this[0])) {\n var i = this[0].eventRegistry, n = this[0];\n e.split(\" \").forEach((function(e) {\n var a = l(e.split(\".\"), 2), r = a[0], o = a[1];\n !function(e, a) {\n n.addEventListener ? n.addEventListener(e, t, !1) : n.attachEvent && n.attachEvent(\"on\".concat(e), t), \n i[e] = i[e] || {}, i[e][a] = i[e][a] || [], i[e][a].push(t);\n }(r, void 0 === o ? \"global\" : o);\n }));\n }\n return this;\n }, t.trigger = function(e) {\n var t = arguments;\n if (f(this[0])) for (var i = this[0].eventRegistry, n = this[0], r = \"string\" == typeof e ? e.split(\" \") : [ e.type ], s = 0; s < r.length; s++) {\n var l = r[s].split(\".\"), c = l[0], u = l[1] || \"global\";\n if (void 0 !== document && \"global\" === u) {\n var d, p = {\n bubbles: !0,\n cancelable: !0,\n composed: !0,\n detail: arguments[1]\n };\n if (document.createEvent) {\n try {\n if (\"input\" === c) p.inputType = \"insertText\", d = new InputEvent(c, p); else d = new CustomEvent(c, p);\n } catch (e) {\n (d = document.createEvent(\"CustomEvent\")).initCustomEvent(c, p.bubbles, p.cancelable, p.detail);\n }\n e.type && (0, a.default)(d, e), n.dispatchEvent(d);\n } else (d = document.createEventObject()).eventType = c, d.detail = arguments[1], \n e.type && (0, a.default)(d, e), n.fireEvent(\"on\" + d.eventType, d);\n } else if (void 0 !== i[c]) {\n arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]), \n arguments[0].detail = arguments.slice(1);\n var h = i[c];\n (\"global\" === u ? Object.values(h).flat() : h[u]).forEach((function(e) {\n return e.apply(n, t);\n }));\n }\n }\n return this;\n };\n var n, a = u(i(600)), r = u(i(9380)), o = u(i(4963)), s = u(i(8741));\n function l(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return c(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function c(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function u(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n function f(e) {\n return e instanceof Element;\n }\n t.Event = n, \"function\" == typeof r.default.CustomEvent ? t.Event = n = r.default.CustomEvent : s.default && (t.Event = n = function(e, t) {\n t = t || {\n bubbles: !1,\n cancelable: !1,\n composed: !0,\n detail: void 0\n };\n var i = document.createEvent(\"CustomEvent\");\n return i.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), i;\n }, n.prototype = r.default.Event.prototype);\n },\n 600: function(e, t) {\n function i(e) {\n return i = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, i(e);\n }\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function e() {\n var t, n, a, r, o, s, l = arguments[0] || {}, c = 1, u = arguments.length, f = !1;\n \"boolean\" == typeof l && (f = l, l = arguments[c] || {}, c++);\n \"object\" !== i(l) && \"function\" != typeof l && (l = {});\n for (;c < u; c++) if (null != (t = arguments[c])) for (n in t) a = l[n], l !== (r = t[n]) && (f && r && (\"[object Object]\" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = !1, \n s = a && Array.isArray(a) ? a : []) : s = a && \"[object Object]\" === Object.prototype.toString.call(a) ? a : {}, \n l[n] = e(f, s, r)) : void 0 !== r && (l[n] = r));\n return l;\n };\n },\n 4963: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = s(i(600)), a = s(i(9380)), r = s(i(253)), o = i(3776);\n function s(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var l = a.default.document;\n function c(e) {\n return e instanceof c ? e : this instanceof c ? void (null != e && e !== a.default && (this[0] = e.nodeName ? e : void 0 !== e[0] && e[0].nodeName ? e[0] : l.querySelector(e), \n void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new c(e);\n }\n c.prototype = {\n on: o.on,\n off: o.off,\n trigger: o.trigger\n }, c.extend = n.default, c.data = r.default, c.Event = o.Event;\n var u = c;\n t.default = u;\n },\n 9845: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.mobile = t.iphone = t.ie = void 0;\n var n, a = (n = i(9380)) && n.__esModule ? n : {\n default: n\n };\n var r = a.default.navigator && a.default.navigator.userAgent || \"\", o = r.indexOf(\"MSIE \") > 0 || r.indexOf(\"Trident/\") > 0, s = navigator.userAgentData && navigator.userAgentData.mobile || a.default.navigator && a.default.navigator.maxTouchPoints || \"ontouchstart\" in a.default, l = /iphone/i.test(r);\n t.iphone = l, t.mobile = s, t.ie = o;\n },\n 7184: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e) {\n return e.replace(i, \"\\\\$1\");\n };\n var i = new RegExp(\"(\\\\\" + [ \"/\", \".\", \"*\", \"+\", \"?\", \"|\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", \"\\\\\", \"$\", \"^\" ].join(\"|\\\\\") + \")\", \"gim\");\n },\n 6030: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.EventHandlers = void 0;\n var n = i(8711), a = i(2839), r = i(9845), o = i(7215), s = i(7760), l = i(4713);\n function c(e, t) {\n var i = \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (!i) {\n if (Array.isArray(e) || (i = function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return u(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return u(e, t);\n }(e)) || t && e && \"number\" == typeof e.length) {\n i && (e = i);\n var n = 0, a = function() {};\n return {\n s: a,\n n: function() {\n return n >= e.length ? {\n done: !0\n } : {\n done: !1,\n value: e[n++]\n };\n },\n e: function(e) {\n throw e;\n },\n f: a\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var r, o = !0, s = !1;\n return {\n s: function() {\n i = i.call(e);\n },\n n: function() {\n var e = i.next();\n return o = e.done, e;\n },\n e: function(e) {\n s = !0, r = e;\n },\n f: function() {\n try {\n o || null == i.return || i.return();\n } finally {\n if (s) throw r;\n }\n }\n };\n }\n function u(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n var f = {\n keyEvent: function(e, t, i, c, u) {\n var d = this.inputmask, p = d.opts, h = d.dependencyLib, v = d.maskset, m = this, g = h(m), y = e.key, k = n.caret.call(d, m), b = p.onKeyDown.call(this, e, n.getBuffer.call(d), k, p);\n if (void 0 !== b) return b;\n if (y === a.keys.Backspace || y === a.keys.Delete || r.iphone && y === a.keys.BACKSPACE_SAFARI || e.ctrlKey && y === a.keys.x && !(\"oncut\" in m)) e.preventDefault(), \n o.handleRemove.call(d, m, y, k), (0, s.writeBuffer)(m, n.getBuffer.call(d, !0), v.p, e, m.inputmask._valueGet() !== n.getBuffer.call(d).join(\"\")); else if (y === a.keys.End || y === a.keys.PageDown) {\n e.preventDefault();\n var x = n.seekNext.call(d, n.getLastValidPosition.call(d));\n n.caret.call(d, m, e.shiftKey ? k.begin : x, x, !0);\n } else y === a.keys.Home && !e.shiftKey || y === a.keys.PageUp ? (e.preventDefault(), \n n.caret.call(d, m, 0, e.shiftKey ? k.begin : 0, !0)) : p.undoOnEscape && y === a.keys.Escape && !0 !== e.altKey ? ((0, \n s.checkVal)(m, !0, !1, d.undoValue.split(\"\")), g.trigger(\"click\")) : y !== a.keys.Insert || e.shiftKey || e.ctrlKey || void 0 !== d.userOptions.insertMode ? !0 === p.tabThrough && y === a.keys.Tab ? !0 === e.shiftKey ? (k.end = n.seekPrevious.call(d, k.end, !0), \n !0 === l.getTest.call(d, k.end - 1).match.static && k.end--, k.begin = n.seekPrevious.call(d, k.end, !0), \n k.begin >= 0 && k.end > 0 && (e.preventDefault(), n.caret.call(d, m, k.begin, k.end))) : (k.begin = n.seekNext.call(d, k.begin, !0), \n k.end = n.seekNext.call(d, k.begin, !0), k.end < v.maskLength && k.end--, k.begin <= v.maskLength && (e.preventDefault(), \n n.caret.call(d, m, k.begin, k.end))) : e.shiftKey || p.insertModeVisual && !1 === p.insertMode && (y === a.keys.ArrowRight ? setTimeout((function() {\n var e = n.caret.call(d, m);\n n.caret.call(d, m, e.begin);\n }), 0) : y === a.keys.ArrowLeft && setTimeout((function() {\n var e = n.translatePosition.call(d, m.inputmask.caretPos.begin);\n n.translatePosition.call(d, m.inputmask.caretPos.end);\n d.isRTL ? n.caret.call(d, m, e + (e === v.maskLength ? 0 : 1)) : n.caret.call(d, m, e - (0 === e ? 0 : 1));\n }), 0)) : o.isSelection.call(d, k) ? p.insertMode = !p.insertMode : (p.insertMode = !p.insertMode, \n n.caret.call(d, m, k.begin, k.begin));\n return d.isComposing = y == a.keys.Process || y == a.keys.Unidentified, d.ignorable = p.ignorables.includes(y), \n f.keypressEvent.call(this, e, t, i, c, u);\n },\n keypressEvent: function(e, t, i, r, l) {\n var c = this.inputmask || this, u = c.opts, f = c.dependencyLib, d = c.maskset, p = c.el, h = f(p), v = e.key;\n if (!0 === t || e.ctrlKey && e.altKey || !(e.ctrlKey || e.metaKey || c.ignorable)) {\n if (v) {\n var m, g = t ? {\n begin: l,\n end: l\n } : n.caret.call(c, p);\n v = u.substitutes[v] || v, d.writeOutBuffer = !0;\n var y = o.isValid.call(c, g, v, r, void 0, void 0, void 0, t);\n if (!1 !== y && (n.resetMaskSet.call(c, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(c, y.pos.begin ? y.pos.begin : y.pos), \n d.p = m), m = u.numericInput && void 0 === y.caret ? n.seekPrevious.call(c, m) : m, \n !1 !== i && (setTimeout((function() {\n u.onKeyValidation.call(p, v, y);\n }), 0), d.writeOutBuffer && !1 !== y)) {\n var k = n.getBuffer.call(c);\n (0, s.writeBuffer)(p, k, m, e, !0 !== t);\n }\n if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y;\n }\n } else v === a.keys.Enter && c.undoValue !== c._valueGet(!0) && (c.undoValue = c._valueGet(!0), \n setTimeout((function() {\n h.trigger(\"change\");\n }), 0));\n },\n pasteEvent: function(e) {\n var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this);\n i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t));\n var l = r.substr(0, o.begin), u = r.substr(o.end, r.length);\n if (l == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join(\"\") && (l = \"\"), \n u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join(\"\") && (u = \"\"), \n window.clipboardData && window.clipboardData.getData) r = l + window.clipboardData.getData(\"Text\") + u; else {\n if (!e.clipboardData || !e.clipboardData.getData) return !0;\n r = l + e.clipboardData.getData(\"text/plain\") + u;\n }\n var f = r;\n if (i.isRTL) {\n f = f.split(\"\");\n var d, p = c(n.getBufferTemplate.call(i));\n try {\n for (p.s(); !(d = p.n()).done; ) {\n var h = d.value;\n f[0] === h && f.shift();\n }\n } catch (e) {\n p.e(e);\n } finally {\n p.f();\n }\n f = f.join(\"\");\n }\n if (\"function\" == typeof a.onBeforePaste) {\n if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1;\n f || (f = r);\n }\n (0, s.checkVal)(this, !0, !1, f.toString().split(\"\"), e), e.preventDefault();\n },\n inputFallBackEvent: function(e) {\n var t = this.inputmask, i = t.opts, o = t.dependencyLib;\n var c, u = this, d = u.inputmask._valueGet(!0), p = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(\"\"), h = n.caret.call(t, u, void 0, void 0, !0);\n if (p !== d) {\n if (c = function(e, a, r) {\n for (var o, s, c, u = e.substr(0, r.begin).split(\"\"), f = e.substr(r.begin).split(\"\"), d = a.substr(0, r.begin).split(\"\"), p = a.substr(r.begin).split(\"\"), h = u.length >= d.length ? u.length : d.length, v = f.length >= p.length ? f.length : p.length, m = \"\", g = [], y = \"~\"; u.length < h; ) u.push(y);\n for (;d.length < h; ) d.push(y);\n for (;f.length < v; ) f.unshift(y);\n for (;p.length < v; ) p.unshift(y);\n var k = u.concat(f), b = d.concat(p);\n for (s = 0, o = k.length; s < o; s++) switch (c = l.getPlaceholder.call(t, n.translatePosition.call(t, s)), \n m) {\n case \"insertText\":\n b[s - 1] === k[s] && r.begin == k.length - 1 && g.push(k[s]), s = o;\n break;\n\n case \"insertReplacementText\":\n case \"deleteContentBackward\":\n k[s] === y ? r.end++ : s = o;\n break;\n\n default:\n k[s] !== b[s] && (k[s + 1] !== y && k[s + 1] !== c && void 0 !== k[s + 1] || (b[s] !== c || b[s + 1] !== y) && b[s] !== y ? b[s + 1] === y && b[s] === k[s + 1] ? (m = \"insertText\", \n g.push(k[s]), r.begin--, r.end--) : k[s] !== c && k[s] !== y && (k[s + 1] === y || b[s] !== k[s] && b[s + 1] === k[s + 1]) ? (m = \"insertReplacementText\", \n g.push(k[s]), r.begin--) : k[s] === y ? (m = \"deleteContentBackward\", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === i.radixPoint) && r.end++) : s = o : (m = \"insertText\", \n g.push(k[s]), r.begin--, r.end--));\n }\n return {\n action: m,\n data: g,\n caret: r\n };\n }(d, p, h), (u.inputmask.shadowRoot || u.ownerDocument).activeElement !== u && u.focus(), \n (0, s.writeBuffer)(u, n.getBuffer.call(t)), n.caret.call(t, u, h.begin, h.end, !0), \n !r.mobile && t.skipNextInsert && \"insertText\" === e.inputType && \"insertText\" === c.action && t.isComposing) return !1;\n switch (\"insertCompositionText\" === e.inputType && \"insertText\" === c.action && t.isComposing ? t.skipNextInsert = !0 : t.skipNextInsert = !1, \n c.action) {\n case \"insertText\":\n case \"insertReplacementText\":\n c.data.forEach((function(e, i) {\n var n = new o.Event(\"keypress\");\n n.key = e, t.ignorable = !1, f.keypressEvent.call(u, n);\n })), setTimeout((function() {\n t.$el.trigger(\"keyup\");\n }), 0);\n break;\n\n case \"deleteContentBackward\":\n var v = new o.Event(\"keydown\");\n v.key = a.keys.Backspace, f.keyEvent.call(u, v);\n break;\n\n default:\n (0, s.applyInputValue)(u, d), n.caret.call(t, u, h.begin, h.end, !0);\n }\n e.preventDefault();\n }\n },\n setValueEvent: function(e) {\n var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1];\n void 0 === a && (a = i.inputmask._valueGet(!0)), (0, s.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]);\n },\n focusEvent: function(e) {\n var t = this.inputmask, i = t.opts, a = null == t ? void 0 : t._valueGet();\n i.showMaskOnFocus && a !== n.getBuffer.call(t).join(\"\") && (0, s.writeBuffer)(this, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))), \n !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || o.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || f.clickEvent.apply(this, [ e, !0 ]), \n t.undoValue = null == t ? void 0 : t._valueGet(!0);\n },\n invalidEvent: function(e) {\n this.inputmask.validationEvent = !0;\n },\n mouseleaveEvent: function() {\n var e = this.inputmask, t = e.opts, i = this;\n e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0, \n s.HandleNativePlaceholder)(i, e.originalPlaceholder);\n },\n clickEvent: function(e, t) {\n var i = this.inputmask;\n i.clicked++;\n var a = this;\n if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) {\n var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t);\n void 0 !== r && n.caret.call(i, a, r);\n }\n },\n cutEvent: function(e) {\n var t = this.inputmask, i = t.maskset, r = this, l = n.caret.call(t, r), c = t.isRTL ? n.getBuffer.call(t).slice(l.end, l.begin) : n.getBuffer.call(t).slice(l.begin, l.end), u = t.isRTL ? c.reverse().join(\"\") : c.join(\"\");\n window.navigator.clipboard ? window.navigator.clipboard.writeText(u) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData(\"Text\", u), \n o.handleRemove.call(t, r, a.keys.Delete, l), (0, s.writeBuffer)(r, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0));\n },\n blurEvent: function(e) {\n var t = this.inputmask, i = t.opts, a = t.dependencyLib;\n t.clicked = 0;\n var r = a(this), l = this;\n if (l.inputmask) {\n (0, s.HandleNativePlaceholder)(l, t.originalPlaceholder);\n var c = l.inputmask._valueGet(), u = n.getBuffer.call(t).slice();\n \"\" !== c && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && c === n.getBufferTemplate.call(t).join(\"\") ? u = [] : s.clearOptionalTail.call(t, u)), \n !1 === o.isComplete.call(t, u) && (setTimeout((function() {\n r.trigger(\"incomplete\");\n }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())), \n (0, s.writeBuffer)(l, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0), \n r.trigger(\"change\"));\n }\n },\n mouseenterEvent: function() {\n var e = this.inputmask, t = e.opts.showMaskOnHover, i = this;\n if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) {\n var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join(\"\");\n t && (0, s.HandleNativePlaceholder)(i, a);\n }\n },\n submitEvent: function() {\n var e = this.inputmask, t = e.opts;\n e.undoValue !== e._valueGet(!0) && e.$el.trigger(\"change\"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join(\"\") && e._valueSet(\"\"), \n t.clearIncomplete && !1 === o.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(\"\"), \n t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {\n (0, s.writeBuffer)(e.el, n.getBuffer.call(e));\n }), 0));\n },\n resetEvent: function() {\n var e = this.inputmask;\n e.refreshValue = !0, setTimeout((function() {\n (0, s.applyInputValue)(e.el, e._valueGet(!0));\n }), 0);\n }\n };\n t.EventHandlers = f;\n },\n 9716: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.EventRuler = void 0;\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n }, r = i(2839), o = i(8711), s = i(7760);\n var l = {\n on: function(e, t, i) {\n var n = e.inputmask.dependencyLib, l = function(t) {\n t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);\n var l, c = this, u = c.inputmask, f = u ? u.opts : void 0;\n if (void 0 === u && \"FORM\" !== this.nodeName) {\n var d = n.data(c, \"_inputmask_opts\");\n n(c).off(), d && new a.default(d).mask(c);\n } else {\n if ([ \"submit\", \"reset\", \"setvalue\" ].includes(t.type) || \"FORM\" === this.nodeName || !(c.disabled || c.readOnly && !(\"keydown\" === t.type && t.ctrlKey && t.key === r.keys.c || !1 === f.tabThrough && t.key === r.keys.Tab))) {\n switch (t.type) {\n case \"input\":\n if (!0 === u.skipInputEvent) return u.skipInputEvent = !1, t.preventDefault();\n break;\n\n case \"click\":\n case \"focus\":\n return u.validationEvent ? (u.validationEvent = !1, e.blur(), (0, s.HandleNativePlaceholder)(e, (u.isRTL ? o.getBufferTemplate.call(u).slice().reverse() : o.getBufferTemplate.call(u)).join(\"\")), \n setTimeout((function() {\n e.focus();\n }), f.validationEventTimeOut), !1) : (l = arguments, void setTimeout((function() {\n e.inputmask && i.apply(c, l);\n }), 0));\n }\n var p = i.apply(c, arguments);\n return !1 === p && (t.preventDefault(), t.stopPropagation()), p;\n }\n t.preventDefault();\n }\n };\n [ \"submit\", \"reset\" ].includes(t) ? (l = l.bind(e), null !== e.form && n(e.form).on(t, l)) : n(e).on(t, l), \n e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l);\n },\n off: function(e, t) {\n if (e.inputmask && e.inputmask.events) {\n var i = e.inputmask.dependencyLib, n = e.inputmask.events;\n for (var a in t && ((n = [])[t] = e.inputmask.events[t]), n) {\n for (var r = n[a]; r.length > 0; ) {\n var o = r.pop();\n [ \"submit\", \"reset\" ].includes(a) ? null !== e.form && i(e.form).off(a, o) : i(e).off(a, o);\n }\n delete e.inputmask.events[a];\n }\n }\n }\n };\n t.EventRuler = l;\n },\n 219: function(e, t, i) {\n var n = d(i(2394)), a = i(2839), r = d(i(7184)), o = i(8711), s = i(4713);\n function l(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return c(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function c(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function u(e) {\n return u = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, u(e);\n }\n function f(e, t) {\n for (var i = 0; i < t.length; i++) {\n var n = t[i];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), \n Object.defineProperty(e, (a = n.key, r = void 0, r = function(e, t) {\n if (\"object\" !== u(e) || null === e) return e;\n var i = e[Symbol.toPrimitive];\n if (void 0 !== i) {\n var n = i.call(e, t || \"default\");\n if (\"object\" !== u(n)) return n;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(a, \"string\"), \"symbol\" === u(r) ? r : String(r)), n);\n }\n var a, r;\n }\n function d(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var p = n.default.dependencyLib, h = function() {\n function e(t, i, n) {\n !function(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.mask = t, this.format = i, this.opts = n, this._date = new Date(1, 0, 1), \n this.initDateObject(t, this.opts);\n }\n var t, i, n;\n return t = e, (i = [ {\n key: \"date\",\n get: function() {\n return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)), \n this._date;\n }\n }, {\n key: \"initDateObject\",\n value: function(e, t) {\n var i;\n for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) {\n var n = new RegExp(\"\\\\d+$\").exec(i[0]), a = n ? i[0][0] + \"x\" : i[0], r = void 0;\n if (void 0 !== e) {\n if (n) {\n var o = P(t).lastIndex, s = E(i.index, t);\n P(t).lastIndex = o, r = e.slice(0, e.indexOf(s.nextMatch[0]));\n } else r = e.slice(0, g[a] && g[a][4] || a.length);\n e = e.slice(r.length);\n }\n Object.prototype.hasOwnProperty.call(g, a) && this.setValue(this, r, a, g[a][2], g[a][1]);\n }\n }\n }, {\n key: \"setValue\",\n value: function(e, t, i, n, a) {\n if (void 0 !== t && (e[n] = \"ampm\" === n ? t : t.replace(/[^0-9]/g, \"0\"), e[\"raw\" + n] = t.replace(/\\s/g, \"_\")), \n void 0 !== a) {\n var r = e[n];\n (\"day\" === n && 29 === parseInt(r) || \"month\" === n && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || \"\" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)), \n \"day\" === n && (m = !0, 0 === parseInt(r) && (r = 1)), \"month\" === n && (m = !0), \n \"year\" === n && (m = !0, r.length < 4 && (r = M(r, 4, !0))), \"\" === r || isNaN(r) || a.call(e._date, r), \n \"ampm\" === n && a.call(e._date, r);\n }\n }\n }, {\n key: \"reset\",\n value: function() {\n this._date = new Date(1, 0, 1);\n }\n }, {\n key: \"reInit\",\n value: function() {\n this._date = void 0, this.date;\n }\n } ]) && f(t.prototype, i), n && f(t, n), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e;\n }(), v = (new Date).getFullYear(), m = !1, g = {\n d: [ \"[1-9]|[12][0-9]|3[01]\", Date.prototype.setDate, \"day\", Date.prototype.getDate ],\n dd: [ \"0[1-9]|[12][0-9]|3[01]\", Date.prototype.setDate, \"day\", function() {\n return M(Date.prototype.getDate.call(this), 2);\n } ],\n ddd: [ \"\" ],\n dddd: [ \"\" ],\n m: [ \"[1-9]|1[012]\", function(e) {\n var t = e ? parseInt(e) : 0;\n return t > 0 && t--, Date.prototype.setMonth.call(this, t);\n }, \"month\", function() {\n return Date.prototype.getMonth.call(this) + 1;\n } ],\n mm: [ \"0[1-9]|1[012]\", function(e) {\n var t = e ? parseInt(e) : 0;\n return t > 0 && t--, Date.prototype.setMonth.call(this, t);\n }, \"month\", function() {\n return M(Date.prototype.getMonth.call(this) + 1, 2);\n } ],\n mmm: [ \"\" ],\n mmmm: [ \"\" ],\n yy: [ \"[0-9]{2}\", Date.prototype.setFullYear, \"year\", function() {\n return M(Date.prototype.getFullYear.call(this), 2);\n } ],\n yyyy: [ \"[0-9]{4}\", Date.prototype.setFullYear, \"year\", function() {\n return M(Date.prototype.getFullYear.call(this), 4);\n } ],\n h: [ \"[1-9]|1[0-2]\", Date.prototype.setHours, \"hours\", Date.prototype.getHours ],\n hh: [ \"0[1-9]|1[0-2]\", Date.prototype.setHours, \"hours\", function() {\n return M(Date.prototype.getHours.call(this), 2);\n } ],\n hx: [ function(e) {\n return \"[0-9]{\".concat(e, \"}\");\n }, Date.prototype.setHours, \"hours\", function(e) {\n return Date.prototype.getHours;\n } ],\n H: [ \"1?[0-9]|2[0-3]\", Date.prototype.setHours, \"hours\", Date.prototype.getHours ],\n HH: [ \"0[0-9]|1[0-9]|2[0-3]\", Date.prototype.setHours, \"hours\", function() {\n return M(Date.prototype.getHours.call(this), 2);\n } ],\n Hx: [ function(e) {\n return \"[0-9]{\".concat(e, \"}\");\n }, Date.prototype.setHours, \"hours\", function(e) {\n return function() {\n return M(Date.prototype.getHours.call(this), e);\n };\n } ],\n M: [ \"[1-5]?[0-9]\", Date.prototype.setMinutes, \"minutes\", Date.prototype.getMinutes ],\n MM: [ \"0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]\", Date.prototype.setMinutes, \"minutes\", function() {\n return M(Date.prototype.getMinutes.call(this), 2);\n } ],\n s: [ \"[1-5]?[0-9]\", Date.prototype.setSeconds, \"seconds\", Date.prototype.getSeconds ],\n ss: [ \"0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]\", Date.prototype.setSeconds, \"seconds\", function() {\n return M(Date.prototype.getSeconds.call(this), 2);\n } ],\n l: [ \"[0-9]{3}\", Date.prototype.setMilliseconds, \"milliseconds\", function() {\n return M(Date.prototype.getMilliseconds.call(this), 3);\n }, 3 ],\n L: [ \"[0-9]{2}\", Date.prototype.setMilliseconds, \"milliseconds\", function() {\n return M(Date.prototype.getMilliseconds.call(this), 2);\n }, 2 ],\n t: [ \"[ap]\", k, \"ampm\", b, 1 ],\n tt: [ \"[ap]m\", k, \"ampm\", b, 2 ],\n T: [ \"[AP]\", k, \"ampm\", b, 1 ],\n TT: [ \"[AP]M\", k, \"ampm\", b, 2 ],\n Z: [ \".*\", void 0, \"Z\", function() {\n var e = this.toString().match(/\\((.+)\\)/)[1];\n e.includes(\" \") && (e = (e = e.replace(\"-\", \" \").toUpperCase()).split(\" \").map((function(e) {\n return l(e, 1)[0];\n })).join(\"\"));\n return e;\n } ],\n o: [ \"\" ],\n S: [ \"\" ]\n }, y = {\n isoDate: \"yyyy-mm-dd\",\n isoTime: \"HH:MM:ss\",\n isoDateTime: \"yyyy-mm-dd'T'HH:MM:ss\",\n isoUtcDateTime: \"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'\"\n };\n function k(e) {\n var t = this.getHours();\n e.toLowerCase().includes(\"p\") ? this.setHours(t + 12) : e.toLowerCase().includes(\"a\") && t >= 12 && this.setHours(t - 12);\n }\n function b() {\n var e = this.getHours();\n return (e = e || 12) >= 12 ? \"PM\" : \"AM\";\n }\n function x(e) {\n var t = new RegExp(\"\\\\d+$\").exec(e[0]);\n if (t && void 0 !== t[0]) {\n var i = g[e[0][0] + \"x\"].slice(\"\");\n return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i;\n }\n if (g[e[0]]) return g[e[0]];\n }\n function P(e) {\n if (!e.tokenizer) {\n var t = [], i = [];\n for (var n in g) if (/\\.*x$/.test(n)) {\n var a = n[0] + \"\\\\d+\";\n -1 === i.indexOf(a) && i.push(a);\n } else -1 === t.indexOf(n[0]) && t.push(n[0]);\n e.tokenizer = \"(\" + (i.length > 0 ? i.join(\"|\") + \"|\" : \"\") + t.join(\"+|\") + \")+?|.\", \n e.tokenizer = new RegExp(e.tokenizer, \"g\");\n }\n return e.tokenizer;\n }\n function w(e, t, i) {\n if (!m) return !0;\n if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || \"29\" == e.day && (!isFinite(e.rawyear) || void 0 === e.rawyear || \"\" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;\n if (\"29\" == e.day) {\n var n = E(t.pos, i);\n if (\"yyyy\" === n.targetMatch[0] && t.pos - n.targetMatchIndex == 2) return t.remove = t.pos + 1, \n t;\n } else if (\"02\" == e.month && \"30\" == e.day && void 0 !== t.c) return e.day = \"03\", \n e.date.setDate(3), e.date.setMonth(1), t.insert = [ {\n pos: t.pos,\n c: \"0\"\n }, {\n pos: t.pos + 1,\n c: t.c\n } ], t.caret = o.seekNext.call(this, t.pos + 1), t;\n return !1;\n }\n function S(e, t, i, n) {\n var a, o, s = \"\";\n for (P(i).lastIndex = 0; a = P(i).exec(e); ) {\n if (void 0 === t) if (o = x(a)) s += \"(\" + o[0] + \")\"; else switch (a[0]) {\n case \"[\":\n s += \"(\";\n break;\n\n case \"]\":\n s += \")?\";\n break;\n\n default:\n s += (0, r.default)(a[0]);\n } else if (o = x(a)) if (!0 !== n && o[3]) s += o[3].call(t.date); else o[2] ? s += t[\"raw\" + o[2]] : s += a[0]; else s += a[0];\n }\n return s;\n }\n function M(e, t, i) {\n for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + \"0\" : \"0\" + e;\n return e;\n }\n function _(e, t, i) {\n return \"string\" == typeof e ? new h(e, t, i) : e && \"object\" === u(e) && Object.prototype.hasOwnProperty.call(e, \"date\") ? e : void 0;\n }\n function O(e, t) {\n return S(t.inputFormat, {\n date: e\n }, t);\n }\n function E(e, t) {\n var i, n, a = 0, r = 0;\n for (P(t).lastIndex = 0; n = P(t).exec(t.inputFormat); ) {\n var o = new RegExp(\"\\\\d+$\").exec(n[0]);\n if ((a += r = o ? parseInt(o[0]) : n[0].length) >= e + 1) {\n i = n, n = P(t).exec(t.inputFormat);\n break;\n }\n }\n return {\n targetMatchIndex: a - r,\n nextMatch: n,\n targetMatch: i\n };\n }\n n.default.extendAliases({\n datetime: {\n mask: function(e) {\n return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join(\"|\"), e.inputFormat = y[e.inputFormat] || e.inputFormat, \n e.displayFormat = y[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = y[e.outputFormat] || e.outputFormat || e.inputFormat, \n e.placeholder = \"\" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\\]]/, \"\"), \n e.regex = S(e.inputFormat, void 0, e), e.min = _(e.min, e.inputFormat, e), e.max = _(e.max, e.inputFormat, e), \n null;\n },\n placeholder: \"\",\n inputFormat: \"isoDateTime\",\n displayFormat: null,\n outputFormat: null,\n min: null,\n max: null,\n skipOptionalPartCharacter: \"\",\n i18n: {\n dayNames: [ \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\" ],\n monthNames: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ],\n ordinalSuffix: [ \"st\", \"nd\", \"rd\", \"th\" ]\n },\n preValidation: function(e, t, i, n, a, r, o, s) {\n if (s) return !0;\n if (isNaN(i) && e[t] !== i) {\n var l = E(t, a);\n if (l.nextMatch && l.nextMatch[0] === i && l.targetMatch[0].length > 1) {\n var c = g[l.targetMatch[0]][0];\n if (new RegExp(c).test(\"0\" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = \"0\", \n {\n fuzzy: !0,\n buffer: e,\n refreshFromBuffer: {\n start: t - 1,\n end: t + 1\n },\n pos: t + 1\n };\n }\n }\n return !0;\n },\n postValidation: function(e, t, i, n, a, r, o, l) {\n var c, u;\n if (o) return !0;\n if (!1 === n && (((c = E(t + 1, a)).targetMatch && c.targetMatchIndex === t && c.targetMatch[0].length > 1 && void 0 !== g[c.targetMatch[0]] || (c = E(t + 2, a)).targetMatch && c.targetMatchIndex === t + 1 && c.targetMatch[0].length > 1 && void 0 !== g[c.targetMatch[0]]) && (u = g[c.targetMatch[0]][0]), \n void 0 !== u && (void 0 !== r.validPositions[t + 1] && new RegExp(u).test(i + \"0\") ? (e[t] = i, \n e[t + 1] = \"0\", n = {\n pos: t + 2,\n caret: t\n }) : new RegExp(u).test(\"0\" + i) && (e[t] = \"0\", e[t + 1] = i, n = {\n pos: t + 2\n })), !1 === n)) return n;\n if (n.fuzzy && (e = n.buffer, t = n.pos), (c = E(t, a)).targetMatch && c.targetMatch[0] && void 0 !== g[c.targetMatch[0]]) {\n var f = g[c.targetMatch[0]];\n u = f[0];\n var d = e.slice(c.targetMatchIndex, c.targetMatchIndex + c.targetMatch[0].length);\n if (!1 === new RegExp(u).test(d.join(\"\")) && 2 === c.targetMatch[0].length && r.validPositions[c.targetMatchIndex] && r.validPositions[c.targetMatchIndex + 1] && (r.validPositions[c.targetMatchIndex + 1].input = \"0\"), \n \"year\" == f[2]) for (var p = s.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h], \n delete r.validPositions[h];\n }\n var m = n, y = _(e.join(\"\"), a.inputFormat, a);\n return m && !isNaN(y.date.getTime()) && (a.prefillYear && (m = function(e, t, i) {\n if (e.year !== e.rawyear) {\n var n = v.toString(), a = e.rawyear.replace(/[^0-9]/g, \"\"), r = n.slice(0, a.length), o = n.slice(a.length);\n if (2 === a.length && a === r) {\n var s = new Date(v, e.month - 1, e.day);\n e.day == s.getDate() && (!i.max || i.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(v), \n e.year = n, t.insert = [ {\n pos: t.pos + 1,\n c: o[0]\n }, {\n pos: t.pos + 2,\n c: o[1]\n } ]);\n }\n }\n return t;\n }(y, m, a)), m = function(e, t, i, n, a) {\n if (!t) return t;\n if (t && i.min && !isNaN(i.min.date.getTime())) {\n var r;\n for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) {\n var o;\n if ((o = x(r)) && o[3]) {\n for (var s = o[1], l = e[o[2]], c = i.min[o[2]], u = i.max ? i.max[o[2]] : c, f = [], d = !1, p = 0; p < c.length; p++) void 0 !== n.validPositions[p + r.index] || d ? (f[p] = l[p], \n d = d || l[p] > c[p]) : (f[p] = c[p], \"year\" === o[2] && l.length - 1 == p && c != u && (f = (parseInt(f.join(\"\")) + 1).toString().split(\"\")), \n \"ampm\" === o[2] && c != u && i.min.date.getTime() > e.date.getTime() && (f[p] = u[p]));\n s.call(e._date, f.join(\"\"));\n }\n }\n t = i.min.date.getTime() <= e.date.getTime(), e.reInit();\n }\n return t && i.max && (isNaN(i.max.date.getTime()) || (t = i.max.date.getTime() >= e.date.getTime())), \n t;\n }(y, m = w.call(this, y, m, a), a, r)), void 0 !== t && m && n.pos !== t ? {\n buffer: S(a.inputFormat, y, a).split(\"\"),\n refreshFromBuffer: {\n start: t,\n end: n.pos\n },\n pos: n.caret || n.pos\n } : m;\n },\n onKeyDown: function(e, t, i, n) {\n e.ctrlKey && e.key === a.keys.ArrowRight && (this.inputmask._valueSet(O(new Date, n)), \n p(this).trigger(\"setvalue\"));\n },\n onUnMask: function(e, t, i) {\n return t ? S(i.outputFormat, _(e, i.inputFormat, i), i, !0) : t;\n },\n casing: function(e, t, i, n) {\n return 0 == t.nativeDef.indexOf(\"[ap]\") ? e.toLowerCase() : 0 == t.nativeDef.indexOf(\"[AP]\") ? e.toUpperCase() : e;\n },\n onBeforeMask: function(e, t) {\n return \"[object Date]\" === Object.prototype.toString.call(e) && (e = O(e, t)), e;\n },\n insertMode: !1,\n insertModeVisual: !1,\n shiftPositions: !1,\n keepStatic: !1,\n inputmode: \"numeric\",\n prefillYear: !0\n }\n });\n },\n 3851: function(e, t, i) {\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n }, r = i(8711), o = i(4713);\n a.default.extendDefinitions({\n A: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n casing: \"upper\"\n },\n \"&\": {\n validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n casing: \"upper\"\n },\n \"#\": {\n validator: \"[0-9A-Fa-f]\",\n casing: \"upper\"\n }\n });\n var s = new RegExp(\"25[0-5]|2[0-4][0-9]|[01][0-9][0-9]\");\n function l(e, t, i, n, a) {\n return i - 1 > -1 && \".\" !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && \".\" !== t.buffer[i - 2] ? t.buffer[i - 2] + e : \"0\" + e) : e = \"00\" + e, \n s.test(e);\n }\n a.default.extendAliases({\n cssunit: {\n regex: \"[+-]?[0-9]+\\\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)\"\n },\n url: {\n regex: \"(https?|ftp)://.*\",\n autoUnmask: !1,\n keepStatic: !1,\n tabThrough: !0\n },\n ip: {\n mask: \"i{1,3}.j{1,3}.k{1,3}.l{1,3}\",\n definitions: {\n i: {\n validator: l\n },\n j: {\n validator: l\n },\n k: {\n validator: l\n },\n l: {\n validator: l\n }\n },\n onUnMask: function(e, t, i) {\n return e;\n },\n inputmode: \"decimal\",\n substitutes: {\n \",\": \".\"\n }\n },\n email: {\n mask: function(e) {\n var t = e.separator, i = e.quantifier, n = \"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]\", a = n;\n if (t) for (var r = 0; r < i; r++) a += \"[\".concat(t).concat(n, \"]\");\n return a;\n },\n greedy: !1,\n casing: \"lower\",\n separator: null,\n quantifier: 5,\n skipOptionalPartCharacter: \"\",\n onBeforePaste: function(e, t) {\n return (e = e.toLowerCase()).replace(\"mailto:\", \"\");\n },\n definitions: {\n \"*\": {\n validator: \"[0-9\\uff11-\\uff19A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5!#$%&'*+/=?^_`{|}~-]\"\n },\n \"-\": {\n validator: \"[0-9A-Za-z-]\"\n }\n },\n onUnMask: function(e, t, i) {\n return e;\n },\n inputmode: \"email\"\n },\n mac: {\n mask: \"##:##:##:##:##:##\"\n },\n vin: {\n mask: \"V{13}9{4}\",\n definitions: {\n V: {\n validator: \"[A-HJ-NPR-Za-hj-npr-z\\\\d]\",\n casing: \"upper\"\n }\n },\n clearIncomplete: !0,\n autoUnmask: !0\n },\n ssn: {\n mask: \"999-99-9999\",\n postValidation: function(e, t, i, n, a, s, l) {\n var c = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0);\n return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(c.join(\"\"));\n }\n }\n });\n },\n 207: function(e, t, i) {\n var n = s(i(2394)), a = s(i(7184)), r = i(8711), o = i(2839);\n function s(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var l = n.default.dependencyLib;\n function c(e, t) {\n for (var i = \"\", a = 0; a < e.length; a++) n.default.prototype.definitions[e.charAt(a)] || t.definitions[e.charAt(a)] || t.optionalmarker[0] === e.charAt(a) || t.optionalmarker[1] === e.charAt(a) || t.quantifiermarker[0] === e.charAt(a) || t.quantifiermarker[1] === e.charAt(a) || t.groupmarker[0] === e.charAt(a) || t.groupmarker[1] === e.charAt(a) || t.alternatormarker === e.charAt(a) ? i += \"\\\\\" + e.charAt(a) : i += e.charAt(a);\n return i;\n }\n function u(e, t, i, n) {\n if (e.length > 0 && t > 0 && (!i.digitsOptional || n)) {\n var a = e.indexOf(i.radixPoint), r = !1;\n i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === a && (e.push(i.radixPoint), \n a = e.length - 1);\n for (var o = 1; o <= t; o++) isFinite(e[a + o]) || (e[a + o] = \"0\");\n }\n return r && e.push(i.negationSymbol.back), e;\n }\n function f(e, t) {\n var i = 0;\n for (var n in \"+\" === e && (i = r.seekNext.call(this, t.validPositions.length - 1)), \n t.tests) if ((n = parseInt(n)) >= i) for (var a = 0, o = t.tests[n].length; a < o; a++) if ((void 0 === t.validPositions[n] || \"-\" === e) && t.tests[n][a].match.def === e) return n + (void 0 !== t.validPositions[n] && \"-\" !== e ? 1 : 0);\n return i;\n }\n function d(e, t) {\n for (var i = -1, n = 0, a = t.validPositions.length; n < a; n++) {\n var r = t.validPositions[n];\n if (r && r.match.def === e) {\n i = n;\n break;\n }\n }\n return i;\n }\n function p(e, t, i, n, a) {\n var r = t.buffer ? t.buffer.indexOf(a.radixPoint) : -1, o = (-1 !== r || n && a.jitMasking) && new RegExp(a.definitions[9].validator).test(e);\n return a._radixDance && -1 !== r && o && null == t.validPositions[r] ? {\n insert: {\n pos: r === i ? r + 1 : r,\n c: a.radixPoint\n },\n pos: i\n } : o;\n }\n n.default.extendAliases({\n numeric: {\n mask: function(e) {\n e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && \"0\" !== e.digits && (\".\" === e.radixPoint ? e.groupSeparator = \",\" : \",\" === e.radixPoint ? e.groupSeparator = \".\" : e.groupSeparator = \"\"), \n \" \" === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)), \n \"radixFocus\" === e.positionCaretOnClick && \"\" === e.placeholder && (e.positionCaretOnClick = \"lvp\");\n var t = \"0\", i = e.radixPoint;\n !0 === e.numericInput && void 0 === e.__financeInput ? (t = \"1\", e.positionCaretOnClick = \"radixFocus\" === e.positionCaretOnClick ? \"lvp\" : e.positionCaretOnClick, \n e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = \",\" === e.radixPoint ? \"?\" : \"!\", \n \"\" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = \"[\" + e.radixPoint + \"]\", \n e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1, \n e.numericInput = !0);\n var n, r = \"[+]\";\n if (r += c(e.prefix, e), \"\" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {}, \n e.definitions[e.groupSeparator].validator = \"[\" + e.groupSeparator + \"]\", e.definitions[e.groupSeparator].placeholder = e.groupSeparator, \n e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0), \n r += e._mask(e)) : r += \"9{+}\", void 0 !== e.digits && 0 !== e.digits) {\n var o = e.digits.toString().split(\",\");\n isFinite(o[0]) && o[1] && isFinite(o[1]) ? r += i + t + \"{\" + e.digits + \"}\" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (n = r + i + t + \"{0,\" + e.digits + \"}\", \n e.keepStatic = !0) : r += i + t + \"{\" + e.digits + \"}\");\n } else e.inputmode = \"numeric\";\n return r += c(e.suffix, e), r += \"[-]\", n && (r = [ n + c(e.suffix, e) + \"[-]\", r ]), \n e.greedy = !1, function(e) {\n void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0, \n a.default)(e.groupSeparator), \"g\"), \"\"), \",\" === e.radixPoint && (e.min = e.min.replace(e.radixPoint, \".\")), \n e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)), \n null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, a.default)(e.groupSeparator), \"g\"), \"\"), \n \",\" === e.radixPoint && (e.max = e.max.replace(e.radixPoint, \".\")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN, \n isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = \"done\");\n }(e), \"\" !== e.radixPoint && e.substituteRadixPoint && (e.substitutes[\".\" == e.radixPoint ? \",\" : \".\"] = e.radixPoint), \n r;\n },\n _mask: function(e) {\n return \"(\" + e.groupSeparator + \"999){+|1}\";\n },\n digits: \"*\",\n digitsOptional: !0,\n enforceDigitsOnBlur: !1,\n radixPoint: \".\",\n positionCaretOnClick: \"radixFocus\",\n _radixDance: !0,\n groupSeparator: \"\",\n allowMinus: !0,\n negationSymbol: {\n front: \"-\",\n back: \"\"\n },\n prefix: \"\",\n suffix: \"\",\n min: null,\n max: null,\n SetMaxOnOverflow: !1,\n step: 1,\n inputType: \"text\",\n unmaskAsNumber: !1,\n roundingFN: Math.round,\n inputmode: \"decimal\",\n shortcuts: {\n k: \"1000\",\n m: \"1000000\"\n },\n placeholder: \"0\",\n greedy: !1,\n rightAlign: !0,\n insertMode: !0,\n autoUnmask: !1,\n skipOptionalPartCharacter: \"\",\n usePrototypeDefinitions: !1,\n stripLeadingZeroes: !0,\n substituteRadixPoint: !0,\n definitions: {\n 0: {\n validator: p\n },\n 1: {\n validator: p,\n definitionSymbol: \"9\"\n },\n 9: {\n validator: \"[0-9\\uff10-\\uff19\\u0660-\\u0669\\u06f0-\\u06f9]\",\n definitionSymbol: \"*\"\n },\n \"+\": {\n validator: function(e, t, i, n, a) {\n return a.allowMinus && (\"-\" === e || e === a.negationSymbol.front);\n }\n },\n \"-\": {\n validator: function(e, t, i, n, a) {\n return a.allowMinus && e === a.negationSymbol.back;\n }\n }\n },\n preValidation: function(e, t, i, n, a, r, o, s) {\n if (!1 !== a.__financeInput && i === a.radixPoint) return !1;\n var l = e.indexOf(a.radixPoint), c = t;\n if (t = function(e, t, i, n, a) {\n return a._radixDance && a.numericInput && t !== a.negationSymbol.back && e <= i && (i > 0 || t == a.radixPoint) && (void 0 === n.validPositions[e - 1] || n.validPositions[e - 1].input !== a.negationSymbol.back) && (e -= 1), \n e;\n }(t, i, l, r, a), \"-\" === i || i === a.negationSymbol.front) {\n if (!0 !== a.allowMinus) return !1;\n var u = !1, p = d(\"+\", r), h = d(\"-\", r);\n return -1 !== p && (u = [ p, h ]), !1 !== u ? {\n remove: u,\n caret: c - a.negationSymbol.back.length\n } : {\n insert: [ {\n pos: f.call(this, \"+\", r),\n c: a.negationSymbol.front,\n fromIsValid: !0\n }, {\n pos: f.call(this, \"-\", r),\n c: a.negationSymbol.back,\n fromIsValid: void 0\n } ],\n caret: c + a.negationSymbol.back.length\n };\n }\n if (i === a.groupSeparator) return {\n caret: c\n };\n if (s) return !0;\n if (-1 !== l && !0 === a._radixDance && !1 === n && i === a.radixPoint && void 0 !== a.digits && (isNaN(a.digits) || parseInt(a.digits) > 0) && l !== t) return {\n caret: a._radixDance && t === l - 1 ? l + 1 : l\n };\n if (!1 === a.__financeInput) if (n) {\n if (a.digitsOptional) return {\n rewritePosition: o.end\n };\n if (!a.digitsOptional) {\n if (o.begin > l && o.end <= l) return i === a.radixPoint ? {\n insert: {\n pos: l + 1,\n c: \"0\",\n fromIsValid: !0\n },\n rewritePosition: l\n } : {\n rewritePosition: l + 1\n };\n if (o.begin < l) return {\n rewritePosition: o.begin - 1\n };\n }\n } else if (!a.showMaskOnHover && !a.showMaskOnFocus && !a.digitsOptional && a.digits > 0 && \"\" === this.__valueGet.call(this.el)) return {\n rewritePosition: l\n };\n return {\n rewritePosition: t\n };\n },\n postValidation: function(e, t, i, n, a, r, o) {\n if (!1 === n) return n;\n if (o) return !0;\n if (null !== a.min || null !== a.max) {\n var s = a.onUnMask(e.slice().reverse().join(\"\"), void 0, l.extend({}, a, {\n unmaskAsNumber: !0\n }));\n if (null !== a.min && s < a.min && (s.toString().length > a.min.toString().length || s < 0)) return !1;\n if (null !== a.max && s > a.max) return !!a.SetMaxOnOverflow && {\n refreshFromBuffer: !0,\n buffer: u(a.max.toString().replace(\".\", a.radixPoint).split(\"\"), a.digits, a).reverse()\n };\n }\n return n;\n },\n onUnMask: function(e, t, i) {\n if (\"\" === t && !0 === i.nullable) return t;\n var n = e.replace(i.prefix, \"\");\n return n = (n = n.replace(i.suffix, \"\")).replace(new RegExp((0, a.default)(i.groupSeparator), \"g\"), \"\"), \n \"\" !== i.placeholder.charAt(0) && (n = n.replace(new RegExp(i.placeholder.charAt(0), \"g\"), \"0\")), \n i.unmaskAsNumber ? (\"\" !== i.radixPoint && -1 !== n.indexOf(i.radixPoint) && (n = n.replace(a.default.call(this, i.radixPoint), \".\")), \n n = (n = n.replace(new RegExp(\"^\" + (0, a.default)(i.negationSymbol.front)), \"-\")).replace(new RegExp((0, \n a.default)(i.negationSymbol.back) + \"$\"), \"\"), Number(n)) : n;\n },\n isComplete: function(e, t) {\n var i = (t.numericInput ? e.slice().reverse() : e).join(\"\");\n return i = (i = (i = (i = (i = i.replace(new RegExp(\"^\" + (0, a.default)(t.negationSymbol.front)), \"-\")).replace(new RegExp((0, \n a.default)(t.negationSymbol.back) + \"$\"), \"\")).replace(t.prefix, \"\")).replace(t.suffix, \"\")).replace(new RegExp((0, \n a.default)(t.groupSeparator) + \"([0-9]{3})\", \"g\"), \"$1\"), \",\" === t.radixPoint && (i = i.replace((0, \n a.default)(t.radixPoint), \".\")), isFinite(i);\n },\n onBeforeMask: function(e, t) {\n var i = t.radixPoint || \",\";\n isFinite(t.digits) && (t.digits = parseInt(t.digits)), \"number\" != typeof e && \"number\" !== t.inputType || \"\" === i || (e = e.toString().replace(\".\", i));\n var n = \"-\" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, r = e.split(i), o = r[0].replace(/[^\\-0-9]/g, \"\"), s = r.length > 1 ? r[1].replace(/[^0-9]/g, \"\") : \"\", l = r.length > 1;\n e = o + (\"\" !== s ? i + s : s);\n var c = 0;\n if (\"\" !== i && (c = t.digitsOptional ? t.digits < s.length ? t.digits : s.length : t.digits, \n \"\" !== s || !t.digitsOptional)) {\n var f = Math.pow(10, c || 1);\n e = e.replace((0, a.default)(i), \".\"), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(c)), \n e = e.toString().replace(\".\", i);\n }\n if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))), \n null !== t.min || null !== t.max) {\n var d = e.toString().replace(i, \".\");\n null !== t.min && d < t.min ? e = t.min.toString().replace(\".\", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(\".\", i));\n }\n return n && \"-\" !== e.charAt(0) && (e = \"-\" + e), u(e.toString().split(\"\"), c, t, l).join(\"\");\n },\n onBeforeWrite: function(e, t, i, n) {\n function r(e, t) {\n if (!1 !== n.__financeInput || t) {\n var i = e.indexOf(n.radixPoint);\n -1 !== i && e.splice(i, 1);\n }\n if (\"\" !== n.groupSeparator) for (;-1 !== (i = e.indexOf(n.groupSeparator)); ) e.splice(i, 1);\n return e;\n }\n var o, s;\n if (n.stripLeadingZeroes && (s = function(e, t) {\n var i = new RegExp(\"(^\" + (\"\" !== t.negationSymbol.front ? (0, a.default)(t.negationSymbol.front) + \"?\" : \"\") + (0, \n a.default)(t.prefix) + \")(.*)(\" + (0, a.default)(t.suffix) + (\"\" != t.negationSymbol.back ? (0, \n a.default)(t.negationSymbol.back) + \"?\" : \"\") + \"$)\").exec(e.slice().reverse().join(\"\")), n = i ? i[2] : \"\", r = !1;\n return n && (n = n.split(t.radixPoint.charAt(0))[0], r = new RegExp(\"^[0\" + t.groupSeparator + \"]*\").exec(n)), \n !(!r || !(r[0].length > 1 || r[0].length > 0 && r[0].length < n.length)) && r;\n }(t, n))) for (var c = t.join(\"\").lastIndexOf(s[0].split(\"\").reverse().join(\"\")) - (s[0] == s.input ? 0 : 1), f = s[0] == s.input ? 1 : 0, d = s[0].length - f; d > 0; d--) delete this.maskset.validPositions[c + d], \n delete t[c + d];\n if (e) switch (e.type) {\n case \"blur\":\n case \"checkval\":\n if (null !== n.min) {\n var p = n.onUnMask(t.slice().reverse().join(\"\"), void 0, l.extend({}, n, {\n unmaskAsNumber: !0\n }));\n if (null !== n.min && p < n.min) return {\n refreshFromBuffer: !0,\n buffer: u(n.min.toString().replace(\".\", n.radixPoint).split(\"\"), n.digits, n).reverse()\n };\n }\n if (t[t.length - 1] === n.negationSymbol.front) {\n var h = new RegExp(\"(^\" + (\"\" != n.negationSymbol.front ? (0, a.default)(n.negationSymbol.front) + \"?\" : \"\") + (0, \n a.default)(n.prefix) + \")(.*)(\" + (0, a.default)(n.suffix) + (\"\" != n.negationSymbol.back ? (0, \n a.default)(n.negationSymbol.back) + \"?\" : \"\") + \"$)\").exec(r(t.slice(), !0).reverse().join(\"\"));\n 0 == (h ? h[2] : \"\") && (o = {\n refreshFromBuffer: !0,\n buffer: [ 0 ]\n });\n } else if (\"\" !== n.radixPoint) {\n t.indexOf(n.radixPoint) === n.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + n.suffix.length) : (t.splice(0, 1 + n.suffix.length), \n o = {\n refreshFromBuffer: !0,\n buffer: r(t)\n }));\n }\n if (n.enforceDigitsOnBlur) {\n var v = (o = o || {}) && o.buffer || t.slice().reverse();\n o.refreshFromBuffer = !0, o.buffer = u(v, n.digits, n, !0).reverse();\n }\n }\n return o;\n },\n onKeyDown: function(e, t, i, n) {\n var a, r = l(this);\n if (3 != e.location) {\n var s, c = e.key;\n if ((s = n.shortcuts && n.shortcuts[c]) && s.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(s)), \n r.trigger(\"setvalue\"), !1;\n }\n if (e.ctrlKey) switch (e.key) {\n case o.keys.ArrowUp:\n return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(n.step)), \n r.trigger(\"setvalue\"), !1;\n\n case o.keys.ArrowDown:\n return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(n.step)), \n r.trigger(\"setvalue\"), !1;\n }\n if (!e.shiftKey && (e.key === o.keys.Delete || e.key === o.keys.Backspace || e.key === o.keys.BACKSPACE_SAFARI) && i.begin !== t.length) {\n if (t[e.key === o.keys.Delete ? i.begin - 1 : i.end] === n.negationSymbol.front) return a = t.slice().reverse(), \n \"\" !== n.negationSymbol.front && a.shift(), \"\" !== n.negationSymbol.back && a.pop(), \n r.trigger(\"setvalue\", [ a.join(\"\"), i.begin ]), !1;\n if (!0 === n._radixDance) {\n var f = t.indexOf(n.radixPoint);\n if (n.digitsOptional) {\n if (0 === f) return (a = t.slice().reverse()).pop(), r.trigger(\"setvalue\", [ a.join(\"\"), i.begin >= a.length ? a.length : i.begin ]), \n !1;\n } else if (-1 !== f && (i.begin < f || i.end < f || e.key === o.keys.Delete && (i.begin === f || i.begin - 1 === f))) {\n var d = void 0;\n return i.begin === i.end && (e.key === o.keys.Backspace || e.key === o.keys.BACKSPACE_SAFARI ? i.begin++ : e.key === o.keys.Delete && i.begin - 1 === f && (d = l.extend({}, i), \n i.begin--, i.end--)), (a = t.slice().reverse()).splice(a.length - i.begin, i.begin - i.end + 1), \n a = u(a, n.digits, n).join(\"\"), d && (i = d), r.trigger(\"setvalue\", [ a, i.begin >= a.length ? f + 1 : i.begin ]), \n !1;\n }\n }\n }\n }\n },\n currency: {\n prefix: \"\",\n groupSeparator: \",\",\n alias: \"numeric\",\n digits: 2,\n digitsOptional: !1\n },\n decimal: {\n alias: \"numeric\"\n },\n integer: {\n alias: \"numeric\",\n inputmode: \"numeric\",\n digits: 0\n },\n percentage: {\n alias: \"numeric\",\n min: 0,\n max: 100,\n suffix: \" %\",\n digits: 0,\n allowMinus: !1\n },\n indianns: {\n alias: \"numeric\",\n _mask: function(e) {\n return \"(\" + e.groupSeparator + \"99){*|1}(\" + e.groupSeparator + \"999){1|1}\";\n },\n groupSeparator: \",\",\n radixPoint: \".\",\n placeholder: \"0\",\n digits: 2,\n digitsOptional: !1\n }\n });\n },\n 9380: function(e, t, i) {\n var n;\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var a = ((n = i(8741)) && n.__esModule ? n : {\n default: n\n }).default ? window : {};\n t.default = a;\n },\n 7760: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.HandleNativePlaceholder = function(e, t) {\n var i = e ? e.inputmask : this;\n if (s.ie) {\n if (e.inputmask._valueGet() !== t && (e.placeholder !== t || \"\" === e.placeholder)) {\n var n = r.getBuffer.call(i).slice(), a = e.inputmask._valueGet();\n if (a !== t) {\n var o = r.getLastValidPosition.call(i);\n -1 === o && a === r.getBufferTemplate.call(i).join(\"\") ? n = [] : -1 !== o && u.call(i, n), \n d(e, n);\n }\n }\n } else e.placeholder !== t && (e.placeholder = t, \"\" === e.placeholder && e.removeAttribute(\"placeholder\"));\n }, t.applyInputValue = c, t.checkVal = f, t.clearOptionalTail = u, t.unmaskedvalue = function(e) {\n var t = e ? e.inputmask : this, i = t.opts, n = t.maskset;\n if (e) {\n if (void 0 === e.inputmask) return e.value;\n e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0));\n }\n for (var a = [], o = n.validPositions, s = 0, l = o.length; s < l; s++) o[s] && o[s].match && (1 != o[s].match.static || Array.isArray(n.metadata) && !0 !== o[s].generatedInput) && a.push(o[s].input);\n var u = 0 === a.length ? \"\" : (t.isRTL ? a.reverse() : a).join(\"\");\n if (\"function\" == typeof i.onUnMask) {\n var f = (t.isRTL ? r.getBuffer.call(t).slice().reverse() : r.getBuffer.call(t)).join(\"\");\n u = i.onUnMask.call(t, f, u, i);\n }\n return u;\n }, t.writeBuffer = d;\n var n = i(2839), a = i(4713), r = i(8711), o = i(7215), s = i(9845), l = i(6030);\n function c(e, t) {\n var i = e ? e.inputmask : this, n = i.opts;\n e.inputmask.refreshValue = !1, \"function\" == typeof n.onBeforeMask && (t = n.onBeforeMask.call(i, t, n) || t), \n f(e, !0, !1, t = (t || \"\").toString().split(\"\")), i.undoValue = i._valueGet(!0), \n (n.clearMaskOnLostFocus || n.clearIncomplete) && e.inputmask._valueGet() === r.getBufferTemplate.call(i).join(\"\") && -1 === r.getLastValidPosition.call(i) && e.inputmask._valueSet(\"\");\n }\n function u(e) {\n e.length = 0;\n for (var t, i = a.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t);\n return e;\n }\n function f(e, t, i, n, s) {\n var c = e ? e.inputmask : this, u = c.maskset, f = c.opts, p = c.dependencyLib, h = n.slice(), v = \"\", m = -1, g = void 0, y = f.skipOptionalPartCharacter;\n f.skipOptionalPartCharacter = \"\", r.resetMaskSet.call(c), u.tests = {}, m = f.radixPoint ? r.determineNewCaretPosition.call(c, {\n begin: 0,\n end: 0\n }, !1, !1 === f.__financeInput ? \"radixFocus\" : void 0).begin : 0, u.p = m, c.caretPos = {\n begin: m\n };\n var k = [], b = c.caretPos;\n if (h.forEach((function(e, t) {\n if (void 0 !== e) {\n var n = new p.Event(\"_checkval\");\n n.key = e, v += e;\n var o = r.getLastValidPosition.call(c, void 0, !0);\n !function(e, t) {\n for (var i = a.getMaskTemplate.call(c, !0, 0).slice(e, r.seekNext.call(c, e, !1, !1)).join(\"\").replace(/'/g, \"\"), n = i.indexOf(t); n > 0 && \" \" === i[n - 1]; ) n--;\n var o = 0 === n && !r.isMask.call(c, e) && (a.getTest.call(c, e).match.nativeDef === t.charAt(0) || !0 === a.getTest.call(c, e).match.static && a.getTest.call(c, e).match.nativeDef === \"'\" + t.charAt(0) || \" \" === a.getTest.call(c, e).match.nativeDef && (a.getTest.call(c, e + 1).match.nativeDef === t.charAt(0) || !0 === a.getTest.call(c, e + 1).match.static && a.getTest.call(c, e + 1).match.nativeDef === \"'\" + t.charAt(0)));\n if (!o && n > 0 && !r.isMask.call(c, e, !1, !0)) {\n var s = r.seekNext.call(c, e);\n c.caretPos.begin < s && (c.caretPos = {\n begin: s\n });\n }\n return o;\n }(m, v) ? (g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, c.caretPos.begin)) && (m = c.caretPos.begin + 1, \n v = \"\") : g = l.EventHandlers.keypressEvent.call(c, n, !0, !1, i, o + 1), g ? (void 0 !== g.pos && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static && void 0 === u.validPositions[g.pos].alternation && (k.push(g.pos), \n c.isRTL || (g.forwardPosition = g.pos + 1)), d.call(c, void 0, r.getBuffer.call(c), g.forwardPosition, n, !1), \n c.caretPos = {\n begin: g.forwardPosition,\n end: g.forwardPosition\n }, b = c.caretPos) : void 0 === u.validPositions[t] && h[t] === a.getPlaceholder.call(c, t) && r.isMask.call(c, t, !0) ? c.caretPos.begin++ : c.caretPos = b;\n }\n })), k.length > 0) {\n var x, P, w = r.seekNext.call(c, -1, void 0, !1);\n if (!o.isComplete.call(c, r.getBuffer.call(c)) && k.length <= w || o.isComplete.call(c, r.getBuffer.call(c)) && k.length > 0 && k.length !== w && 0 === k[0]) for (var S = w; void 0 !== (x = k.shift()); ) {\n var M = new p.Event(\"_checkval\");\n if ((P = u.validPositions[x]).generatedInput = !0, M.key = P.input, (g = l.EventHandlers.keypressEvent.call(c, M, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && u.validPositions[g.pos] && !0 === u.validPositions[g.pos].match.static) k.push(g.pos); else if (!g) break;\n S++;\n }\n }\n t && d.call(c, e, r.getBuffer.call(c), g ? g.forwardPosition : c.caretPos.begin, s || new p.Event(\"checkval\"), s && (\"input\" === s.type && c.undoValue !== r.getBuffer.call(c).join(\"\") || \"paste\" === s.type)), \n f.skipOptionalPartCharacter = y;\n }\n function d(e, t, i, a, s) {\n var l = e ? e.inputmask : this, c = l.opts, u = l.dependencyLib;\n if (a && \"function\" == typeof c.onBeforeWrite) {\n var f = c.onBeforeWrite.call(l, a, t, i, c);\n if (f) {\n if (f.refreshFromBuffer) {\n var d = f.refreshFromBuffer;\n o.refreshFromBuffer.call(l, !0 === d ? d : d.start, d.end, f.buffer || t), t = r.getBuffer.call(l, !0);\n }\n void 0 !== i && (i = void 0 !== f.caret ? f.caret : i);\n }\n }\n if (void 0 !== e && (e.inputmask._valueSet(t.join(\"\")), void 0 === i || void 0 !== a && \"blur\" === a.type || r.caret.call(l, e, i, void 0, void 0, void 0 !== a && \"keydown\" === a.type && (a.key === n.keys.Delete || a.key === n.keys.Backspace)), \n !0 === s)) {\n var p = u(e), h = e.inputmask._valueGet();\n e.inputmask.skipInputEvent = !0, p.trigger(\"input\"), setTimeout((function() {\n h === r.getBufferTemplate.call(l).join(\"\") ? p.trigger(\"cleared\") : !0 === o.isComplete.call(l, t) && p.trigger(\"complete\");\n }), 0);\n }\n }\n },\n 2394: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var n = i(157), a = m(i(4963)), r = m(i(9380)), o = i(2391), s = i(4713), l = i(8711), c = i(7215), u = i(7760), f = i(9716), d = m(i(7392)), p = m(i(3976)), h = m(i(8741));\n function v(e) {\n return v = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, v(e);\n }\n function m(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var g = r.default.document, y = \"_inputmask_opts\";\n function k(e, t, i) {\n if (h.default) {\n if (!(this instanceof k)) return new k(e, t, i);\n this.dependencyLib = a.default, this.el = void 0, this.events = {}, this.maskset = void 0, \n !0 !== i && (\"[object Object]\" === Object.prototype.toString.call(e) ? t = e : (t = t || {}, \n e && (t.alias = e)), this.opts = a.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions, \n this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1, \n this.undoValue = void 0, this.$el = void 0, this.skipInputEvent = !1, this.validationEvent = !1, \n this.ignorable = !1, this.maxLength, this.mouseEnter = !1, this.clicked = 0, this.originalPlaceholder = void 0, \n this.isComposing = !1, this.hasAlternator = !1;\n }\n }\n function b(e, t, i) {\n var n = k.prototype.aliases[e];\n return n ? (n.alias && b(n.alias, void 0, i), a.default.extend(!0, i, n), a.default.extend(!0, i, t), \n !0) : (null === i.mask && (i.mask = e), !1);\n }\n k.prototype = {\n dataAttribute: \"data-inputmask\",\n defaults: p.default,\n definitions: d.default,\n aliases: {},\n masksCache: {},\n get isRTL() {\n return this.opts.isRTL || this.opts.numericInput;\n },\n mask: function(e) {\n var t = this;\n return \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), \n (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : [].slice.call(e)).forEach((function(e, i) {\n var s = a.default.extend(!0, {}, t.opts);\n if (function(e, t, i, n) {\n function o(t, a) {\n var o = \"\" === n ? t : n + \"-\" + t;\n null !== (a = void 0 !== a ? a : e.getAttribute(o)) && (\"string\" == typeof a && (0 === t.indexOf(\"on\") ? a = r.default[a] : \"false\" === a ? a = !1 : \"true\" === a && (a = !0)), \n i[t] = a);\n }\n if (!0 === t.importDataAttributes) {\n var s, l, c, u, f = e.getAttribute(n);\n if (f && \"\" !== f && (f = f.replace(/'/g, '\"'), l = JSON.parse(\"{\" + f + \"}\")), \n l) for (u in c = void 0, l) if (\"alias\" === u.toLowerCase()) {\n c = l[u];\n break;\n }\n for (s in o(\"alias\", c), i.alias && b(i.alias, i, t), t) {\n if (l) for (u in c = void 0, l) if (u.toLowerCase() === s.toLowerCase()) {\n c = l[u];\n break;\n }\n o(s, c);\n }\n }\n a.default.extend(!0, t, i), (\"rtl\" === e.dir || t.rightAlign) && (e.style.textAlign = \"right\");\n (\"rtl\" === e.dir || t.numericInput) && (e.dir = \"ltr\", e.removeAttribute(\"dir\"), \n t.isRTL = !0);\n return Object.keys(i).length;\n }(e, s, a.default.extend(!0, {}, t.userOptions), t.dataAttribute)) {\n var l = (0, o.generateMaskSet)(s, t.noMasksCache);\n void 0 !== l && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()), \n e.inputmask = new k(void 0, void 0, !0), e.inputmask.opts = s, e.inputmask.noMasksCache = t.noMasksCache, \n e.inputmask.userOptions = a.default.extend(!0, {}, t.userOptions), e.inputmask.el = e, \n e.inputmask.$el = (0, a.default)(e), e.inputmask.maskset = l, a.default.data(e, y, t.userOptions), \n n.mask.call(e.inputmask));\n }\n })), e && e[0] && e[0].inputmask || this;\n },\n option: function(e, t) {\n return \"string\" == typeof e ? this.opts[e] : \"object\" === v(e) ? (a.default.extend(this.userOptions, e), \n this.el && !0 !== t && this.mask(this.el), this) : void 0;\n },\n unmaskedvalue: function(e) {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n void 0 === this.el || void 0 !== e) {\n var t = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !1, !1, t), \"function\" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, l.getBuffer.call(this), 0, this.opts);\n }\n return u.unmaskedvalue.call(this, this.el);\n },\n remove: function() {\n if (this.el) {\n a.default.data(this.el, y, null);\n var e = this.opts.autoUnmask ? (0, u.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);\n e !== l.getBufferTemplate.call(this).join(\"\") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(\"\"), \n f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), \"value\") && this.__valueGet && Object.defineProperty(this.el, \"value\", {\n get: this.__valueGet,\n set: this.__valueSet,\n configurable: !0\n }) : g.__lookupGetter__ && this.el.__lookupGetter__(\"value\") && this.__valueGet && (this.el.__defineGetter__(\"value\", this.__valueGet), \n this.el.__defineSetter__(\"value\", this.__valueSet)), this.el.inputmask = void 0;\n }\n return this.el;\n },\n getemptymask: function() {\n return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n (this.isRTL ? l.getBufferTemplate.call(this).reverse() : l.getBufferTemplate.call(this)).join(\"\");\n },\n hasMaskedValue: function() {\n return !this.opts.autoUnmask;\n },\n isComplete: function() {\n return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n c.isComplete.call(this, l.getBuffer.call(this));\n },\n getmetadata: function() {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n Array.isArray(this.maskset.metadata)) {\n var e = s.getMaskTemplate.call(this, !0, 0, !1).join(\"\");\n return this.maskset.metadata.forEach((function(t) {\n return t.mask !== e || (e = t, !1);\n })), e;\n }\n return this.maskset.metadata;\n },\n isValid: function(e) {\n if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), \n e) {\n var t = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !0, !1, t);\n } else e = this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\");\n for (var i = l.getBuffer.call(this), n = l.determineLastRequiredPosition.call(this), a = i.length - 1; a > n && !l.isMask.call(this, a); a--) ;\n return i.splice(n, a + 1 - n), c.isComplete.call(this, i) && e === (this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\"));\n },\n format: function(e, t) {\n this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache);\n var i = (\"function\" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(\"\");\n u.checkVal.call(this, void 0, !0, !1, i);\n var n = this.isRTL ? l.getBuffer.call(this).slice().reverse().join(\"\") : l.getBuffer.call(this).join(\"\");\n return t ? {\n value: n,\n metadata: this.getmetadata()\n } : n;\n },\n setValue: function(e) {\n this.el && (0, a.default)(this.el).trigger(\"setvalue\", [ e ]);\n },\n analyseMask: o.analyseMask\n }, k.extendDefaults = function(e) {\n a.default.extend(!0, k.prototype.defaults, e);\n }, k.extendDefinitions = function(e) {\n a.default.extend(!0, k.prototype.definitions, e);\n }, k.extendAliases = function(e) {\n a.default.extend(!0, k.prototype.aliases, e);\n }, k.format = function(e, t, i) {\n return k(t).format(e, i);\n }, k.unmask = function(e, t) {\n return k(t).unmaskedvalue(e);\n }, k.isValid = function(e, t) {\n return k(t).isValid(e);\n }, k.remove = function(e) {\n \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {\n e.inputmask && e.inputmask.remove();\n }));\n }, k.setValue = function(e, t) {\n \"string\" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {\n e.inputmask ? e.inputmask.setValue(t) : (0, a.default)(e).trigger(\"setvalue\", [ t ]);\n }));\n }, k.dependencyLib = a.default, r.default.Inputmask = k;\n var x = k;\n t.default = x;\n },\n 5296: function(e, t, i) {\n function n(e) {\n return n = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, n(e);\n }\n var a = h(i(9380)), r = h(i(2394)), o = h(i(8741));\n function s(e, t) {\n for (var i = 0; i < t.length; i++) {\n var a = t[i];\n a.enumerable = a.enumerable || !1, a.configurable = !0, \"value\" in a && (a.writable = !0), \n Object.defineProperty(e, (r = a.key, o = void 0, o = function(e, t) {\n if (\"object\" !== n(e) || null === e) return e;\n var i = e[Symbol.toPrimitive];\n if (void 0 !== i) {\n var a = i.call(e, t || \"default\");\n if (\"object\" !== n(a)) return a;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(r, \"string\"), \"symbol\" === n(o) ? o : String(o)), a);\n }\n var r, o;\n }\n function l(e) {\n var t = f();\n return function() {\n var i, a = p(e);\n if (t) {\n var r = p(this).constructor;\n i = Reflect.construct(a, arguments, r);\n } else i = a.apply(this, arguments);\n return function(e, t) {\n if (t && (\"object\" === n(t) || \"function\" == typeof t)) return t;\n if (void 0 !== t) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return function(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e);\n }(this, i);\n };\n }\n function c(e) {\n var t = \"function\" == typeof Map ? new Map : void 0;\n return c = function(e) {\n if (null === e || (i = e, -1 === Function.toString.call(i).indexOf(\"[native code]\"))) return e;\n var i;\n if (\"function\" != typeof e) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== t) {\n if (t.has(e)) return t.get(e);\n t.set(e, n);\n }\n function n() {\n return u(e, arguments, p(this).constructor);\n }\n return n.prototype = Object.create(e.prototype, {\n constructor: {\n value: n,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), d(n, e);\n }, c(e);\n }\n function u(e, t, i) {\n return u = f() ? Reflect.construct.bind() : function(e, t, i) {\n var n = [ null ];\n n.push.apply(n, t);\n var a = new (Function.bind.apply(e, n));\n return i && d(a, i.prototype), a;\n }, u.apply(null, arguments);\n }\n function f() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), \n !0;\n } catch (e) {\n return !1;\n }\n }\n function d(e, t) {\n return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {\n return e.__proto__ = t, e;\n }, d(e, t);\n }\n function p(e) {\n return p = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n }, p(e);\n }\n function h(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n var v = a.default.document;\n if (o.default && v && v.head && v.head.attachShadow && a.default.customElements && void 0 === a.default.customElements.get(\"input-mask\")) {\n var m = function(e) {\n !function(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), t && d(e, t);\n }(o, e);\n var t, i, n, a = l(o);\n function o() {\n var e;\n !function(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, o);\n var t = (e = a.call(this)).getAttributeNames(), i = e.attachShadow({\n mode: \"closed\"\n }), n = v.createElement(\"input\");\n for (var s in n.type = \"text\", i.appendChild(n), t) Object.prototype.hasOwnProperty.call(t, s) && n.setAttribute(t[s], e.getAttribute(t[s]));\n var l = new r.default;\n return l.dataAttribute = \"\", l.mask(n), n.inputmask.shadowRoot = i, e;\n }\n return t = o, i && s(t.prototype, i), n && s(t, n), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), t;\n }(c(HTMLElement));\n a.default.customElements.define(\"input-mask\", m);\n }\n },\n 2839: function(e, t) {\n function i(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return n(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return n(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function n(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.keys = t.keyCode = void 0, t.toKey = function(e, t) {\n return r[e] || (t ? String.fromCharCode(e) : String.fromCharCode(e).toLowerCase());\n }, t.toKeyCode = function(e) {\n return a[e];\n };\n var a = {\n AltGraph: 18,\n ArrowDown: 40,\n ArrowLeft: 37,\n ArrowRight: 39,\n ArrowUp: 38,\n Backspace: 8,\n BACKSPACE_SAFARI: 127,\n CapsLock: 20,\n Delete: 46,\n End: 35,\n Enter: 13,\n Escape: 27,\n Home: 36,\n Insert: 45,\n PageDown: 34,\n PageUp: 33,\n Space: 32,\n Tab: 9,\n c: 67,\n x: 88,\n z: 90,\n Shift: 16,\n Control: 17,\n Alt: 18,\n Pause: 19,\n Meta_LEFT: 91,\n Meta_RIGHT: 92,\n ContextMenu: 93,\n Process: 229,\n Unidentified: 229,\n F1: 112,\n F2: 113,\n F3: 114,\n F4: 115,\n F5: 116,\n F6: 117,\n F7: 118,\n F8: 119,\n F9: 120,\n F10: 121,\n F11: 122,\n F12: 123\n };\n t.keyCode = a;\n var r = Object.entries(a).reduce((function(e, t) {\n var n = i(t, 2), a = n[0], r = n[1];\n return e[r] = void 0 === e[r] ? a : e[r], e;\n }), {}), o = Object.entries(a).reduce((function(e, t) {\n var n = i(t, 2), a = n[0];\n n[1];\n return e[a] = \"Space\" === a ? \" \" : a, e;\n }), {});\n t.keys = o;\n },\n 2391: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.analyseMask = function(e, t, i) {\n var n, o, s, l, c, u, f = /(?:[?*+]|\\{[0-9+*]+(?:,[0-9+*]*)?(?:\\|[0-9+*]*)?\\})|[^.?*+^${[]()|\\\\]+|./g, d = /\\[\\^?]?(?:[^\\\\\\]]+|\\\\[\\S\\s]?)*]?|\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\\S\\s]?)|\\((?:\\?[:=!]?)?|(?:[?*+]|\\{[0-9]+(?:,[0-9]*)?\\})\\??|[^.?*+^${[()|\\\\]+|./g, p = !1, h = new a.default, v = [], m = [], g = !1;\n function y(e, n, a) {\n a = void 0 !== a ? a : e.matches.length;\n var o = e.matches[a - 1];\n if (t) {\n if (0 === n.indexOf(\"[\") || p && /\\\\d|\\\\s|\\\\w|\\\\p/i.test(n) || \".\" === n) {\n var s = i.casing ? \"i\" : \"\";\n /^\\\\p\\{.*}$/i.test(n) && (s += \"u\"), e.matches.splice(a++, 0, {\n fn: new RegExp(n, s),\n static: !1,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== n,\n casing: null,\n def: n,\n placeholder: void 0,\n nativeDef: n\n });\n } else p && (n = n[n.length - 1]), n.split(\"\").forEach((function(t, n) {\n o = e.matches[a - 1], e.matches.splice(a++, 0, {\n fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp(\"[\" + (i.staticDefinitionSymbol || t) + \"]\", i.casing ? \"i\" : \"\") : null,\n static: !0,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== t && !0 !== o.static,\n casing: null,\n def: i.staticDefinitionSymbol || t,\n placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0,\n nativeDef: (p ? \"'\" : \"\") + t\n });\n }));\n p = !1;\n } else {\n var l = i.definitions && i.definitions[n] || i.usePrototypeDefinitions && r.default.prototype.definitions[n];\n l && !p ? e.matches.splice(a++, 0, {\n fn: l.validator ? \"string\" == typeof l.validator ? new RegExp(l.validator, i.casing ? \"i\" : \"\") : new function() {\n this.test = l.validator;\n } : new RegExp(\".\"),\n static: l.static || !1,\n optionality: l.optional || !1,\n defOptionality: l.optional || !1,\n newBlockMarker: void 0 === o || l.optional ? \"master\" : o.def !== (l.definitionSymbol || n),\n casing: l.casing,\n def: l.definitionSymbol || n,\n placeholder: l.placeholder,\n nativeDef: n,\n generated: l.generated\n }) : (e.matches.splice(a++, 0, {\n fn: /[a-z]/i.test(i.staticDefinitionSymbol || n) ? new RegExp(\"[\" + (i.staticDefinitionSymbol || n) + \"]\", i.casing ? \"i\" : \"\") : null,\n static: !0,\n optionality: !1,\n newBlockMarker: void 0 === o ? \"master\" : o.def !== n && !0 !== o.static,\n casing: null,\n def: i.staticDefinitionSymbol || n,\n placeholder: void 0 !== i.staticDefinitionSymbol ? n : void 0,\n nativeDef: (p ? \"'\" : \"\") + n\n }), p = !1);\n }\n }\n function k() {\n if (v.length > 0) {\n if (y(l = v[v.length - 1], o), l.isAlternator) {\n c = v.pop();\n for (var e = 0; e < c.matches.length; e++) c.matches[e].isGroup && (c.matches[e].isGroup = !1);\n v.length > 0 ? (l = v[v.length - 1]).matches.push(c) : h.matches.push(c);\n }\n } else y(h, o);\n }\n function b(e) {\n var t = new a.default(!0);\n return t.openGroup = !1, t.matches = e, t;\n }\n function x() {\n if ((s = v.pop()).openGroup = !1, void 0 !== s) if (v.length > 0) {\n if ((l = v[v.length - 1]).matches.push(s), l.isAlternator) {\n for (var e = (c = v.pop()).matches[0].matches ? c.matches[0].matches.length : 1, t = 0; t < c.matches.length; t++) c.matches[t].isGroup = !1, \n c.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (c.matches[t].matches ? c.matches[t].matches.length : 1) && (i.keepStatic = !0), \n e = c.matches[t].matches ? c.matches[t].matches.length : 1;\n v.length > 0 ? (l = v[v.length - 1]).matches.push(c) : h.matches.push(c);\n }\n } else h.matches.push(s); else k();\n }\n function P(e) {\n var t = e.pop();\n return t.isQuantifier && (t = b([ e.pop(), t ])), t;\n }\n t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0);\n for (;n = t ? d.exec(e) : f.exec(e); ) {\n if (o = n[0], t) {\n switch (o.charAt(0)) {\n case \"?\":\n o = \"{0,1}\";\n break;\n\n case \"+\":\n case \"*\":\n o = \"{\" + o + \"}\";\n break;\n\n case \"|\":\n if (0 === v.length) {\n var w = b(h.matches);\n w.openGroup = !0, v.push(w), h.matches = [], g = !0;\n }\n }\n switch (o) {\n case \"\\\\d\":\n o = \"[0-9]\";\n break;\n\n case \"\\\\p\":\n o += d.exec(e)[0], o += d.exec(e)[0];\n }\n }\n if (p) k(); else switch (o.charAt(0)) {\n case \"$\":\n case \"^\":\n t || k();\n break;\n\n case i.escapeChar:\n p = !0, t && k();\n break;\n\n case i.optionalmarker[1]:\n case i.groupmarker[1]:\n x();\n break;\n\n case i.optionalmarker[0]:\n v.push(new a.default(!1, !0));\n break;\n\n case i.groupmarker[0]:\n v.push(new a.default(!0));\n break;\n\n case i.quantifiermarker[0]:\n var S = new a.default(!1, !1, !0), M = (o = o.replace(/[{}?]/g, \"\")).split(\"|\"), _ = M[0].split(\",\"), O = isNaN(_[0]) ? _[0] : parseInt(_[0]), E = 1 === _.length ? O : isNaN(_[1]) ? _[1] : parseInt(_[1]), T = isNaN(M[1]) ? M[1] : parseInt(M[1]);\n \"*\" !== O && \"+\" !== O || (O = \"*\" === E ? 0 : 1), S.quantifier = {\n min: O,\n max: E,\n jit: T\n };\n var j = v.length > 0 ? v[v.length - 1].matches : h.matches;\n (n = j.pop()).isGroup || (n = b([ n ])), j.push(n), j.push(S);\n break;\n\n case i.alternatormarker:\n if (v.length > 0) {\n var A = (l = v[v.length - 1]).matches[l.matches.length - 1];\n u = l.openGroup && (void 0 === A.matches || !1 === A.isGroup && !1 === A.isAlternator) ? v.pop() : P(l.matches);\n } else u = P(h.matches);\n if (u.isAlternator) v.push(u); else if (u.alternatorGroup ? (c = v.pop(), u.alternatorGroup = !1) : c = new a.default(!1, !1, !1, !0), \n c.matches.push(u), v.push(c), u.openGroup) {\n u.openGroup = !1;\n var D = new a.default(!0);\n D.alternatorGroup = !0, v.push(D);\n }\n break;\n\n default:\n k();\n }\n }\n g && x();\n for (;v.length > 0; ) s = v.pop(), h.matches.push(s);\n h.matches.length > 0 && (!function e(n) {\n n && n.matches && n.matches.forEach((function(a, r) {\n var o = n.matches[r + 1];\n (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && a && a.isGroup && (a.isGroup = !1, \n t || (y(a, i.groupmarker[0], 0), !0 !== a.openGroup && y(a, i.groupmarker[1]))), \n e(a);\n }));\n }(h), m.push(h));\n (i.numericInput || i.isRTL) && function e(t) {\n for (var n in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, n)) {\n var a = parseInt(n);\n if (t.matches[n].isQuantifier && t.matches[a + 1] && t.matches[a + 1].isGroup) {\n var r = t.matches[n];\n t.matches.splice(n, 1), t.matches.splice(a + 1, 0, r);\n }\n void 0 !== t.matches[n].matches ? t.matches[n] = e(t.matches[n]) : t.matches[n] = ((o = t.matches[n]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]), \n o);\n }\n var o;\n return t;\n }(m[0]);\n return m;\n }, t.generateMaskSet = function(e, t) {\n var i;\n function a(e, t) {\n var i = t.repeat, n = t.groupmarker, a = t.quantifiermarker, r = t.keepStatic;\n if (i > 0 || \"*\" === i || \"+\" === i) {\n var l = \"*\" === i ? 0 : \"+\" === i ? 1 : i;\n e = n[0] + e + n[1] + a[0] + l + \",\" + i + a[1];\n }\n if (!0 === r) {\n var c = e.match(new RegExp(\"(.)\\\\[([^\\\\]]*)\\\\]\", \"g\"));\n c && c.forEach((function(t, i) {\n var n = function(e, t) {\n return function(e) {\n if (Array.isArray(e)) return e;\n }(e) || function(e, t) {\n var i = null == e ? null : \"undefined\" != typeof Symbol && e[Symbol.iterator] || e[\"@@iterator\"];\n if (null != i) {\n var n, a, r, o, s = [], l = !0, c = !1;\n try {\n if (r = (i = i.call(e)).next, 0 === t) {\n if (Object(i) !== i) return;\n l = !1;\n } else for (;!(l = (n = r.call(i)).done) && (s.push(n.value), s.length !== t); l = !0) ;\n } catch (e) {\n c = !0, a = e;\n } finally {\n try {\n if (!l && null != i.return && (o = i.return(), Object(o) !== o)) return;\n } finally {\n if (c) throw a;\n }\n }\n return s;\n }\n }(e, t) || function(e, t) {\n if (!e) return;\n if (\"string\" == typeof e) return s(e, t);\n var i = Object.prototype.toString.call(e).slice(8, -1);\n \"Object\" === i && e.constructor && (i = e.constructor.name);\n if (\"Map\" === i || \"Set\" === i) return Array.from(e);\n if (\"Arguments\" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return s(e, t);\n }(e, t) || function() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }(t.split(\"[\"), 2), a = n[0], r = n[1];\n r = r.replace(\"]\", \"\"), e = e.replace(new RegExp(\"\".concat((0, o.default)(a), \"\\\\[\").concat((0, \n o.default)(r), \"\\\\]\")), a.charAt(0) === r.charAt(0) ? \"(\".concat(a, \"|\").concat(a).concat(r, \")\") : \"\".concat(a, \"[\").concat(r, \"]\"));\n }));\n }\n return e;\n }\n function l(e, i, o) {\n var s, l, c = !1;\n return null !== e && \"\" !== e || ((c = null !== o.regex) ? e = (e = o.regex).replace(/^(\\^)(.*)(\\$)$/, \"$2\") : (c = !0, \n e = \".*\")), 1 === e.length && !1 === o.greedy && 0 !== o.repeat && (o.placeholder = \"\"), \n e = a(e, o), l = c ? \"regex_\" + o.regex : o.numericInput ? e.split(\"\").reverse().join(\"\") : e, \n null !== o.keepStatic && (l = \"ks_\" + o.keepStatic + l), void 0 === r.default.prototype.masksCache[l] || !0 === t ? (s = {\n mask: e,\n maskToken: r.default.prototype.analyseMask(e, c, o),\n validPositions: [],\n _buffer: void 0,\n buffer: void 0,\n tests: {},\n excludes: {},\n metadata: i,\n maskLength: void 0,\n jitOffset: {}\n }, !0 !== t && (r.default.prototype.masksCache[l] = s, s = n.default.extend(!0, {}, r.default.prototype.masksCache[l]))) : s = n.default.extend(!0, {}, r.default.prototype.masksCache[l]), \n s;\n }\n \"function\" == typeof e.mask && (e.mask = e.mask(e));\n if (Array.isArray(e.mask)) {\n if (e.mask.length > 1) {\n null === e.keepStatic && (e.keepStatic = !0);\n var c = e.groupmarker[0];\n return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) {\n c.length > 1 && (c += e.alternatormarker), void 0 !== t.mask && \"function\" != typeof t.mask ? c += t.mask : c += t;\n })), l(c += e.groupmarker[1], e.mask, e);\n }\n e.mask = e.mask.pop();\n }\n i = e.mask && void 0 !== e.mask.mask && \"function\" != typeof e.mask.mask ? l(e.mask.mask, e.mask, e) : l(e.mask, e.mask, e);\n null === e.keepStatic && (e.keepStatic = !1);\n return i;\n };\n var n = l(i(4963)), a = l(i(9695)), r = l(i(2394)), o = l(i(7184));\n function s(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];\n return n;\n }\n function l(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n },\n 157: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.mask = function() {\n var e = this, t = this.opts, i = this.el, u = this.dependencyLib;\n o.EventRuler.off(i);\n var f = function(t, i) {\n \"textarea\" !== t.tagName.toLowerCase() && i.ignorables.push(n.keys.Enter);\n var s = t.getAttribute(\"type\"), l = \"input\" === t.tagName.toLowerCase() && i.supportsInputType.includes(s) || t.isContentEditable || \"textarea\" === t.tagName.toLowerCase();\n if (!l) if (\"input\" === t.tagName.toLowerCase()) {\n var c = document.createElement(\"input\");\n c.setAttribute(\"type\", s), l = \"text\" === c.type, c = null;\n } else l = \"partial\";\n return !1 !== l ? function(t) {\n var n, s;\n function l() {\n return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== a.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? r.clearOptionalTail.call(e, a.getBuffer.call(e).slice()).reverse() : r.clearOptionalTail.call(e, a.getBuffer.call(e).slice())).join(\"\") : n.call(this) : \"\" : n.call(this);\n }\n function c(e) {\n s.call(this, e), this.inputmask && (0, r.applyInputValue)(this, e);\n }\n if (!t.inputmask.__valueGet) {\n if (!0 !== i.noValuePatching) {\n if (Object.getOwnPropertyDescriptor) {\n var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), \"value\") : void 0;\n f && f.get && f.set ? (n = f.get, s = f.set, Object.defineProperty(t, \"value\", {\n get: l,\n set: c,\n configurable: !0\n })) : \"input\" !== t.tagName.toLowerCase() && (n = function() {\n return this.textContent;\n }, s = function(e) {\n this.textContent = e;\n }, Object.defineProperty(t, \"value\", {\n get: l,\n set: c,\n configurable: !0\n }));\n } else document.__lookupGetter__ && t.__lookupGetter__(\"value\") && (n = t.__lookupGetter__(\"value\"), \n s = t.__lookupSetter__(\"value\"), t.__defineGetter__(\"value\", l), t.__defineSetter__(\"value\", c));\n t.inputmask.__valueGet = n, t.inputmask.__valueSet = s;\n }\n t.inputmask._valueGet = function(t) {\n return e.isRTL && !0 !== t ? n.call(this.el).split(\"\").reverse().join(\"\") : n.call(this.el);\n }, t.inputmask._valueSet = function(t, i) {\n s.call(this.el, null == t ? \"\" : !0 !== i && e.isRTL ? t.split(\"\").reverse().join(\"\") : t);\n }, void 0 === n && (n = function() {\n return this.value;\n }, s = function(e) {\n this.value = e;\n }, function(t) {\n if (u.valHooks && (void 0 === u.valHooks[t] || !0 !== u.valHooks[t].inputmaskpatch)) {\n var n = u.valHooks[t] && u.valHooks[t].get ? u.valHooks[t].get : function(e) {\n return e.value;\n }, o = u.valHooks[t] && u.valHooks[t].set ? u.valHooks[t].set : function(e, t) {\n return e.value = t, e;\n };\n u.valHooks[t] = {\n get: function(t) {\n if (t.inputmask) {\n if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue();\n var r = n(t);\n return -1 !== a.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? r : \"\";\n }\n return n(t);\n },\n set: function(e, t) {\n var i = o(e, t);\n return e.inputmask && (0, r.applyInputValue)(e, t), i;\n },\n inputmaskpatch: !0\n };\n }\n }(t.type), function(e) {\n o.EventRuler.on(e, \"mouseenter\", (function() {\n var e = this, t = e.inputmask._valueGet(!0);\n t != (e.inputmask.isRTL ? a.getBuffer.call(e.inputmask).slice().reverse() : a.getBuffer.call(e.inputmask)).join(\"\") && (0, \n r.applyInputValue)(e, t);\n }));\n }(t));\n }\n }(t) : t.inputmask = void 0, l;\n }(i, t);\n if (!1 !== f) {\n e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0, \n -1 === e.maxLength && (e.maxLength = void 0), \"inputMode\" in i && null === i.getAttribute(\"inputmode\") && (i.inputMode = t.inputmode, \n i.setAttribute(\"inputmode\", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ \"cc-number\", \"cc-exp\" ].indexOf(i.autocomplete), \n s.iphone && (t.insertModeVisual = !1, i.setAttribute(\"autocorrect\", \"off\")), o.EventRuler.on(i, \"submit\", c.EventHandlers.submitEvent), \n o.EventRuler.on(i, \"reset\", c.EventHandlers.resetEvent), o.EventRuler.on(i, \"blur\", c.EventHandlers.blurEvent), \n o.EventRuler.on(i, \"focus\", c.EventHandlers.focusEvent), o.EventRuler.on(i, \"invalid\", c.EventHandlers.invalidEvent), \n o.EventRuler.on(i, \"click\", c.EventHandlers.clickEvent), o.EventRuler.on(i, \"mouseleave\", c.EventHandlers.mouseleaveEvent), \n o.EventRuler.on(i, \"mouseenter\", c.EventHandlers.mouseenterEvent), o.EventRuler.on(i, \"paste\", c.EventHandlers.pasteEvent), \n o.EventRuler.on(i, \"cut\", c.EventHandlers.cutEvent), o.EventRuler.on(i, \"complete\", t.oncomplete), \n o.EventRuler.on(i, \"incomplete\", t.onincomplete), o.EventRuler.on(i, \"cleared\", t.oncleared), \n !0 !== t.inputEventOnly && o.EventRuler.on(i, \"keydown\", c.EventHandlers.keyEvent), \n (s.mobile || t.inputEventOnly) && i.removeAttribute(\"maxLength\"), o.EventRuler.on(i, \"input\", c.EventHandlers.inputFallBackEvent)), \n o.EventRuler.on(i, \"setvalue\", c.EventHandlers.setValueEvent), a.getBufferTemplate.call(e).join(\"\"), \n e.undoValue = e._valueGet(!0);\n var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement;\n if (\"\" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) {\n (0, r.applyInputValue)(i, i.inputmask._valueGet(!0), t);\n var p = a.getBuffer.call(e).slice();\n !1 === l.isComplete.call(e, p) && t.clearIncomplete && a.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === a.getLastValidPosition.call(e) ? p = [] : r.clearOptionalTail.call(e, p)), \n (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || \"\" !== i.inputmask._valueGet(!0)) && (0, \n r.writeBuffer)(i, p), d === i && a.caret.call(e, i, a.seekNext.call(e, a.getLastValidPosition.call(e)));\n }\n }\n };\n var n = i(2839), a = i(8711), r = i(7760), o = i(9716), s = i(9845), l = i(7215), c = i(6030);\n },\n 9695: function(e, t) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function(e, t, i, n) {\n this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1, \n this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = n || !1, \n this.quantifier = {\n min: 1,\n max: 1\n };\n };\n },\n 3194: function() {\n Array.prototype.includes || Object.defineProperty(Array.prototype, \"includes\", {\n value: function(e, t) {\n if (null == this) throw new TypeError('\"this\" is null or not defined');\n var i = Object(this), n = i.length >>> 0;\n if (0 === n) return !1;\n for (var a = 0 | t, r = Math.max(a >= 0 ? a : n - Math.abs(a), 0); r < n; ) {\n if (i[r] === e) return !0;\n r++;\n }\n return !1;\n }\n });\n },\n 9302: function() {\n var e = Function.bind.call(Function.call, Array.prototype.reduce), t = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable), i = Function.bind.call(Function.call, Array.prototype.concat), n = Object.keys;\n Object.entries || (Object.entries = function(a) {\n return e(n(a), (function(e, n) {\n return i(e, \"string\" == typeof n && t(a, n) ? [ [ n, a[n] ] ] : []);\n }), []);\n });\n },\n 7149: function() {\n function e(t) {\n return e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(e) {\n return typeof e;\n } : function(e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, e(t);\n }\n \"function\" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = \"object\" === e(\"test\".__proto__) ? function(e) {\n return e.__proto__;\n } : function(e) {\n return e.constructor.prototype;\n });\n },\n 4013: function() {\n String.prototype.includes || (String.prototype.includes = function(e, t) {\n return \"number\" != typeof t && (t = 0), !(t + e.length > this.length) && -1 !== this.indexOf(e, t);\n });\n },\n 8711: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.caret = function(e, t, i, n, a) {\n var r, o = this, s = this.opts;\n if (void 0 === t) return \"selectionStart\" in e && \"selectionEnd\" in e ? (t = e.selectionStart, \n i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset, \n i = r.endOffset) : document.selection && document.selection.createRange && (i = (t = 0 - (r = document.selection.createRange()).duplicate().moveStart(\"character\", -e.inputmask._valueGet().length)) + r.text.length), \n {\n begin: n ? t : c.call(o, t),\n end: n ? i : c.call(o, i)\n };\n if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]), \n void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin), \n \"number\" == typeof t) {\n t = n ? t : c.call(o, t), i = \"number\" == typeof (i = n ? i : c.call(o, i)) ? i : t;\n var l = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i;\n if (e.scrollLeft = l > e.scrollWidth ? l : 0, e.inputmask.caretPos = {\n begin: t,\n end: i\n }, s.insertModeVisual && !1 === s.insertMode && t === i && (a || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if (\"setSelectionRange\" in e) e.setSelectionRange(t, i); else if (window.getSelection) {\n if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) {\n var u = document.createTextNode(\"\");\n e.appendChild(u);\n }\n r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length), \n r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length), \n r.collapse(!0);\n var f = window.getSelection();\n f.removeAllRanges(), f.addRange(r);\n } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd(\"character\", i), \n r.moveStart(\"character\", t), r.select());\n }\n }, t.determineLastRequiredPosition = function(e) {\n var t, i, r = this, s = r.maskset, l = r.dependencyLib, c = n.getMaskTemplate.call(r, !0, o.call(r), !0, !0), u = c.length, f = o.call(r), d = {}, p = s.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0;\n for (t = f + 1; t < c.length; t++) h = (i = n.getTestTemplate.call(r, t, h, t - 1)).locator.slice(), \n d[t] = l.extend(!0, {}, i);\n var v = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0;\n for (t = u - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || v && (v !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && a.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(\",\"), v.toString().split(\",\")) && \"\" !== n.getTests.call(r, t)[0].def)) && c[t] === n.getPlaceholder.call(r, t, i.match)); t--) u--;\n return e ? {\n l: u,\n def: d[u] ? d[u].match : void 0\n } : u;\n }, t.determineNewCaretPosition = function(e, t, i) {\n var a = this, c = a.maskset, u = a.opts;\n t && (a.isRTL ? e.end = e.begin : e.begin = e.end);\n if (e.begin === e.end) {\n switch (i = i || u.positionCaretOnClick) {\n case \"none\":\n break;\n\n case \"select\":\n e = {\n begin: 0,\n end: r.call(a).length\n };\n break;\n\n case \"ignore\":\n e.end = e.begin = l.call(a, o.call(a));\n break;\n\n case \"radixFocus\":\n if (a.clicked > 1 && 0 == c.validPositions.length) break;\n if (function(e) {\n if (\"\" !== u.radixPoint && 0 !== u.digits) {\n var t = c.validPositions;\n if (void 0 === t[e] || t[e].input === n.getPlaceholder.call(a, e)) {\n if (e < l.call(a, -1)) return !0;\n var i = r.call(a).indexOf(u.radixPoint);\n if (-1 !== i) {\n for (var o = 0, s = t.length; o < s; o++) if (t[o] && i < o && t[o].input !== n.getPlaceholder.call(a, o)) return !1;\n return !0;\n }\n }\n }\n return !1;\n }(e.begin)) {\n var f = r.call(a).join(\"\").indexOf(u.radixPoint);\n e.end = e.begin = u.numericInput ? l.call(a, f) : f;\n break;\n }\n\n default:\n var d = e.begin, p = o.call(a, d, !0), h = l.call(a, -1 !== p || s.call(a, 0) ? p : -1);\n if (d <= h) e.end = e.begin = s.call(a, d, !1, !0) ? d : l.call(a, d); else {\n var v = c.validPositions[p], m = n.getTestTemplate.call(a, h, v ? v.match.locator : void 0, v), g = n.getPlaceholder.call(a, h, m.match);\n if (\"\" !== g && r.call(a)[h] !== g && !0 !== m.match.optionalQuantifier && !0 !== m.match.newBlockMarker || !s.call(a, h, u.keepStatic, !0) && m.match.def === g) {\n var y = l.call(a, h);\n (d >= y || d === h) && (h = y);\n }\n e.end = e.begin = h;\n }\n }\n return e;\n }\n }, t.getBuffer = r, t.getBufferTemplate = function() {\n var e = this.maskset;\n void 0 === e._buffer && (e._buffer = n.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice()));\n return e._buffer;\n }, t.getLastValidPosition = o, t.isMask = s, t.resetMaskSet = function(e) {\n var t = this.maskset;\n t.buffer = void 0, !0 !== e && (t.validPositions = [], t.p = 0);\n }, t.seekNext = l, t.seekPrevious = function(e, t) {\n var i = this, a = e - 1;\n if (e <= 0) return 0;\n for (;a > 0 && (!0 === t && (!0 !== n.getTest.call(i, a).match.newBlockMarker || !s.call(i, a, void 0, !0)) || !0 !== t && !s.call(i, a, void 0, !0)); ) a--;\n return a;\n }, t.translatePosition = c;\n var n = i(4713), a = i(7215);\n function r(e) {\n var t = this, i = t.maskset;\n return void 0 !== i.buffer && !0 !== e || (i.buffer = n.getMaskTemplate.call(t, !0, o.call(t), !0), \n void 0 === i._buffer && (i._buffer = i.buffer.slice())), i.buffer;\n }\n function o(e, t, i) {\n var n = this.maskset, a = -1, r = -1, o = i || n.validPositions;\n void 0 === e && (e = -1);\n for (var s = 0, l = o.length; s < l; s++) o[s] && (t || !0 !== o[s].generatedInput) && (s <= e && (a = s), \n s >= e && (r = s));\n return -1 === a || a == e ? r : -1 == r || e - a < r - e ? a : r;\n }\n function s(e, t, i) {\n var a = this, r = this.maskset, o = n.getTestTemplate.call(a, e).match;\n if (\"\" === o.def && (o = n.getTest.call(a, e).match), !0 !== o.static) return o.fn;\n if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0;\n if (!0 !== t && e > -1) {\n if (i) {\n var s = n.getTests.call(a, e);\n return s.length > 1 + (\"\" === s[s.length - 1].match.def ? 1 : 0);\n }\n var l = n.determineTestTemplate.call(a, e, n.getTests.call(a, e)), c = n.getPlaceholder.call(a, e, l.match);\n return l.match.def !== c;\n }\n return !1;\n }\n function l(e, t, i) {\n var a = this;\n void 0 === i && (i = !0);\n for (var r = e + 1; \"\" !== n.getTest.call(a, r).match.def && (!0 === t && (!0 !== n.getTest.call(a, r).match.newBlockMarker || !s.call(a, r, void 0, !0)) || !0 !== t && !s.call(a, r, void 0, i)); ) r++;\n return r;\n }\n function c(e) {\n var t = this.opts, i = this.el;\n return !this.isRTL || \"number\" != typeof e || t.greedy && \"\" === t.placeholder || !i || (e = this._valueGet().length - e) < 0 && (e = 0), \n e;\n }\n },\n 4713: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.determineTestTemplate = c, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, n, a) {\n var r = this, o = this.opts, u = this.maskset, f = o.greedy;\n a && o.greedy && (o.greedy = !1, r.maskset.tests = {});\n t = t || 0;\n var p, h, v, m, g = [], y = 0;\n do {\n if (!0 === e && u.validPositions[y]) h = (v = a && u.validPositions[y].match.optionality && void 0 === u.validPositions[y + 1] && (!0 === u.validPositions[y].generatedInput || u.validPositions[y].input == o.skipOptionalPartCharacter && y > 0) ? c.call(r, y, d.call(r, y, p, y - 1)) : u.validPositions[y]).match, \n p = v.locator.slice(), g.push(!0 === i ? v.input : !1 === i ? h.nativeDef : s.call(r, y, h)); else {\n h = (v = l.call(r, y, p, y - 1)).match, p = v.locator.slice();\n var k = !0 !== n && (!1 !== o.jitMasking ? o.jitMasking : h.jit);\n (m = (m && h.static && h.def !== o.groupSeparator && null === h.fn || u.validPositions[y - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && u.tests[y]) || !1 === k || void 0 === k || \"number\" == typeof k && isFinite(k) && k > y ? g.push(!1 === i ? h.nativeDef : s.call(r, g.length, h)) : m = !1;\n }\n y++;\n } while (!0 !== h.static || \"\" !== h.def || t > y);\n \"\" === g[g.length - 1] && g.pop();\n !1 === i && void 0 !== u.maskLength || (u.maskLength = y - 1);\n return o.greedy = f, g;\n }, t.getPlaceholder = s, t.getTest = u, t.getTestTemplate = l, t.getTests = d, t.isSubsetOf = f;\n var n, a = (n = i(2394)) && n.__esModule ? n : {\n default: n\n };\n function r(e, t) {\n var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join(\"\");\n if (\"\" !== i) for (;i.length < t; ) i += \"0\";\n return i;\n }\n function o(e) {\n var t = e.locator[e.alternation];\n return \"string\" == typeof t && t.length > 0 && (t = t.split(\",\")[0]), void 0 !== t ? t.toString() : \"\";\n }\n function s(e, t, i) {\n var n = this.opts, a = this.maskset;\n if (void 0 !== (t = t || u.call(this, e).match).placeholder || !0 === i) return \"function\" == typeof t.placeholder ? t.placeholder(n) : t.placeholder;\n if (!0 === t.static) {\n if (e > -1 && void 0 === a.validPositions[e]) {\n var r, o = d.call(this, e), s = [];\n if (o.length > 1 + (\"\" === o[o.length - 1].match.def ? 1 : 0)) for (var l = 0; l < o.length; l++) if (\"\" !== o[l].match.def && !0 !== o[l].match.optionality && !0 !== o[l].match.optionalQuantifier && (!0 === o[l].match.static || void 0 === r || !1 !== o[l].match.fn.test(r.match.def, a, e, !0, n)) && (s.push(o[l]), \n !0 === o[l].match.static && (r = o[l]), s.length > 1 && /[0-9a-bA-Z]/.test(s[0].match.def))) return n.placeholder.charAt(e % n.placeholder.length);\n }\n return t.def;\n }\n return n.placeholder.charAt(e % n.placeholder.length);\n }\n function l(e, t, i) {\n return this.maskset.validPositions[e] || c.call(this, e, d.call(this, e, t ? t.slice() : t, i));\n }\n function c(e, t) {\n var i = this.opts, n = 0, a = function(e, t) {\n var i = 0, n = !1;\n t.forEach((function(e) {\n e.match.optionality && (0 !== i && i !== e.match.optionality && (n = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality));\n })), i && (0 == e || 1 == t.length ? i = 0 : n || (i = 0));\n return i;\n }(e, t);\n e = e > 0 ? e - 1 : 0;\n var o, s, l, c = r(u.call(this, e));\n i.greedy && t.length > 1 && \"\" === t[t.length - 1].match.def && (n = 1);\n for (var f = 0; f < t.length - n; f++) {\n var d = t[f];\n o = r(d, c.length);\n var p = Math.abs(o - c);\n (void 0 === s || \"\" !== o && p < s || l && !i.greedy && l.match.optionality && l.match.optionality - a > 0 && \"master\" === l.match.newBlockMarker && (!d.match.optionality || d.match.optionality - a < 1 || !d.match.newBlockMarker) || l && !i.greedy && l.match.optionalQuantifier && !d.match.optionalQuantifier) && (s = p, \n l = d);\n }\n return l;\n }\n function u(e, t) {\n var i = this.maskset;\n return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0];\n }\n function f(e, t, i) {\n function n(e) {\n for (var t, i = [], n = -1, a = 0, r = e.length; a < r; a++) if (\"-\" === e.charAt(a)) for (t = e.charCodeAt(a + 1); ++n < t; ) i.push(String.fromCharCode(n)); else n = e.charCodeAt(a), \n i.push(e.charAt(a));\n return i.join(\"\");\n }\n return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== n(t.match.fn.toString().replace(/[[\\]/]/g, \"\")).indexOf(n(e.match.fn.toString().replace(/[[\\]/]/g, \"\")));\n }\n function d(e, t, i) {\n var n, r, o = this, s = this.dependencyLib, l = this.maskset, u = this.opts, d = this.el, p = l.maskToken, h = t ? i : 0, v = t ? t.slice() : [ 0 ], m = [], g = !1, y = t ? t.join(\"\") : \"\";\n function k(t, i, r, s) {\n function c(r, s, p) {\n function v(e, t) {\n var i = 0 === t.matches.indexOf(e);\n return i || t.matches.every((function(n, a) {\n return !0 === n.isQuantifier ? i = v(e, t.matches[a - 1]) : Object.prototype.hasOwnProperty.call(n, \"matches\") && (i = v(e, n)), \n !i;\n })), i;\n }\n function x(e, t, i) {\n var n, a;\n if ((l.tests[e] || l.validPositions[e]) && (l.tests[e] || [ l.validPositions[e] ]).every((function(e, r) {\n if (e.mloc[t]) return n = e, !1;\n var o = void 0 !== i ? i : e.alternation, s = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1;\n return (void 0 === a || s < a) && -1 !== s && (n = e, a = s), !0;\n })), n) {\n var r = n.locator[n.alternation];\n return (n.mloc[t] || n.mloc[r] || n.locator).slice((void 0 !== i ? i : n.alternation) + 1);\n }\n return void 0 !== i ? x(e, t) : void 0;\n }\n function P(e, t) {\n var i = e.alternation, n = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]);\n if (!n && i > t.alternation) for (var a = t.alternation; a < i; a++) if (e.locator[a] !== t.locator[a]) {\n i = a, n = !0;\n break;\n }\n if (n) {\n e.mloc = e.mloc || {};\n var r = e.locator[i];\n if (void 0 !== r) {\n if (\"string\" == typeof r && (r = r.split(\",\")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()), \n void 0 !== t) {\n for (var o in t.mloc) \"string\" == typeof o && (o = o.split(\",\")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]);\n e.locator[i] = Object.keys(e.mloc).join(\",\");\n }\n return !0;\n }\n e.alternation = void 0;\n }\n return !1;\n }\n function w(e, t) {\n if (e.locator.length !== t.locator.length) return !1;\n for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1;\n return !0;\n }\n if (h > e + u._maxTestPos) throw \"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. \" + l.mask;\n if (h === e && void 0 === r.matches) {\n if (m.push({\n match: r,\n locator: s.reverse(),\n cd: y,\n mloc: {}\n }), !r.optionality || void 0 !== p || !(u.definitions && u.definitions[r.nativeDef] && u.definitions[r.nativeDef].optional || a.default.prototype.definitions[r.nativeDef] && a.default.prototype.definitions[r.nativeDef].optional)) return !0;\n g = !0, h = e;\n } else if (void 0 !== r.matches) {\n if (r.isGroup && p !== r) return function() {\n if (r = c(t.matches[t.matches.indexOf(r) + 1], s, p)) return !0;\n }();\n if (r.isOptional) return function() {\n var t = r, a = m.length;\n if (r = k(r, i, s, p), m.length > 0) {\n if (m.forEach((function(e, t) {\n t >= a && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1);\n })), n = m[m.length - 1].match, void 0 !== p || !v(n, t)) return r;\n g = !0, h = e;\n }\n }();\n if (r.isAlternator) return function() {\n o.hasAlternator = !0;\n var n, a, v, y = r, k = [], b = m.slice(), S = s.length, M = !1, _ = i.length > 0 ? i.shift() : -1;\n if (-1 === _ || \"string\" == typeof _) {\n var O, E = h, T = i.slice(), j = [];\n if (\"string\" == typeof _) j = _.split(\",\"); else for (O = 0; O < y.matches.length; O++) j.push(O.toString());\n if (void 0 !== l.excludes[e]) {\n for (var A = j.slice(), D = 0, B = l.excludes[e].length; D < B; D++) {\n var C = l.excludes[e][D].toString().split(\":\");\n s.length == C[1] && j.splice(j.indexOf(C[0]), 1);\n }\n 0 === j.length && (delete l.excludes[e], j = A);\n }\n (!0 === u.keepStatic || isFinite(parseInt(u.keepStatic)) && E >= u.keepStatic) && (j = j.slice(0, 1));\n for (var R = 0; R < j.length; R++) {\n O = parseInt(j[R]), m = [], i = \"string\" == typeof _ && x(h, O, S) || T.slice();\n var L = y.matches[O];\n if (L && c(L, [ O ].concat(s), p)) r = !0; else if (0 === R && (M = !0), L && L.matches && L.matches.length > y.matches[0].matches.length) break;\n n = m.slice(), h = E, m = [];\n for (var F = 0; F < n.length; F++) {\n var I = n[F], N = !1;\n I.match.jit = I.match.jit || M, I.alternation = I.alternation || S, P(I);\n for (var V = 0; V < k.length; V++) {\n var G = k[V];\n if (\"string\" != typeof _ || void 0 !== I.alternation && j.includes(I.locator[I.alternation].toString())) {\n if (I.match.nativeDef === G.match.nativeDef) {\n N = !0, P(G, I);\n break;\n }\n if (f(I, G, u)) {\n P(I, G) && (N = !0, k.splice(k.indexOf(G), 0, I));\n break;\n }\n if (f(G, I, u)) {\n P(G, I);\n break;\n }\n if (v = G, !0 === (a = I).match.static && !0 !== v.match.static && v.match.fn.test(a.match.def, l, e, !1, u, !1)) {\n w(I, G) || void 0 !== d.inputmask.userOptions.keepStatic ? P(I, G) && (N = !0, k.splice(k.indexOf(G), 0, I)) : u.keepStatic = !0;\n break;\n }\n }\n }\n N || k.push(I);\n }\n }\n m = b.concat(k), h = e, g = m.length > 0, r = k.length > 0, i = T.slice();\n } else r = c(y.matches[_] || t.matches[_], [ _ ].concat(s), p);\n if (r) return !0;\n }();\n if (r.isQuantifier && p !== t.matches[t.matches.indexOf(r) - 1]) return function() {\n for (var a = r, o = !1, f = i.length > 0 ? i.shift() : 0; f < (isNaN(a.quantifier.max) ? f + 1 : a.quantifier.max) && h <= e; f++) {\n var d = t.matches[t.matches.indexOf(a) - 1];\n if (r = c(d, [ f ].concat(s), d)) {\n if (m.forEach((function(t, i) {\n (n = b(d, t.match) ? t.match : m[m.length - 1].match).optionalQuantifier = f >= a.quantifier.min, \n n.jit = (f + 1) * (d.matches.indexOf(n) + 1) > a.quantifier.jit, n.optionalQuantifier && v(n, d) && (g = !0, \n h = e, u.greedy && null == l.validPositions[e - 1] && f > a.quantifier.min && -1 != [ \"*\", \"+\" ].indexOf(a.quantifier.max) && (m.pop(), \n y = void 0), o = !0, r = !1), !o && n.jit && (l.jitOffset[e] = d.matches.length - d.matches.indexOf(n));\n })), o) break;\n return !0;\n }\n }\n }();\n if (r = k(r, i, s, p)) return !0;\n } else h++;\n }\n for (var p = i.length > 0 ? i.shift() : 0; p < t.matches.length; p++) if (!0 !== t.matches[p].isQuantifier) {\n var v = c(t.matches[p], [ p ].concat(r), s);\n if (v && h === e) return v;\n if (h > e) break;\n }\n }\n function b(e, t) {\n var i = -1 != e.matches.indexOf(t);\n return i || e.matches.forEach((function(e, n) {\n void 0 === e.matches || i || (i = b(e, t));\n })), i;\n }\n if (e > -1) {\n if (void 0 === t) {\n for (var x, P = e - 1; void 0 === (x = l.validPositions[P] || l.tests[P]) && P > -1; ) P--;\n void 0 !== x && P > -1 && (v = function(e, t) {\n var i, n = [];\n return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === u.keepStatic ? 0 === (n = c.call(o, e, t.slice()).locator.slice()).length && (n = t[0].locator.slice()) : t.forEach((function(e) {\n \"\" !== e.def && (0 === n.length ? (i = e.alternation, n = e.locator.slice()) : e.locator[i] && -1 === n[i].toString().indexOf(e.locator[i]) && (n[i] += \",\" + e.locator[i]));\n }))), n;\n }(P, x), y = v.join(\"\"), h = P);\n }\n if (l.tests[e] && l.tests[e][0].cd === y) return l.tests[e];\n for (var w = v.shift(); w < p.length; w++) {\n if (k(p[w], v, [ w ]) && h === e || h > e) break;\n }\n }\n return (0 === m.length || g) && m.push({\n match: {\n fn: null,\n static: !0,\n optionality: !1,\n casing: null,\n def: \"\",\n placeholder: \"\"\n },\n locator: [],\n mloc: {},\n cd: y\n }), void 0 !== t && l.tests[e] ? r = s.extend(!0, [], m) : (l.tests[e] = s.extend(!0, [], m), \n r = l.tests[e]), m.forEach((function(e) {\n e.match.optionality = e.match.defOptionality || !1;\n })), r;\n }\n },\n 7215: function(e, t, i) {\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.alternate = s, t.checkAlternationMatch = function(e, t, i) {\n for (var n, a = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(\",\") : [], s = 0; s < o.length; s++) -1 !== (n = e.indexOf(o[s])) && e.splice(n, 1);\n for (var l = 0; l < e.length; l++) if (a.includes(e[l])) {\n r = !0;\n break;\n }\n return r;\n }, t.handleRemove = function(e, t, i, o, l) {\n var c = this, u = this.maskset, f = this.opts;\n if ((f.numericInput || c.isRTL) && (t === a.keys.Backspace ? t = a.keys.Delete : t === a.keys.Delete && (t = a.keys.Backspace), \n c.isRTL)) {\n var d = i.end;\n i.end = i.begin, i.begin = d;\n }\n var p, h = r.getLastValidPosition.call(c, void 0, !0);\n i.end >= r.getBuffer.call(c).length && h >= i.end && (i.end = h + 1);\n t === a.keys.Backspace ? i.end - i.begin < 1 && (i.begin = r.seekPrevious.call(c, i.begin)) : t === a.keys.Delete && i.begin === i.end && (i.end = r.isMask.call(c, i.end, !0, !0) ? i.end + 1 : r.seekNext.call(c, i.end) + 1);\n if (!1 !== (p = v.call(c, i))) {\n if (!0 !== o && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(c, i.begin).match.def.indexOf(\"|\")) {\n var m = s.call(c, !0);\n if (m) {\n var g = void 0 !== m.caret ? m.caret : m.pos ? r.seekNext.call(c, m.pos.begin ? m.pos.begin : m.pos) : r.getLastValidPosition.call(c, -1, !0);\n (t !== a.keys.Delete || i.begin > g) && i.begin;\n }\n }\n !0 !== o && (u.p = t === a.keys.Delete ? i.begin + p : i.begin, u.p = r.determineNewCaretPosition.call(c, {\n begin: u.p,\n end: u.p\n }, !1, !1 === f.insertMode && t === a.keys.Backspace ? \"none\" : void 0).begin);\n }\n }, t.isComplete = c, t.isSelection = u, t.isValid = f, t.refreshFromBuffer = p, \n t.revalidateMask = v;\n var n = i(4713), a = i(2839), r = i(8711), o = i(6030);\n function s(e, t, i, a, o, l) {\n var c, u, d, p, h, v, m, g, y, k, b, x = this, P = this.dependencyLib, w = this.opts, S = x.maskset, M = P.extend(!0, [], S.validPositions), _ = P.extend(!0, {}, S.tests), O = !1, E = !1, T = void 0 !== o ? o : r.getLastValidPosition.call(x);\n if (l && (k = l.begin, b = l.end, l.begin > l.end && (k = l.end, b = l.begin)), \n -1 === T && void 0 === o) c = 0, u = (p = n.getTest.call(x, c)).alternation; else for (;T >= 0; T--) if ((d = S.validPositions[T]) && void 0 !== d.alternation) {\n if (T <= (e || 0) && p && p.locator[d.alternation] !== d.locator[d.alternation]) break;\n c = T, u = S.validPositions[c].alternation, p = d;\n }\n if (void 0 !== u) {\n m = parseInt(c), S.excludes[m] = S.excludes[m] || [], !0 !== e && S.excludes[m].push((0, \n n.getDecisionTaker)(p) + \":\" + p.alternation);\n var j = [], A = -1;\n for (h = m; h < r.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === A && e <= h && void 0 !== t && (j.push(t), \n A = j.length - 1), (v = S.validPositions[h]) && !0 !== v.generatedInput && (void 0 === l || h < k || h >= b) && j.push(v.input), \n delete S.validPositions[h];\n for (-1 === A && void 0 !== t && (j.push(t), A = j.length - 1); void 0 !== S.excludes[m] && S.excludes[m].length < 10; ) {\n for (S.tests = {}, r.resetMaskSet.call(x, !0), O = !0, h = 0; h < j.length && (g = O.caret || r.getLastValidPosition.call(x, void 0, !0) + 1, \n y = j[h], O = f.call(x, g, y, !1, a, !0)); h++) h === A && (E = O), 1 == e && O && (E = {\n caretPos: h\n });\n if (O) break;\n if (r.resetMaskSet.call(x), p = n.getTest.call(x, m), S.validPositions = P.extend(!0, [], M), \n S.tests = P.extend(!0, {}, _), !S.excludes[m]) {\n E = s.call(x, e, t, i, a, m - 1, l);\n break;\n }\n var D = (0, n.getDecisionTaker)(p);\n if (-1 !== S.excludes[m].indexOf(D + \":\" + p.alternation)) {\n E = s.call(x, e, t, i, a, m - 1, l);\n break;\n }\n for (S.excludes[m].push(D + \":\" + p.alternation), h = m; h < r.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h];\n }\n }\n return E && !1 === w.keepStatic || delete S.excludes[m], E;\n }\n function l(e, t, i) {\n var n = this.opts, r = this.maskset;\n switch (n.casing || t.casing) {\n case \"upper\":\n e = e.toUpperCase();\n break;\n\n case \"lower\":\n e = e.toLowerCase();\n break;\n\n case \"title\":\n var o = r.validPositions[i - 1];\n e = 0 === i || o && o.input === String.fromCharCode(a.keyCode.Space) ? e.toUpperCase() : e.toLowerCase();\n break;\n\n default:\n if (\"function\" == typeof n.casing) {\n var s = Array.prototype.slice.call(arguments);\n s.push(r.validPositions), e = n.casing.apply(this, s);\n }\n }\n return e;\n }\n function c(e) {\n var t = this, i = this.opts, a = this.maskset;\n if (\"function\" == typeof i.isComplete) return i.isComplete(e, i);\n if (\"*\" !== i.repeat) {\n var o = !1, s = r.determineLastRequiredPosition.call(t, !0), l = r.seekPrevious.call(t, s.l);\n if (void 0 === s.def || s.def.newBlockMarker || s.def.optionality || s.def.optionalQuantifier) {\n o = !0;\n for (var c = 0; c <= l; c++) {\n var u = n.getTestTemplate.call(t, c).match;\n if (!0 !== u.static && void 0 === a.validPositions[c] && !0 !== u.optionality && !0 !== u.optionalQuantifier || !0 === u.static && e[c] !== n.getPlaceholder.call(t, c, u)) {\n o = !1;\n break;\n }\n }\n }\n return o;\n }\n }\n function u(e) {\n var t = this.opts.insertMode ? 0 : 1;\n return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t;\n }\n function f(e, t, i, a, o, d, m) {\n var g = this, y = this.dependencyLib, k = this.opts, b = g.maskset;\n i = !0 === i;\n var x = e;\n function P(e) {\n if (void 0 !== e) {\n if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]), \n e.remove.sort((function(e, t) {\n return g.isRTL ? e.pos - t.pos : t.pos - e.pos;\n })).forEach((function(e) {\n v.call(g, {\n begin: e,\n end: e + 1\n });\n })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]), \n e.insert.sort((function(e, t) {\n return g.isRTL ? t.pos - e.pos : e.pos - t.pos;\n })).forEach((function(e) {\n \"\" !== e.c && f.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a);\n })), e.insert = void 0), e.refreshFromBuffer && e.buffer) {\n var t = e.refreshFromBuffer;\n p.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0;\n }\n void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0);\n }\n return e;\n }\n function w(t, i, o) {\n var s = !1;\n return n.getTests.call(g, t).every((function(c, f) {\n var d = c.match;\n if (r.getBuffer.call(g, !0), !1 !== (s = (!d.jit || void 0 !== b.validPositions[r.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, o, k, u.call(g, e)) : (i === d.def || i === k.skipOptionalPartCharacter) && \"\" !== d.def && {\n c: n.getPlaceholder.call(g, t, d, !0) || d.def,\n pos: t\n }))) {\n var p = void 0 !== s.c ? s.c : i, h = t;\n return p = p === k.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p, \n !0 !== (s = P(s)) && void 0 !== s.pos && s.pos !== t && (h = s.pos), !0 !== s && void 0 === s.pos && void 0 === s.c ? !1 : (!1 === v.call(g, e, y.extend({}, c, {\n input: l.call(g, p, d, h)\n }), a, h) && (s = !1), !1);\n }\n return !0;\n })), s;\n }\n void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin);\n var S = !0, M = y.extend(!0, {}, b.validPositions);\n if (!1 === k.keepStatic && void 0 !== b.excludes[x] && !0 !== o && !0 !== a) for (var _ = x; _ < (g.isRTL ? e.begin : e.end); _++) void 0 !== b.excludes[_] && (b.excludes[_] = void 0, \n delete b.tests[_]);\n if (\"function\" == typeof k.preValidation && !0 !== a && !0 !== d && (S = P(S = k.preValidation.call(g, r.getBuffer.call(g), x, t, u.call(g, e), k, b, e, i || o))), \n !0 === S) {\n if (S = w(x, t, i), (!i || !0 === a) && !1 === S && !0 !== d) {\n var O = b.validPositions[x];\n if (!O || !0 !== O.match.static || O.match.def !== t && t !== k.skipOptionalPartCharacter) {\n if (k.insertMode || void 0 === b.validPositions[r.seekNext.call(g, x)] || e.end > x) {\n var E = !1;\n if (b.jitOffset[x] && void 0 === b.validPositions[r.seekNext.call(g, x)] && !1 !== (S = f.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== o && (S.caret = x), \n E = !0), e.end > x && (b.validPositions[x] = void 0), !E && !r.isMask.call(g, x, k.keepStatic && 0 === x)) for (var T = x + 1, j = r.seekNext.call(g, x, !1, 0 !== x); T <= j; T++) if (!1 !== (S = w(T, t, i))) {\n S = h.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T;\n break;\n }\n }\n } else S = {\n caret: r.seekNext.call(g, x)\n };\n }\n g.hasAlternator && !0 !== o && !i && (!1 === S && k.keepStatic && (c.call(g, r.getBuffer.call(g)) || 0 === x) ? S = s.call(g, x, t, i, a, void 0, e) : (u.call(g, e) && b.tests[x] && b.tests[x].length > 1 && k.keepStatic || 1 == S && !0 !== k.numericInput && b.tests[x] && b.tests[x].length > 1 && r.getLastValidPosition.call(g, void 0, !0) > x) && (S = s.call(g, !0))), \n !0 === S && (S = {\n pos: x\n });\n }\n if (\"function\" == typeof k.postValidation && !0 !== a && !0 !== d) {\n var A = k.postValidation.call(g, r.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, k, b, i, m);\n void 0 !== A && (S = !0 === A ? S : A);\n }\n S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === d ? (r.resetMaskSet.call(g, !0), \n b.validPositions = y.extend(!0, [], M)) : h.call(g, void 0, x, !0);\n var D = P(S);\n void 0 !== g.maxLength && (r.getBuffer.call(g).length > g.maxLength && !a && (r.resetMaskSet.call(g, !0), \n b.validPositions = y.extend(!0, [], M), D = !1));\n return D;\n }\n function d(e, t, i) {\n for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), s = 0; s < o.length; s++) {\n if (o[s].match && (o[s].match.nativeDef === t.match[i.shiftPositions ? \"def\" : \"nativeDef\"] && (!i.shiftPositions || !t.match.static) || o[s].match.nativeDef === t.match.nativeDef || i.regex && !o[s].match.static && o[s].match.fn.test(t.input, a, e, !1, i))) {\n r = !0;\n break;\n }\n if (o[s].match && o[s].match.def === t.match.nativeDef) {\n r = void 0;\n break;\n }\n }\n return !1 === r && void 0 !== a.jitOffset[e] && (r = d.call(this, e + a.jitOffset[e], t, i)), \n r;\n }\n function p(e, t, i) {\n var n, a, s = this, l = this.maskset, c = this.opts, u = this.dependencyLib, f = c.skipOptionalPartCharacter, d = s.isRTL ? i.slice().reverse() : i;\n if (c.skipOptionalPartCharacter = \"\", !0 === e) r.resetMaskSet.call(s), l.tests = {}, \n e = 0, t = i.length, a = r.determineNewCaretPosition.call(s, {\n begin: 0,\n end: 0\n }, !1).begin; else {\n for (n = e; n < t; n++) delete l.validPositions[n];\n a = e;\n }\n var p = new u.Event(\"keypress\");\n for (n = e; n < t; n++) {\n p.key = d[n].toString(), s.ignorable = !1;\n var h = o.EventHandlers.keypressEvent.call(s, p, !0, !1, !1, a);\n !1 !== h && void 0 !== h && (a = h.forwardPosition);\n }\n c.skipOptionalPartCharacter = f;\n }\n function h(e, t, i) {\n var a = this, o = this.maskset, s = this.dependencyLib;\n if (void 0 === e) for (e = t - 1; e > 0 && !o.validPositions[e]; e--) ;\n for (var l = e; l < t; l++) {\n if (void 0 === o.validPositions[l] && !r.isMask.call(a, l, !1)) if (0 == l ? n.getTest.call(a, l) : o.validPositions[l - 1]) {\n var c = n.getTests.call(a, l).slice();\n \"\" === c[c.length - 1].match.def && c.pop();\n var u, d = n.determineTestTemplate.call(a, l, c);\n if (d && (!0 !== d.match.jit || \"master\" === d.match.newBlockMarker && (u = o.validPositions[l + 1]) && !0 === u.match.optionalQuantifier) && ((d = s.extend({}, d, {\n input: n.getPlaceholder.call(a, l, d.match, !0) || d.match.def\n })).generatedInput = !0, v.call(a, l, d, !0), !0 !== i)) {\n var p = o.validPositions[t].input;\n return o.validPositions[t] = void 0, f.call(a, t, p, !0, !0);\n }\n }\n }\n }\n function v(e, t, i, a) {\n var o = this, s = this.maskset, l = this.opts, c = this.dependencyLib;\n function u(e, t, i) {\n var n = t[e];\n if (void 0 !== n && !0 === n.match.static && !0 !== n.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) {\n var a = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1];\n return a && r;\n }\n return !1;\n }\n var p = 0, h = void 0 !== e.begin ? e.begin : e, v = void 0 !== e.end ? e.end : e, m = !0;\n if (e.begin > e.end && (h = e.end, v = e.begin), a = void 0 !== a ? a : h, void 0 === i && (h !== v || l.insertMode && void 0 !== s.validPositions[a] || void 0 === t || t.match.optionalQuantifier || t.match.optionality)) {\n var g, y = c.extend(!0, {}, s.validPositions), k = r.getLastValidPosition.call(o, void 0, !0);\n for (s.p = h, g = k; g >= h; g--) delete s.validPositions[g], void 0 === t && delete s.tests[g + 1];\n var b, x, P = a, w = P;\n for (t && (s.validPositions[a] = c.extend(!0, {}, t), w++, P++), g = t ? v : v - 1; g <= k; g++) {\n if (void 0 !== (b = y[g]) && !0 !== b.generatedInput && (g >= v || g >= h && u(g, y, {\n begin: h,\n end: v\n }))) {\n for (;\"\" !== n.getTest.call(o, w).match.def; ) {\n if (!1 !== (x = d.call(o, w, b, l)) || \"+\" === b.match.def) {\n \"+\" === b.match.def && r.getBuffer.call(o, !0);\n var S = f.call(o, w, b.input, \"+\" !== b.match.def, !0);\n if (m = !1 !== S, P = (S.pos || w) + 1, !m && x) break;\n } else m = !1;\n if (m) {\n void 0 === t && b.match.static && g === e.begin && p++;\n break;\n }\n if (!m && r.getBuffer.call(o), w > s.maskLength) break;\n w++;\n }\n \"\" == n.getTest.call(o, w).match.def && (m = !1), w = P;\n }\n if (!m) break;\n }\n if (!m) return s.validPositions = c.extend(!0, [], y), r.resetMaskSet.call(o, !0), \n !1;\n } else t && n.getTest.call(o, a).match.cd === t.match.cd && (s.validPositions[a] = c.extend(!0, {}, t));\n return r.resetMaskSet.call(o, !0), p;\n }\n }\n }, t = {};\n function i(n) {\n var a = t[n];\n if (void 0 !== a) return a.exports;\n var r = t[n] = {\n exports: {}\n };\n return e[n](r, r.exports, i), r.exports;\n }\n var n = {};\n return function() {\n var e, t = n;\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0, i(7149), i(3194), i(9302), i(4013), i(3851), i(219), i(207), \n i(5296);\n var a = ((e = i(2394)) && e.__esModule ? e : {\n default: e\n }).default;\n t.default = a;\n }(), n;\n }();\n}));\n\n//# sourceURL=webpack://Formio/./node_modules/inputmask/dist/inputmask.js?");
1748
-
1749
- /***/ }),
1750
-
1751
1730
  /***/ "./node_modules/json-logic-js/logic.js":
1752
1731
  /*!*********************************************!*\
1753
1732
  !*** ./node_modules/json-logic-js/logic.js ***!
@@ -3216,7 +3195,7 @@ eval("\n\nfunction hash(str) {\n var hash = 5381,\n i = str.length;\n\n
3216
3195
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3217
3196
 
3218
3197
  "use strict";
3219
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = exports.FormioPathType = void 0;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst fastCloneDeep_1 = __webpack_require__(/*! ../utils/fastCloneDeep */ \"./node_modules/@formio/core/lib/utils/fastCloneDeep.js\");\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil.js\");\nconst jwtDecode_1 = __webpack_require__(/*! ../utils/jwtDecode */ \"./node_modules/@formio/core/lib/utils/jwtDecode.js\");\nconst eventemitter3_1 = __importDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\nconst browser_cookies_1 = __importDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\nconst { fetch, Headers } = (0, fetch_ponyfill_1.default)();\nconst Plugins_1 = __importDefault(__webpack_require__(/*! ./Plugins */ \"./node_modules/@formio/core/lib/sdk/Plugins.js\"));\n/**\n * The different path types for a project.\n */\nvar FormioPathType;\n(function (FormioPathType) {\n FormioPathType[\"Subdirectories\"] = \"Subdirectories\";\n FormioPathType[\"Subdomains\"] = \"Subdomains\";\n})(FormioPathType || (exports.FormioPathType = FormioPathType = {}));\n/**\n * The Formio interface class. This is a minimalistic API library that allows you to work with the Form.io API's within JavaScript.\n *\n * ## Usage\n * Creating an instance of Formio is simple, and takes only a path (URL String). The path can be different, depending on the desired output.\n * The Formio instance can also access higher level operations, depending on how granular of a path you start with.\n *\n * ```ts\n * var formio = new Formio(<endpoint>, [options]);\n * ```\n *\n * Where **endpoint** is any valid API endpoint within Form.io. These URL's can provide a number of different methods depending on the granularity of the endpoint. This allows you to use the same interface but have access to different methods depending on how granular the endpoint url is.\n * **options** is defined within the {link Formio.constructor} documentation.\n *\n * Here is an example of how this library can be used to load a form JSON from the Form.io API's\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n */\nclass Formio {\n /* eslint-disable max-statements */\n /**\n * @constructor\n * @param {string} path - A project, form, and submission API Url.\n * @param {FormioOptions} options - Available options to configure the Javascript API.\n */\n constructor(path, options = {}) {\n this.path = path;\n this.options = options;\n /**\n * The base API url of the Form.io Platform. Example: https://api.form.io\n */\n this.base = '';\n /**\n * The Projects Endpoint derived from the provided source.\n *\n * @example https://api.form.io/project\n */\n this.projectsUrl = '';\n /**\n * A specific project endpoint derived from the provided source.\n *\n * @example https://examples.form.io\n */\n this.projectUrl = '';\n /**\n * The Project ID found within the provided source.\n */\n this.projectId = '';\n /**\n * A specific Role URL provided the source.\n *\n * @example https://examples.form.io/role/2342343234234234\n */\n this.roleUrl = '';\n /**\n * The roles endpoint derived from the provided source.\n *\n * @example https://examples.form.io/role\n */\n this.rolesUrl = '';\n /**\n * The roleID derieved from the provided source.\n */\n this.roleId = '';\n /**\n * A specific form url derived from the provided source.\n *\n * @example https://examples.form.io/example\n */\n this.formUrl = '';\n /**\n * The forms url derived from the provided source.\n *\n * @example https://example.form.io/form\n */\n this.formsUrl = '';\n /**\n * The Form ID derived from the provided source.\n */\n this.formId = '';\n /**\n * The submissions URL derived from the provided source.\n *\n * @example https://examples.form.io/example/submission\n */\n this.submissionsUrl = '';\n /**\n * A specific submissions URL derived from a provided source.\n *\n * @example https://examples.form.io/example/submission/223423423423\n */\n this.submissionUrl = '';\n /**\n * The submission ID provided a submission url.\n */\n this.submissionId = '';\n /**\n * The actions url provided a form url as the source.\n *\n * @example https://examples.form.io/example/action\n */\n this.actionsUrl = '';\n /**\n * The Action ID derived from a provided Action url.\n */\n this.actionId = '';\n /**\n * A specific action api endoint.\n */\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n /**\n * The query string derived from the provided src url.\n */\n this.query = '';\n /**\n * If this is a non-project url, such is the case for Open Source API.\n */\n this.noProject = false;\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n }\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n if (options.hasOwnProperty('base') && options.base) {\n this.base = options.base;\n }\n else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n }\n else if (window && window.location) {\n const match = window.location.href.match(/http[s]?:\\/\\/api./);\n this.base = match ? match[0] : window.location.origin;\n }\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || `${this.base}/project`;\n this.projectsUrl = `${this.base}/project`;\n this.projectId = '';\n this.query = '';\n return;\n }\n if (options.hasOwnProperty('project') && options.project) {\n this.projectUrl = options.project;\n }\n const project = this.projectUrl || Formio.projectUrl;\n const projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n const isProjectUrl = (path.search(projectRegEx) !== -1);\n // The baseURL is the same as the projectUrl, and does not contain \"/project/MONGO_ID\" in\n // its domain. This is almost certainly against the Open Source server.\n if (project && this.base === project && !isProjectUrl) {\n this.noProject = true;\n this.projectUrl = this.base;\n }\n // Normalize to an absolute path.\n if ((path.indexOf('http') !== 0) && (path.indexOf('//') !== 0)) {\n path = this.base + path;\n }\n const hostparts = this.getUrlParts(path);\n let hostName = '';\n let parts = [];\n if (hostparts) {\n hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n const queryparts = path.split('?');\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = `?${queryparts[1]}`;\n }\n }\n // Register a specific path.\n const registerPath = (name, base) => {\n this[`${name}sUrl`] = `${base}/${name}`;\n const regex = new RegExp(`/${name}/([^/]+)`);\n if (path && path.search(regex) !== -1) {\n parts = path.match(regex);\n this[`${name}Url`] = parts ? (base + parts[0]) : '';\n this[`${name}Id`] = (parts.length > 1) ? parts[1] : '';\n base += parts[0];\n }\n return base;\n };\n // Register an array of items.\n const registerItems = (items, base, staticBase) => {\n for (const i in items) {\n if (items.hasOwnProperty(i)) {\n const item = items[i];\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n }\n else {\n const newBase = registerPath(item, base);\n base = staticBase ? base : newBase;\n }\n }\n }\n };\n if (!this.projectUrl || (this.projectUrl === this.base)) {\n // If a project uses Subdirectories path type, we need to specify a projectUrl\n if (!this.projectUrl && !isProjectUrl && Formio.pathType === 'Subdirectories') {\n const regex = `^${hostName.replace(/\\//g, '\\\\/')}.[^/]+`;\n const match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n }\n else {\n this.projectUrl = hostName;\n }\n }\n // Check if we have a specified path type.\n let isNotSubdomainType = false;\n if (Formio.pathType) {\n isNotSubdomainType = Formio.pathType !== 'Subdomains';\n }\n if (!this.noProject) {\n // Determine the projectUrl and projectId\n if (isProjectUrl) {\n // Get project id as project/:projectId.\n registerItems(['project'], hostName);\n path = path.replace(projectRegEx, '');\n }\n else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts && hostparts.length > 3 && path.split('/').length > 1) {\n const isFile = path.match(/.json/);\n const pathParts = path.split('/');\n if (isFile) {\n this.projectUrl = hostName;\n }\n else {\n pathParts.shift(); // Throw away the first /.\n const projectId = pathParts.shift();\n if (projectId) {\n this.projectId = projectId;\n path = `/${pathParts.join('/')}`;\n this.projectUrl = `${hostName}/${this.projectId}`;\n }\n }\n }\n }\n else {\n // Get project id from subdomain.\n if (hostparts && hostparts.length > 2 && (hostparts[2].split('.').length > 2 || hostName.includes('localhost')) && !isNotSubdomainType) {\n this.projectUrl = hostName;\n this.projectId = hostparts[2].split('.')[0];\n }\n }\n this.projectsUrl = this.projectsUrl || `${this.base}/project`;\n }\n // Configure Role urls and role ids.\n registerItems(['role'], this.projectUrl);\n // Configure Form urls and form ids.\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n }\n else {\n const subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n const subs = path.match(subRegEx);\n if ((subs && (subs.length > 1))) {\n this.pathType = subs[1];\n }\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = `${this.projectUrl}/form`;\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n const items = ['submission', 'action', 'v'];\n for (const i in items) {\n if (items.hasOwnProperty(i)) {\n const item = items[i];\n this[`${item}sUrl`] = `${this.projectUrl + path}/${item}`;\n if ((this.pathType === item) && subs && (subs.length > 2) && subs[2]) {\n this[`${item}Id`] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[`${item}Url`] = this.projectUrl + path + subs[0];\n }\n }\n }\n }\n // Set the app url if it is not set.\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = this.projectUrl;\n }\n }\n /* eslint-enable max-statements */\n /**\n * Deletes a remote resource of any provided type.\n *\n * @param {string} type - The type of resource to delete. \"submission\", \"form\", etc.\n * @param {object} options - The options passed to {@link Formio.request}\n * @return {Promise<Response>}\n */\n delete(type, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n if (!this[_id]) {\n return Promise.reject('Nothing to delete');\n }\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n /**\n * Returns the index (array of records) for any provided type.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} query - A query object to pass to the request.\n * @param {object} query.params - A map (key-value pairs) of URL query parameters to add to the url.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n index(type, query, opts) {\n const _url = `${type}Url`;\n query = query || '';\n if (query && (0, lodash_1.isObject)(query)) {\n query = `?${Formio.serialize(query.params)}`;\n }\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n /**\n * Save a document record using \"upsert\". If the document does not exist, it will be created, if the _id is provided,\n * it will be updated.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} data - The resource data object.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n save(type, data, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n const method = (this[_id] || data._id) ? 'put' : 'post';\n let reqUrl = this[_id] ? this[_url] : this[`${type}sUrl`];\n if (!this[_id] && data._id && (method === 'put') && !reqUrl.includes(data._id)) {\n reqUrl += `/${data._id}`;\n }\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n /**\n * @summary Load (GET) a document record.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} query - A query object to pass to the request.\n * @param {object} query.params - A map (key-value pairs) of URL query parameters to add to the url.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n load(type, query, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n if (query && (0, lodash_1.isObject)(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = this.query ? (`${this.query}&${query}`) : (`?${query}`);\n }\n else {\n query = this.query;\n }\n if (!this[_id]) {\n return Promise.reject(`Missing ${_id}`);\n }\n let url = this[_url] + query;\n if (type === 'form' && !isNaN(parseInt(this.vId))) {\n url += url.indexOf('?') === -1 ? '?' : '&';\n url += `formRevision=${this.vId}`;\n }\n return this.makeRequest(type, url, 'get', null, opts);\n }\n /**\n * @summary Call {@link Formio.makeRequest} for this Formio instance.\n *\n * @param {string} type - The request resource type. \"submission\", \"form\", etc.\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>}\n */\n makeRequest(type, url, method, data, opts) {\n return Formio.makeRequest(this, type, url, method, data, opts);\n }\n /**\n * @summary Loads a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadProject().then((project) => {\n * console.log(project);\n * });\n * ```\n *\n * @param {object} query - Query parameters to pass to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n /**\n * Saves or Updates a project.\n *\n * ### Create a new project\n * ```ts\n * const formio = new Formio();\n * formio.saveProject({\n * title: 'My Project',\n * path: 'myproject',\n * name: 'myproject'\n * });\n * ```\n *\n * ### Update an existing project\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadProject().then((project) => {\n * project.title = 'Title changed';\n * formio.saveProject(project).then(() => {\n * console.log('Done saving project!');\n * });\n * });\n * ```\n *\n * @param {object} data - The project JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n /**\n * Deletes a project\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.deleteProject();\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n deleteProject(opts) {\n return this.delete('project', opts);\n }\n /**\n * Loads a list of all projects.\n *\n * ```ts\n * Formio.loadProjects().then((projects) => {\n * console.log(projects);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {*}\n */\n static loadProjects(query, opts) {\n query = query || '';\n if ((0, lodash_1.isObject)(query)) {\n query = `?${Formio.serialize(query.params)}`;\n }\n return Formio.makeStaticRequest(`${Formio.baseUrl}/project${query}`, 'GET', null, opts);\n }\n /**\n * Loads a role within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/role/234234234234');\n * formio.loadRole().then((role) => {\n * console.log(role);\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadRole(opts) {\n return this.load('role', null, opts);\n }\n /**\n * Create a new or Update an existing role within a project.\n *\n * ### Create new Role example\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.saveRole({\n * title: 'Employee',\n * description: 'A person who belongs to a company.'\n * }).then((role) => {\n * console.log(role);\n * });\n * ```\n *\n * ### Update existing role example\n * ```ts\n * const formio = new Formio('https://examples.form.io/role/234234234234234');\n * formio.loadRole().then((role) => {\n * role.title = 'Manager';\n * formio.saveRole(role).then(() => {\n * console.log('DONE');\n * });\n * });\n * ```\n *\n * @param {object} role - The Role JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n /**\n * Deletes a role within a project.\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteRole(opts) {\n return this.delete('role', opts);\n }\n /**\n * Load all roles within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadRoles().then((roles) => {\n * console.log(roles);\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n /**\n * Loads a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n loadForm(query, opts) {\n return this.load('form', query, opts)\n .then((currentForm) => {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(this.vId))) {\n return currentForm;\n }\n // If a submission already exists but form is marked to load current version of form.\n if (currentForm.revisions === 'current' && this.submissionId) {\n return currentForm;\n }\n // eslint-disable-next-line eqeqeq\n if (currentForm._vid == this.vId || currentForm.revisionId === this.vId) {\n return currentForm;\n }\n // If they specified a revision form, load the revised form components.\n if (query && (0, lodash_1.isObject)(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = this.query ? (`${this.query}&${query}`) : (`?${query}`);\n }\n else {\n query = this.query;\n }\n return this.makeRequest('form', this.vUrl + query, 'get', null, opts)\n .then((revisionForm) => {\n currentForm._vid = revisionForm._vid;\n currentForm.components = revisionForm.components;\n currentForm.settings = revisionForm.settings;\n currentForm.revisionId = revisionForm.revisionId;\n // Using object.assign so we don't cross polinate multiple form loads.\n return Object.assign({}, currentForm);\n })\n // If we couldn't load the revision, just return the original form.\n .catch(() => Object.assign({}, currentForm));\n });\n }\n /**\n * Create or Update a specific form.\n *\n * ### Create form example\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.saveForm({\n * title: 'Employee',\n * type: 'resource',\n * path: 'employee',\n * name: 'employee',\n * components: [\n * {\n * type: 'textfield',\n * key: 'firstName',\n * label: 'First Name'\n * },\n * {\n * type: 'textfield',\n * key: 'lastName',\n * label: 'Last Name'\n * }\n * ]\n * });\n * ```\n *\n * ### Update a form example\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * form.title = 'Changed Title';\n * formio.saveForm(form).then(() => {\n * console.log('DONE!!!');\n * });\n * });\n * ```\n *\n * @param {object} data - The Form JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n /**\n * Deletes a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.deleteForm().then(() => {\n * console.log('Deleted!');\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteForm(opts) {\n return this.delete('form', opts);\n }\n /**\n * Loads all forms within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadForms().then((forms) => {\n * console.log(forms);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n /**\n * Loads a specific submissionn.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/23423423423423423');\n * formio.loadSubmission().then((submission) => {\n * console.log(submission);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n loadSubmission(query, opts) {\n return this.load('submission', query, opts)\n .then((submission) => {\n this.vId = submission._frid || submission._fvid;\n this.vUrl = `${this.formUrl}/v/${this.vId}`;\n return submission;\n });\n }\n /**\n * Creates a new or Updates an existing submission.\n *\n * ### Create a new submission\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.saveSubmission({\n * data: {\n * firstName: 'Joe',\n * lastName: 'Smith'\n * }\n * }).then((submission) => {\n * // This will now be the complete submission object saved on the server.\n * console.log(submission);\n * });\n * ```\n *\n * ### Update an existing submission\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/23423423423423423');\n * formio.loadSubmission().then((submission) => {\n * submission.data.lastName = 'Thompson';\n * formio.saveSubmission(submission).then(() => {\n * console.log('DONE');\n * });\n * });\n * ```\n *\n * @param {object} data - The submission JSON object.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId)) && !data._fvid) {\n data._fvid = this.vId;\n }\n return this.save('submission', data, opts);\n }\n /**\n * Deletes a submission.\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteSubmission(opts) {\n return this.delete('submission', opts);\n }\n /**\n * Loads all submissions within a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadSubmissions({\n * params: {\n * limit: 25,\n * 'data.lastName__regex': 'smith'\n * }\n * }).then((submissions) => {\n * // Should print out 25 submissions where the last name contains \"smith\".\n * console.log(submissions);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n /**\n * Loads a form action.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.loadAction().then((action) => {\n * console.log(action);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n /**\n * Create a new or update an existing action.\n *\n * ### Create a new action for a form.\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.saveAction({\n * data: {\n * name: 'webhook',\n * title: 'Webhook Action',\n * method: ['create', 'update', 'delete'],\n * handler: ['after'],\n * condition: {},\n * settings: {\n * url: 'https://example.com',\n * headers: [{}],\n * block: false,\n * forwardHeaders: false\n * }\n * }\n * }).then((action) => {\n * console.log(action);\n * });\n * ```\n *\n * ### Update an action\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.loadAction().then((action) => {\n * action.title = 'Updated title';\n * formio.saveAction(action).then(() => {\n * console.log('Done!');\n * });\n * });\n * ```\n *\n * @param {object} data - The action JSON\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n /**\n * Delete an action\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.deleteAction().then(() => {\n * console.log('Action was deleted.');\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteAction(opts) {\n return this.delete('action', opts);\n }\n /**\n * Loads all actions within a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadActions().then((actions) => {\n * console.log(actions);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n /**\n * Returns a list of available actions\n *\n * @return {Promise<Response>}\n */\n availableActions() {\n return this.makeRequest('availableActions', `${this.formUrl}/actions`);\n }\n /**\n * Returns the action information for a specific action, such as \"save\".\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/actions/save');\n * formio.actionInfo().then((info) => {\n * console.log(info);\n * });\n * ```\n *\n * @param {string} name - The name of the action you would like to get information for. i.e. \"save\", \"webhook\", etc.\n * @return {Promise<Response>}\n */\n actionInfo(name) {\n return this.makeRequest('actionInfo', `${this.formUrl}/actions/${name}`);\n }\n /**\n * Determine if a string ID is a valid MongoID.\n *\n * @param {string} id - The id that should be tested if it is avalid id.\n * @return {boolean} - true if it is a valid MongoId, false otherwise.\n */\n isObjectId(id) {\n const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n /**\n * Get the project ID of project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.getProjectId().then((projectId) => {\n * console.log(projectId);\n * };\n * ```\n *\n * @return {Promise<string>}\n */\n getProjectId() {\n if (!this.projectId) {\n return Promise.resolve('');\n }\n if (this.isObjectId(this.projectId)) {\n return Promise.resolve(this.projectId);\n }\n else {\n return this.loadProject().then((project) => {\n return project._id;\n });\n }\n }\n /**\n * Get the ID of a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.getFormId().then((formId) => {\n * console.log(formId);\n * });\n * ```\n *\n * @return {Promise<string>}\n */\n getFormId() {\n if (!this.formId) {\n return Promise.resolve('');\n }\n if (this.isObjectId(this.formId)) {\n return Promise.resolve(this.formId);\n }\n else {\n return this.loadForm().then((form) => {\n return form._id;\n });\n }\n }\n /**\n * Instance method for {@link Formio.currentUser}\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n currentUser(options) {\n return Formio.currentUser(this, options);\n }\n /**\n * Instance method for {@link Formio.accessInfo}\n *\n * @return {Promise<Response>}\n */\n accessInfo() {\n return Formio.accessInfo(this);\n }\n /**\n * Sets OAuth Logout URL.\n *\n * @param {string} uri - Logout URL.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string}\n */\n oauthLogoutURI(uri, options) {\n return Formio.oauthLogoutURI(uri, Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Returns the JWT token for this instance.\n *\n * @param {object} options - The following options are provided.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string} - The JWT token for this user.\n */\n getToken(options) {\n return Formio.getToken(Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Sets the JWT token for this instance.\n *\n * @param {string} token - The JWT token to set.\n * @param {object} options - The following options are provided.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string} - The JWT token that was set.\n */\n setToken(token, options) {\n return Formio.setToken(token, Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Returns a temporary authentication token for single purpose token generation.\n *\n * @param {number|string} expire - The amount of seconds to wait before this temp token expires.\n * @param {string} allowed - The allowed path string inn the format GET:/path\n * @param {object} options - The options passed to {@link Formio#getToken}\n */\n getTempToken(expire, allowed, options) {\n const token = Formio.getToken(options);\n if (!token) {\n return Promise.reject('You must be authenticated to generate a temporary auth token.');\n }\n const authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', `${authUrl}/token`, 'GET', null, {\n ignoreCache: true,\n header: new Headers({\n 'x-expire': expire,\n 'x-allow': allowed\n })\n });\n }\n /**\n * Get a PDF download url for a submission, which will generate a new PDF of the submission. This method will first\n * fetch a temporary download token, and then append this to the download url for this form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/324234234234234');\n * formio.getDownloadUrl().then((url) => {\n * console.log(url);\n * });\n * ```\n *\n * @param {object} [form] - The form JSON to fetch a download url for.\n * @return {Promise<string>} - The download url.\n */\n getDownloadUrl(form) {\n if (!this.submissionId) {\n return Promise.resolve('');\n }\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then((_form) => {\n if (!_form) {\n return '';\n }\n return this.getDownloadUrl(_form);\n });\n }\n let apiUrl = `/project/${form.project}`;\n apiUrl += `/form/${form._id}`;\n apiUrl += `/submission/${this.submissionId}`;\n const postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n let download = this.base + apiUrl;\n return new Promise((resolve, reject) => {\n this.getTempToken(3600, `GET:${apiUrl}`).then((tempToken) => {\n download += `?token=${tempToken.key}`;\n resolve(download);\n }, () => {\n resolve(download);\n }).catch(reject);\n });\n }\n /**\n * Returns the user permissions to a form and submission.\n *\n * @param user - The user or current user if undefined. For anonymous, use \"null\"\n * @param form - The form or current form if undefined. For no form check, use \"null\"\n * @param submission - The submisison or \"index\" if undefined.\n *\n * @return {{create: boolean, read: boolean, edit: boolean, delete: boolean}}\n */\n userPermissions(user, form, submission) {\n return Promise.all([\n (form !== undefined) ? Promise.resolve(form) : this.loadForm(),\n (user !== undefined) ? Promise.resolve(user) : this.currentUser(),\n (submission !== undefined || !this.submissionId) ? Promise.resolve(submission) : this.loadSubmission(),\n this.accessInfo()\n ]).then((results) => {\n const form = results.shift();\n const user = results.shift() || { _id: false, roles: [] };\n const submission = results.shift();\n const access = results.shift();\n const permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n delete: 'delete'\n };\n const perms = {\n user: user,\n form: form,\n access: access,\n create: false,\n read: false,\n edit: false,\n delete: false\n };\n for (const roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n const role = access.roles[roleName];\n if (role.default && (user._id === false)) {\n // User is anonymous. Add the anonymous role.\n user.roles.push(role._id);\n }\n else if (role.admin && user.roles.indexOf(role._id) !== -1) {\n perms.create = true;\n perms.read = true;\n perms.delete = true;\n perms.edit = true;\n return perms;\n }\n }\n }\n if (form && form.submissionAccess) {\n for (let i = 0; i < form.submissionAccess.length; i++) {\n const permission = form.submissionAccess[i];\n const [perm, scope] = permission.type.split('_');\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, lodash_1.intersection)(permission.roles, user.roles).length) {\n perms[permMap[perm]] = (scope === 'all') || (!submission || (user._id === submission.owner));\n }\n }\n }\n }\n // check for Group Permissions\n if (submission) {\n // we would anyway need to loop through components for create permission, so we'll do that for all of them\n (0, formUtil_1.eachComponent)(form.components, (component, path) => {\n if (component && component.defaultPermission) {\n const value = (0, lodash_1.get)(submission.data, path);\n // make it work for single-select Group and multi-select Group\n const groups = Array.isArray(value) ? value : [value];\n groups.forEach(group => {\n if (group && group._id && // group id is present\n user.roles.indexOf(group._id) > -1 // user has group id in his roles\n ) {\n if (component.defaultPermission === 'read') {\n perms[permMap.read] = true;\n }\n if (component.defaultPermission === 'create') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n }\n if (component.defaultPermission === 'write') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n }\n if (component.defaultPermission === 'admin') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n perms[permMap.delete] = true;\n }\n }\n });\n }\n });\n }\n return perms;\n });\n }\n /**\n * `Determine if the current user can submit a form.\n * @return {*}\n */\n canSubmit() {\n return this.userPermissions().then((perms) => {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return this.userPermissions(null).then((anonPerms) => {\n if (anonPerms.create) {\n Formio.setUser(null);\n return true;\n }\n return false;\n });\n }\n return perms.create;\n });\n }\n getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n static getUrlParts(url, formio) {\n const base = (formio && formio.base) ? formio.base : Formio.baseUrl;\n let regex = '^(http[s]?:\\\\/\\\\/)';\n if (base && url.indexOf(base) === 0) {\n regex += `(${base.replace(/^http[s]?:\\/\\//, '')})`;\n }\n else {\n regex += '([^/]+)';\n }\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n static serialize(obj, _interpolate) {\n const str = [];\n const interpolate = (item) => {\n return _interpolate ? _interpolate(item) : item;\n };\n for (const p in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, p)) {\n str.push(`${encodeURIComponent(p)}=${encodeURIComponent(interpolate(obj[p]))}`);\n }\n }\n return str.join('&');\n }\n static getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n if (!opts || !(0, lodash_1.isObject)(opts)) {\n opts = {};\n }\n const requestArgs = {\n url,\n method,\n data: data || null,\n opts\n };\n if (type) {\n requestArgs.type = type;\n }\n if (formio) {\n requestArgs.formio = formio;\n }\n return requestArgs;\n }\n static makeStaticRequest(url, method, data, opts) {\n const requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n const request = Plugins_1.default.pluginWait('preRequest', requestArgs)\n .then(() => Plugins_1.default.pluginGet('staticRequest', requestArgs)\n .then((result) => {\n if ((0, lodash_1.isNil)(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n }));\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n /**\n * Make an API request and wrap that request with the Form.io Request plugin system. This is very similar to the\n * {Formio.request} method with a difference being that it will pass the request through the Form.io request plugin.\n *\n * @param {Formio} formio - An instance of the Formio class.\n * @param {string} type - The request resource type. \"submission\", \"form\", etc.\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>}\n */\n static makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n const requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio;\n //for Formio requests default Accept and Content-type headers\n if (!requestArgs.opts.headers) {\n requestArgs.opts.headers = {};\n }\n requestArgs.opts.headers = (0, lodash_1.defaults)(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n const request = Plugins_1.default.pluginWait('preRequest', requestArgs)\n .then(() => Plugins_1.default.pluginGet('request', requestArgs)\n .then((result) => {\n if ((0, lodash_1.isNil)(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n }));\n return Plugins_1.default.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n /**\n * Execute an API request to any external system. This is a wrapper around the Web fetch method.\n *\n * ```ts\n * Formio.request('https://examples.form.io').then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {Headers} header - An object of headers to pass to the request.\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>|*}\n */\n static request(url, method, data, header, opts) {\n if (!url) {\n return Promise.reject('No url provided');\n }\n method = (method || 'GET').toUpperCase();\n // For reverse compatibility, if they provided the ignoreCache parameter,\n // then change it back to the options format where that is a parameter.\n if ((0, lodash_1.isBoolean)(opts)) {\n opts = { ignoreCache: opts };\n }\n if (!opts || !(0, lodash_1.isObject)(opts)) {\n opts = {};\n }\n // Generate a cachekey.\n const cacheKey = btoa(encodeURI(url));\n // Get the cached promise to save multiple loads.\n if (!opts.ignoreCache && method === 'GET' && Formio.cache.hasOwnProperty(cacheKey)) {\n return Promise.resolve(Formio.cloneResponse(Formio.cache[cacheKey]));\n }\n if (url[0] === '/') {\n url = Formio.baseUrl + url;\n }\n // Set up and fetch request\n const headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n const token = Formio.getToken(opts);\n if (token && !opts.noToken) {\n headers.set('x-jwt-token', token);\n }\n // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n const headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n let options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n if (data) {\n options.body = JSON.stringify(data);\n }\n // Allow plugins to alter the options.\n options = Plugins_1.default.pluginAlter('requestOptions', options, url);\n if (options.namespace || Formio.namespace) {\n opts.namespace = options.namespace || Formio.namespace;\n }\n const requestToken = options.headers['x-jwt-token'];\n const result = Plugins_1.default.pluginAlter('wrapFetchRequestPromise', Formio.fetch(url, options), { url, method, data, opts }).then((response) => {\n // Allow plugins to respond.\n response = Plugins_1.default.pluginAlter('requestResponse', response, Formio, data);\n if (!response.ok) {\n if (response.status === 440) {\n Formio.setToken(null, opts);\n Formio.events.emit('formio.sessionExpired', response.body);\n }\n else if (response.status === 401) {\n Formio.events.emit('formio.unauthorized', response.body);\n }\n else if (response.status === 416) {\n Formio.events.emit('formio.rangeIsNotSatisfiable', response.body);\n }\n else if (response.status === 504) {\n return Promise.reject(new Error('Network request failed'));\n }\n // Parse and return the error as a rejected promise to reject this promise\n return (response.headers.get('content-type').includes('application/json')\n ? response.json()\n : response.text())\n .then((error) => {\n return Promise.reject(error);\n });\n }\n // Handle fetch results\n const respToken = response.headers.get('x-jwt-token');\n // In some strange cases, the fetch library will return an x-jwt-token without sending\n // one to the server. This has even been debugged on the server to verify that no token\n // was introduced with the request, but the response contains a token. This is an Invalid\n // case where we do not send an x-jwt-token and get one in return for any GET request.\n let tokenIntroduced = false;\n if ((method === 'GET') &&\n !requestToken &&\n respToken &&\n !opts.external &&\n !url.includes('token=') &&\n !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n if (response.status >= 200 &&\n response.status < 300 &&\n respToken &&\n respToken !== '' &&\n !tokenIntroduced) {\n Formio.setToken(respToken, Object.assign(Object.assign({}, opts), { fromCurrent: (opts.fromCurrent || !!requestToken) }));\n }\n // 204 is no content. Don't try to .json() it.\n if (response.status === 204) {\n return {};\n }\n const getResult = response.headers.get('content-type').includes('application/json')\n ? response.json()\n : response.text();\n return getResult.then((result) => {\n // Add some content-range metadata to the result here\n let range = response.headers.get('content-range');\n if (range && (0, lodash_1.isObject)(result)) {\n range = range.split('/');\n if (range[0] !== '*') {\n const skipLimit = range[0].split('-');\n result.skip = Number(skipLimit[0]);\n result.limit = skipLimit[1] - skipLimit[0] + 1;\n }\n result.serverCount = range[1] === '*' ? range[1] : Number(range[1]);\n }\n if (!opts.getHeaders) {\n return result;\n }\n const headers = {};\n response.headers.forEach((item, key) => {\n headers[key] = item;\n });\n // Return the result with the headers.\n return {\n result,\n headers,\n };\n });\n })\n .then((result) => {\n if (opts.getHeaders) {\n return result;\n }\n // Cache the response.\n if (method === 'GET') {\n Formio.cache[cacheKey] = result;\n }\n return Formio.cloneResponse(result);\n })\n .catch((err) => {\n if (err === 'Bad Token' && opts.noToken !== false) {\n Formio.setToken(null, opts);\n Formio.events.emit('formio.badToken', err);\n }\n if (err.message) {\n err = new Error(`Could not connect to API server (${err.message}): ${url}`);\n err.networkError = true;\n }\n if (method === 'GET') {\n delete Formio.cache[cacheKey];\n }\n return Promise.reject(err);\n });\n return result;\n }\n // Needed to maintain reverse compatability...\n static get token() {\n return Formio.tokens.formioToken || '';\n }\n // Needed to maintain reverse compatability...\n static set token(token) {\n Formio.tokens.formioToken = token || '';\n }\n static useSessionToken(options) {\n if (typeof localStorage === 'undefined') {\n return;\n }\n let namespace = options;\n if (typeof options === 'object') {\n options = options.namespace;\n }\n const tokenName = `${namespace || Formio.namespace || 'formio'}Token`;\n const token = localStorage.getItem(tokenName);\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n const userName = `${namespace || Formio.namespace || 'formio'}User`;\n const user = localStorage.getItem(userName);\n if (user) {\n localStorage.removeItem(userName);\n sessionStorage.setItem(userName, user);\n }\n localStorage.setItem('useSessionToken', 'true');\n }\n /**\n * Sets the JWT in storage to be used within an application.\n *\n * @param {string} token - The JWT token to set.\n * @param {object} options - Options as follows\n * @param {string} options.namespace - The namespace to save the token within. i.e. \"formio\"\n * @param {Formio} options.formio - The Formio instance.\n * @return {Promise<object>|void}\n */\n static setToken(token = '', opts = {}) {\n token = token || '';\n opts = (typeof opts === 'string') ? { namespace: opts } : opts || {};\n const tokenName = `${opts.namespace || Formio.namespace || 'formio'}Token`;\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n const storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n if (!token) {\n if (!opts.fromUser) {\n opts.fromToken = true;\n Formio.setUser(null, opts);\n }\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.removeItem(tokenName);\n }\n catch (err) {\n browser_cookies_1.default.erase(tokenName, { path: '/' });\n }\n Formio.tokens[tokenName] = token;\n return Promise.resolve(null);\n }\n if (Formio.tokens[tokenName] !== token) {\n Formio.tokens[tokenName] = token;\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.setItem(tokenName, token);\n }\n catch (err) {\n browser_cookies_1.default.set(tokenName, token, { path: '/' });\n }\n }\n // Return or updates the current user\n return Formio.currentUser(opts.formio, opts);\n }\n /**\n * Returns the token set within the application for the user.\n *\n * @param {object} options - The options as follows.\n * @param {string} options.namespace - The namespace of the token you wish to fetch.\n * @param {boolean} options.decode - If you would like the token returned as decoded JSON.\n * @return {*}\n */\n static getToken(options) {\n options = (typeof options === 'string') ? { namespace: options } : options || {};\n const tokenName = `${options.namespace || Formio.namespace || 'formio'}Token`;\n const decodedTokenName = options.decode ? `${tokenName}Decoded` : tokenName;\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n if (Formio.tokens[decodedTokenName]) {\n return Formio.tokens[decodedTokenName];\n }\n try {\n const token = localStorage.getItem('useSessionToken')\n ? sessionStorage.getItem(tokenName)\n : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, jwtDecode_1.jwtDecode)(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n return Formio.tokens[tokenName];\n }\n catch (e) {\n Formio.tokens[tokenName] = browser_cookies_1.default.get(tokenName);\n return '';\n }\n }\n /**\n * Sets the current user within the application cache.\n *\n * @param {object} user - JSON object of the user you wish to set.\n * @param {object} options - Options as follows\n * @param {string} options.namespace - The namespace of the tokens\n */\n static setUser(user, opts = {}) {\n const userName = `${opts.namespace || Formio.namespace || 'formio'}User`;\n const storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n }\n // Emit an event on the cleared user.\n Formio.events.emit('formio.user', null);\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n return storage.removeItem(userName);\n }\n catch (err) {\n return browser_cookies_1.default.erase(userName, { path: '/' });\n }\n }\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.setItem(userName, JSON.stringify(user));\n }\n catch (err) {\n browser_cookies_1.default.set(userName, JSON.stringify(user), { path: '/' });\n }\n // Emit an event on the authenticated user.\n Formio.events.emit('formio.user', user);\n }\n /**\n * Returns the user JSON.\n *\n * @param {object} options - Options as follows\n * @param {string} namespace - The namespace of the tokens stored within this application.\n * @return {object} - The user object.\n */\n static getUser(options) {\n options = options || {};\n const userName = `${options.namespace || Formio.namespace || 'formio'}User`;\n try {\n return JSON.parse((localStorage.getItem('useSessionToken')\n ? sessionStorage\n : localStorage).getItem(userName) || '');\n }\n catch (e) {\n return JSON.parse(browser_cookies_1.default.get(userName));\n }\n }\n /**\n * Sets the BaseURL for the application.\n *\n * @description Every application developed using the JavaScript SDK must set both the {@link Formio.setBaseUrl} and\n * {@link Formio.setProjectUrl} methods. These two functions ensure that every URL passed into the constructor of this\n * class can determine the \"project\" context for which the application is running.\n *\n * Any Open Source server applications will set both the {@link Formio.setBaseUrl} and {@link Formio.setProjectUrl}\n * values will be the same value.\n *\n * ```ts\n * Formio.setBaseUrl('https://yourwebsite.com/forms');\n * Formio.setProjectUrl('https://yourwebsite.com/forms/project');\n *\n * // Now the Formio constructor will know what is the \"project\" and what is the form alias name. Without setBaseUrl\n * // and setProjectUrl, this would throw an error.\n *\n * const formio = new Formio('https://yourwebsite.com/forms/project/user');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {string} url - The URL of the Base API url.\n */\n static setBaseUrl(url) {\n Formio.baseUrl = url;\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n /**\n * Returns the current base url described at {@link Formio.setBaseUrl}\n *\n * @return {string} - The base url of the application.\n */\n static getBaseUrl() {\n return Formio.baseUrl;\n }\n static setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n static getApiUrl() {\n return Formio.getBaseUrl();\n }\n static setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n /**\n * Sets the Project Url for the application. This is an important method that needs to be set for all applications. It\n * is documented @ {@link Formio.setBaseUrl}.\n *\n * @param {string} url - The project api url.\n */\n static setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n /**\n * The Auth URL can be set to customize the authentication requests made from an application. By default, this is\n * just the same value as {@link Formio.projectUrl}\n *\n * @param {string} url - The authentication url\n */\n static setAuthUrl(url) {\n Formio.authUrl = url;\n }\n static getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n /**\n * Returns the Project url described at {@link Formio.setProjectUrl}\n *\n * @return {string|string} - The Project Url.\n */\n static getProjectUrl() {\n return Formio.projectUrl;\n }\n /**\n * Clears the runtime internal API cache.\n *\n * @description By default, the Formio class will cache all API requests in memory so that any subsequent requests\n * using GET method will return the cached results as long as the API URl is the same as what was cached previously.\n * This cache can be cleared using this method as follows.\n *\n * ```ts\n * Formio.clearCache();\n * ```\n *\n * Or, if you just wish to clear a single request, then the {@link Formio.request#options.ignoreCache} option can be\n * provided when making an API request as follows.\n *\n * ```ts\n * Formio.loadForm({}, {\n * ignoreCache: true\n * }).then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * Both of the following will ensure that a new request is made to the API server and that the results will not be\n * from the cached result.\n */\n static clearCache() {\n Formio.cache = {};\n }\n /**\n * Return the access information about a Project, such as the Role ID's for that project, and if the server is\n * configured to do so, the Form and Resource access configurations that the authenticated user has access to.\n *\n * @description This is useful for an application to determine the UI for a specific user to identify which forms they have\n * access to submit or read.\n *\n * @param {Formio} formio - The Formio instance.\n * @return {Promise<Response>}\n */\n static accessInfo(formio) {\n const projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', `${projectUrl}/access`);\n }\n /**\n * Returns an array of roles for the project, which includes the ID's and names of those roles.\n *\n * @param {Formio} formio - The Formio instance.\n * @return {Promise<Response>}\n */\n static projectRoles(formio) {\n const projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', `${projectUrl}/role`);\n }\n /**\n * Return the currentUser object. This will fetch the user from the server and respond with the Submission JSON\n * of that user object.\n *\n * @param {Formio} formio - The Formio instance\n * @param {object} options - The options passed to {@link Formio.getUser}\n * @return {Promise<R>|*}\n */\n static currentUser(formio, options = {}) {\n let authUrl = Formio.authUrl;\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : (Formio.projectUrl || Formio.baseUrl);\n }\n authUrl += '/current';\n if (!options.ignoreCache || options.fromCurrent) {\n const user = Formio.getUser(options);\n if (user) {\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', Promise.resolve(user), {\n url: authUrl,\n method: 'GET',\n options\n });\n }\n }\n const token = Formio.getToken(options);\n if ((!options || !options.external) && !token) {\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', Promise.resolve(null), {\n url: authUrl,\n method: 'GET',\n options\n });\n }\n options.fromCurrent = true;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options)\n .then((response) => {\n Formio.setUser(response, options);\n return response;\n });\n }\n /**\n * Performs a logout of the Form.io application. This will reset all cache, as well as make a request to the logout\n * endpoint of the Form.io api platform.\n *\n * @param {Formio} formio - A Formio instance.\n * @param {object} options - Options passed to both {@link Formio.setToken} as well as {@link Formio.setUser}\n * @return {Promise<Response>}\n */\n static logout(formio, options = {}) {\n options.formio = formio;\n const projectUrl = Formio.authUrl ? Formio.authUrl : (formio ? formio.projectUrl : Formio.baseUrl);\n const logout = () => {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n localStorage.removeItem('useSessionToken');\n };\n return Formio.makeRequest(formio, 'logout', `${projectUrl}/logout`)\n .then(function (result) {\n logout();\n if (result.shouldRedirect && result.url) {\n window.location.href = result.url;\n }\n return result;\n })\n .catch(function (err) {\n logout();\n throw err;\n });\n }\n /**\n * Returns the query passed to a page in JSON object format.\n *\n * @description For example, lets say you visit your application using\n * the url as follows.\n *\n * ```\n * https://yourapplication.com/?token=23423423423&username=Joe\n * ```\n *\n * The following code will provide your application with the following.\n *\n * ```ts\n * const query Formio.pageQuery();\n * console.log(query.token); // Will print 23423423423\n * console.log(query.username); // Will print Joe\n * ```\n *\n * @return {{}} - A JSON object representation of the query that was passed to the URL of an application.\n */\n static pageQuery() {\n const pageQuery = {};\n pageQuery.paths = [];\n const hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n let parts = [];\n location.search.substr(1).split('&').forEach(function (item) {\n parts = item.split('=');\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n });\n hashes.forEach(function (item) {\n parts = item.split('=');\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n /**\n * Much like {@link Formio.currentUser}, but instead automatically injects the Bearer tokens into the headers to\n * perform a Token swap of the OAuth token which will then return the JWT token for that user.\n *\n * @param {Formio} formio - The Formio instance\n * @param {string} token - An OAuth Bearer token to use for a token swap between the OAuth provider and Form.io\n * @return {Promise<R>|*}\n */\n static oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: `Bearer ${token}`\n }\n });\n }\n static oauthLogoutURI(uri, options) {\n options = (typeof options === 'string') ? { namespace: options } : options || {};\n const logoutURIName = `${options.namespace || Formio.namespace || 'formio'}LogoutAuthUrl`;\n Formio.tokens[logoutURIName];\n localStorage.setItem(logoutURIName, uri);\n return Formio.tokens[logoutURIName];\n }\n /**\n * Perform a SAML initialization.\n *\n * @description Typically, you would use the {@link Formio.ssoInit} method to perform this function\n * since this method is an alias for the following.\n *\n * ```ts\n * Formio.samlInit();\n * Formio.ssoInit('saml'); // This is the exact same thing as calling Formio.samlInit\n * ```\n *\n * This method will return false if the process is just starting. The code below is a typical block of code that is\n * used to automatically trigger the SAML authentication process within your application using a Button component.\n *\n * ```ts\n * if (Formio.pageQuery().saml) {\n * const sso = Formio.samlInit();\n * if (sso) {\n * sso.then((user) => {\n * // The SSO user is now loaded!\n * console.log(user);\n * });\n * }\n * }\n * ```\n *\n * You can then place the following code withiin the \"Custom\" action of a Button component on your form.\n *\n * ```ts\n * Formio.samlInit();\n * ```\n *\n * Now when you click on this button, it will start the handshake process with SAML, and once it returns, will pass\n * a \"saml\" query parameter back to your application which will execute the code to load the current user from SAML.\n *\n * @param {object} options - Options to pass to the SAML initialization process.\n * @param {string} options.relay - The URL that will be used as the authentication \"relay\" that occurs during a SAML handshake process.\n * @return {boolean|Promise<Object>|void}\n */\n static samlInit(options = {}) {\n const query = Formio.pageQuery();\n if (query.saml) {\n Formio.setUser(null);\n const retVal = Formio.setToken(query.saml);\n let uri = window.location.toString();\n uri = uri.substring(0, uri.indexOf('?'));\n if (window.location.hash) {\n uri += window.location.hash;\n }\n window.history.replaceState({}, document.title, uri);\n return retVal;\n }\n // Set the relay if not provided.\n if (!options.relay) {\n options.relay = window.location.href;\n }\n // go to the saml sso endpoint for this project.\n const authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = `${authUrl}/saml/sso?relay=${encodeURI(options.relay)}`;\n return false;\n }\n /**\n * Perform an Okta Authentication process using the {@link https://developer.okta.com/code/javascript/okta_auth_sdk|Okta SDK}.\n *\n * @description This method does require that you first include the Okta JavaScript SDK within your application as follows.\n *\n * First you need to include the Okta Authentication script.\n *\n * ```html\n * <script src=\"https://ok1static.oktacdn.com/assets/js/sdk/okta-auth-js/2.0.1/okta-auth-js.min.js\" type=\"text/javascript\"></script>\n * ```\n *\n * Then you can call this method as follows.\n *\n * ```ts\n * Formio.oktaInit();\n * ```\n *\n * @param {object} options - Options that are passed directly to the {@link https://github.com/okta/okta-auth-js#configuration-reference|Okta SDK constructor}\n * @param {constructor} options.OktaAuth - If the OktaAuth constructor is not provided global to the application, it can be provided to this method using this property.\n * @param {Formio} options.formio - The Formio instance.\n * @param {Array<string>} options.scopes - Scopes that are passed to the {@link https://github.com/okta/okta-auth-js#tokengetwithredirectoptions|getWithRedirect} method from the Okta SDK.\n * @return {Promise<Object>}\n */\n static oktaInit(options = {}) {\n if (typeof OktaAuth !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n if (typeof options.OktaAuth === undefined) {\n const errorMessage = 'Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.';\n console.warn(errorMessage);\n return Promise.reject(errorMessage);\n }\n return new Promise((resolve, reject) => {\n const Okta = options.OktaAuth;\n delete options.OktaAuth;\n const authClient = new Okta(options);\n authClient.tokenManager.get('accessToken')\n .then((accessToken) => {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n }\n else if (location.hash) {\n authClient.token.parseFromUrl()\n .then((token) => {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n })\n .catch((err) => {\n console.warn(err);\n reject(err);\n });\n }\n else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n })\n .catch((error) => {\n reject(error);\n });\n });\n }\n /**\n * A common static method to trigger any SSO processes. This method is really just an alias for other static methods.\n *\n * @param {('saml'|'okta')} type - The type of SSO to trigger. 'saml' is an alias for {@link Formio.samlInit}, and 'okta' is an alias for {@link Formio.oktaInit}.\n * @param {object} options - Options to pass to the specific sso methods\n * @return {*|Promise<Object>|boolean|void}\n */\n static ssoInit(type, options = {}) {\n switch (type) {\n case 'saml':\n return Formio.samlInit(options);\n case 'okta':\n return Formio.oktaInit(options);\n default:\n console.warn('Unknown SSO type');\n return Promise.reject('Unknown SSO type');\n }\n }\n /**\n * Lazy load a remote library dependency.\n *\n * @description This is useful for components that wish to lazy load a required library\n * by adding that library to the <scripts> section of the HTML webpage, and then provide a promise that will resolve\n * when the library becomes available for use.\n *\n * @example Load Google Maps API.\n * ```ts\n * Formio.requireLibrary('googleMaps', 'google.maps.Map', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap', true).then(() => {\n * // Once the promise resolves, the following can now be used within your application.\n * const map = new google.maps.Map(document.getElementById(\"map\"), {...});\n * });\n * ```\n *\n * @param {string} name - The internal name to give to the library you are loading. This is useful for caching the library for later use.\n * @param {string} property - The name of the global property that will be added to the global namespace once the library has been loaded. This is used to check to see if the property exists before resolving the promise that the library is ready for use.\n * @param {string} src - The URL of the library to lazy load.\n * @param {boolean} polling - Determines if polling should be used to determine if they library is ready to use. If set to false, then it will rely on a global callback called ${name}Callback where \"name\" is the first property passed to this method. When this is called, that will indicate when the library is ready. In most cases, you will want to pass true to this parameter to initiate a polling method to check for the library availability in the global context.\n * @return {Promise<object>} - A promise that will resolve when the plugin is ready to be used.\n */\n static requireLibrary(name, property, src, polling = false, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new Promise((resolve, reject) => {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n const callbackName = `${name}Callback`;\n if (!polling && !window[callbackName]) {\n window[callbackName] = () => Formio.libraries[name].resolve();\n }\n // See if the plugin already exists.\n const plugin = (0, lodash_1.get)(window, property);\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n }\n else {\n src = Array.isArray(src) ? src : [src];\n src.forEach((lib) => {\n let attrs = {};\n let elementType = '';\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib,\n };\n }\n switch (lib.type) {\n case 'script':\n elementType = 'script';\n attrs = {\n src: lib.src,\n type: 'text/javascript',\n defer: true,\n async: true,\n referrerpolicy: 'origin',\n };\n break;\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet',\n };\n break;\n }\n // Add the script to the top of the page.\n const element = document.createElement(elementType);\n if (element.setAttribute) {\n for (const attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n if (onload) {\n element.addEventListener('load', () => {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n const { head } = document;\n if (head) {\n head.appendChild(element);\n }\n });\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n const interval = setInterval(() => {\n const plugin = (0, lodash_1.get)(window, property);\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n const lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n /**\n * Determines if a lazy loaded library is ready to be used.\n *\n * @description Example: Let's assume that the example provided at {@link Formio.requireLibrary} was used elsewhere in your application.\n * You could now use the following within a separate place that will also resolve once the library is ready to be used.\n *\n * ```js\n * Formio.libraryReady('googleMaps').then(() => {\n * // Once the promise resolves, the following can now be used within your application.\n * const map = new google.maps.Map(document.getElementById(\"map\"), {...});\n * });\n * ```\n *\n * @param {string} name - The name of the library to check.\n * @return {Promise<object>} - A promise that will resolve when the library is ready to be used.\n */\n static libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) &&\n Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n return Promise.reject(`${name} library was not required.`);\n }\n /**\n * Clones the response from the API so that it cannot be mutated.\n *\n * @param response\n */\n static cloneResponse(response) {\n const copy = (0, fastCloneDeep_1.fastCloneDeep)(response);\n if (Array.isArray(response)) {\n copy.skip = response.skip;\n copy.limit = response.limit;\n copy.serverCount = response.serverCount;\n }\n return copy;\n }\n /**\n * Sets the project path type.\n *\n * @param type\n */\n static setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n /**\n * Gets the project path type.\n */\n static getPathType() {\n return Formio.pathType;\n }\n}\nexports.Formio = Formio;\n/**\n * The base API url of the Form.io Platform. Example: https://api.form.io\n */\nFormio.baseUrl = 'https://api.form.io';\n/**\n * The project API url of the Form.io Project. Example: https://examples.form.io\n */\nFormio.projectUrl = '';\n/**\n * The project url to use for Authentication.\n */\nFormio.authUrl = '';\n/**\n * Set to true if the project url has been established with ```Formio.setProjectUrl()```\n */\nFormio.projectUrlSet = false;\n/**\n * The Form.io API Cache. This ensures that requests to the same API endpoint are cached.\n */\nFormio.cache = {};\n/**\n * The namespace used to save the Form.io Token's and variables within an application.\n */\nFormio.namespace = '';\n/**\n * Handles events fired within this SDK library.\n */\nFormio.events = new eventemitter3_1.default();\n/**\n * Stores all of the libraries lazy loaded with ```Formio.requireLibrary``` method.\n */\nFormio.libraries = {};\n/**\n * A direct interface to the Form.io fetch polyfill.\n */\nFormio.fetch = fetch;\n/**\n * A direct interface to the Form.io fetch Headers polyfill.\n */\nFormio.Headers = Headers;\n/**\n * All of the auth tokens for this session.\n */\nFormio.tokens = {};\n/**\n * The version of this library.\n */\nFormio.version = '---VERSION---';\n/**\n * The global options for the Formio library.\n */\nFormio.options = {};\n// Add Plugin methods.\nFormio.plugins = Plugins_1.default.plugins;\nFormio.deregisterPlugin = Plugins_1.default.deregisterPlugin;\nFormio.registerPlugin = Plugins_1.default.registerPlugin;\nFormio.getPlugin = Plugins_1.default.getPlugin;\nFormio.pluginWait = Plugins_1.default.pluginWait;\nFormio.pluginGet = Plugins_1.default.pluginGet;\nFormio.pluginAlter = Plugins_1.default.pluginAlter;\n// Adds Formio to the Plugins Interface.\nPlugins_1.default.Formio = Formio;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/sdk/Formio.js?");
3198
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = exports.FormioPathType = void 0;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst fastCloneDeep_1 = __webpack_require__(/*! ../utils/fastCloneDeep */ \"./node_modules/@formio/core/lib/utils/fastCloneDeep.js\");\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil.js\");\nconst jwtDecode_1 = __webpack_require__(/*! ../utils/jwtDecode */ \"./node_modules/@formio/core/lib/utils/jwtDecode.js\");\nconst eventemitter3_1 = __importDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\nconst browser_cookies_1 = __importDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\nconst { fetch, Headers } = (0, fetch_ponyfill_1.default)();\nconst Plugins_1 = __importDefault(__webpack_require__(/*! ./Plugins */ \"./node_modules/@formio/core/lib/sdk/Plugins.js\"));\n/**\n * The different path types for a project.\n */\nvar FormioPathType;\n(function (FormioPathType) {\n FormioPathType[\"Subdirectories\"] = \"Subdirectories\";\n FormioPathType[\"Subdomains\"] = \"Subdomains\";\n})(FormioPathType || (exports.FormioPathType = FormioPathType = {}));\n/**\n * The Formio interface class. This is a minimalistic API library that allows you to work with the Form.io API's within JavaScript.\n *\n * ## Usage\n * Creating an instance of Formio is simple, and takes only a path (URL String). The path can be different, depending on the desired output.\n * The Formio instance can also access higher level operations, depending on how granular of a path you start with.\n *\n * ```ts\n * var formio = new Formio(<endpoint>, [options]);\n * ```\n *\n * Where **endpoint** is any valid API endpoint within Form.io. These URL's can provide a number of different methods depending on the granularity of the endpoint. This allows you to use the same interface but have access to different methods depending on how granular the endpoint url is.\n * **options** is defined within the {link Formio.constructor} documentation.\n *\n * Here is an example of how this library can be used to load a form JSON from the Form.io API's\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n */\nclass Formio {\n /* eslint-disable max-statements */\n /**\n * @constructor\n * @param {string} path - A project, form, and submission API Url.\n * @param {FormioOptions} options - Available options to configure the Javascript API.\n */\n constructor(path, options = {}) {\n this.path = path;\n this.options = options;\n /**\n * The base API url of the Form.io Platform. Example: https://api.form.io\n */\n this.base = '';\n /**\n * The Projects Endpoint derived from the provided source.\n *\n * @example https://api.form.io/project\n */\n this.projectsUrl = '';\n /**\n * A specific project endpoint derived from the provided source.\n *\n * @example https://examples.form.io\n */\n this.projectUrl = '';\n /**\n * The Project ID found within the provided source.\n */\n this.projectId = '';\n /**\n * A specific Role URL provided the source.\n *\n * @example https://examples.form.io/role/2342343234234234\n */\n this.roleUrl = '';\n /**\n * The roles endpoint derived from the provided source.\n *\n * @example https://examples.form.io/role\n */\n this.rolesUrl = '';\n /**\n * The roleID derieved from the provided source.\n */\n this.roleId = '';\n /**\n * A specific form url derived from the provided source.\n *\n * @example https://examples.form.io/example\n */\n this.formUrl = '';\n /**\n * The forms url derived from the provided source.\n *\n * @example https://example.form.io/form\n */\n this.formsUrl = '';\n /**\n * The Form ID derived from the provided source.\n */\n this.formId = '';\n /**\n * The submissions URL derived from the provided source.\n *\n * @example https://examples.form.io/example/submission\n */\n this.submissionsUrl = '';\n /**\n * A specific submissions URL derived from a provided source.\n *\n * @example https://examples.form.io/example/submission/223423423423\n */\n this.submissionUrl = '';\n /**\n * The submission ID provided a submission url.\n */\n this.submissionId = '';\n /**\n * The actions url provided a form url as the source.\n *\n * @example https://examples.form.io/example/action\n */\n this.actionsUrl = '';\n /**\n * The Action ID derived from a provided Action url.\n */\n this.actionId = '';\n /**\n * A specific action api endoint.\n */\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n /**\n * The query string derived from the provided src url.\n */\n this.query = '';\n /**\n * If this is a non-project url, such is the case for Open Source API.\n */\n this.noProject = false;\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n }\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n if (options.hasOwnProperty('base') && options.base) {\n this.base = options.base;\n }\n else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n }\n else if (window && window.location) {\n const match = window.location.href.match(/http[s]?:\\/\\/api./);\n this.base = match ? match[0] : window.location.origin;\n }\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || `${this.base}/project`;\n this.projectsUrl = `${this.base}/project`;\n this.projectId = '';\n this.query = '';\n return;\n }\n if (options.hasOwnProperty('project') && options.project) {\n this.projectUrl = options.project;\n }\n const project = this.projectUrl || Formio.projectUrl;\n const projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n const isProjectUrl = (path.search(projectRegEx) !== -1);\n // The baseURL is the same as the projectUrl, and does not contain \"/project/MONGO_ID\" in\n // its domain. This is almost certainly against the Open Source server.\n if (project && this.base === project && !isProjectUrl) {\n this.noProject = true;\n this.projectUrl = this.base;\n }\n // Normalize to an absolute path.\n if ((path.indexOf('http') !== 0) && (path.indexOf('//') !== 0)) {\n path = this.base + path;\n }\n const hostparts = this.getUrlParts(path);\n let hostName = '';\n let parts = [];\n if (hostparts) {\n hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n const queryparts = path.split('?');\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = `?${queryparts[1]}`;\n }\n }\n // Register a specific path.\n const registerPath = (name, base) => {\n this[`${name}sUrl`] = `${base}/${name}`;\n const regex = new RegExp(`/${name}/([^/]+)`);\n if (path && path.search(regex) !== -1) {\n parts = path.match(regex);\n this[`${name}Url`] = parts ? (base + parts[0]) : '';\n this[`${name}Id`] = (parts.length > 1) ? parts[1] : '';\n base += parts[0];\n }\n return base;\n };\n // Register an array of items.\n const registerItems = (items, base, staticBase) => {\n for (const i in items) {\n if (items.hasOwnProperty(i)) {\n const item = items[i];\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n }\n else {\n const newBase = registerPath(item, base);\n base = staticBase ? base : newBase;\n }\n }\n }\n };\n if (!this.projectUrl || (this.projectUrl === this.base)) {\n // If a project uses Subdirectories path type, we need to specify a projectUrl\n if (!this.projectUrl && !isProjectUrl && Formio.pathType === 'Subdirectories') {\n const regex = `^${hostName.replace(/\\//g, '\\\\/')}.[^/]+`;\n const match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n }\n else {\n this.projectUrl = hostName;\n }\n }\n // Check if we have a specified path type.\n let isNotSubdomainType = false;\n if (Formio.pathType) {\n isNotSubdomainType = Formio.pathType !== 'Subdomains';\n }\n if (!this.noProject) {\n // Determine the projectUrl and projectId\n if (isProjectUrl) {\n // Get project id as project/:projectId.\n registerItems(['project'], hostName);\n path = path.replace(projectRegEx, '');\n }\n else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts && hostparts.length > 3 && path.split('/').length > 1) {\n const isFile = path.match(/.json/);\n const pathParts = path.split('/');\n if (isFile) {\n this.projectUrl = hostName;\n }\n else {\n pathParts.shift(); // Throw away the first /.\n const projectId = pathParts.shift();\n if (projectId) {\n this.projectId = projectId;\n path = `/${pathParts.join('/')}`;\n this.projectUrl = `${hostName}/${this.projectId}`;\n }\n }\n }\n }\n else {\n // Get project id from subdomain.\n if (hostparts && hostparts.length > 2 && (hostparts[2].split('.').length > 2 || hostName.includes('localhost')) && !isNotSubdomainType) {\n this.projectUrl = hostName;\n this.projectId = hostparts[2].split('.')[0];\n }\n }\n this.projectsUrl = this.projectsUrl || `${this.base}/project`;\n }\n // Configure Role urls and role ids.\n registerItems(['role'], this.projectUrl);\n // Configure Form urls and form ids.\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n }\n else {\n const subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n const subs = path.match(subRegEx);\n if ((subs && (subs.length > 1))) {\n this.pathType = subs[1];\n }\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = `${this.projectUrl}/form`;\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n const items = ['submission', 'action', 'v'];\n for (const i in items) {\n if (items.hasOwnProperty(i)) {\n const item = items[i];\n this[`${item}sUrl`] = `${this.projectUrl + path}/${item}`;\n if ((this.pathType === item) && subs && (subs.length > 2) && subs[2]) {\n this[`${item}Id`] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[`${item}Url`] = this.projectUrl + path + subs[0];\n }\n }\n }\n }\n // Set the app url if it is not set.\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = this.projectUrl;\n }\n }\n /* eslint-enable max-statements */\n /**\n * Deletes a remote resource of any provided type.\n *\n * @param {string} type - The type of resource to delete. \"submission\", \"form\", etc.\n * @param {object} options - The options passed to {@link Formio.request}\n * @return {Promise<Response>}\n */\n delete(type, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n if (!this[_id]) {\n return Promise.reject('Nothing to delete');\n }\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n /**\n * Returns the index (array of records) for any provided type.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} query - A query object to pass to the request.\n * @param {object} query.params - A map (key-value pairs) of URL query parameters to add to the url.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n index(type, query, opts) {\n const _url = `${type}Url`;\n query = query || '';\n if (query && (0, lodash_1.isObject)(query)) {\n query = `?${Formio.serialize(query.params)}`;\n }\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n /**\n * Save a document record using \"upsert\". If the document does not exist, it will be created, if the _id is provided,\n * it will be updated.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} data - The resource data object.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n save(type, data, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n const method = (this[_id] || data._id) ? 'put' : 'post';\n let reqUrl = this[_id] ? this[_url] : this[`${type}sUrl`];\n if (!this[_id] && data._id && (method === 'put') && !reqUrl.includes(data._id)) {\n reqUrl += `/${data._id}`;\n }\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n /**\n * @summary Load (GET) a document record.\n *\n * @param {string} type - The type of resource to fetch the index of. \"submission\", \"form\", etc.\n * @param {object} query - A query object to pass to the request.\n * @param {object} query.params - A map (key-value pairs) of URL query parameters to add to the url.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n load(type, query, opts) {\n const _id = `${type}Id`;\n const _url = `${type}Url`;\n if (query && (0, lodash_1.isObject)(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = this.query ? (`${this.query}&${query}`) : (`?${query}`);\n }\n else {\n query = this.query;\n }\n if (!this[_id]) {\n return Promise.reject(`Missing ${_id}`);\n }\n let url = this[_url] + query;\n if (type === 'form' && !isNaN(parseInt(this.vId))) {\n url += url.indexOf('?') === -1 ? '?' : '&';\n url += `formRevision=${this.vId}`;\n }\n return this.makeRequest(type, url, 'get', null, opts);\n }\n /**\n * @summary Call {@link Formio.makeRequest} for this Formio instance.\n *\n * @param {string} type - The request resource type. \"submission\", \"form\", etc.\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>}\n */\n makeRequest(type, url, method, data, opts) {\n return Formio.makeRequest(this, type, url, method, data, opts);\n }\n /**\n * @summary Loads a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadProject().then((project) => {\n * console.log(project);\n * });\n * ```\n *\n * @param {object} query - Query parameters to pass to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n /**\n * Saves or Updates a project.\n *\n * ### Create a new project\n * ```ts\n * const formio = new Formio();\n * formio.saveProject({\n * title: 'My Project',\n * path: 'myproject',\n * name: 'myproject'\n * });\n * ```\n *\n * ### Update an existing project\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadProject().then((project) => {\n * project.title = 'Title changed';\n * formio.saveProject(project).then(() => {\n * console.log('Done saving project!');\n * });\n * });\n * ```\n *\n * @param {object} data - The project JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n /**\n * Deletes a project\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.deleteProject();\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n deleteProject(opts) {\n return this.delete('project', opts);\n }\n /**\n * Loads a list of all projects.\n *\n * ```ts\n * Formio.loadProjects().then((projects) => {\n * console.log(projects);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {*}\n */\n static loadProjects(query, opts) {\n query = query || '';\n if ((0, lodash_1.isObject)(query)) {\n query = `?${Formio.serialize(query.params)}`;\n }\n return Formio.makeStaticRequest(`${Formio.baseUrl}/project${query}`, 'GET', null, opts);\n }\n /**\n * Loads a role within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/role/234234234234');\n * formio.loadRole().then((role) => {\n * console.log(role);\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadRole(opts) {\n return this.load('role', null, opts);\n }\n /**\n * Create a new or Update an existing role within a project.\n *\n * ### Create new Role example\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.saveRole({\n * title: 'Employee',\n * description: 'A person who belongs to a company.'\n * }).then((role) => {\n * console.log(role);\n * });\n * ```\n *\n * ### Update existing role example\n * ```ts\n * const formio = new Formio('https://examples.form.io/role/234234234234234');\n * formio.loadRole().then((role) => {\n * role.title = 'Manager';\n * formio.saveRole(role).then(() => {\n * console.log('DONE');\n * });\n * });\n * ```\n *\n * @param {object} role - The Role JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n /**\n * Deletes a role within a project.\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteRole(opts) {\n return this.delete('role', opts);\n }\n /**\n * Load all roles within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadRoles().then((roles) => {\n * console.log(roles);\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n /**\n * Loads a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n loadForm(query, opts) {\n return this.load('form', query, opts)\n .then((currentForm) => {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(this.vId))) {\n return currentForm;\n }\n // If a submission already exists but form is marked to load current version of form.\n if (currentForm.revisions === 'current' && this.submissionId) {\n return currentForm;\n }\n // eslint-disable-next-line eqeqeq\n if (currentForm._vid == this.vId || currentForm.revisionId === this.vId) {\n return currentForm;\n }\n // If they specified a revision form, load the revised form components.\n if (query && (0, lodash_1.isObject)(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = this.query ? (`${this.query}&${query}`) : (`?${query}`);\n }\n else {\n query = this.query;\n }\n return this.makeRequest('form', this.vUrl + query, 'get', null, opts)\n .then((revisionForm) => {\n currentForm._vid = revisionForm._vid;\n currentForm.components = revisionForm.components;\n currentForm.settings = revisionForm.settings;\n currentForm.revisionId = revisionForm.revisionId;\n // Using object.assign so we don't cross polinate multiple form loads.\n return Object.assign({}, currentForm);\n })\n // If we couldn't load the revision, just return the original form.\n .catch(() => Object.assign({}, currentForm));\n });\n }\n /**\n * Create or Update a specific form.\n *\n * ### Create form example\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.saveForm({\n * title: 'Employee',\n * type: 'resource',\n * path: 'employee',\n * name: 'employee',\n * components: [\n * {\n * type: 'textfield',\n * key: 'firstName',\n * label: 'First Name'\n * },\n * {\n * type: 'textfield',\n * key: 'lastName',\n * label: 'Last Name'\n * }\n * ]\n * });\n * ```\n *\n * ### Update a form example\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadForm().then((form) => {\n * form.title = 'Changed Title';\n * formio.saveForm(form).then(() => {\n * console.log('DONE!!!');\n * });\n * });\n * ```\n *\n * @param {object} data - The Form JSON to create or update.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n /**\n * Deletes a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.deleteForm().then(() => {\n * console.log('Deleted!');\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteForm(opts) {\n return this.delete('form', opts);\n }\n /**\n * Loads all forms within a project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.loadForms().then((forms) => {\n * console.log(forms);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n /**\n * Loads a specific submissionn.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/23423423423423423');\n * formio.loadSubmission().then((submission) => {\n * console.log(submission);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n loadSubmission(query, opts) {\n return this.load('submission', query, opts)\n .then((submission) => {\n this.vId = submission._frid || submission._fvid;\n this.vUrl = `${this.formUrl}/v/${this.vId}`;\n return submission;\n });\n }\n /**\n * Creates a new or Updates an existing submission.\n *\n * ### Create a new submission\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.saveSubmission({\n * data: {\n * firstName: 'Joe',\n * lastName: 'Smith'\n * }\n * }).then((submission) => {\n * // This will now be the complete submission object saved on the server.\n * console.log(submission);\n * });\n * ```\n *\n * ### Update an existing submission\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/23423423423423423');\n * formio.loadSubmission().then((submission) => {\n * submission.data.lastName = 'Thompson';\n * formio.saveSubmission(submission).then(() => {\n * console.log('DONE');\n * });\n * });\n * ```\n *\n * @param {object} data - The submission JSON object.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId)) && !data._fvid) {\n data._fvid = this.vId;\n }\n return this.save('submission', data, opts);\n }\n /**\n * Deletes a submission.\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteSubmission(opts) {\n return this.delete('submission', opts);\n }\n /**\n * Loads all submissions within a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadSubmissions({\n * params: {\n * limit: 25,\n * 'data.lastName__regex': 'smith'\n * }\n * }).then((submissions) => {\n * // Should print out 25 submissions where the last name contains \"smith\".\n * console.log(submissions);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n /**\n * Loads a form action.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.loadAction().then((action) => {\n * console.log(action);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n /**\n * Create a new or update an existing action.\n *\n * ### Create a new action for a form.\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.saveAction({\n * data: {\n * name: 'webhook',\n * title: 'Webhook Action',\n * method: ['create', 'update', 'delete'],\n * handler: ['after'],\n * condition: {},\n * settings: {\n * url: 'https://example.com',\n * headers: [{}],\n * block: false,\n * forwardHeaders: false\n * }\n * }\n * }).then((action) => {\n * console.log(action);\n * });\n * ```\n *\n * ### Update an action\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.loadAction().then((action) => {\n * action.title = 'Updated title';\n * formio.saveAction(action).then(() => {\n * console.log('Done!');\n * });\n * });\n * ```\n *\n * @param {object} data - The action JSON\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Object>}\n */\n saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n /**\n * Delete an action\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/action/234234234234');\n * formio.deleteAction().then(() => {\n * console.log('Action was deleted.');\n * });\n * ```\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n deleteAction(opts) {\n return this.delete('action', opts);\n }\n /**\n * Loads all actions within a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.loadActions().then((actions) => {\n * console.log(actions);\n * });\n * ```\n *\n * @param {object} query - Query parameters similar to {@link Formio#load}.\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<Response>}\n */\n loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n /**\n * Returns a list of available actions\n *\n * @return {Promise<Response>}\n */\n availableActions() {\n return this.makeRequest('availableActions', `${this.formUrl}/actions`);\n }\n /**\n * Returns the action information for a specific action, such as \"save\".\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/actions/save');\n * formio.actionInfo().then((info) => {\n * console.log(info);\n * });\n * ```\n *\n * @param {string} name - The name of the action you would like to get information for. i.e. \"save\", \"webhook\", etc.\n * @return {Promise<Response>}\n */\n actionInfo(name) {\n return this.makeRequest('actionInfo', `${this.formUrl}/actions/${name}`);\n }\n /**\n * Determine if a string ID is a valid MongoID.\n *\n * @param {string} id - The id that should be tested if it is avalid id.\n * @return {boolean} - true if it is a valid MongoId, false otherwise.\n */\n isObjectId(id) {\n const checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n /**\n * Get the project ID of project.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io');\n * formio.getProjectId().then((projectId) => {\n * console.log(projectId);\n * };\n * ```\n *\n * @return {Promise<string>}\n */\n getProjectId() {\n if (!this.projectId) {\n return Promise.resolve('');\n }\n if (this.isObjectId(this.projectId)) {\n return Promise.resolve(this.projectId);\n }\n else {\n return this.loadProject().then((project) => {\n return project._id;\n });\n }\n }\n /**\n * Get the ID of a form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example');\n * formio.getFormId().then((formId) => {\n * console.log(formId);\n * });\n * ```\n *\n * @return {Promise<string>}\n */\n getFormId() {\n if (!this.formId) {\n return Promise.resolve('');\n }\n if (this.isObjectId(this.formId)) {\n return Promise.resolve(this.formId);\n }\n else {\n return this.loadForm().then((form) => {\n return form._id;\n });\n }\n }\n /**\n * Instance method for {@link Formio.currentUser}\n *\n * @param {object} options - Options to pass to {@link Formio.request}\n * @return {Promise<object>}\n */\n currentUser(options) {\n return Formio.currentUser(this, options);\n }\n /**\n * Instance method for {@link Formio.accessInfo}\n *\n * @return {Promise<Response>}\n */\n accessInfo() {\n return Formio.accessInfo(this);\n }\n /**\n * Sets OAuth Logout URL.\n *\n * @param {string} uri - Logout URL.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string}\n */\n oauthLogoutURI(uri, options) {\n return Formio.oauthLogoutURI(uri, Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Returns the JWT token for this instance.\n *\n * @param {object} options - The following options are provided.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string} - The JWT token for this user.\n */\n getToken(options) {\n return Formio.getToken(Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Sets the JWT token for this instance.\n *\n * @param {string} token - The JWT token to set.\n * @param {object} options - The following options are provided.\n * @param {string} options.namespace - The localStorage namespace to use when retrieving tokens from storage.\n * @return {string} - The JWT token that was set.\n */\n setToken(token, options) {\n return Formio.setToken(token, Object.assign({ formio: this }, this.options, options));\n }\n /**\n * Returns a temporary authentication token for single purpose token generation.\n *\n * @param {number|string} expire - The amount of seconds to wait before this temp token expires.\n * @param {string} allowed - The allowed path string inn the format GET:/path\n * @param {object} options - The options passed to {@link Formio#getToken}\n */\n getTempToken(expire, allowed, options) {\n const token = Formio.getToken(options);\n if (!token) {\n return Promise.reject('You must be authenticated to generate a temporary auth token.');\n }\n const authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', `${authUrl}/token`, 'GET', null, {\n ignoreCache: true,\n header: new Headers({\n 'x-expire': expire,\n 'x-allow': allowed\n })\n });\n }\n /**\n * Get a PDF download url for a submission, which will generate a new PDF of the submission. This method will first\n * fetch a temporary download token, and then append this to the download url for this form.\n *\n * ```ts\n * const formio = new Formio('https://examples.form.io/example/submission/324234234234234');\n * formio.getDownloadUrl().then((url) => {\n * console.log(url);\n * });\n * ```\n *\n * @param {object} [form] - The form JSON to fetch a download url for.\n * @return {Promise<string>} - The download url.\n */\n getDownloadUrl(form) {\n if (!this.submissionId) {\n return Promise.resolve('');\n }\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then((_form) => {\n if (!_form) {\n return '';\n }\n return this.getDownloadUrl(_form);\n });\n }\n let apiUrl = `/project/${form.project}`;\n apiUrl += `/form/${form._id}`;\n apiUrl += `/submission/${this.submissionId}`;\n const postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n let download = this.base + apiUrl;\n return new Promise((resolve, reject) => {\n this.getTempToken(3600, `GET:${apiUrl}`).then((tempToken) => {\n download += `?token=${tempToken.key}`;\n resolve(download);\n }, () => {\n resolve(download);\n }).catch(reject);\n });\n }\n /**\n * Returns the user permissions to a form and submission.\n *\n * @param user - The user or current user if undefined. For anonymous, use \"null\"\n * @param form - The form or current form if undefined. For no form check, use \"null\"\n * @param submission - The submisison or \"index\" if undefined.\n *\n * @return {{create: boolean, read: boolean, edit: boolean, delete: boolean}}\n */\n userPermissions(user, form, submission) {\n return Promise.all([\n (form !== undefined) ? Promise.resolve(form) : this.loadForm(),\n (user !== undefined) ? Promise.resolve(user) : this.currentUser(),\n (submission !== undefined || !this.submissionId) ? Promise.resolve(submission) : this.loadSubmission(),\n this.accessInfo()\n ]).then((results) => {\n const form = results.shift();\n const user = results.shift() || { _id: false, roles: [] };\n const submission = results.shift();\n const access = results.shift();\n const permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n delete: 'delete'\n };\n const perms = {\n user: user,\n form: form,\n access: access,\n create: false,\n read: false,\n edit: false,\n delete: false\n };\n for (const roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n const role = access.roles[roleName];\n if (role.default && (user._id === false)) {\n // User is anonymous. Add the anonymous role.\n user.roles.push(role._id);\n }\n else if (role.admin && user.roles.indexOf(role._id) !== -1) {\n perms.create = true;\n perms.read = true;\n perms.delete = true;\n perms.edit = true;\n return perms;\n }\n }\n }\n if (form && form.submissionAccess) {\n for (let i = 0; i < form.submissionAccess.length; i++) {\n const permission = form.submissionAccess[i];\n const [perm, scope] = permission.type.split('_');\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, lodash_1.intersection)(permission.roles, user.roles).length) {\n perms[permMap[perm]] = (scope === 'all') || (!submission || (user._id === submission.owner));\n }\n }\n }\n }\n // check for Group Permissions\n if (submission) {\n // we would anyway need to loop through components for create permission, so we'll do that for all of them\n (0, formUtil_1.eachComponent)(form.components, (component, path) => {\n if (component && component.defaultPermission) {\n const value = (0, lodash_1.get)(submission.data, path);\n // make it work for single-select Group and multi-select Group\n const groups = Array.isArray(value) ? value : [value];\n groups.forEach(group => {\n if (group && group._id && // group id is present\n user.roles.indexOf(group._id) > -1 // user has group id in his roles\n ) {\n if (component.defaultPermission === 'read') {\n perms[permMap.read] = true;\n }\n if (component.defaultPermission === 'create') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n }\n if (component.defaultPermission === 'write') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n }\n if (component.defaultPermission === 'admin') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n perms[permMap.delete] = true;\n }\n }\n });\n }\n });\n }\n return perms;\n });\n }\n /**\n * `Determine if the current user can submit a form.\n * @return {*}\n */\n canSubmit() {\n return this.userPermissions().then((perms) => {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return this.userPermissions(null).then((anonPerms) => {\n if (anonPerms.create) {\n Formio.setUser(null);\n return true;\n }\n return false;\n });\n }\n return perms.create;\n });\n }\n getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n static getUrlParts(url, formio) {\n const base = (formio && formio.base) ? formio.base : Formio.baseUrl;\n let regex = '^(http[s]?:\\\\/\\\\/)';\n if (base && url.indexOf(base) === 0) {\n regex += `(${base.replace(/^http[s]?:\\/\\//, '')})`;\n }\n else {\n regex += '([^/]+)';\n }\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n static serialize(obj, _interpolate) {\n const str = [];\n const interpolate = (item) => {\n return _interpolate ? _interpolate(item) : item;\n };\n for (const p in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, p)) {\n str.push(`${encodeURIComponent(p)}=${encodeURIComponent(interpolate(obj[p]))}`);\n }\n }\n return str.join('&');\n }\n static getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n if (!opts || !(0, lodash_1.isObject)(opts)) {\n opts = {};\n }\n const requestArgs = {\n url,\n method,\n data: data || null,\n opts\n };\n if (type) {\n requestArgs.type = type;\n }\n if (formio) {\n requestArgs.formio = formio;\n }\n return requestArgs;\n }\n static makeStaticRequest(url, method, data, opts) {\n const requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n const request = Plugins_1.default.pluginWait('preRequest', requestArgs)\n .then(() => Plugins_1.default.pluginGet('staticRequest', requestArgs)\n .then((result) => {\n if ((0, lodash_1.isNil)(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n }));\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n /**\n * Make an API request and wrap that request with the Form.io Request plugin system. This is very similar to the\n * {Formio.request} method with a difference being that it will pass the request through the Form.io request plugin.\n *\n * @param {Formio} formio - An instance of the Formio class.\n * @param {string} type - The request resource type. \"submission\", \"form\", etc.\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>}\n */\n static makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n const requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio;\n //for Formio requests default Accept and Content-type headers\n if (!requestArgs.opts.headers) {\n requestArgs.opts.headers = {};\n }\n requestArgs.opts.headers = (0, lodash_1.defaults)(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n const request = Plugins_1.default.pluginWait('preRequest', requestArgs)\n .then(() => Plugins_1.default.pluginGet('request', requestArgs)\n .then((result) => {\n if ((0, lodash_1.isNil)(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n }));\n return Plugins_1.default.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n /**\n * Execute an API request to any external system. This is a wrapper around the Web fetch method.\n *\n * ```ts\n * Formio.request('https://examples.form.io').then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {string} url - The URL to request.\n * @param {string} method - The request method. GET, PUT, POST, DELETE, or PATCH\n * @param {object} data - The data to pass to the request (for PUT, POST, and PATCH methods)\n * @param {Headers} header - An object of headers to pass to the request.\n * @param {object} options - An object of options to pass to the request method.\n * @param {boolean} options.ignoreCache - To ignore internal caching of the request.\n * @param {object} options.headers - An object of headers to pass along to the request.\n * @param {boolean} options.noToken - If set to true, this will not include the Form.io x-jwt-token along with the request.\n * @param {string} options.namespace - The Form.io namespace to prepend to all LocalStorage variables such as formioToken.\n * @param {boolean} options.getHeaders - Set this if you wish to include the response headers with the return of this method.\n * @return {Promise<Response>|*}\n */\n static request(url, method, data, header, opts) {\n if (!url) {\n return Promise.reject('No url provided');\n }\n method = (method || 'GET').toUpperCase();\n // For reverse compatibility, if they provided the ignoreCache parameter,\n // then change it back to the options format where that is a parameter.\n if ((0, lodash_1.isBoolean)(opts)) {\n opts = { ignoreCache: opts };\n }\n if (!opts || !(0, lodash_1.isObject)(opts)) {\n opts = {};\n }\n // Generate a cachekey.\n const cacheKey = btoa(encodeURI(url));\n // Get the cached promise to save multiple loads.\n if (!opts.ignoreCache && method === 'GET' && Formio.cache.hasOwnProperty(cacheKey)) {\n return Promise.resolve(Formio.cloneResponse(Formio.cache[cacheKey]));\n }\n if (url[0] === '/') {\n url = Formio.baseUrl + url;\n }\n // Set up and fetch request\n const headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n const token = Formio.getToken(opts);\n if (token && !opts.noToken) {\n headers.set('x-jwt-token', token);\n }\n // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n const headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n let options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n if (data) {\n options.body = JSON.stringify(data);\n }\n // Allow plugins to alter the options.\n options = Plugins_1.default.pluginAlter('requestOptions', options, url);\n if (options.namespace || Formio.namespace) {\n opts.namespace = options.namespace || Formio.namespace;\n }\n const requestToken = options.headers['x-jwt-token'];\n const result = Plugins_1.default.pluginAlter('wrapFetchRequestPromise', Formio.fetch(url, options), { url, method, data, opts }).then((response) => {\n // Allow plugins to respond.\n response = Plugins_1.default.pluginAlter('requestResponse', response, Formio, data);\n if (!response.ok) {\n if (response.status === 440) {\n Formio.setToken(null, opts);\n Formio.events.emit('formio.sessionExpired', response.body || response);\n }\n else if (response.status === 401) {\n Formio.events.emit('formio.unauthorized', response.body || response);\n }\n else if (response.status === 416) {\n Formio.events.emit('formio.rangeIsNotSatisfiable', response.body || response);\n }\n else if (response.status === 504) {\n return Promise.reject(new Error('Network request failed'));\n }\n // Parse and return the error as a rejected promise to reject this promise\n return (response.headers.get('content-type').includes('application/json')\n ? response.json()\n : response.text())\n .then((error) => {\n return Promise.reject(error);\n });\n }\n // Handle fetch results\n const respToken = response.headers.get('x-jwt-token');\n // In some strange cases, the fetch library will return an x-jwt-token without sending\n // one to the server. This has even been debugged on the server to verify that no token\n // was introduced with the request, but the response contains a token. This is an Invalid\n // case where we do not send an x-jwt-token and get one in return for any GET request.\n let tokenIntroduced = false;\n if ((method === 'GET') &&\n !requestToken &&\n respToken &&\n !opts.external &&\n !url.includes('token=') &&\n !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n if (response.status >= 200 &&\n response.status < 300 &&\n respToken &&\n respToken !== '' &&\n !tokenIntroduced) {\n Formio.setToken(respToken, Object.assign(Object.assign({}, opts), { fromCurrent: (opts.fromCurrent || !!requestToken) }));\n }\n // 204 is no content. Don't try to .json() it.\n if (response.status === 204) {\n return {};\n }\n const getResult = response.headers.get('content-type').includes('application/json')\n ? response.json()\n : response.text();\n return getResult.then((result) => {\n // Add some content-range metadata to the result here\n let range = response.headers.get('content-range');\n if (range && (0, lodash_1.isObject)(result)) {\n range = range.split('/');\n if (range[0] !== '*') {\n const skipLimit = range[0].split('-');\n result.skip = Number(skipLimit[0]);\n result.limit = skipLimit[1] - skipLimit[0] + 1;\n }\n result.serverCount = range[1] === '*' ? range[1] : Number(range[1]);\n }\n if (!opts.getHeaders) {\n return result;\n }\n const headers = {};\n response.headers.forEach((item, key) => {\n headers[key] = item;\n });\n // Return the result with the headers.\n return {\n result,\n headers,\n };\n });\n })\n .then((result) => {\n if (opts.getHeaders) {\n return result;\n }\n // Cache the response.\n if (method === 'GET') {\n Formio.cache[cacheKey] = result;\n }\n return Formio.cloneResponse(result);\n })\n .catch((err) => {\n if (err === 'Bad Token' && opts.noToken !== false) {\n Formio.setToken(null, opts);\n Formio.events.emit('formio.badToken', err);\n }\n if (err.message) {\n err = new Error(`Could not connect to API server (${err.message}): ${url}`);\n err.networkError = true;\n }\n if (method === 'GET') {\n delete Formio.cache[cacheKey];\n }\n return Promise.reject(err);\n });\n return result;\n }\n // Needed to maintain reverse compatability...\n static get token() {\n return Formio.tokens.formioToken || '';\n }\n // Needed to maintain reverse compatability...\n static set token(token) {\n Formio.tokens.formioToken = token || '';\n }\n static useSessionToken(options) {\n if (typeof localStorage === 'undefined') {\n return;\n }\n let namespace = options;\n if (typeof options === 'object') {\n options = options.namespace;\n }\n const tokenName = `${namespace || Formio.namespace || 'formio'}Token`;\n const token = localStorage.getItem(tokenName);\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n const userName = `${namespace || Formio.namespace || 'formio'}User`;\n const user = localStorage.getItem(userName);\n if (user) {\n localStorage.removeItem(userName);\n sessionStorage.setItem(userName, user);\n }\n localStorage.setItem('useSessionToken', 'true');\n }\n /**\n * Sets the JWT in storage to be used within an application.\n *\n * @param {string} token - The JWT token to set.\n * @param {object} options - Options as follows\n * @param {string} options.namespace - The namespace to save the token within. i.e. \"formio\"\n * @param {Formio} options.formio - The Formio instance.\n * @return {Promise<object>|void}\n */\n static setToken(token = '', opts = {}) {\n token = token || '';\n opts = (typeof opts === 'string') ? { namespace: opts } : opts || {};\n const tokenName = `${opts.namespace || Formio.namespace || 'formio'}Token`;\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n const storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n if (!token) {\n if (!opts.fromUser) {\n opts.fromToken = true;\n Formio.setUser(null, opts);\n }\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.removeItem(tokenName);\n }\n catch (err) {\n browser_cookies_1.default.erase(tokenName, { path: '/' });\n }\n Formio.tokens[tokenName] = token;\n return Promise.resolve(null);\n }\n if (Formio.tokens[tokenName] !== token) {\n Formio.tokens[tokenName] = token;\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.setItem(tokenName, token);\n }\n catch (err) {\n browser_cookies_1.default.set(tokenName, token, { path: '/' });\n }\n }\n // Return or updates the current user\n return Formio.currentUser(opts.formio, opts);\n }\n /**\n * Returns the token set within the application for the user.\n *\n * @param {object} options - The options as follows.\n * @param {string} options.namespace - The namespace of the token you wish to fetch.\n * @param {boolean} options.decode - If you would like the token returned as decoded JSON.\n * @return {*}\n */\n static getToken(options) {\n options = (typeof options === 'string') ? { namespace: options } : options || {};\n const tokenName = `${options.namespace || Formio.namespace || 'formio'}Token`;\n const decodedTokenName = options.decode ? `${tokenName}Decoded` : tokenName;\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n if (Formio.tokens[decodedTokenName]) {\n return Formio.tokens[decodedTokenName];\n }\n try {\n const token = localStorage.getItem('useSessionToken')\n ? sessionStorage.getItem(tokenName)\n : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, jwtDecode_1.jwtDecode)(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n return Formio.tokens[tokenName];\n }\n catch (e) {\n Formio.tokens[tokenName] = browser_cookies_1.default.get(tokenName);\n return '';\n }\n }\n /**\n * Sets the current user within the application cache.\n *\n * @param {object} user - JSON object of the user you wish to set.\n * @param {object} options - Options as follows\n * @param {string} options.namespace - The namespace of the tokens\n */\n static setUser(user, opts = {}) {\n const userName = `${opts.namespace || Formio.namespace || 'formio'}User`;\n const storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n }\n // Emit an event on the cleared user.\n Formio.events.emit('formio.user', null);\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n return storage.removeItem(userName);\n }\n catch (err) {\n return browser_cookies_1.default.erase(userName, { path: '/' });\n }\n }\n // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n try {\n storage.setItem(userName, JSON.stringify(user));\n }\n catch (err) {\n browser_cookies_1.default.set(userName, JSON.stringify(user), { path: '/' });\n }\n // Emit an event on the authenticated user.\n Formio.events.emit('formio.user', user);\n }\n /**\n * Returns the user JSON.\n *\n * @param {object} options - Options as follows\n * @param {string} namespace - The namespace of the tokens stored within this application.\n * @return {object} - The user object.\n */\n static getUser(options) {\n options = options || {};\n const userName = `${options.namespace || Formio.namespace || 'formio'}User`;\n try {\n return JSON.parse((localStorage.getItem('useSessionToken')\n ? sessionStorage\n : localStorage).getItem(userName) || '');\n }\n catch (e) {\n return JSON.parse(browser_cookies_1.default.get(userName));\n }\n }\n /**\n * Sets the BaseURL for the application.\n *\n * @description Every application developed using the JavaScript SDK must set both the {@link Formio.setBaseUrl} and\n * {@link Formio.setProjectUrl} methods. These two functions ensure that every URL passed into the constructor of this\n * class can determine the \"project\" context for which the application is running.\n *\n * Any Open Source server applications will set both the {@link Formio.setBaseUrl} and {@link Formio.setProjectUrl}\n * values will be the same value.\n *\n * ```ts\n * Formio.setBaseUrl('https://yourwebsite.com/forms');\n * Formio.setProjectUrl('https://yourwebsite.com/forms/project');\n *\n * // Now the Formio constructor will know what is the \"project\" and what is the form alias name. Without setBaseUrl\n * // and setProjectUrl, this would throw an error.\n *\n * const formio = new Formio('https://yourwebsite.com/forms/project/user');\n * formio.loadForm().then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * @param {string} url - The URL of the Base API url.\n */\n static setBaseUrl(url) {\n Formio.baseUrl = url;\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n /**\n * Returns the current base url described at {@link Formio.setBaseUrl}\n *\n * @return {string} - The base url of the application.\n */\n static getBaseUrl() {\n return Formio.baseUrl;\n }\n static setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n static getApiUrl() {\n return Formio.getBaseUrl();\n }\n static setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n /**\n * Sets the Project Url for the application. This is an important method that needs to be set for all applications. It\n * is documented @ {@link Formio.setBaseUrl}.\n *\n * @param {string} url - The project api url.\n */\n static setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n /**\n * The Auth URL can be set to customize the authentication requests made from an application. By default, this is\n * just the same value as {@link Formio.projectUrl}\n *\n * @param {string} url - The authentication url\n */\n static setAuthUrl(url) {\n Formio.authUrl = url;\n }\n static getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n /**\n * Returns the Project url described at {@link Formio.setProjectUrl}\n *\n * @return {string|string} - The Project Url.\n */\n static getProjectUrl() {\n return Formio.projectUrl;\n }\n /**\n * Clears the runtime internal API cache.\n *\n * @description By default, the Formio class will cache all API requests in memory so that any subsequent requests\n * using GET method will return the cached results as long as the API URl is the same as what was cached previously.\n * This cache can be cleared using this method as follows.\n *\n * ```ts\n * Formio.clearCache();\n * ```\n *\n * Or, if you just wish to clear a single request, then the {@link Formio.request#options.ignoreCache} option can be\n * provided when making an API request as follows.\n *\n * ```ts\n * Formio.loadForm({}, {\n * ignoreCache: true\n * }).then((form) => {\n * console.log(form);\n * });\n * ```\n *\n * Both of the following will ensure that a new request is made to the API server and that the results will not be\n * from the cached result.\n */\n static clearCache() {\n Formio.cache = {};\n }\n /**\n * Return the access information about a Project, such as the Role ID's for that project, and if the server is\n * configured to do so, the Form and Resource access configurations that the authenticated user has access to.\n *\n * @description This is useful for an application to determine the UI for a specific user to identify which forms they have\n * access to submit or read.\n *\n * @param {Formio} formio - The Formio instance.\n * @return {Promise<Response>}\n */\n static accessInfo(formio) {\n const projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', `${projectUrl}/access`);\n }\n /**\n * Returns an array of roles for the project, which includes the ID's and names of those roles.\n *\n * @param {Formio} formio - The Formio instance.\n * @return {Promise<Response>}\n */\n static projectRoles(formio) {\n const projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', `${projectUrl}/role`);\n }\n /**\n * Return the currentUser object. This will fetch the user from the server and respond with the Submission JSON\n * of that user object.\n *\n * @param {Formio} formio - The Formio instance\n * @param {object} options - The options passed to {@link Formio.getUser}\n * @return {Promise<R>|*}\n */\n static currentUser(formio, options = {}) {\n let authUrl = Formio.authUrl;\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : (Formio.projectUrl || Formio.baseUrl);\n }\n authUrl += '/current';\n if (!options.ignoreCache || options.fromCurrent) {\n const user = Formio.getUser(options);\n if (user) {\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', Promise.resolve(user), {\n url: authUrl,\n method: 'GET',\n options\n });\n }\n }\n const token = Formio.getToken(options);\n if ((!options || !options.external) && !token) {\n return Plugins_1.default.pluginAlter('wrapStaticRequestPromise', Promise.resolve(null), {\n url: authUrl,\n method: 'GET',\n options\n });\n }\n options.fromCurrent = true;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options)\n .then((response) => {\n Formio.setUser(response, options);\n return response;\n });\n }\n /**\n * Performs a logout of the Form.io application. This will reset all cache, as well as make a request to the logout\n * endpoint of the Form.io api platform.\n *\n * @param {Formio} formio - A Formio instance.\n * @param {object} options - Options passed to both {@link Formio.setToken} as well as {@link Formio.setUser}\n * @return {Promise<Response>}\n */\n static logout(formio, options = {}) {\n options.formio = formio;\n const projectUrl = Formio.authUrl ? Formio.authUrl : (formio ? formio.projectUrl : Formio.baseUrl);\n const logout = () => {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n localStorage.removeItem('useSessionToken');\n };\n return Formio.makeRequest(formio, 'logout', `${projectUrl}/logout`)\n .then(function (result) {\n logout();\n if (result.shouldRedirect && result.url) {\n window.location.href = result.url;\n }\n return result;\n })\n .catch(function (err) {\n logout();\n throw err;\n });\n }\n /**\n * Returns the query passed to a page in JSON object format.\n *\n * @description For example, lets say you visit your application using\n * the url as follows.\n *\n * ```\n * https://yourapplication.com/?token=23423423423&username=Joe\n * ```\n *\n * The following code will provide your application with the following.\n *\n * ```ts\n * const query Formio.pageQuery();\n * console.log(query.token); // Will print 23423423423\n * console.log(query.username); // Will print Joe\n * ```\n *\n * @return {{}} - A JSON object representation of the query that was passed to the URL of an application.\n */\n static pageQuery() {\n const pageQuery = {};\n pageQuery.paths = [];\n const hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n let parts = [];\n location.search.substr(1).split('&').forEach(function (item) {\n parts = item.split('=');\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n });\n hashes.forEach(function (item) {\n parts = item.split('=');\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n /**\n * Much like {@link Formio.currentUser}, but instead automatically injects the Bearer tokens into the headers to\n * perform a Token swap of the OAuth token which will then return the JWT token for that user.\n *\n * @param {Formio} formio - The Formio instance\n * @param {string} token - An OAuth Bearer token to use for a token swap between the OAuth provider and Form.io\n * @return {Promise<R>|*}\n */\n static oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: `Bearer ${token}`\n }\n });\n }\n static oauthLogoutURI(uri, options) {\n options = (typeof options === 'string') ? { namespace: options } : options || {};\n const logoutURIName = `${options.namespace || Formio.namespace || 'formio'}LogoutAuthUrl`;\n Formio.tokens[logoutURIName];\n localStorage.setItem(logoutURIName, uri);\n return Formio.tokens[logoutURIName];\n }\n /**\n * Perform a SAML initialization.\n *\n * @description Typically, you would use the {@link Formio.ssoInit} method to perform this function\n * since this method is an alias for the following.\n *\n * ```ts\n * Formio.samlInit();\n * Formio.ssoInit('saml'); // This is the exact same thing as calling Formio.samlInit\n * ```\n *\n * This method will return false if the process is just starting. The code below is a typical block of code that is\n * used to automatically trigger the SAML authentication process within your application using a Button component.\n *\n * ```ts\n * if (Formio.pageQuery().saml) {\n * const sso = Formio.samlInit();\n * if (sso) {\n * sso.then((user) => {\n * // The SSO user is now loaded!\n * console.log(user);\n * });\n * }\n * }\n * ```\n *\n * You can then place the following code withiin the \"Custom\" action of a Button component on your form.\n *\n * ```ts\n * Formio.samlInit();\n * ```\n *\n * Now when you click on this button, it will start the handshake process with SAML, and once it returns, will pass\n * a \"saml\" query parameter back to your application which will execute the code to load the current user from SAML.\n *\n * @param {object} options - Options to pass to the SAML initialization process.\n * @param {string} options.relay - The URL that will be used as the authentication \"relay\" that occurs during a SAML handshake process.\n * @return {boolean|Promise<Object>|void}\n */\n static samlInit(options = {}) {\n const query = Formio.pageQuery();\n if (query.saml) {\n Formio.setUser(null);\n const retVal = Formio.setToken(query.saml);\n let uri = window.location.toString();\n uri = uri.substring(0, uri.indexOf('?'));\n if (window.location.hash) {\n uri += window.location.hash;\n }\n window.history.replaceState({}, document.title, uri);\n return retVal;\n }\n // Set the relay if not provided.\n if (!options.relay) {\n options.relay = window.location.href;\n }\n // go to the saml sso endpoint for this project.\n const authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = `${authUrl}/saml/sso?relay=${encodeURI(options.relay)}`;\n return false;\n }\n /**\n * Perform an Okta Authentication process using the {@link https://developer.okta.com/code/javascript/okta_auth_sdk|Okta SDK}.\n *\n * @description This method does require that you first include the Okta JavaScript SDK within your application as follows.\n *\n * First you need to include the Okta Authentication script.\n *\n * ```html\n * <script src=\"https://ok1static.oktacdn.com/assets/js/sdk/okta-auth-js/2.0.1/okta-auth-js.min.js\" type=\"text/javascript\"></script>\n * ```\n *\n * Then you can call this method as follows.\n *\n * ```ts\n * Formio.oktaInit();\n * ```\n *\n * @param {object} options - Options that are passed directly to the {@link https://github.com/okta/okta-auth-js#configuration-reference|Okta SDK constructor}\n * @param {constructor} options.OktaAuth - If the OktaAuth constructor is not provided global to the application, it can be provided to this method using this property.\n * @param {Formio} options.formio - The Formio instance.\n * @param {Array<string>} options.scopes - Scopes that are passed to the {@link https://github.com/okta/okta-auth-js#tokengetwithredirectoptions|getWithRedirect} method from the Okta SDK.\n * @return {Promise<Object>}\n */\n static oktaInit(options = {}) {\n if (typeof OktaAuth !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n if (typeof options.OktaAuth === undefined) {\n const errorMessage = 'Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.';\n console.warn(errorMessage);\n return Promise.reject(errorMessage);\n }\n return new Promise((resolve, reject) => {\n const Okta = options.OktaAuth;\n delete options.OktaAuth;\n const authClient = new Okta(options);\n authClient.tokenManager.get('accessToken')\n .then((accessToken) => {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n }\n else if (location.hash) {\n authClient.token.parseFromUrl()\n .then((token) => {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n })\n .catch((err) => {\n console.warn(err);\n reject(err);\n });\n }\n else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n })\n .catch((error) => {\n reject(error);\n });\n });\n }\n /**\n * A common static method to trigger any SSO processes. This method is really just an alias for other static methods.\n *\n * @param {('saml'|'okta')} type - The type of SSO to trigger. 'saml' is an alias for {@link Formio.samlInit}, and 'okta' is an alias for {@link Formio.oktaInit}.\n * @param {object} options - Options to pass to the specific sso methods\n * @return {*|Promise<Object>|boolean|void}\n */\n static ssoInit(type, options = {}) {\n switch (type) {\n case 'saml':\n return Formio.samlInit(options);\n case 'okta':\n return Formio.oktaInit(options);\n default:\n console.warn('Unknown SSO type');\n return Promise.reject('Unknown SSO type');\n }\n }\n /**\n * Lazy load a remote library dependency.\n *\n * @description This is useful for components that wish to lazy load a required library\n * by adding that library to the <scripts> section of the HTML webpage, and then provide a promise that will resolve\n * when the library becomes available for use.\n *\n * @example Load Google Maps API.\n * ```ts\n * Formio.requireLibrary('googleMaps', 'google.maps.Map', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap', true).then(() => {\n * // Once the promise resolves, the following can now be used within your application.\n * const map = new google.maps.Map(document.getElementById(\"map\"), {...});\n * });\n * ```\n *\n * @param {string} name - The internal name to give to the library you are loading. This is useful for caching the library for later use.\n * @param {string} property - The name of the global property that will be added to the global namespace once the library has been loaded. This is used to check to see if the property exists before resolving the promise that the library is ready for use.\n * @param {string} src - The URL of the library to lazy load.\n * @param {boolean} polling - Determines if polling should be used to determine if they library is ready to use. If set to false, then it will rely on a global callback called ${name}Callback where \"name\" is the first property passed to this method. When this is called, that will indicate when the library is ready. In most cases, you will want to pass true to this parameter to initiate a polling method to check for the library availability in the global context.\n * @return {Promise<object>} - A promise that will resolve when the plugin is ready to be used.\n */\n static requireLibrary(name, property, src, polling = false, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new Promise((resolve, reject) => {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n const callbackName = `${name}Callback`;\n if (!polling && !window[callbackName]) {\n window[callbackName] = () => Formio.libraries[name].resolve();\n }\n // See if the plugin already exists.\n const plugin = (0, lodash_1.get)(window, property);\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n }\n else {\n src = Array.isArray(src) ? src : [src];\n src.forEach((lib) => {\n let attrs = {};\n let elementType = '';\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib,\n };\n }\n switch (lib.type) {\n case 'script':\n elementType = 'script';\n attrs = {\n src: lib.src,\n type: 'text/javascript',\n defer: true,\n async: true,\n referrerpolicy: 'origin',\n };\n break;\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet',\n };\n break;\n }\n // Add the script to the top of the page.\n const element = document.createElement(elementType);\n if (element.setAttribute) {\n for (const attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n if (onload) {\n element.addEventListener('load', () => {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n const { head } = document;\n if (head) {\n head.appendChild(element);\n }\n });\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n const interval = setInterval(() => {\n const plugin = (0, lodash_1.get)(window, property);\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n const lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n /**\n * Determines if a lazy loaded library is ready to be used.\n *\n * @description Example: Let's assume that the example provided at {@link Formio.requireLibrary} was used elsewhere in your application.\n * You could now use the following within a separate place that will also resolve once the library is ready to be used.\n *\n * ```js\n * Formio.libraryReady('googleMaps').then(() => {\n * // Once the promise resolves, the following can now be used within your application.\n * const map = new google.maps.Map(document.getElementById(\"map\"), {...});\n * });\n * ```\n *\n * @param {string} name - The name of the library to check.\n * @return {Promise<object>} - A promise that will resolve when the library is ready to be used.\n */\n static libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) &&\n Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n return Promise.reject(`${name} library was not required.`);\n }\n /**\n * Clones the response from the API so that it cannot be mutated.\n *\n * @param response\n */\n static cloneResponse(response) {\n const copy = (0, fastCloneDeep_1.fastCloneDeep)(response);\n if (Array.isArray(response)) {\n copy.skip = response.skip;\n copy.limit = response.limit;\n copy.serverCount = response.serverCount;\n }\n return copy;\n }\n /**\n * Sets the project path type.\n *\n * @param type\n */\n static setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n /**\n * Gets the project path type.\n */\n static getPathType() {\n return Formio.pathType;\n }\n}\nexports.Formio = Formio;\n/**\n * The base API url of the Form.io Platform. Example: https://api.form.io\n */\nFormio.baseUrl = 'https://api.form.io';\n/**\n * The project API url of the Form.io Project. Example: https://examples.form.io\n */\nFormio.projectUrl = '';\n/**\n * The project url to use for Authentication.\n */\nFormio.authUrl = '';\n/**\n * Set to true if the project url has been established with ```Formio.setProjectUrl()```\n */\nFormio.projectUrlSet = false;\n/**\n * The Form.io API Cache. This ensures that requests to the same API endpoint are cached.\n */\nFormio.cache = {};\n/**\n * The namespace used to save the Form.io Token's and variables within an application.\n */\nFormio.namespace = '';\n/**\n * Handles events fired within this SDK library.\n */\nFormio.events = new eventemitter3_1.default();\n/**\n * Stores all of the libraries lazy loaded with ```Formio.requireLibrary``` method.\n */\nFormio.libraries = {};\n/**\n * A direct interface to the Form.io fetch polyfill.\n */\nFormio.fetch = fetch;\n/**\n * A direct interface to the Form.io fetch Headers polyfill.\n */\nFormio.Headers = Headers;\n/**\n * All of the auth tokens for this session.\n */\nFormio.tokens = {};\n/**\n * The version of this library.\n */\nFormio.version = '---VERSION---';\n/**\n * The global options for the Formio library.\n */\nFormio.options = {};\n// Add Plugin methods.\nFormio.plugins = Plugins_1.default.plugins;\nFormio.deregisterPlugin = Plugins_1.default.deregisterPlugin;\nFormio.registerPlugin = Plugins_1.default.registerPlugin;\nFormio.getPlugin = Plugins_1.default.getPlugin;\nFormio.pluginWait = Plugins_1.default.pluginWait;\nFormio.pluginGet = Plugins_1.default.pluginGet;\nFormio.pluginAlter = Plugins_1.default.pluginAlter;\n// Adds Formio to the Plugins Interface.\nPlugins_1.default.Formio = Formio;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/sdk/Formio.js?");
3220
3199
 
3221
3200
  /***/ }),
3222
3201
 
@@ -3480,7 +3459,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
3480
3459
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3481
3460
 
3482
3461
  "use strict";
3483
- eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.isSelectResourceWithObjectValue = exports.getItemTemplateKeys = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nObject.defineProperty(exports, \"Evaluator\", ({ enumerable: true, get: function () { return Evaluator_1.Evaluator; } }));\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.Evaluator.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\n/**\n * Sets the path to the component and parent schema.\n * @param {import('@formio/core').Component} component - The component to set the path for.\n */\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n * @param {Function|string|object} func - The function to evaluate.\n * @param {*} args - A map of arguments to pass to the function.\n * @param {string} ret - The name of the \"return\" variable in the script.\n * @param {boolean} interpolate - True if the script should be interpolated before being executed.\n * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.\n * @returns {*} - The result of the evaluation.\n */\nfunction evaluate(func, args, ret, interpolate, options = {}) {\n return Evaluator_1.Evaluator.evaluate(func, args, ret, interpolate, undefined, options);\n}\nexports.evaluate = evaluate;\n/**\n * Returns a random compoennt ID.\n * @returns {string} - A random component ID.\n */\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n * @param {CSSStyleDeclaration} style - The style element to get the property value from.\n * @param {string} prop - The property to get the value for.\n * @returns {number} - The value of the property.\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n * @param {HTMLElement} element - A DOM element to get the bounding rectangle for.\n * @returns {{x: number, y: number, width: number, height: number}} - The bounding rectangle.\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Determines the boolean value of a setting.\n * @param {string|boolean} value - A string or boolean value to convert to boolean.\n * @returns {boolean} - The boolean value of the setting.\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param {string} text - The text to check if it is a mongoID.\n * @returns {boolean} - TRUE if the text is a mongoID; FALSE otherwise.\n */\nfunction isMongoId(text) {\n return !!text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the calculated value.\n * @param {import('@formio/core').Submission} submission - A submission object.\n * @param {*} rowData - The contextual row data for the component.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {import('@formio/core').SimpleConditional} condition - The condition to check.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\n/**\n * Returns a components normalized value.\n * @param {string} compPath - The full path to the component.\n * @param {*} data - The data object to get the value from.\n * @param {*} row - The contextual row data for the component.\n * @returns {*} - The normalized value of the component.\n */\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {string} custom - The custom conditional string to evaluate.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {string} variable - The variable name for the result of the custom conditional.\n * @param {*} onError - A custom return if there is an error or the value is null from the evaluation.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {*} - The result of the evaulation.\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\n/**\n * Check a component for JSON conditionals.\n * @param {import('@formio/core').Component} component - The component\n * @param {import('@formio/core').JSONConditional} json - The json conditional to check.\n * @param {*} row - The contextual row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The Form JSON of the form.\n * @param {*} onError - Custom return value if there is an error.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\n/**\n * Returns the contextual row data for a component.\n * @param {import('@formio/core').Component} component - The component to get the row data for.\n * @param {*} row - The row data for the component.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @param {*} conditional - The component conditional.\n * @returns {*} - The contextual row data for the component.\n */\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the condition.\n * @param {*} row - The data within a row\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n * @param {import('@formio/core').Component} component - The component to test the trigger against.\n * @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The root data object.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {any} instance - The component that is performing the trigger.\n * @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\n/**\n * Sets a property on a component via an executed Logic action.\n * @param {import('@formio/core').Component} component - The component to set the property on.\n * @param {import('@formio/core').LogicAction} action - The action to perform on the component.\n * @param {string} result - The name of the variable in the evaulation to use as the result.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The full submission data.\n * @param {any} instance - The component instance.\n * @returns {import('@formio/core').Component} - The modified component.\n */\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.Evaluator.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param {string} str - The string to unescape.\n * @returns {string} - The unescaped string.\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param {string} str - The string to convert to an HTML element.\n * @param {string} selector - The selector to use to get the element once it is created.\n * @returns {HTMLElement} - The HTML element that was created.\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param {string} name - The original name of the file.\n * @param {string} template - The template to use for the unique name.\n * @param {object} evalContext - The context to use for the evaluation.\n * @returns {string} - A unique filename.\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.Evaluator.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\n/**\n * Returns a GUID\n * @returns {string} - A GUID.\n */\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n * @param {string|Date} date - The date to translate.\n * @returns {(null|Date)} - The translated date.\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.Evaluator.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\n/**\n * Returns true if the date is a valid date. False otherwise.\n * @param {Date|string} date - The date to check for validity.\n * @returns {boolean} - TRUE if the date is valid; FALSE otherwise.\n */\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n * @returns {string} - The current timezone.\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n * @param {Date} date - The date to offset.\n * @param {string} timezone - The timezone to offset the date to.\n * @returns {Date} - The offset date.\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n * @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n * @param {string} timezone - The timezone to check if we should load the zones.\n * @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n * @param {string} url - The URL to load the timezone data from.\n * @param {string} timezone - The timezone to load.\n * @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n * @param {string|Date} value - The value to convert into a moment date.\n * @param {string} format - The format to convert the date to.\n * @param {string} timezone - The timezone to convert the date to.\n * @returns {Date} - The moment date object.\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {string|Date} value - The value to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @param {string} flatPickrInputFormat - The format to use for flatpickr input.\n * @returns {string} - The formatted date.\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {Function} formatFn - The format function to use.\n * @param {Date|string} date - The date to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @returns {string} - The formatted date.\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\n/**\n * Returns the local date format information.\n * @param {Intl.LocalesArgument} locale - The locale to get the date format for.\n * @returns {object} - The local date format information.\n */\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\n/**\n * Convert the format from the angular-datepicker module to mask format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\n/**\n * Unmasks a value using the provided mask and placeholder characters.\n * @param {string} value - The value to unmask.\n * @param {string} mask - The mask to use for unmasking.\n * @param {string} placeholderChar - The placeholder character to use for unmasking.\n * @returns {string} - The unmasked value.\n */\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\n/**\n * Returns true if the value matches the input mask format.\n * @param {string} value - The value to check.\n * @param {string} inputMask - The input mask to check against.\n * @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.\n */\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\n/**\n * Returns the number separators (i.e. 1,000) for the provided language.\n * @param {string} lang - The language code to get the number separators for.\n * @returns {{delimiter: string, decimalSeparator: string}} - The number separators.\n */\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\n/**\n * Returns the number for the maximum amount of decimal places for a number.\n * @param {import('@formio/core').Component} component - The component to check for decimal limits.\n * @param {number} defaultLimit - The default limit to use if none is provided in the component.\n * @returns {number} - The number of decimal places allowed.\n */\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\n/**\n * Returns the currency affixes for a specific language.\n * @param {object} arg0 - The arguments object.\n * @param {string} arg0.currency - The currency code to get the affixes for.\n * @param {number} arg0.decimalLimit - The number of decimal places to use.\n * @param {string} arg0.decimalSeparator - The decimal separator to use.\n * @param {string} arg0.lang - The language code to use.\n * @returns {{prefix: string, suffix: string}} - The currency affixes.\n */\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n * @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.\n * @param {import('@formio/core').Component} component - The component to fetch the field data for.\n * @returns {*} - The field data.\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n * @param {Function} fn - Function to delay\n * @param {number} delay - Delay time\n * @param {...any} args - Arguments to pass to the function\n * @returns {*} - Function to cancel the delay\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n /**\n *\n */\n function cancel() {\n clearTimeout(timer);\n }\n /**\n * Execute the function early.\n * @returns {*} - The result of the function.\n */\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n * @param {string} key\n * Modify the component key to be unique.\n * @returns {string}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n * @param {Record<string, string>} map - The map to check for uniqueness.\n * @param {string} base - The base path of the key.\n * @returns {string} - The unique key.\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n * @param {object} options - The options to check for bootstrap version.\n * @param {string} options.bootstrap - The bootstrap version to use.\n * @returns {number} - The bootstrap version.\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {Function|any} e - The argument to check if a function and call if so.\n * @returns {any} - Either the result of the function call (e) or e if it is not a function.\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection - The collection to map through unfold.;\n * @returns {T} - The first non-nil value.\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/**\n * Create enclosed state. Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @returns {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n /**\n * Returns the state of the switch.\n * @returns {*} - The current state.\n */\n function get() {\n return state;\n }\n /**\n * Toggles the state of the switch.\n */\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\n/**\n * Create a function that will call the provided function only the provided limit.\n * @param {Function} callback - The callback to call.\n * @param {object} options - The options to use.\n * @param {number} options.limit - The limit to call the callback.\n * @param {number} options.delay - The delay to wait before resetting the call count.\n * @returns {Function} - The function that will call the callback only the provided limit.\n */\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\n/**\n * Returns the components that are provided within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @param {boolean} excludeNested - Exclude nested components.\n * @param {Array<string>} excludedTypes - The types of components to exclude.\n * @returns {Array} - The components within the evaluation context.\n */\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\n/**\n * Returns the button components that are within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @returns {Array} - The button components within the evaluation context.\n */\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n * @param {HTMLElement} elem - The element to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.Evaluator.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n * @param {HTMLElement} tag - The tag to translate.\n * @param {Function} translate - The translation function.\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n * @param {string} template - The template to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n * @param {string} string - The string to sanitize.\n * @param {any} options - The options to use for sanitization.\n * @returns {string} - The sanitized html string.\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Use profiles\n if (options.sanitizeConfig && options.sanitizeConfig.useProfiles) {\n Object.keys(options.sanitizeConfig.useProfiles).forEach(key => {\n sanitizeOptions.USE_PROFILES[key] = options.sanitizeConfig.useProfiles[key];\n });\n }\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n const allowedUriRegex = options.sanitizeConfig.allowedUriRegex;\n sanitizeOptions.ALLOWED_URI_REGEXP = lodash_1.default.isString(allowedUriRegex) ? new RegExp(allowedUriRegex) : allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n * @param {any} obj - The object to perform a fast clone deep against.\n * @returns {any} - The cloned object.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Returns if the component is an input component.\n * @param {import('@formio/core').Component} componentJson - The JSON of a component.\n * @returns {bool} - TRUE if the component is an input component; FALSE otherwise.\n */\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\n/**\n * Takes a component path, and returns a component path array.\n * @param {string} pathStr - The path string to convert to an array.\n * @returns {Arryay<number>} - The array of paths.\n */\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\n/**\n * Returns true if the component is a child of the parent.\n * @param {any} child - The child component to check.\n * @param {any} parent - The parent component to check.\n * @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.\n */\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\n/**\n * Takes an array of component path indexes, and returns a string version of that array.\n * @param {Array<number>} path - The path array to convert to a string.\n * @returns {string} - The string version of the path.\n */\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\n/**\n * Takes a number and rounds it to the provided precision amount.\n * @param {number} number - The number to round.\n * @param {number} precision - The precision to round the number to.\n * @returns {string} - The rounded number.\n */\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number.toString();\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n * @returns {(number|null)} - The IE browser version or null if not IE\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n * @returns {object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\n/**\n * Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.\n * @param {string} path - The path to remove the indicies from.\n * @returns {string} - The path without the indicies.\n */\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property\n * @param {string} path - Path to the component\n * @returns {string} - Path to the component\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {Component} componentInstance - The component to check for the parent.\n * @returns {Component|undefined} - The parent data component.\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param {any} value - The value to check\n * @returns {boolean} - TRUE if the value is a promise; FALSE otherwise\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param {Component} componentInstance - The component to check for the scoping parent.\n * @param {boolean} firstPass - Whether it is the first pass of the function\n * @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\n/**\n * Returns all the focusable elements within the provided dom element.\n * @param {HTMLElement} element - The element to get the focusable elements from.\n * @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.\n */\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\n/**\n * Returns the saved types for the component\n * @param {import('@formio/core').Component} fullSchema - The component schema\n * @returns {Array<string>|null} - The saved types for the component\n */\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {Component} component - The component to interpolate the errors for\n * @param {FieldError[]} errors - The errors to interpolate\n * @param {Function} interpolateFn - The interpolation function\n * @returns {[]} - The interpolated errors\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n/**\n * Returns the template keys inside the template code.\n * @param {string} template - The template to get the keys from.\n * @returns {Array<string>} - The keys inside the template.\n */\nfunction getItemTemplateKeys(template) {\n const templateKeys = [];\n if (!template) {\n return templateKeys;\n }\n const keys = template.match(/({{\\s*(.*?)\\s*}})/g);\n if (keys) {\n keys.forEach((key) => {\n const propKey = key.match(/{{\\s*item\\.(.*?)\\s*}}/);\n if (propKey && propKey.length > 1) {\n templateKeys.push(propKey[1]);\n }\n });\n }\n return templateKeys;\n}\nexports.getItemTemplateKeys = getItemTemplateKeys;\n/**\n * Returns if the component is a select resource with an object for its value.\n * @param {import('@formio/core').Component} comp - The component to check.\n * @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.\n */\nfunction isSelectResourceWithObjectValue(comp = {}) {\n const { reference, dataSrc, valueProperty } = comp;\n return reference || (dataSrc === 'resource' && (!valueProperty || valueProperty === 'data'));\n}\nexports.isSelectResourceWithObjectValue = isSelectResourceWithObjectValue;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
3462
+ eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getScriptPlugin = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.isSelectResourceWithObjectValue = exports.getItemTemplateKeys = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = exports.observeOverload = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nObject.defineProperty(exports, \"Evaluator\", ({ enumerable: true, get: function () { return Evaluator_1.Evaluator; } }));\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.Evaluator.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\n/**\n * Sets the path to the component and parent schema.\n * @param {import('@formio/core').Component} component - The component to set the path for.\n */\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n * @param {Function|string|object} func - The function to evaluate.\n * @param {*} args - A map of arguments to pass to the function.\n * @param {string} ret - The name of the \"return\" variable in the script.\n * @param {boolean} interpolate - True if the script should be interpolated before being executed.\n * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.\n * @returns {*} - The result of the evaluation.\n */\nfunction evaluate(func, args, ret, interpolate, options = {}) {\n return Evaluator_1.Evaluator.evaluate(func, args, ret, interpolate, undefined, options);\n}\nexports.evaluate = evaluate;\n/**\n * Returns a random compoennt ID.\n * @returns {string} - A random component ID.\n */\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n * @param {CSSStyleDeclaration} style - The style element to get the property value from.\n * @param {string} prop - The property to get the value for.\n * @returns {number} - The value of the property.\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n * @param {HTMLElement} element - A DOM element to get the bounding rectangle for.\n * @returns {{x: number, y: number, width: number, height: number}} - The bounding rectangle.\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Get non HTMLElement property in the window object\n * @param {string} property - The window property to fetch the script plugin from.\n * @returns {any | undefined} - The HTML Element property on the window object.\n */\nfunction getScriptPlugin(property) {\n const obj = window[property];\n if (typeof HTMLElement === 'object' ? obj instanceof HTMLElement : //DOM2\n obj && typeof obj === 'object' && true && obj.nodeType === 1 && typeof obj.nodeName === 'string') {\n return undefined;\n }\n return obj;\n}\nexports.getScriptPlugin = getScriptPlugin;\n/**\n * Determines the boolean value of a setting.\n * @param {string|boolean} value - A string or boolean value to convert to boolean.\n * @returns {boolean} - The boolean value of the setting.\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param {string} text - The text to check if it is a mongoID.\n * @returns {boolean} - TRUE if the text is a mongoID; FALSE otherwise.\n */\nfunction isMongoId(text) {\n return !!text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the calculated value.\n * @param {import('@formio/core').Submission} submission - A submission object.\n * @param {*} rowData - The contextual row data for the component.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {import('@formio/core').SimpleConditional} condition - The condition to check.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\n/**\n * Returns a components normalized value.\n * @param {string} compPath - The full path to the component.\n * @param {*} data - The data object to get the value from.\n * @param {*} row - The contextual row data for the component.\n * @returns {*} - The normalized value of the component.\n */\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {string} custom - The custom conditional string to evaluate.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {string} variable - The variable name for the result of the custom conditional.\n * @param {*} onError - A custom return if there is an error or the value is null from the evaluation.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {*} - The result of the evaulation.\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\n/**\n * Check a component for JSON conditionals.\n * @param {import('@formio/core').Component} component - The component\n * @param {import('@formio/core').JSONConditional} json - The json conditional to check.\n * @param {*} row - The contextual row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The Form JSON of the form.\n * @param {*} onError - Custom return value if there is an error.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\n/**\n * Returns the contextual row data for a component.\n * @param {import('@formio/core').Component} component - The component to get the row data for.\n * @param {*} row - The row data for the component.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @param {*} conditional - The component conditional.\n * @returns {*} - The contextual row data for the component.\n */\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the condition.\n * @param {*} row - The data within a row\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n * @param {import('@formio/core').Component} component - The component to test the trigger against.\n * @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The root data object.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {any} instance - The component that is performing the trigger.\n * @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\n/**\n * Sets a property on a component via an executed Logic action.\n * @param {import('@formio/core').Component} component - The component to set the property on.\n * @param {import('@formio/core').LogicAction} action - The action to perform on the component.\n * @param {string} result - The name of the variable in the evaulation to use as the result.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The full submission data.\n * @param {any} instance - The component instance.\n * @returns {import('@formio/core').Component} - The modified component.\n */\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.Evaluator.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param {string} str - The string to unescape.\n * @returns {string} - The unescaped string.\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param {string} str - The string to convert to an HTML element.\n * @param {string} selector - The selector to use to get the element once it is created.\n * @returns {HTMLElement} - The HTML element that was created.\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param {string} name - The original name of the file.\n * @param {string} template - The template to use for the unique name.\n * @param {object} evalContext - The context to use for the evaluation.\n * @returns {string} - A unique filename.\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.Evaluator.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\n/**\n * Returns a GUID\n * @returns {string} - A GUID.\n */\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n * @param {string|Date} date - The date to translate.\n * @returns {(null|Date)} - The translated date.\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.Evaluator.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\n/**\n * Returns true if the date is a valid date. False otherwise.\n * @param {Date|string} date - The date to check for validity.\n * @returns {boolean} - TRUE if the date is valid; FALSE otherwise.\n */\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n * @returns {string} - The current timezone.\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n * @param {Date} date - The date to offset.\n * @param {string} timezone - The timezone to offset the date to.\n * @returns {Date} - The offset date.\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n * @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n * @param {string} timezone - The timezone to check if we should load the zones.\n * @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n * @param {string} url - The URL to load the timezone data from.\n * @param {string} timezone - The timezone to load.\n * @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n * @param {string|Date} value - The value to convert into a moment date.\n * @param {string} format - The format to convert the date to.\n * @param {string} timezone - The timezone to convert the date to.\n * @returns {Date} - The moment date object.\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {string|Date} value - The value to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @param {string} flatPickrInputFormat - The format to use for flatpickr input.\n * @returns {string} - The formatted date.\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {Function} formatFn - The format function to use.\n * @param {Date|string} date - The date to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @returns {string} - The formatted date.\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\n/**\n * Returns the local date format information.\n * @param {Intl.LocalesArgument} locale - The locale to get the date format for.\n * @returns {object} - The local date format information.\n */\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\n/**\n * Convert the format from the angular-datepicker module to mask format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\n/**\n * Unmasks a value using the provided mask and placeholder characters.\n * @param {string} value - The value to unmask.\n * @param {string} mask - The mask to use for unmasking.\n * @param {string} placeholderChar - The placeholder character to use for unmasking.\n * @returns {string} - The unmasked value.\n */\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\n/**\n * Returns true if the value matches the input mask format.\n * @param {string} value - The value to check.\n * @param {string} inputMask - The input mask to check against.\n * @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.\n */\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\n/**\n * Returns the number separators (i.e. 1,000) for the provided language.\n * @param {string} lang - The language code to get the number separators for.\n * @returns {{delimiter: string, decimalSeparator: string}} - The number separators.\n */\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\n/**\n * Returns the number for the maximum amount of decimal places for a number.\n * @param {import('@formio/core').Component} component - The component to check for decimal limits.\n * @param {number} defaultLimit - The default limit to use if none is provided in the component.\n * @returns {number} - The number of decimal places allowed.\n */\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\n/**\n * Returns the currency affixes for a specific language.\n * @param {object} arg0 - The arguments object.\n * @param {string} arg0.currency - The currency code to get the affixes for.\n * @param {number} arg0.decimalLimit - The number of decimal places to use.\n * @param {string} arg0.decimalSeparator - The decimal separator to use.\n * @param {string} arg0.lang - The language code to use.\n * @returns {{prefix: string, suffix: string}} - The currency affixes.\n */\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n * @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.\n * @param {import('@formio/core').Component} component - The component to fetch the field data for.\n * @returns {*} - The field data.\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n * @param {Function} fn - Function to delay\n * @param {number} delay - Delay time\n * @param {...any} args - Arguments to pass to the function\n * @returns {*} - Function to cancel the delay\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n /**\n *\n */\n function cancel() {\n clearTimeout(timer);\n }\n /**\n * Execute the function early.\n * @returns {*} - The result of the function.\n */\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n * @param {string} key\n * Modify the component key to be unique.\n * @returns {string}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n * @param {Record<string, string>} map - The map to check for uniqueness.\n * @param {string} base - The base path of the key.\n * @returns {string} - The unique key.\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n * @param {object} options - The options to check for bootstrap version.\n * @param {string} options.bootstrap - The bootstrap version to use.\n * @returns {number} - The bootstrap version.\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {Function|any} e - The argument to check if a function and call if so.\n * @returns {any} - Either the result of the function call (e) or e if it is not a function.\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection - The collection to map through unfold.;\n * @returns {T} - The first non-nil value.\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/**\n * Create enclosed state. Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @returns {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n /**\n * Returns the state of the switch.\n * @returns {*} - The current state.\n */\n function get() {\n return state;\n }\n /**\n * Toggles the state of the switch.\n */\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\n/**\n * Create a function that will call the provided function only the provided limit.\n * @param {Function} callback - The callback to call.\n * @param {object} options - The options to use.\n * @param {number} options.limit - The limit to call the callback.\n * @param {number} options.delay - The delay to wait before resetting the call count.\n * @returns {Function} - The function that will call the callback only the provided limit.\n */\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\n/**\n * Returns the components that are provided within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @param {boolean} excludeNested - Exclude nested components.\n * @param {Array<string>} excludedTypes - The types of components to exclude.\n * @returns {Array} - The components within the evaluation context.\n */\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\n/**\n * Returns the button components that are within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @returns {Array} - The button components within the evaluation context.\n */\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n * @param {HTMLElement} elem - The element to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.Evaluator.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n * @param {HTMLElement} tag - The tag to translate.\n * @param {Function} translate - The translation function.\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n * @param {string} template - The template to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n * @param {string} string - The string to sanitize.\n * @param {any} options - The options to use for sanitization.\n * @returns {string} - The sanitized html string.\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Use profiles\n if (options.sanitizeConfig && options.sanitizeConfig.useProfiles) {\n Object.keys(options.sanitizeConfig.useProfiles).forEach(key => {\n sanitizeOptions.USE_PROFILES[key] = options.sanitizeConfig.useProfiles[key];\n });\n }\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n const allowedUriRegex = options.sanitizeConfig.allowedUriRegex;\n sanitizeOptions.ALLOWED_URI_REGEXP = lodash_1.default.isString(allowedUriRegex) ? new RegExp(allowedUriRegex) : allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n * @param {any} obj - The object to perform a fast clone deep against.\n * @returns {any} - The cloned object.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Returns if the component is an input component.\n * @param {import('@formio/core').Component} componentJson - The JSON of a component.\n * @returns {bool} - TRUE if the component is an input component; FALSE otherwise.\n */\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\n/**\n * Takes a component path, and returns a component path array.\n * @param {string} pathStr - The path string to convert to an array.\n * @returns {Arryay<number>} - The array of paths.\n */\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\n/**\n * Returns true if the component is a child of the parent.\n * @param {any} child - The child component to check.\n * @param {any} parent - The parent component to check.\n * @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.\n */\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\n/**\n * Takes an array of component path indexes, and returns a string version of that array.\n * @param {Array<number>} path - The path array to convert to a string.\n * @returns {string} - The string version of the path.\n */\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\n/**\n * Takes a number and rounds it to the provided precision amount.\n * @param {number} number - The number to round.\n * @param {number} precision - The precision to round the number to.\n * @returns {string} - The rounded number.\n */\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number.toString();\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n * @returns {(number|null)} - The IE browser version or null if not IE\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n * @returns {object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\n/**\n * Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.\n * @param {string} path - The path to remove the indicies from.\n * @returns {string} - The path without the indicies.\n */\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property\n * @param {string} path - Path to the component\n * @returns {string} - Path to the component\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {Component} componentInstance - The component to check for the parent.\n * @returns {Component|undefined} - The parent data component.\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param {any} value - The value to check\n * @returns {boolean} - TRUE if the value is a promise; FALSE otherwise\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param {Component} componentInstance - The component to check for the scoping parent.\n * @param {boolean} firstPass - Whether it is the first pass of the function\n * @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\n/**\n * Returns all the focusable elements within the provided dom element.\n * @param {HTMLElement} element - The element to get the focusable elements from.\n * @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.\n */\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\n/**\n * Returns the saved types for the component\n * @param {import('@formio/core').Component} fullSchema - The component schema\n * @returns {Array<string>|null} - The saved types for the component\n */\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {Component} component - The component to interpolate the errors for\n * @param {FieldError[]} errors - The errors to interpolate\n * @param {Function} interpolateFn - The interpolation function\n * @returns {[]} - The interpolated errors\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n/**\n * Returns the template keys inside the template code.\n * @param {string} template - The template to get the keys from.\n * @returns {Array<string>} - The keys inside the template.\n */\nfunction getItemTemplateKeys(template) {\n const templateKeys = [];\n if (!template) {\n return templateKeys;\n }\n const keys = template.match(/({{\\s*(.*?)\\s*}})/g);\n if (keys) {\n keys.forEach((key) => {\n const propKey = key.match(/{{\\s*item\\.(.*?)\\s*}}/);\n if (propKey && propKey.length > 1) {\n templateKeys.push(propKey[1]);\n }\n });\n }\n return templateKeys;\n}\nexports.getItemTemplateKeys = getItemTemplateKeys;\n/**\n * Returns if the component is a select resource with an object for its value.\n * @param {import('@formio/core').Component} comp - The component to check.\n * @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.\n */\nfunction isSelectResourceWithObjectValue(comp = {}) {\n const { reference, dataSrc, valueProperty } = comp;\n return reference || (dataSrc === 'resource' && (!valueProperty || valueProperty === 'data'));\n}\nexports.isSelectResourceWithObjectValue = isSelectResourceWithObjectValue;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
3484
3463
 
3485
3464
  /***/ }),
3486
3465